summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tableof/tableoftest.tex
blob: f8ddc8a24202cab48aede9131a2a53c47b76996b (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
%%
%% This is file `tableoftest.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tableof.dtx  (with options: `test')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from tableoftest.tex.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file tableof.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%% Package: tableof
%% Version: 1.4c (2021/07/05)
%% License: LPPL 1.3c
%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
%%
%% This file `tableoftest.tex' serves to demontrate the use of the
%% commands from the package `tableof'.
%%
%% (run on it `latex' or `pdflatex' twice.)
%%
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage{tableof}
%%\usepackage{etoc} % for testing
\DeclareRobustCommand\lowast{\raisebox{-.25\height}{*}}
\begin{document}
%% \etoctoclines % (if using package etoc)
%%
%% we don't need here \tofOpenTocFileForWrite
%% as the document has \tableofcontents a few lines down.
%%
\section*{\string\tableof\{\}}
\tableof{}
\section*{\string\tableof\lowast\{A,B,C,D,E,F\}}
\tableof*{  A, B,C , D , E, F  }
\section*{\string\tableof\{A\}}
\tableof{A}
\section*{\string\tableof\lowast\{A\}}
\tableof*{A}
\section*{\string\tableof\{A,C\}}
\tableof{  A ,C }
\section*{\string\tableof\lowast\{A,C\}}
\tableof*{A, C }
\section*{\string\tableoftaggedcontents\lowast\{A,D\}\{B,F\}}
\tableoftaggedcontents*{ A,D}{B, F}
\renewcommand\contentsname{\string\nexttocwithtags\lowast\{A,D\}\lowast\{B,F\}\string\tableofcontents}
\nexttocwithtags*{ A , D}*{B ,F}
\tableofcontents
%% requires package etoc
%% \etoctocstyle{1}{with A and D and without B and without F}
%% \nexttocwithtags{A,D}{B,F}\tableofcontents
%% \etoctocstyle{1}{with (A or D) and without B and without F}
%% \nexttocwithtags*{A,D}{B,F}\tableofcontents
%% \etoctocstyle{1}{with A and D and (without B or without F)}
%% \nexttocwithtags{A,D}*{B,F}\tableofcontents
\section*{with B or with C (using \string\tableoftaggedcontents)}
\tableoftaggedcontents*{B, C}{}
\section*{with B or with C (using \string\tableof\lowast)}
\tableof*{B, C}
\section*{with A and with B and with C}
\tableof{A,  B,  C}
\section*{with A or with B or with C}
\tableof*{   A,B ,C  }
\section*{without B (and) (using \string\tableoftaggedcontents)}
\tableoftaggedcontents{}{B}
\section*{without A and without B (using \string\tableoftaggedcontents)}
\tableoftaggedcontents{}{A  ,  B}
\section*{without A or without C}
\tablenotof*{  A,  C}
\section*{without A and without B and without C}
\tablenotof{ A  ,  B , C}
\section*{without A or without B or without C}
\tablenotof*{A,  B,C   }
\section*{with D and with E}
\tableof{D,E}
\section*{with E}
\tableof{E}
\section*{without D}
\tablenotof{D}
\section*{ecology and rabbits}
\tableof{     ecology        ,        rabbits      }
\section*{rabbits and not ecology}
\tableoftaggedcontents{  rabbits   }{     ecology  }
\section*{kitchenware and not rabbits}
\tableoftaggedcontents{   kitchenware }{ rabbits}
\clearpage
\section{no tag}
nothing
\begin{verbatim}
\toftagstart{D,E,F}
\toftagthis{A}
\end{verbatim}
\toftagstart{   D,  E,  F }
\toftagthis{A}
\section{A,D,E,F}
A,D,E,F
\begin{verbatim}
\toftagthis{B}
\end{verbatim}
\toftagthis{B}
\section{B,D,E,F}
B,D,E,F
\begin{verbatim}
\toftagthis{C}
\end{verbatim}
\toftagthis{  C  }
\section{C,D,E,F}
C,D,E,F
\begin{verbatim}
\toftagstop{F}
\toftagthis{A,B}
\end{verbatim}
\toftagstop{F}
\toftagthis{      A,B}
\section{A,B,D,E}
A,B,D,E
\begin{verbatim}
\toftagthis{B,C}
\end{verbatim}
\toftagthis{B,       C}
\section{B,C,D,E}
B,C,D
\begin{verbatim}
\toftagthis{A,C}
\toftagstop{E}
\end{verbatim}
\toftagthis{   A,   C}
\toftagstop{     E}
\section{A,C,D}
A,C,D
\begin{verbatim}
\toftagstop{D}
\toftagthis{A,B,C}
\end{verbatim}
\toftagstop{D     }
\toftagthis{A,B,C     }
\section{A,B,C}
A,B,C
\begin{verbatim}
\toftagstop{A,B,C,D,E,F}
\toftagstart{kitchenware,rabbits}
\end{verbatim}
\toftagstop{A,B,       C,D,E,F}
\toftagstart{       kitchenware,rabbits}
\section{Knives and rabbits}
\begin{verbatim}
\tofuntagthis{kitchenware}
\end{verbatim}
\tofuntagthis{kitchenware}
\subsection{Hunting rabbits}
\begin{verbatim}
\tofuntagthis{rabbits}
\end{verbatim}
\tofuntagthis{rabbits}
\subsection{Best knives for cooking}
\subsection{Eating rabbits}
\begin{verbatim}
\toftagstart{ecology}\tofuntagthis{rabbits}
\end{verbatim}
\toftagstart{ecology}\tofuntagthis{        rabbits}
\section{Knives and global climate}
\begin{verbatim}
\toftagstop{kitchenware}
\end{verbatim}
\toftagstop{kitchenware      }
\section{The rabbit in the wild}
\subsection{Impact of the rabbit on global climate}
\begin{verbatim}
\toftagstop{rabbits}
\end{verbatim}
\toftagstop{      rabbits}
\section{Other species of interest for cooking}
\end{document}\endinput
\endinput
%%
%% End of file `tableoftest.tex'.