git.iko.soy/typeable/pandoc
on 2.14.0.3 help sign in
typeable/pandoc/test/tables.latex
134 lines 3.8 kB history raw
1Simple table with caption:
3\begin{longtable}[]{@{}rlcl@{}}
4\caption{Demonstration of simple table syntax.}\tabularnewline
5\toprule
6Right & Left & Center & Default \\
7\midrule
8\endfirsthead
9\toprule
10Right & Left & Center & Default \\
11\midrule
12\endhead
1312 & 12 & 12 & 12 \\
14123 & 123 & 123 & 123 \\
151 & 1 & 1 & 1 \\
16\bottomrule
17\end{longtable}
19Simple table without caption:
21\begin{longtable}[]{@{}rlcl@{}}
22\toprule
23Right & Left & Center & Default \\
24\midrule
25\endhead
2612 & 12 & 12 & 12 \\
27123 & 123 & 123 & 123 \\
281 & 1 & 1 & 1 \\
29\bottomrule
30\end{longtable}
32Simple table indented two spaces:
34\begin{longtable}[]{@{}rlcl@{}}
35\caption{Demonstration of simple table syntax.}\tabularnewline
36\toprule
37Right & Left & Center & Default \\
38\midrule
39\endfirsthead
40\toprule
41Right & Left & Center & Default \\
42\midrule
43\endhead
4412 & 12 & 12 & 12 \\
45123 & 123 & 123 & 123 \\
461 & 1 & 1 & 1 \\
47\bottomrule
48\end{longtable}
50Multiline table with caption:
52\begin{longtable}[]{@{}
53 >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
54 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
55 >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
56 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
57\caption{Here's the caption. It may span multiple lines.}\tabularnewline
58\toprule
59\begin{minipage}[b]{\linewidth}\centering
60Centered Header
61\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
62Left Aligned
63\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft
64Right Aligned
65\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
66Default aligned
67\end{minipage} \\
68\midrule
69\endfirsthead
70\toprule
71\begin{minipage}[b]{\linewidth}\centering
72Centered Header
73\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
74Left Aligned
75\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft
76Right Aligned
77\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
78Default aligned
79\end{minipage} \\
80\midrule
81\endhead
82First & row & 12.0 & Example of a row that spans multiple lines. \\
83Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
84\bottomrule
85\end{longtable}
87Multiline table without caption:
89\begin{longtable}[]{@{}
90 >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
91 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
92 >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
93 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
94\toprule
95\begin{minipage}[b]{\linewidth}\centering
96Centered Header
97\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
98Left Aligned
99\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft
100Right Aligned
101\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
102Default aligned
103\end{minipage} \\
104\midrule
105\endhead
106First & row & 12.0 & Example of a row that spans multiple lines. \\
107Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
108\bottomrule
109\end{longtable}
111Table without column headers:
113\begin{longtable}[]{@{}rlcr@{}}
114\toprule
115\endhead
11612 & 12 & 12 & 12 \\
117123 & 123 & 123 & 123 \\
1181 & 1 & 1 & 1 \\
119\bottomrule
120\end{longtable}
122Multiline table without column headers:
124\begin{longtable}[]{@{}
125 >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
126 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
127 >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
128 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
129\toprule
130\endhead
131First & row & 12.0 & Example of a row that spans multiple lines. \\
132Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
133\bottomrule
134\end{longtable}