Debian Codegraph @

texmf-dist/doc/generic/pgf/pgfmanual-en-pgfsys-overview.tex

raw
1 % Copyright 2018 by Till Tantau
2 %
3 % This file may be distributed and/or modified
4 %
5 % 1. under the LaTeX Project Public License and/or
6 % 2. under the GNU Free Documentation License.
7 %
8 % See the file doc/generic/pgf/licenses/LICENSE for more details.
9
10
11 \section{Design of the System Layer}
12
13 \makeatletter
14
15 \subsection{Driver Files}
16 \label{section-pgfsys}
17
18 The \pgfname\ system layer mainly consists of a large number of commands
19 starting with |\pgfsys@|. These commands will be called \emph{system commands}
20 in the following. The higher layers ``interface'' with the system layer by
21 calling these commands. The higher layers should never use |\special| commands
22 directly or even check whether |\pdfoutput| is defined. Instead, all drawing
23 requests should be ``channeled'' through the system commands.
24
25 The system layer is loaded and set up by the following package:
26
27 \begin{package}{pgfsys}
28 This file provides ``default implementations'' of all system commands, but
29 most simply produce a warning that they are not implemented. The actual
30 implementations of the system commands for a particular driver like, say,
31 |pdftex| reside in files called |pgfsys-xxxx.sty|, where |xxxx| is the
32 driver name. These will be called \emph{driver files} in the following.
33
34 When |pgfsys.sty| is loaded, it will try to determine which driver is used
35 by loading |pgf.cfg|. This file should set up the macro |\pgfsysdriver|
36 appropriately. The |pgfsys.sty| will input the appropriate
37 |pgfsys-|\meta{drivername}|.sty|.
38 \end{package}
39
40 \begin{command}{\pgfsysdriver}
41 This macro should expand to the name of the driver to be used by |pgfsys|.
42 The default from |pgf.cfg| is |pgfsys-\Gin@driver|. This is very likely to
43 be correct if you are using \LaTeX. For plain \TeX, the macro will be set
44 to |pgfsys-pdftex.def| if |pdftex| is used and to |pgfsys-dvips.def|
45 otherwise.
46 \end{command}
47
48 \begin{filedescription}{pgf.cfg}
49 This file should set up the command |\pgfsysdriver| correctly. If
50 |\pgfsysdriver| is already set to some value, the driver normally should
51 not change it. Otherwise, it should make a ``good guess'' at which driver
52 will be appropriate.
53 \end{filedescription}
54
55 The currently supported backend drivers are discussed in
56 Section~\ref{section-drivers}.
57
58
59 \subsection{Common Definition Files}
60
61 Some drivers share many |\pgfsys@| commands. For the reason, files defining
62 these ``common'' commands are available. These files are \emph{not} usable
63 alone.
64
65 \begin{filedescription}{pgfsys-common-postscript}
66 This file defines some |\pgfsys@| commands so that they produce appropriate
67 PostScript code.
68 \end{filedescription}
69
70 \begin{filedescription}{pgfsys-common-pdf}
71 This file defines some |\pgfsys@| commands so that they produce appropriate
72 \textsc{pdf} code.
73 \end{filedescription}
74
75
76 %%% Local Variables:
77 %%% mode: latex
78 %%% TeX-master: "pgfmanual"
79 %%% End: