File: tpa2.tex

package info (click to toggle)
tralics 2.14.4-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 17,152 kB
  • ctags: 8,260
  • sloc: cpp: 49,403; xml: 18,145; sh: 140; makefile: 118
file content (348 lines) | stat: -rw-r--r-- 8,620 bytes parent folder | download
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
% tralics configuration file 'test'
% This file tests that a lot of XML element and attribute names
% can be changed

\documentclass{book}
\usepackage{curves,ra,soul}
\begin{document}

\notrivialmath=7

\newcounter{bib}
\everybibitem{\stepcounter{bib}%
\edef\foo{%
bk=\XMLgetatt[\the\XMLlastid]{bib-key},%
BK=\XMLgetatt[\the\XMLlastid]{Bibkey},%
N=\XMLgetatt[\the\XMLlastid]{},%
S=\XMLgetatt{}.
}
\xbox{bib}{\thebib\XMLaddatt*{}{BiB}}\xbox{}{\foo}}

%%% test divisions
\frontmatter
\chapter{Chapter one}  OK
\mainmatter
\part{First Part of document}
Some text here
\part{Second Part}
\chapter{Chapter two}
\section{Section one}
\subsection{Subsection one}
\subsubsection{Subsubsection one}
\paragraph{First paragraph}
\subparagraph{First sub paragraph}
Normal text\label{a}
\backmatter
We are now in the backmatter.\ref{a}\pageref{a}

%%% test tables 
\newcolumntype{+} {>{B}l <{D}|}

\begin{tabular*}{3cm}[t]{|ll|rr|cc|}
\hline a&b&c&d&e&f\\
A&\multicolumn{3}{+}{C}&E&F\\
\multicolumn{2}{|l}{ab}&c&d&e&f\\[1cm]
\cline{1-3}\cline{6-6}\\\hline
\end{tabular*}

%%% Test Graphics
\def\IC#1{\includegraphics[width=#1cm]{Logo-INRIA-couleur}}
\IC{1}
\fbox{\includegraphics[clip=, angle=90, scale=3, %
       width=10cm, height=3mm]{A}}

%%% Test Float

\begin{figure}
\subfigure[~one]{\IC{2}} \subfigure{\IC{3}} \par
\subfigure[~two]{\IC{4}} \subfigure{\IC{1.3}} 
\caption{Caption of the figure}
\end{figure}
\begin{table}[b]
\begin{tabular}[t]{cc}
a&b
\end{tabular}
\caption{ok}
\end{table}

a\footnote{B}\footnote{C\par D}
\caption{a caption}
\subfigure[~one]{\IC{2}} 
\noindent \mbox{\xbox{a}{b}} \rotatebox{30}{x}
\subfigure[a]{b}

\begin{tabular}{c}a\end{tabular}
\caption{A}
\begin{table}[htbp]
\begin{tabular}{c}a\end{tabular}
\caption{B}
\end{table}
\begin{table}[htbp]
\includegraphics{a}
\caption{C}
\end{table}
\begin{figure}[htbp]
\includegraphics{a}
\caption[ok]{D}
\end{figure}
\caption{a}\caption[b]{c}

%% Boxes
\mbox{fo\xbox{a}{b}}
\scalebox{0.3}{foo}
\raisebox{0.3}{foo}
\framebox{foo}
\framebox[2cm]{foo}
\makebox(1,2)[bl]{foo\xbox{a}{b}}
\rotatebox{45}{\it x}
\fbox{foo}\scalebox{0.3}{foo}\framebox(10,10){foo}\framebox[10pt][11]{foo}


%%% Picture
\begin{picture}(100,100)
\qbezier(0,0)(10,30)(50,30)
\put(15,20){\circle{6}}
\put(15,20){\circle*{6}}
 \scaleput(10,10){\arc(5,0){121}}
  \multiput(20,5)(-20,12){2} {\line(5,3){20}}
\put(10,32){\vector(-2,1){10}}
\put(15,20){\oval(30,10)}
\dashline{3}[0.7](0,18)(63,18)
\drawline some text here% well
\dottedline{2}(0,10)(70,10)
\put(30,20){\circle{6}}
\put(15,20){\bigcircle{2}}
\closecurve(150,0, 190,100, 230,0)
\curve[17](300,0, 340,100, 380,0)
\tagcurve(80,0, 0,0, 40,100, 80,0, 0,0)
\thicklines
\thinlines
\linethickness{.5pt}
\end{picture}

