Re: [NTG-context] developing large numbers of MP files for inclusion in source

2005-12-24 Thread Taco Hoekwater

David Arnold wrote:
Do you have one metapost file with many figures in it? Is it possible  
to just compile for the figurein that file that you want? 


Usually I have all in one file. You can comment out figures
you do not need, using:

  if false:
  beginfig(1)
  ...
  endfig;
  ..
  fi

So I normally do that with the first ten when I am working on the
eleventh. Later, I just change the 'false' to 'true'.

Sometimes metaposts "input" command is handier, but I prefer not
to have too many files on disk.

Is there  a 
command that will compile then show the result?


I use ghostscript for preview (gv, actually) or xpdf if there is
embedded math/nontrivial text, by running mptopdf first.

Like I said before: my setup is not hightech at all.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] developing large numbers of MP files for inclusion in source

2005-12-24 Thread David Arnold

Mojca,

You pretty much describe the way I've always worked in the past.

I am currently working on a technique where all my graphics for  
section1 of chapter 3 are inside a file named sectionfigs.tex. I am  
using MPpage and friends to make these. The file currently contains  
about 14 graphics and files .1 through .14 are produced when I run  
the file with texexec.


Next, I have a file section1figs.xml that is working as per the  
directions in xfigures-s.pdf from Pragma. It produces a nice listing  
of all of the figures for section 1 and their new labels (names).


I am now in my main document section1.tex including these figures as  
per directions in xfigures-s.pdf.


I'd be happy to send what I've done when I've finished. Let me know.

On Dec 24, 2005, at 4:17 PM, Mojca Miklavec wrote:


Do you have one metapost file with many figures in it? Is it possible
to just compile for the figurein that file that   you want? Is there
a command that will compile then show the result?


(sorry for not writing to the list)

If you have an .mp file, it compiles "faster than you can switch from
command line back to the editor". No really, if you work with .mp, you
don't need to wait for hours as you do have to wait if you have
metafun graphics inside text.

You get figures filename.1, filename.2, ... out of it, so you only
need to have GhostView with "filename.5" (or your desired figure) open
and it also changes instantly. If you need to have a text inside it,
it's an exception since it won't work until you convert the graphic
into PDF (mptopdf), which takes slightly longer, but may still be
acceptable.

I alway create mp files first and then (eventually) copy the content
into the document if needed since it much faster.

If you need metafun macros inside .mp files, you can load them with
input mp-tool;
input mp-spec;
(I guess.)

Metapost files can't give you the flexibility to combine extremely
fancy stuff (typesetting text on paths created by metafun or vice
versa), but I guess you don't need that.

Ask on the list again if you can inctruct mptopdf to convert into PDF
one figure only.

Mojca


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] developing large numbers of MP files for inclusion in source

2005-12-24 Thread David Arnold
Do you have one metapost file with many figures in it? Is it possible  
to just compile for the figurein that file that   you want? Is there  
a command that will compile then show the result?


On Dec 24, 2005, at 1:17 AM, Taco Hoekwater wrote:


David Arnold wrote:
I am open to any suggestions on how to most efficiently develop  
and  include figures (in Metapost, of course) in our main document.


Well, if you do not depend on metafun -- context interaction, then
I would just create a metapost input file per chapter, and compile
it with mpost off-line (it they are complicated, even pre-run mptopdf
to save time during the inclusion phase).

Then include the image in the document just like I would a 'normal'
external figure or even table). I have a separate per-chapter  
directory

for that to avoid clutter. It is not most high-tech solution, but I
find it quite workable.

So, my tree structure usually looks like this:

   ./book.tex
   ./style.tex
   ./chapter1.tex % those are components
   ./chapter2.tex
   ...
   ./chapter1/figure.mp
   ./chapter1/figure.1
   ./chapter1/figure.2
   ./chapter1/whatever.png
   ./chapter1/table-1.tex

Cheers,

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] developing large numbers of MP files for inclusion in source

2005-12-24 Thread Henning Hraban Ramm

Am 2005-12-24 um 01:18 schrieb David Arnold:


1. It's really inefficient to compile the entire context source  
file just to see what will happen to one figure. So, it seems that  
we should probably have a library of graphs for later inclusion in  
the main document. One would want to be able to compile all at once  
or individually if one were just working on one file.


2. The code for many individual figures is quite long and tends to  
obscure the flow of thought when included in the source. Again, if  
they were coming from an external document, that would be better.




Perhaps the "figure database" approach is right for you - create a  
PDF with one figure per page and write a descripting XML, see also  
http://wiki.contextgarden.net/Image_Database



Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] developing large numbers of MP files for inclusion in source

2005-12-24 Thread Taco Hoekwater

David Arnold wrote:


I am open to any suggestions on how to most efficiently develop and  
include figures (in Metapost, of course) in our main document.


Well, if you do not depend on metafun -- context interaction, then
I would just create a metapost input file per chapter, and compile
it with mpost off-line (it they are complicated, even pre-run mptopdf
to save time during the inclusion phase).

Then include the image in the document just like I would a 'normal'
external figure or even table). I have a separate per-chapter directory
for that to avoid clutter. It is not most high-tech solution, but I
find it quite workable.

So, my tree structure usually looks like this:

   ./book.tex
   ./style.tex
   ./chapter1.tex % those are components
   ./chapter2.tex
   ...
   ./chapter1/figure.mp
   ./chapter1/figure.1
   ./chapter1/figure.2
   ./chapter1/whatever.png
   ./chapter1/table-1.tex

Cheers,

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] developing large numbers of MP files for inclusion in source

2005-12-23 Thread David Arnold

Hans, Taco, et al,

Our intermediate algebra text will require a large number of figures.  
I have two thoughts.


1. It's really inefficient to compile the entire context source file  
just to see what will happen to one figure. So, it seems that we  
should probably have a library of graphs for later inclusion in the  
main document. One would want to be able to compile all at once or  
individually if one were just working on one file.


2. The code for many individual figures is quite long and tends to  
obscure the flow of thought when included in the source. Again, if  
they were coming from an external document, that would be better.


I am not looking to include the files one at a time after  
development. I know how to do that. Rather, I am looking for a way to  
gather all the source for figures in a file, compile all of the file,  
or just one figure from the file, then somehow call that source code  
into the main .tex doc during compile time.


I am open to any suggestions on how to most efficiently develop and  
include figures (in Metapost, of course) in our main document.


Thanks.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context