[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Broadcasting diagrams
From: |
Ben Abbott |
Subject: |
Re: Broadcasting diagrams |
Date: |
Sun, 01 Jan 2012 19:49:47 -0500 |
On Dec 31, 2011, at 1:27 PM, Ben Abbott wrote:
> On Dec 31, 2011, at 9:53 AM, Jordi GutiƩrrez Hermoso wrote:
>
>> 2011/12/30 Ben Abbott <address@hidden>:
>>>
>>> On Dec 30, 2011, at 6:53 PM, Jordi GutiƩrrez Hermoso wrote:
>>>
>>>> 2011/12/30 Ben Abbott <address@hidden>:
>>>>
>>>>> Why the hesitation to just add eps-files ?
>>>>
>>>> Weeellll, it really shouldn't be done, just like we don't check in
>>>> configure scripts into hg.
>>>>
>>>> But that's not the heart of my problem. I can't figure out how to make
>>>> texinfo include my images correctly. That's what I'm really asking
>>>> help for.
>>>
>>> Forgive me for pealing the layers of the onion, but ... the logo
>>> images are in mercurial and the logo is included in octave.texi.
>>
>> Ben, I don't understand what you're getting at.
>>
>> Do you know the right incantations to make TeXinfo include my images
>> correctly for all output formats, including whatever make(1) commands
>> are necessary? It's mostly the latter infrastructure I'm asking about.
>>
>> The question whether to add dia as a build-dep or not is separate. We
>> can ponder that after I manage to get the images working correctly by
>> whatever means possible.
>>
>> - Jordi g. H.
>
>
> Ok. My apologies for being dense. I was focused on the texinfo / latex / etc
> part and not the "make" part.
>
> I assume you'd like to add the dia and eps files (to avoid requiring dia as a
> dependency) to the sources and then convert to png and pdf using ghostscript ?
>
> Writing a m-file that does that for you (broadcastimages.m ?) and accepts the
> same inputs as the other m-files (like geometeryimages.m), looks like an
> acceptable hack. You could just as well include code for producing the eps
> files from the dia files if they are needed. We'd just need to be careful to
> (1) change the dia file, (2) make, (3) commit the changes to both the dia and
> eps files.
>
> Then (if I understand the process correctly), all that is needed is to add
> the necessary parts to Makefile.in. For ./doc/interpreter/Makefile.in, look
> in the vicinity of lines 1624-1666 & 2629-2848.
>
> Ben
Jordi,
I took a look at what was needed to convert from eps files and other formats. I
used some of the private functions intended to support printing to avoid
duplicating code. If the attached is placed in .../scripts/plot/ then it can be
used for conversion from eps to png or pdf (among other formats).
I don't think scripts/plot is the right place for this file unless we decide to
make it part of Octave. Thoughts ?
In any event, if the following lines are added to
.../doc/interpreter/Makefile.in, then .../doc/interpreter/bcast-ApTimesB.eps
will be converted to the pdf, png, and txt formats when the docs are built.
bcast-ApTimesB.pdf: bcast-ApTimesB.eps
$(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval
"convert_eps_image ('bcast-ApTimesB', 'pdf');"
bcast-ApTimesB.png: bcast-ApTimesB.eps
$(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval
"convert_eps_image ('bcast-ApTimesB', 'png');"
bcast-ApTimesB.txt: bcast-ApTimesB.eps
$(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval
"convert_eps_image ('bcast-ApTimesB', 'txt');"
octave.html/bcast-ApTimesB.png: bcast-ApTimesB.png
octave.html/index.html
cp $< $@
If I understand correctly, all that is left is to include the image file names
in the lists IMAGES_EPS, IMAGES_PDF, IMAGES_PNG, IMAGES_TXT, and HTMLDIR_IMAGES
of Makefile.in.
Ben
convert_eps_image.m
Description: Binary data
- Re: Broadcasting diagrams,
Ben Abbott <=