diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/prerex/prerex.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/prerex/prerex.tex | 109 |
1 files changed, 33 insertions, 76 deletions
diff --git a/Master/texmf-dist/doc/latex/prerex/prerex.tex b/Master/texmf-dist/doc/latex/prerex/prerex.tex index 448ef4e5ef0..48c49ce88dd 100644 --- a/Master/texmf-dist/doc/latex/prerex/prerex.tex +++ b/Master/texmf-dist/doc/latex/prerex/prerex.tex @@ -7,7 +7,7 @@ %\def\LaTeX{\mbox{LaTeX}} \begin{document} -\title{\textsf{prerex.sty}: Prerequisite Charts in \LaTeX\\{\large Version 6.5}} +\title{\textsf{prerex.sty}: Prerequisite Charts in \LaTeX\\{\large Version 6.6}} \author{R. D. Tennent\\\texttt{rdt@cs.queensu.ca}} \date{\today} \maketitle @@ -21,12 +21,6 @@ can use to create charts consisting of labelled course boxes linked by arrows that represent pre- and co-requisite requirements; see the example chart in Figure~\ref{chart} on page~\pageref{chart}. -If pdf\LaTeX\ is used as the processing engine, -three auxiliary files will be generated, as follows: image-map data and SVG commands for the -hyperlinked nodes in the diagram, and a shell script for cropping a PNG image -obtained from the output. pdf\LaTeX\ must be used as the processing engine -to get accurate page coordinates. - If the source file satisfies the constraints of the \textsf{prerex(5)} @@ -280,10 +274,10 @@ so that, in suitable PDF viewers, if the mouse cursor is placed over a box, mini, or midpoint of an arrow, the \emph{coordinates} of the box/mini/text(or the coordinates of the source \emph{and} target of the arrow) will be displayed -as follows: in the +either in the status bar -in \texttt{xpdf} and \texttt{gpdf}, and in a -``tooltip'' in recent versions of \texttt{kpdf}/\texttt{okular}, \texttt{evince}, and the Acrobat Reader. +or in a +``tooltip.'' This coordinate display make it easier to edit chart descriptions. When the grid is on, the mid-point of every arrow is highlighted by a ``bullet''. @@ -374,54 +368,21 @@ The following additional packages are used: \verb|multido|, \verb|relsize|, \verb|calc|, -\verb|ifpdf|, \verb|textcomp|, -\verb|zref-savepos|, +\verb|xcolor|, and \verb|hyperref|. \emph{Either} \verb\pdflatex\ \emph{or} -\verb\latex\ (followed by \verb\dvips\ and, possibly, \verb\ps2pdf\) +\verb\xelatex\ \emph{or} -\verb\latex\ (with suitable driver options, followed by \verb\dvipdfmx\) -may be used; however, cropping shell scripts, -image maps and link data files are only generated if \verb\pdflatex\ -is used. - -\section{Conversion to Portable Network Graphic (PNG) Format} - -To convert a chart (in Postscript or PDF format) to a reasonably high-quality image, it is suggested to use the -\verb|convert| tool of the -\verb|ImageMagick| package as follows: -\begin{verbatim} - convert -density 125 chart.ps chart.png -\end{verbatim} -or -\begin{verbatim} - convert -density 125 chart.pdf chart.png -\end{verbatim} -The density parameter specifies the number of pixels per inch; if this is too small, the -image is of poor quality, and if it is too large, the image file is too big. -By default, the shell script generated by \texttt{prerex.sty} crops the image at the southeast corner. -It is possible to use a PNG compression application such as -\texttt{optipng} to reduce the file-size of the cropped image (without loss of quality). - -If \verb\pdflatex\ is used, an auxiliary file -containing image-map data for the hyperlinked nodes in the chart is also generated; -consult a reference on the HTML language for an explanation of (client-side) image maps. - -\section{Conversion to Scalable Vector Graphic (SVG) Format} - -SVG is an emerging standard for high-quality graphics. The -\texttt{pdf2svg}\footnote{% -\myurl{http://www.cityinthesky.co.uk/opensource/pdf2svg/}} -program uses \texttt{poppler} and \texttt{cairo} libraries -to convert a PDF page to a scalable vector-graphic image. When compressed -by \texttt{gzip} into \texttt{.svgz} format, the image file is comparable in size and quality -to the PDF form. Currently, links in the PDF are not converted by \texttt{poppler} and -\texttt{cairo} to links -in the SVG image. Since Version~6.5, an auxiliary file of suitable commands for inclusion in -a \texttt{.svg} image is generated by pdf\LaTeX\ processing. +\verb\latex\, followed by \verb\dvips\ and, possibly, \verb\ps2pdf\ +\emph{or} +\verb\latex\ (with suitable driver options), followed by either \verb\dvipdfmx\ +or \verb\dvisvgm\ may be used. + +\pagebreak + \section{Installation} @@ -431,16 +392,8 @@ a \texttt{.svg} image is generated by pdf\LaTeX\ processing. \item copy \verb|prerex.sty| to \emph{your-texmf-tree}\verb|/tex/latex/misc| \item copy \verb|doc/prerex.{tex,pdf}| to \emph{your-texmf-tree}\verb|/doc/latex/misc| \item if necessary, refresh the \TeX\ database (e.g., \verb|texhash|) - \item copy \verb|man/prerex.sty.7| to sub-directory \verb|man7| of a \verb|man| directory on your + \item on a \textsc{Unix}-like system, copy \verb|doc/prerex.5| and \verb|doc/prerex.sty.7| to sub-directories of a \verb|man| directory on your \verb|MANPATH| - \item test by doing - -\begin{verbatim} -$ man 7 prerex.sty -$ make chart.pdf -\end{verbatim} - - \end{enumerate} \section{Configuration} @@ -470,7 +423,6 @@ coordinate unit if the chart is converted to an image at 125 dpi. \item \verb|\newcommand{\dpi}{125}| \item \verb|\newcommand{\PixelsPerUnit}{10}| \end{list} -These have to re-defined together if the image-map data are to be correct. \begin{list}{}{} \item \verb|\setcounter{diagheight}{75}| \end{list} @@ -508,6 +460,24 @@ this parameter is font-dependent. \verb|\newcommand{\baselineAdj}{-0.5ex}| \end{list} +\section{Conversion to Scalable Vector Graphic Format} + +Scalable Vector Graphics (SVG) is an emerging standard for high-quality graphics. It is supported +by all modern browsers natively, making it ideal for posting charts on the web. +When compressed +by \texttt{gzip} into \texttt{.svgz} format, an SVG image is comparable in size and quality +to a PDF chart. +The \texttt{dvisvgm}\footnote{% +\myurl{http://dvisvgm.sourceforge.net/}; also available from CTAN and in TeXLive.} +program may be used to produce a (compressed) SVG image directly from \verb\latex\ output. + +Another approach is to use \texttt{pdf2svg}\footnote{% +\myurl{http://www.cityinthesky.co.uk/opensource/pdf2svg/}}, +a small program that uses \texttt{poppler} and \texttt{cairo} libraries +to convert a PDF page to a scalable vector-graphic image. +From version 0.2.3, \verb\pdf2svg\ inserts clickable +links into the SVG image and supports a scaling option. + \section{Implementation Details} \subsection{Boxes} @@ -522,7 +492,7 @@ on, it is hyperlinked and its chart coordinates are encoded in the URI. \subsection{Arrows} Arrows with a small height and arrows whose -source and target points have equal x or y coordinates are always draw straight +source and target points have equal x or y coordinates are always drawn straight (using a specialized and simpler macro) unless an explicit non-zero curvature argument is provided. @@ -542,19 +512,6 @@ two ``anchor'' hyperlinks are inserted at the southwest and northeast corners of the diagram to allow prerex-enabled PDF viewers to compute chart coordinates. -\subsection{Chart Images} - -To support HTML versions of charts, -\texttt{prerex.sty} -(if processed by \verb\pdflatex\) generates a script to crop a chart image at the southeast corner, allowing -descriptive notes below the chart to be treated as ordinary text. Also, for the clickable links, -it generates image-map data for use with an HTML image map and -\texttt{xlink} commands for embedding into an -SVG image. To -obtain absolute page coordinates for these auxiliary files, the \texttt{zsavepos}, \texttt{zposx} -and \texttt{zposy} commands are used; the page coordinates are converted into pixel -coordinates. - \section{License} \verb|prerex.sty|, \verb|prerex.sty.7|, \verb|README.prerex| and this document may be distributed and/or modified under the conditions of the \LaTeX\ Project Public License. |