-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathxltabular-example.inp
127 lines (101 loc) · 2.97 KB
/
xltabular-example.inp
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
\newcommand*\showCounterTable{%
\noindent The Counter \textbf{table:~\arabic{table}}\par
}
\begin{document}
\chapter{Chapter 1}
\section{Section 1 of Chapter 1}
\showCounterTable
\begin{xltabular}[l]{.7\linewidth}{|c|X|X|}
\caption{A table with a caption\label{tab:A}} \\
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\section{Section 2 of Chapter 1}
\showCounterTable
\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\section{Section 3 of Chapter 1}
\showCounterTable
\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
\caption{A table with a caption\label{tab:B}} \\
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\section{Section 4 of Chapter 1}
\showCounterTable
\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
\caption*{A table with a star caption\label{tab:BB}} \\
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\showCounterTable
\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
\caption{A table with a normal caption\label{tab:BBB}} \\
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\chapter{Chapter 2}
\section{Section 1 of Chapter 2}
\showCounterTable
\begin{xltabular}[c]{.7\linewidth}{|c|X|X|}
\caption{A table with a caption\label{tab:C}} \\
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\section{Section 2 of Chapter 2}
\showCounterTable
\begin{xltabular}[c]{.7\linewidth}{|c|X|X|}
\caption{A table with a caption\label{tab:D}} \\
\hline
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\section{Section 3 of Chapter 2}
\showCounterTable
\begin{xltabular}[c]{.7\linewidth}{|c|X|X|}
\caption{A table with a caption\label{tab:DD}} \\
\hline
& \begin{enumerate}\item foo \item bar \end{enumerate} & \\
1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
\hline
\end{xltabular}
\showCounterTable
\section{Section 4 of Chapter 2 -- some references}
\begin{itemize}
\item Table~\ref{tab:A} is on page~\pageref{tab:A}
\item Table~\ref{tab:B} is on page~\pageref{tab:B}
\item Table~\ref{tab:C} is on page~\pageref{tab:C}
\item Table~\ref{tab:D} is on page~\pageref{tab:D}
\end{itemize}
\begin{longtable}{c}
\caption{caption}
\endfirsthead
xxx\\xxx
xxx\\xxx
\end{longtable}
\listoftables
\end{document}
\endinput