summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex126
1 files changed, 78 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex
index a9483064435..3674f2f86d9 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-drivers.tex
@@ -8,7 +8,7 @@
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\section{Input and Output Formats}
+\section{Supported Formats}
\label{section-formats}
@@ -20,7 +20,7 @@ can be produced.
-\subsection{Supported Input Formats}
+\subsection{Supported Input Formats: \LaTeX, Plain \TeX, Con\TeX t}
\TeX\ does not prescribe exactly how your input should be
formatted. While it is \emph{customary} that, say, an opening brace
@@ -83,10 +83,6 @@ format if you use |pdftex| or |tex| plus |dvips|. For all other output
formats you need to set the macro |\pgfsysdriver| to the correct
value. See the description of using output formats later on.
-\pgfname\ was originally written for use with \LaTeX\ and this shows
-in a number of places. Nevertheless, the plain \TeX\ support is
-reasonably good.
-
Like the \LaTeX\ style files, the plain \TeX\ files like |tikz.tex|
also just include the correct |tikz.code.tex| file.
@@ -94,9 +90,7 @@ also just include the correct |tikz.code.tex| file.
\subsubsection{Using the Con\TeX t Format}
-When using the Con\TeX t format\footnote{Note that \pgfname/\tikzname{}
- is not supported by recent Con\TeX t versions (like mark IV, the
- Lua\TeX-aware part of Con\TeX t).}, you say |\usemodule[pgf]| or
+When using the Con\TeX t format, you say |\usemodule[pgf]| or
|\usemodule[tikz]|. As for the plain \TeX\ format you also have to
replace the start- and end-of-environment tags as follows: Instead of
|\begin{pgfpicture}| and |\end{pgfpicture}| you use |\startpgfpicture|
@@ -131,7 +125,8 @@ typeset. Producing the output is (conceptually) a two-stage process:
\TeX\ typesets your text and graphics. The result of this
typesetting is mainly a long list of letter--coordinate pairs, plus
(possibly) some ``special'' commands. This long list of pairs
- is written to something called a |.dvi|-file.
+ is written to something called a |.dvi|-file (informally known as
+ ``device-independent file'').
\item
Some other program reads this |.dvi|-file and translates the
letter--coordinate pairs into, say, PostScript commands for placing
@@ -142,7 +137,7 @@ The classical example of this process is the combination of |latex|
and |dvips|. The |latex| program (which is just the |tex| program
called with the \LaTeX-macros preinstalled) produces a |.dvi|-file as
its output. The |dvips| program takes this output and produces a
-|.ps|-file (a PostScript) file. Possibly, this file is further
+|.ps|-file (a PostScript file). Possibly, this file is further
converted using, say, |ps2pdf|, whose name is supposed to mean
``PostScript to PDF.'' Another example of programs using this
process is the combination of |tex| and |dvipdfm|. The |dvipdfm|
@@ -153,17 +148,17 @@ input and translates the letter--coordinate pairs therein into
output, this time it is a |.html| file. The programs |pdftex| and
|pdflatex| are special: They directly produce a |.pdf|-file without
the intermediate |.dvi|-stage. However, from the programmer's point of
-view they behave exactly as if there where an intermediate stage.
+view they behave exactly as if there was an intermediate stage.
Normally, \TeX\ only produces letter--coordinate pairs as its
-``output.'' This obviously makes is difficult to draw, say, a
+``output.'' This obviously makes it difficult to draw, say, a
curve. For this, ``special'' commands can be used. Unfortunately,
these special commands are not the same for the different programs
that process the |.dvi|-file. Indeed, every program that takes a
|.dvi|-file as input has a totally different syntax for the special
commands.
-One of the main jobs of \pgfname\ is to ``abstract way'' the
+One of the main jobs of \pgfname\ is to ``abstract away'' the
difference in the syntax of the different programs. However, this
means that support for each program has to be ``programmed,'' which is
a time-consuming and complicated process.
@@ -204,9 +199,8 @@ exactly the same.
|pdftex| or |pdflatex| command. It includes
|pgfsys-common-pdf.def|.
- This driver has the ``complete'' functionality. This means,
- everything \pgfname\ ``can do at all'' is implemented in this
- driver.
+ This driver has a lot of functionality. (Almost) everything
+ \pgfname\ ``can do at all'' is implemented in this driver.
\end{filedescription}
\begin{filedescription}{pgfsys-dvipdfm.def}
@@ -221,21 +215,13 @@ exactly the same.
inclusion and does not support masking.
\item
In plain \TeX\ mode it does not support image inclusion.
- \item
- For remembering of pictures (inter-picture connections) you need
- to use a recent version of |pdftex| running in DVI-mode.
- \item
- Patterns are not (cannot) be supported.
- \item
- Functional shadings are not (cannot) be supported.
\end{enumerate}
\end{filedescription}
\begin{filedescription}{pgfsys-xetex.def}
This is a driver file for use with |xe|(|la|)|tex| followed by
- |xdvipdfmx|. This driver supports the same operations as the dvipdfm
- driver, except that remembering of pictures (inter-picture
- connections) always works.
+ |xdvipdfmx|. This driver supports largely the same operations as the
+ |dvipdfm| driver.
\end{filedescription}
\begin{filedescription}{pgfsys-vtex.def}
@@ -311,17 +297,61 @@ produce Postscript output.
-\subsubsection{Producing HTML / SVG Output}
+\subsubsection{Producing SVG Output}
+
+\begin{filedescription}{pgfsys-dvisvgm.def}
+ This driver converts \textsc{dvi} files to \textsc{svg} file,
+ including text and fonts. When you select this driver, \pgfname\
+ will output the required raw \textsc{svg} code for the pictures it
+ produces.
+
+ Since the |graphics| package does not (yet?) support this driver
+ directly, there is special rule for this driver in \LaTeX: If the
+ option |dvisvgm| is given to the |tikz| package, this driver gets
+ selected (normally, the driver selected by |graphics| would be
+ used). For packages like |beamer| that load \pgfname\
+ themselves, this means that the option |dvisvgm| should be given to
+ the document class.
+\begin{codeexample}[code only]
+% example.tex
+\documentclass[dvisvgm]{minimal}
+
+\usepackage{tikz}
+
+\begin{document}
+Hello \tikz [baseline] \fill [fill=blue!80!black] (0,.75ex) circle[radius=.75ex];
+\end{document}
+\end{codeexample}
+
+ And then run
+\begin{codeexample}[code only]
+latex example
+dvisvgm example
+\end{codeexample}
+ or better
+\begin{codeexample}[code only]
+lualatex --output-format=dvi example
+dvisvgm example
+\end{codeexample}
+ (This is ``better'' since it gives you access to the full power of
+ Lua\TeX\ inside your \TeX-file. In particular, \tikzname\ is able
+ to run graph drawing algorithms in this case.)
+
+ Unlike the |tex4ht| driver below, this driver has full support of
+ text nodes.
+\end{filedescription}
-The |tex4ht| program converts |.dvi|-files to |.html|-files. While the
-\textsc{html}-format cannot be used to draw graphics, the
-\textsc{svg}-format can. Using the following driver, you can ask
-\pgfname\ to produce an \textsc{svg}-picture for each \pgfname\
-graphic in your text.
\begin{filedescription}{pgfsys-tex4ht.def}
- This is a driver file for use with the |tex4ht| program. It includes
- |pgfsys-common-svg.def|.
+ This is a driver file for use with the |tex4ht| program. It is
+ selected automatically when the |tex4ht| style or command is
+ loaded. It includes |pgfsys-common-svg.def|.
+
+ The |tex4ht| program converts |.dvi|-files to |.html|-files. While the
+ \textsc{html}-format cannot be used to draw graphics, the
+ \textsc{svg}-format can. This driver will ask
+ \pgfname\ to produce an \textsc{svg}-picture for each \pgfname\
+ graphic in your text.
When using this driver you should be aware of the following
restrictions:
@@ -338,7 +368,7 @@ graphic in your text.
Text inside |pgfpicture|s is not supported very well. The reason
is that the \textsc{svg} specification currently does not support
text very well and, although it is possible to ``escape
- back'' to \textsc{html}, |Tikz| has then to guess what size the text
+ back'' to \textsc{html}, \tikzname\ has then to guess what size the text
rendered by the browser would have.
\item
Unlike for other output formats, the bounding box of a picture
@@ -364,7 +394,7 @@ graphic in your text.
\textsc{svg} standard, you may wish to use the following options to
modify the way text is handled:
- \begin{key}{/tikz/tex4ht node/escape=\meta{boolean} (default |false|)}
+ \begin{key}{/pgf/tex4ht node/escape=\meta{boolean} (default |false|)}
Selects the rendering method for a text node with the tex4ht driver.
When this key is set to |false|, text is translated into
@@ -386,46 +416,46 @@ graphic in your text.
simple as |$\alpha$|, this may corrupt the graphic.
\begin{codeexample}[code only]
-\tikz \node[draw,tex4ht node/escape=false] {Example : $(a+b)^2=a^2+2ab+b^2$};
+\tikz \node[draw,/pgf/tex4ht node/escape=false] {Example : $(a+b)^2=a^2+2ab+b^2$};
\end{codeexample}
- When you write |node[tex4ht node/escape=true] {|\meta{text}|}|,
- \tikzname\ escapes back to \textsc{html} to render the
+ When you write |node[/pgf/tex4ht node/escape=true] {|\meta{text}|}|,
+ \pgfname\ escapes back to \textsc{html} to render the
\meta{text}. This method produces valid \textsc{html} code in most
cases and the support for complicated text nodes is much better since
- code that renders well outside a |{tikzpicture}|, should also
+ code that renders well outside a |{pgfpicture}|, should also
render well inside a text node. Another advantage is that inside
text nodes with fixed width, \textsc{html} will produce line
breaks for long lines. On the other hand, you need a browser with
good \textsc{svg} support to display the picture. Also, the text
will display differently, depending on your browsers, the fonts
you have on your system and your settings. Finally,
- \tikzname\ has to guess the size of the text rendered by the
+ \pgfname\ has to guess the size of the text rendered by the
browser to scale it and prevent it from sticking from the
node. When it fails, the text will be either cropped or too small.
\begin{codeexample}[code only]
-\tikz \node[draw,tex4ht node/escape=true]
+\tikz \node[draw,/pgf/tex4ht node/escape=true]
{Example : $\int_0^\infty\frac{1}{1+t^2}dt=\frac{\pi}{2}$};
\end{codeexample}
\end{key}
- \begin{key}{/tikz/tex4ht node/css=\meta{filename} (default |\string\jobname|)}
+ \begin{key}{/pgf/tex4ht node/css=\meta{filename} (default |\string\jobname|)}
This option allows you to tell the browser what \textsc{css} file
it should use to style the display of the node (only with
|tex4ht node/escape=true|).
\end{key}
- \begin{key}{/tikz/tex4ht node/class=\meta{class name} (default foreignobject)}
+ \begin{key}{/pgf/tex4ht node/class=\meta{class name} (default foreignobject)}
This option allows you to give a class name to the node, allowing
it to be styled by a \textsc{css} file (only with
|tex4ht node/escape=true|).
\end{key}
- \begin{key}{/tikz/tex4ht node/id=\meta{id name} (default
+ \begin{key}{/pgf/tex4ht node/id=\meta{id name} (default
|\string\jobname\ picture number-node number|)}
This option allows you to give a unique id to the node, allowing
it to be styled by a \textsc{css} file (only with
- |tex4ht node/escape=true|).
+ |tex4ht node/escape=true|).
\end{key}
\end{filedescription}
@@ -447,7 +477,7 @@ graphic in your text.
\begin{itemize}
\item Text boxes can be placed in the normal way.
\item Lines and curves can be drawn (stroked). If they are not
- horizontal or vertical, they are composed of hundred of small
+ horizontal or vertical, they are composed of hundreds of small
rectangles.
\item Lines of different width are supported.
\item Transformations are supported.