diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/faq-graphics.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/faq-graphics.tex | 84 |
1 files changed, 70 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/faq-graphics.tex b/Master/texmf-dist/doc/generic/FAQ-en/faq-graphics.tex index eac0022cce9..ded17f9673c 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/faq-graphics.tex +++ b/Master/texmf-dist/doc/generic/FAQ-en/faq-graphics.tex @@ -1,4 +1,4 @@ -% $Id: faq-graphics.tex,v 1.5 2010/07/08 20:29:21 rf10 Exp rf10 $ +% $Id: faq-graphics.tex,v 1.10 2011/02/14 20:53:28 rf10 Exp $ \section{Graphics} @@ -201,7 +201,7 @@ An alternative solution is to use \ProgName{purifyeps}, a included directly. Sadly, \ProgName{purifyeps} doesn't work for all \extension{eps} files. -Good coverage of the problem is to be found in Herbert Vo\ss{}' +Good coverage of the problem is to be found in Herbert Vo\ss {}'s \href{http://pstricks.tug.org/main.cgi?file=pdf/pdfoutput}{\acro{PDF} support page}, which is targeted at the use of \Package{pstricks} in \PDFLaTeX{}, and also covers the \Package{pstricks}-specific package @@ -363,28 +363,36 @@ The alternative is to use the \Package{graphics} package command of the \Package{graphicx} and the \Package{epsfig} packages. The syntax of \csx{graphicspath}'s one argument is slightly odd: it's a sequence of paths (typically relative paths), each of which is -enclosed in braces. A slightly odd sample, given in the -\Package{graphics} bundle documentation, is: +enclosed in braces. A slightly odd example (slightly modified from one +given in the \Package{graphics} bundle documentation) is: \begin{quote} \begin{verbatim} -\graphicspath{{eps/}{tiff/}} +\graphicspath{{eps/}{png/}} \end{verbatim} \end{quote} -however, if the security checks on your \AllTeX{} system allow, the -path may be anything you choose (rather than strictly relative, like -those above); note that the trailing ``\texttt{/}'' \emph{is} required. +which will search for graphics files in subdirectories \File{eps} and +\File{png} of the directory in which \latex{} is running. (Note that +the trailing ``\texttt{/}'' \emph{is} required.) + +(Note that some \AllTeX{} systems will only allow you to use files in +the current directory and its sub-directories, for security reasons. +However, \csx{graphicspath} imposes no such restriction: as far as +\emph{it} is concerned, you can access files anywhere.) Be aware that \csx{graphicspath} does not affect the operations of graphics macros other than those from the graphics bundle~--- in particular, those of the outdated \Package{epsf} and \Package{psfig} packages are immune. -The disadvantage of the \csx{graphicspath} method is inefficiency. The -package will call \AllTeX{} once for each entry in the list, which is -itself slows things. More seriously, \TeX{} remembers the file name, -thus effectively losing memory, every time it's -asked to look up a file, so a document that uses a huge number of -graphical inputs could be embarrassed by lack of memory. +The slight disadvantage of the \csx{graphicspath} method is +inefficiency. The package will call \AllTeX{} once for each entry in +the list to look for a file, which of course slows things. Further, +\AllTeX{} remembers the name of any file it's asked to look up, thus +effectively losing memory, so that in the limit a document that uses a +huge number of graphical inputs could be embarrassed by lack of +memory. (Such ``memory starvation'' is pretty unlikely with any +ordinary document in a reasonably modern \AllTeX{} system, but it +should be borne in mind.) If your document is split into a variety of directories, and each directory has its associated graphics, the \Package{import} package @@ -733,6 +741,10 @@ of drawing, and setup, here are a few systems you may consider: all the power of \MF{}, but it generates \PS{} figures; \MP{} is nowadays part of most serious \AllTeX{} distributions. Knuth uses it for all his work\dots{} + + Note that you can ``embed'' \MP{} source in your document (i.e., + keep it in-line with your \latex{} code), using the \Package{emp} + package. \item \ProgName{Mfpic}; you liked \MF{}, but can't understand the language? The package makes up \MF{} or \MP{} code for you within using familiar-looking \TeX{} macros. Not \emph{quite} the @@ -744,12 +756,48 @@ of drawing, and setup, here are a few systems you may consider: other \TeX{} drawing packages, but is an entirely new implementation, which is not as hard on memory, is much more readable (and is fully documented). +\item You fancy the idea of embedding the source of drawings (as with + \Package{emp}, but you like another drawing tool? In principle, + it's possible to do the same with other tools; for example + \Package{asyfig} allows you to embed % ! line break + \ProgName{asymptote} code in your document. \end{itemize} + +Some of the free-standing graphics applications may also be used +(effectively) in-line in \latex{} documents; examples are +\begin{booklist} +\item[asymptote]A package, \Package{asymptote}, defines an environment + \environment{asy} which arranges that its contents are included + (after ``enough'' runs, in the \latex{} way). + + Basically, you write + \begin{quote} + \cmdinvoke{begin}{asy} + \texttt{\meta{asymptote code}} + \cmdinvoke{end}{asy} + \end{quote} + and then execute +\begin{quote} +\begin{verbatim} +latex document +asy document-*.asy +latex document +\end{verbatim} +\end{quote} +\item[egplot]Allows you to incorporate \ProgName{\acro{GNU}plot} + code in your document, again for processing outside of \latex{}; the + design of this package was strongly influenced by that of \Package{emp} +\item[emp]Another of the same, this time for \MP{} graphics. +\end{booklist} \begin{ctanrefs} +\item[asymptote.sty]\CTANref{asymptote} \item[dratex.sty]\CTANref{dratex} +\item[egplot]\CTANref{egplot} +\item[emp]\CTANref{emp} \item[epic.sty]\CTANref{epic} \item[eepic.sty]\CTANref{eepic} \item[eepicemu.sty]\CTANref{eepic} +\item[emp.sty]\CTANref{emp} \item[mfpic]\CTANref{mfpic} \item[preview.sty]\CTANref{preview} \item[pspicture.sty]\CTANref{pspicture} @@ -854,7 +902,14 @@ of texts and the like on top of a graphic. The package can draw a grid for planning your ``attack''; the distribution comes with simple examples. +The \Package{lpic} package is somewhat similar to \Package{overpic}; +it defines an environment \environment{lpic} (which places your +graphic for you): within the environment you may use the command +\csx{lbl} to position \latex{} material at appropriate places over the +graphic. + \Package{Pstricks} can of course do everything that \Package{overpic} +or \Package{lpic} can, with all the flexibility of \PS{} programming that it offers The \Package{pstricks} web site has a page with several % ! line break \href{http://pstricks.tug.org/main.cgi?file=Examples/overlay}{examples of labelling} @@ -870,6 +925,7 @@ with the do-it-yourself approach. \item[auto-pst-pdf.sty]\CTANref{auto-pst-pdf} \item[iTe]\CTANref{ite} \item[laprint]Distributed with \CTANref{psfragx} +\item[lpic.sty]\CTANref{lpic} \item[overpic.sty]\CTANref{overpic} \item[psfrag.sty]\CTANref{psfrag} \item[psfragx.sty]\CTANref{psfragx} |