%%% Lists 
\begin{itemize}
\makeatletter
\@item [A]b
\@@item [A]b
\end{itemize}

\begin{list}{}{}
\item[item label] item value
\begin{description}
\item[first item] okok
\item[second item]
\begin{itemize}
\item First
\item Second
\begin{enumerate}
\item some item
\item another one
\end{enumerate}
\end{itemize}
\end{description}
\end{list}

%%% Theorems
\newtheorem{xCor}{Corollary}
\begin{xCor}[Important] this is easy \end{xCor}

%%% Fonts
\ul{a}\caps{b}\hl{c}\so{d}\st{e}
\textsuperscript{f}\textsubscript{g}
\oldstylenums{h}\overline{i}\underline{j}

{\Huge a}{\huge b}{\LARGE c}{\Large d}{\large e}{\normalsize f}{\small
  g}{\footnotesize h}{\scriptsize i}{\tiny j}

\textbf{a}\textsf{b}\texttt{c}\textsc{d}\textsl{e}\textit{f}
\textup{x}\textmd{x}\textrm{x} %% currently these do not work
{\upshape a}{\itshape b}{\slshape c}{\scshape d}
{\mdseries e}{\bfseries f}{\ttfamily h}{\sffamily h}{\rmfamily i}
Normal text

%%% Bibliography
\makeatletter {
\leavevmode\@setmode 4
\citation{A}{cite:B}{bid2}{D}{E}
\bauthors{\bpers {a}{}{c}{d}}
\beditors{\bpers[AA] {a}{b}{c}{d}}
\endcitation
\@setmode 1}\par

\def\cite@prenote{cf}
\def\cite@@type{fx}
\cite[p 30]{toto}

\xbox{Bibitem}{\XMLsolvecite{toto}{key1}}
OKOK \bibitem [toto] {titi}{tata}
\ChangeElementName{bibitem}{Bibitem}
\ChangeElementName{natcite}{NatCite}
\ChangeElementName*{bibkey}{Bibkey}
\bibitem [toto] {titi2}{tata}
\natcite{titi2}

%%% Raweb specific stuff 
No everything tested here
\def\X{\pers{a}{b}} \def\Y{\pers{c}{d}}
\begin{participant} \X\Y \end{participant}

\begin{xmlelement*}{catperso}\xbox{head}{xx}
\pers {jean}{dupond}{PHD}{Cnrs}[Ok][not yet]
\end{xmlelement*}

\begin{glossaire}
\glo{aa}{bb}
\glo{cc}{dd}
\end{glossaire}

