[OS X TeX] diagonal arrows in figures

Philipp Mathey pmathey at uwo.ca
Wed Apr 20 19:58:11 CEST 2005


> But whichever Xy-pic feature you use, it will always be fastest
> to create an image from each diagram, then just reuse this image
> on later runs, rather than reinterpret every diagram each time.
>
> For this, you want the same kind of strategy as what  pdftricks
> provides, or  ps4pdf .
>
> Learn how to use these, and your documents containing Xy-pic diagrams
> will compile much, much faster --- on all but the first run after
> some change has been made to a diagr




I have never used either pdftricks nor ps4pdf. I briefly looked at the  
documentation :
which one is "better" ? I am just interested in typesetting commutative  
diagrams (for mathematics) , nothing else.
I prefer the syntax of \xymatrix{...} . Also, I am using pdflatex, so ,  
I guess, the only options for xypic are "all" or "pdftex,all"(for this  
a manual installation of xypdf would be
be necessary)

For pdftricks :  would having

usepackage[all]{xy}

\usepackage{pdftricks}
\begin{psinputs}
\usepackage{color}
\usepackage[all] {xy}
\end{psinputs}

in the preamble be enough in order for xypic to compile faster ? I  
tried that and pdftricks seems to load correctly but I am not sure that  
I notice any dramatic increases in speed.
Maybe I am missing something.

Thanks.


On 20-Apr-05, at 6:07 AM, Ross Moore wrote:

> Hi Philipp,
>
> On 20/04/2005, at 7:16 PM, Philipp Mathey wrote:
>
>>
>> On 19-Apr-05, at 11:05 PM, Ross Moore wrote:
>>
>>> There are 2 ways to get better diagrams when using XYpic with pdftex  
>>> .
>>>
>>> A.
>>> One way is to load the  xypdftex  driver-support file:
>>>
>>>      \usepackage[pdftex,all,....]{xy}
>>>
>>
>>
>>
>>>
>>> B.
>>>
>>>       \usepackage[ps,dvips,all,....]{xy}
>>>
>>> --------------------------------------------------------------------- 
>>> ---
>>>
>>
>>
>> What is the fastest way to use xypic ?
>
> That depends a lot on what you are doing.
>
>> I noticed it takes a lot of time to load up xymatrices.
>> (even when using "\CompileMatrices").
>
> Yes. That is because \xymatrix is not very efficient.
> Rather, people tend to use it in situations where it works,
> but is not necessarily the most appropriate construction for
> the kind of diagram that needs to be set.
>
> Often \xygraph  will produce a similar result much more quickly.
> But there the high-level language is rather more abstract,
> so less familiar --- hence seems to be harder, at first sight.
>
>
>
> But whichever Xy-pic feature you use, it will always be fastest
> to create an image from each diagram, then just reuse this image
> on later runs, rather than reinterpret every diagram each time.
>
> For this, you want the same kind of strategy as what  pdftricks
> provides, or  ps4pdf .
>
> Learn how to use these, and your documents containing Xy-pic diagrams
> will compile much, much faster --- on all but the first run after
> some change has been made to a diagram.
>
>
>> I have always just used the "all" option, never pdftex, or ps, dvips  
>> ..
>>
>> From what you wrote, I assume that adding pdftex, for example, to the  
>> options would create visually more appealing results but would also  
>> possibly slow xypic down a little  ?
>
> More appealing, yes.
> Slower --- in fact, no!
> Using the PostScript back-end is generally *much* faster.
>
> In non-ps mode, Xy-pic works by laying font-characters adjacent
> to each other, e.g. to build a line segment at an arbitrary angle.
> The position of each piece needs to be calculated and stored in the
>  .dvi (or .pdf ) file.
>
> In ps mode, a line segment is just a pair of points (start and finish).
> An appropriate \special command is created and written to the  .dvi  
> file.
> This requires *much* less computational time for the TeX engine.
>
>
> The downside of using  ps  mode is that not all TeX viewers can show
> the results.  It needs  dvips (or other driver)  and a PostScript
> interpreter such as Ghostscript  (or Adobe's Distiller) before the
> results can be seen.
>
> Note that this is *not* encapsulated ps (.eps), so there's no
> guarantee that a non-PostScript-based  .dvi viewer can show the
> embedded PostScript bits --- even something like  xdvi  can get
> confused with the complexity of the final document.
>
>
>> Or is the difference ( of time of compilation) negligible ?
>
> Not negligible at all.
> Using the  'ps' and 'dvips'  leads to both speed-ups and
> better quality output!
>
> Combine this with  ps4pdf  (or  pdftricks)  and the first time
> you include a new diagram, or alter an existing one in your document,
> it will be quite slow, but thereafter it should be *much* faster.
>
> Advice:
> build new diagrams separately, within a different document having  
> nothing else.
> When you are sure it is complete, then include it in your main job.
>
>
>
> Of course as computers get faster and faster, then you don't really
> notice the slow-downs due to the diagrams.
>
>
>
> Hope this helps,
>
> 	Ross Moore
>
>
>>
>> --------------------- Info ---------------------
>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>           & FAQ: http://latex.yauh.de/faq/
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>>
>>
>>
> ----------------------------------------------------------------------- 
> -
> Ross Moore                                         ross at maths.mq.edu.au
> Mathematics Department                             office: E7A-419
> Macquarie University                               tel: +61 +2 9850  
> 8955
> Sydney, Australia                                  fax: +61 +2 9850  
> 8114
> ----------------------------------------------------------------------- 
> -
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list