File: testpackii.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 (80 lines) | stat: -rw-r--r-- 2,117 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
\documentclass{article}

\long\def\testeq#1#2{\def\tmp{#2}\ifx#1\tmp\else \toks0={#1wantd: ->#2.}
\typeout{\the\toks0}\show #1\uerror\fi}


\usepackage{float,forloop}
\begin{document}
\section {A}
Testing the float package

\section {B}

\makeatletter

\floatstyle{ruled}
\restylefloat{Figure}
\expandafter\let\expandafter\endFigurE\csname endFigure*\endcsname
\expandafter\let\expandafter\FigurE\csname Figure*\endcsname

\testeq\fst@Figure{\fs@ruled} 
\testeq\Figure{\@float{Figure}}
\testeq\FigurE{\@dblfloat{Figure}}
\ifx\endFigure\float@end\else\bad\fi
\ifx\endFigurE\float@dblend\else\bad\fi
\ifx\@float@c@Figure\float@caption\else\bad\fi
\edef\foo{x\the\@float@every@Figure}\testeq\foo{x}
\restylefloat*{Figure}
\ifx\@float@c@Figure\@caption\else\bad\fi
\floatname{Figure}{xfigure}\testeq\fname@Figure{xfigure}
\floatplacement{Figure}{xyz}\testeq\fps@Figure{xyz}

\newfloat{Table}{tbp}{lop}[section]
\testeq\ext@Table{lop}
\let\float@do=\relax
\xdef\foo{\the\float@exts}\testeq\foo{\float@do{lop}}
\floatname{Tablex}{tablex}
\newfloat{Tablex}{tbp}{lop2}

\xdef\foo{\the\float@exts}\testeq\foo{\float@do{lop}\float@do{lop2}}
\floatevery{Table}{foo {\it xx}}
\xdef\foo{\the\@float@every@Table}\testeq\foo{foo {\it xx}}
\testeq\fps@Table{tbp}
\testeq\fname@Table{Table}
\testeq\fname@Tablex{tablex}
\testeq\fnum@Table{\fname@Table{} \theTable}

\testeq\Table{\@float{Table}}
\ifx\endTable\float@end\else\bad\fi
\testeq\ftype@Table{3}
\testeq\ftype@Tablex{4}
\testeq\ftype@Table{3}
\testeq\ftype@Tablex{4}
\testeq\theTablex{\arabic{Tablex}}
\testeq\theTable{\thesection.\arabic{Table}}


\begin{Table}Hey\caption{foo}\end{Table}
\begin{Tablex}Hey\caption[bar]{foo}\end{Tablex}
\begin{Table*}[hh]Hey\end{Table*}
\begin{figure}\includegraphics{foo}\end{figure} 
\begin{table}\includegraphics{foo}\end{table} 

\listof{figure}{List of figures}
\listof{Program}{List of Programs}


\paragraph{forloop}
\newcounter{foo}
\forloop[2]{foo}{1}{\value{foo}<10} {+\thefoo}
\forLoop[3]{2}{17}{foo}{=\thefoo}
\forLoop[3]{2}{18}{foo}{=\thefoo}

\bibliography{bo,bo,bi}
\cite{OK}


This is the end of the document

\end{document}