%%% Other 
Text
\setbox0\xbox{foo}{bar}%
\leaders\copy0\hfil\cleaders\copy0\hfil\xleaders\copy0\hfil
\noindent Word\index{foo}
\index{foo!a@barb|gee}
\index{foo!b@bara}%
\index{foo}
\begin{motscle} first, second,  {(max,+)}\end{motscle}
\url{foo}
\tableofcontents
\makeindex
{\@nomathml=-1 $xy$
\def\[{$$\formulaattribute{textype}{Bdisplay}}  \[ x \] 
\def\({$\formulaattribute{textype}{Binline}}  \( x \) }
\def\unused{$$ and $} % Emacs



a\\[2pt]b
\begin{center}A\end{center}
\begin{quote}B\end{quote}
\begin{quotation}C\end{quotation}
\begin{flushleft}D\end{flushleft}
\begin{flushright}E\end{flushright}

\begin{tabular}{|r|l|c}
\hline a&b&\multicolumn{1}{c|}{x}\hline\\[2pt]
\end{tabular}
$\begin{array}{|r|l|}
a&b&\multicolumn{1}{c|}{x}\\[2pt]
\end{array}$

\begin{minipage}[t][2cm][s]{3cm}
ok
\end{minipage}

\theorembodyfont{\sl}
\theoremstyle{break}
\newtheorem{Cor}{Corollary}
\theoremstyle{plain}
%\newcounter{section}
\setcounter{section}{17}
\newtheorem{Exa}{Example}[section]
{\theorembodyfont{\rmfamily}\newtheorem{Rem}{Remark}}
\theoremstyle{marginbreak}
\newtheorem{Lem}[Cor]{lemma}
\theoremstyle{change}
\theorembodyfont{\small\itshape} \newtheorem{Def}[Cor]{Definition}
\theoremheaderfont{\scshape}
\def\Lenv#1{\texttt{#1}}
\begin{Cor}
 This is a sentence typeset in the theorem environment \Lenv{Cor}.
\end{Cor}
\ref{exA}\ref{exB}
\begin{Exa}
\label{exA}
 This is a sentence typeset \par \label{exB}in the theorem environment \Lenv{Exa}.
\end{Exa}
\begin{Rem}
 This is a sentence typeset in the theorem environment \Lenv{Rem}.
\end{Rem}
\begin{Lem}[Ben User]
 This is a sentence typeset in the theorem environment \Lenv{Lem}.
\end{Lem}
\begin{Def}[Very Impressive definition]
 This is a sentence typeset in the theorem environment \Lenv{Def}.
\end{Def}

\setlength{\unitlength}{1.8mm}
\begin{picture}(40,30)
  \thicklines
  \multiput(20,5)(20,12){2} {\line(0,-1){2}\line(-5,3){20}}
  \multiput(20,5)(-20,12){2} {\line(5,3){20}}
  \put(20,3){\line(5,3){20}}
  \put(20,3){\line(-5,3){20}}
  \put(0,15){\line(0,1){2}}
  \linethickness{1pt}
  \put(20,5) {
   \renewcommand{\xscale}{1}%
   \renewcommand{\xscaley}{-1}%
   \renewcommand{\yscale}{0.6}%
   \renewcommand{\yscalex}{0.6}%
   \scaleput(10,10){\bigcircle{10}}
   \put(0,-2){%
      \scaleput(10,10){\arc(5,0){121}}
      \scaleput(10,10){\arc(5,0){-31}}}}
\end{picture}\hspace{1.5cm}
\setlength{\unitlength}{1mm}
\newcounter{cms}
\begin{picture}(50,39)
\put(0,7){\makebox(0,0)[bl]{cm}}
\multiput*(10,7)(10,0){5}{\addtocounter{cms}{1}\makebox(0,0)[b]{\arabic{cms}}}
\put(15,20){\circle{6}}
\put(30,20){\circle{6}}
\put(15,20){\circle*{2}}
\put(30,20){\circle*{2}}
\put(10,24){\framebox(25,8){car}}
\put(10,32){\vector(-2,1){10}}
\multiput(1,0)(1,0){49}{\line(0,1){2.5}}
\multiput(5,0)(10,0){5}{\line(0,1){3.5}}
\thicklines
\put(0,0){\line(1,0){50}}
\multiput(0,0)(10,0){6}{\line(0,1){5}}
\end{picture}

On the fly changes are possible, for instance
a\allowbreak b
\ChangeElementName{allowbreak}{AllowBreak}
a\allowbreak b

You can change attributes also
\begin{quote}B\end{quote}
\ChangeElementName*{rend}{rendering}
\ChangeElementName*{quote}{quotation}
\begin{quote}B\end{quote}

\section[Section 1]{Section two}
\subsection[Subsetion 2]{Subsection two}

% Wagner test
A \begin{table} $x$ \end{table}
B \begin{table} \begin{tabular}{c} x \end{tabular} \end{table}
C \begin{tabular}{c} x \end{tabular} 
A \begin{table}[ht] $x$ \end{table}
B \begin{table*} \begin{tabular}{c} x \end{tabular} \end{table*}
C \begin{tabular}{c} x \end{tabular} 
\begin{figure} text \end{figure}
\begin{figure}[!h] \includegraphics{x.ps} \end{figure}
\begin{figure}[!h] \includegraphics{x.ps}\hspace{2cm}\includegraphics{x.ps} \end{figure}
\begin{figure}[!h] \includegraphics{x.ps} text\includegraphics{x.ps} \end{figure}


Same test as in torture file
\let\IC=\includegraphics
\def\FILE{Logo-INRIA-couleur}
\IC[angle=0,width=3cm,clip=]{\FILE}
\IC[angle=20,width=.5\textwidth,height=.3\textheight]{\FILE.ducon}
\IC[angle=0,width=\columnwidth,height=\textheight]{\FILE.foo_bar}
{\language=1 a:c
\IC[angle=0, =foo,,width=3cm,scale=1,scale=2,clip]{../../a_b:c}
}

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: