summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.code.tex
blob: fca9c791b8d01b823bbb319f1a61d767f961676e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Copyright 2009 by Till Tantau and Christian Feuersänger
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\input pgfmanual.prettyprinter.code.tex
\input pgfmanual.pdflinks.code.tex

% TODO for auto xrefs:
% 1. check the already identified labels, preferably using
%      /pdflinks/show labels=true
% and the image externalization debug mode (see pgfmanual-en-main.tex)
% (to strip almost all images away)
%
% 2. Insert '\declareandlabel' in the document whenever something has been
% defined in the text, so it should get a pdf anchor (see
% pgfmanual.pdflinks.code.tex )
%
% 2.1 perhaps insert \pgfmanualpdflabel{<label>}{} where needed.
%
% 3. Verify that the |...| commands occurring in situations where catcodes can't
% be changed (footnotes or macro arguments) work as expected.
%
% 4. Consider telling the pretty printer that several control sequences
% have arguments which are options (see below for the predefined list).
% This may apply to \pgfpageslogicalpageoptions or so.
%
% 5. @Christian: consider extensions of the parser such that it identifies path commands (at least partially)
%
%

\def\pgfmanual@warning#1{\pgf@typeout{! Package pgfmanual Warning: #1}}%


\pgfkeys{
    % set this to 'false' to disable auto reference generation.
    % However, a little bit runtime overhead will still remain
    % (and the \pgfmanualpdflabel commands will still be used)
    /pdflinks/codeexample links=true,
    %
    /codeexample/prettyprint/cs arguments/tikzset/.initial=1,
    /codeexample/prettyprint/cs/tikzset/.code 2 args={\pgfmanualpdfref{#1}{#1}\{\pgfmanualprettyprintpgfkeys{#2}\pgfmanualclosebrace},
    /codeexample/prettyprint/cs arguments/usetikzlibrary/.initial=1,
    /codeexample/prettyprint/cs/usetikzlibrary/.code 2 args={\pgfmanualpdfref{#1}{#1}\{\pgfmanualpdfref{#2}{#2}\pgfmanualclosebrace},
    /codeexample/prettyprint/cs arguments/usepgflibrary/.initial=1,
    /codeexample/prettyprint/cs/usepgflibrary/.code 2 args={\pgfmanualpdfref{#1}{#1}\{\pgfmanualpdfref{#2}{#2}\pgfmanualclosebrace},
    %
    %
    %
    % whenever an unqualified key is found, the following key prefix
    % list is tried to find a match.
    /pdflinks/search key prefixes in={/tikz/,/pgf/},
    %
    % the link prefix written to the pdf file:
    /pdflinks/internal link prefix=pgf,
    %
    /pdflinks/warnings=false,
    % for debugging:
    /pdflinks/show labels=false,
}%