File: testbe.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 (165 lines) | stat: -rw-r--r-- 4,284 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
\documentclass {article}
\usepackage{amsmath,listings,color,fancyhdr}
\begin{filecontents+}{lst-test.C}
This is a test file for the listings package

// In a case like \def\bar#1foo#2{...}, this returns the value of #1
// given the token list foo as argument. 
TokenList Parser::read_delimited (const TokenList& L)
{
  TokenList res;
  scanner_status = ss_matching;
  scan_group_del(res,L);
  scanner_status = ss_normal;
  return res;
}

\end{filecontents+}


\def\hhline#1{}
\newcommand{\requirements}[2]{{
    \noindent%
    \begin{tabular}{||p{2.3cm}||p{12.7cm}||}
      \hhline{|t:=:t:=:t|}
      Requirements\vfill & \parbox{12cm}{
        {#1}
      } \\
      \hhline{|:=::=:|}
      Results\vfill      & \parbox{12cm}{
        {#2}
      } \\
      \hhline{|b:=:b:=:b|}
    \end{tabular}
  }}


\begin{document}

Test of bordermatrix

$\bordermatrix{
a&b&c&d&e\cr
f&g&h&i&j\cr
k&l&m&n&o\cr
p&q&r&s&t\cr}
$

no row$\bordermatrix{}$
one row $\bordermatrix{1&2&3}$
first row empty  $\bordermatrix{\cr 1&2&3}$
first row small  $\bordermatrix{1\cr 1&2&3}$
second row empty $\bordermatrix{1&2\cr \cr 1 & 2}$
second row small $\bordermatrix{1&2\cr 3\cr}$
first row OK  $\bordermatrix{1&2\cr 3&4<}$


Testing spaces in math
\skip0=3mm\relax\the\skip0 
\skip0=25pt\relax\the\skip0 
\skip0= 3PC\relax\the\skip0
$x^2 \hbox{\kern 3mm +\hspace{25pt} +\hskip 3PC =0} y^2$
$x^2 \hbox{\kern 3mm+\hspace{25pt}+\hskip 3PC=0} y^2$
$x^2 \hbox{aa\,\;\! $bb\,\;\! cc$dd} y^2$
$x^2 \hbox{aa\,\;\! $b\kern 3mm b\,\;\! cc$dd} y^2$

xx$\mbox{\hspace {2mm}}$yy

Test of spaces between \verb+\begin{description}+ and \verb+\item+


\requirements{
  \begin{description}
  \item[$\bullet$] the input distribution : {\itshape inputDistribution}
  \item[type] : Distribution
  \end{description}
}
{
  \begin{description}
  \item[$\bullet$] the random input vector : {\itshape inputRandomVector}
  \item[type] : RandomVector which implementation is a UsualRandomVector
  \end{description}
}

\lstset{language=C++, basicstyle=\normalsize}
\begin{lstlisting}[frame=TBRL]
class Exception {
public :
        Exception ( const char *description, const char * comment = 0 ) ;
        virtual ~Exception( ) throw();
        /* ... */
        friend ostream & operator<< (ostream &, const Exception & e ) ;
} ;
\end{lstlisting}

\lstset{language=C++, basicstyle=\color{red}}
\lstinputlisting{lst-test.C}

\includegraphics{nosuchfile} 

\section {one}
Footnotes and fonts\footnote{normal\it italic} after note.

Hey {\bf Footnotes and fonts\footnote{normal\it italic} after} note.

\ChangeElementName{use_font_elt}{true}
{\large  This is large {\color{red} This is red 
{\it This is italics\footnote{NormalNote \tiny small note \let\bar\par
      \color{blue}  blue note} after the note} after italic}\par after red} 
after large\ifx\bar\par \error{Non-local definition in footnote} \fi

\newcounter{Rulecounter}
%\setcounter{Rulecounter}{1} <- le laisser à 0

\newcommand{\Rule}[2]{
\begin{description} \refstepcounter*{Rulecounter}\label{rule:#1}
\item[{\color{blue} R\arabic{Rulecounter}}] #2
\end{description}
} 

\section{Two} Some text. \label{secl1}

\appendix

Texte1. \Rule{A} {Rule A}  texte fin1.

Texte2.  \Rule{B} {Rule B}  texte fin2.

Texte3 \Rule{C}{Rule C} texte fin3.

Liens \ref{rule:A} et \ref{rule:B} et \ref{rule:C}. Lien
\pageref{rule:C}

\arabic{Rulecounter} \label{xx1} ok'3
\refstepcounter{Rulecounter}  {\it \arabic{Rulecounter}}\label{xx2} ok4
% this puts an anchor on the previous \it
\refstepcounter* {Rulecounter} {\it \arabic{Rulecounter}} \label{xx3} ok5
\refstepcounter{Rulecounter} {\it \arabic{Rulecounter}} \label{xx4} OK6

\ref{xx1}\ref{xx2}\ref{xx3}\ref{xx4}

%% fancyheadings
\fancypagestyle{plain}
\nouppercase{{foo \bf bar}}
\headrule \footrule \fancypagestyle{myps}

% 
We are in H-mode here
\setcounter{tocdepth}{5}
\ChangeElementName{listoftables}{ListOfTables}
\ChangeElementName{listoffigures}{ListOfFigures}
\XMLaddatt[4]{mode}{all}
\listoftables \XMLaddatt[\the\XMLlastid]{value}{lot}
\listoffigures \XMLaddatt[\the\XMLlastid]{value}{lof}
\tableofcontents
\setcounter{tocdepth}{4}
\tableofcontents
\XMLaddatt[4]{mode2}{all2}

\section{One in appendix} Some text. \label{secl2}
\section{Two in appendix} Some text. 
References \ref{secl1}, \ref{secl2}



\end{document}