Debian Codegraph @

texmf-dist/doc/latex/oberdiek/hypgotoe-example.tex

raw
1 %%
2 %% This is file `hypgotoe-example.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% hypgotoe.dtx (with options: `example')
8 %%
9 %% This is a generated file.
10 %%
11 %% Project: hypgotoe
12 %% Version: 2019/12/29 v0.3
13 %%
14 %% Copyright (C)
15 %% 2007 Heiko Oberdiek
16 %% 2016-2019 Oberdiek Package Support Group
17 %%
18 %% This work may be distributed and/or modified under the
19 %% conditions of the LaTeX Project Public License, either
20 %% version 1.3c of this license or (at your option) any later
21 %% version. This version of this license is in
22 %% https://www.latex-project.org/lppl/lppl-1-3c.txt
23 %% and the latest version of this license is in
24 %% https://www.latex-project.org/lppl.txt
25 %% and version 1.3 or later is part of all distributions of
26 %% LaTeX version 2005/12/01 or later.
27 %%
28 %% This work has the LPPL maintenance status "maintained".
29 %%
30 %% The Current Maintainers of this work are
31 %% Heiko Oberdiek and the Oberdiek Package Support Group
32 %% https://github.com/ho-tex/oberdiek/issues
33 %%
34 %%
35 %% This work consists of the main source file hypgotoe.dtx
36 %% and the derived files
37 %% hypgotoe.sty, hypgotoe.pdf, hypgotoe.ins, hypgotoe.drv,
38 %% hypgotoe-example.tex.
39 %%
40 \NeedsTeXFormat{LaTeX2e}
41 \begin{filecontents}{hypgotoe-child.tex}
42 \NeedsTeXFormat{LaTeX2e}
43 \documentclass{article}
44 \usepackage{hypgotoe}[2019/12/29]
45 \begin{document}
46 \section{This is the child document.}
47 \href{gotoe:%
48 dest={page.1},parent%
49 }{Go to first page of main document}\\
50 \href{gotoe:%
51 dest={page.2},parent%
52 }{Go to second page of main document}
53 \newpage
54 \section{This is the second page of the child document.}
55 \href{gotoe:%
56 dest={page.1},parent%
57 }{Go to first page of main document}\\
58 \href{gotoe:%
59 dest={page.2},parent%
60 }{Go to second page of main document}
61
62 \hypertarget{foobar}{}
63 Anchor foobar is here.
64 \end{document}
65 \end{filecontents}
66 \documentclass{article}
67 \usepackage{hypgotoe}[2019/12/29]
68 \usepackage{embedfile}
69 \IfFileExists{hypgotoe-child.pdf}{%
70 \embedfile{hypgotoe-child.pdf}%
71 }{%
72 \typeout{}%
73 \typeout{--> Run hypgotoe-child.tex through pdflatex}%
74 \typeout{}%
75 }
76 \begin{document}
77 \section{First page of main document}
78 \href{gotoe:%
79 dest=page.1,embedded=hypgotoe-child.pdf%
80 }{Go to first page of child document}\\
81 \href{gotoe:%
82 dest=page.2,embedded=hypgotoe-child.pdf%
83 }{Go to second page of child document}\\
84 \href{gotoe:%
85 dest=foobar,embedded=hypgotoe-child.pdf%
86 }{Go to foobar in child document}
87 \newpage
88 \section{Second page of main document}
89 \href{gotoe:%
90 dest=section.1,embedded=hypgotoe-child.pdf%
91 }{Go to first section of child document}\\
92 \href{gotoe:%
93 dest=section.2,embedded=hypgotoe-child.pdf%
94 }{Go to second section of child document}\\
95 \href{gotoe:%
96 dest=foobar,embedded=hypgotoe-child.pdf%
97 }{Go to foobar in child document}
98 \end{document}
99 \endinput
100 %%
101 %% End of file `hypgotoe-example.tex'.