Apply [ 125 ] respect automatic table column sizing also in html4css1.
[docutils.git] / docutils / test / functional / expected / latex_cornercases.tex
bloba5ef5a09b34733ba3b043ee000dcd2d4cd971da9
1 \documentclass[a4paper]{article}
2 % generated by Docutils <http://docutils.sourceforge.net/>
3 \usepackage{fixltx2e} % LaTeX patches, \textsubscript
4 \usepackage{cmap} % fix search and cut-and-paste in Acrobat
5 \usepackage{ifthen}
6 \usepackage[T1]{fontenc}
7 \usepackage[utf8]{inputenc}
8 \usepackage{graphicx}
9 \usepackage{multirow}
10 \setcounter{secnumdepth}{0}
11 \usepackage{longtable,ltcaption,array}
12 \setlength{\extrarowheight}{2pt}
13 \newlength{\DUtablewidth} % internal use in tables
15 %%% Custom LaTeX preamble
16 % PDF Standard Fonts
17 \usepackage{mathptmx} % Times
18 \usepackage[scaled=.90]{helvet}
19 \usepackage{courier}
21 %%% User specified packages and stylesheets
23 %%% Fallback definitions for Docutils-specific commands
25 % transition (break, fancybreak, anonymous section)
26 \providecommand*{\DUtransition}[1][class-arg]{%
27 \hspace*{\fill}\hrulefill\hspace*{\fill}
28 \vskip 0.5\baselineskip
31 % hyperlinks:
32 \ifthenelse{\isundefined{\hypersetup}}{
33 \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
34 \usepackage{bookmark}
35 \urlstyle{same} % normal text font (alternatives: tt, rm, sf)
36 }{}
37 \hypersetup{
38 pdftitle={Some Tests for the LaTeX Writer},
41 %%% Title Data
42 \title{\phantomsection%
43 Some Tests for the LaTeX Writer%
44 \label{some-tests-for-the-latex-writer}}
45 \author{}
46 \date{}
48 %%% Body
49 \begin{document}
50 \maketitle
52 These tests contain unusual combinations of syntax elements which may cause
53 trouble for the LaTeX writer but do not need to be tested with other writers.
56 \section{Block Quotes%
57 \label{block-quotes}%
60 \begin{quote}
62 This block quote comes directly after the section heading and is
63 followed by a paragraph.
65 This is the second paragraph of the block quote and it contains
66 some more text filling up some space which would otherwise be
67 empty.
68 \nopagebreak
70 \raggedleft —Attribution
72 \end{quote}
74 This is a paragraph.
76 \begin{quote}
78 This block quote does not have an attribution.
80 \end{quote}
82 This is another paragraph.
84 \begin{quote}
86 Another block quote at the end of the section.
88 \end{quote}
91 \section{More Block Quotes%
92 \label{more-block-quotes}%
95 \begin{quote}
97 Block quote followed by a transition.
99 \end{quote}
102 %___________________________________________________________________________
103 \DUtransition
106 \begin{quote}
108 Another block quote.
110 \end{quote}
113 \section{Images%
114 \label{images}%
117 Image with 20\% width:
119 \includegraphics[width=0.200\linewidth]{../../../docs/user/rst/images/title.png}
121 Image with 100\% width:
123 \includegraphics[width=1.000\linewidth]{../../../docs/user/rst/images/title.png}
126 \section{Rowspanning tables%
127 \label{rowspanning-tables}%
130 Several rowspanning cells in a table.
132 Problem:
134 In LaTeX, \textquotedbl{}overwritten\textquotedbl{} cells need to be defined as empty cells.
136 Docutils (similarily to HTML) uses is the \textquotedbl{}Exchange Table Model\textquotedbl{} (also known
137 as CALS tables, see docs/ref/soextblx.dtd) which defines only the remaining
138 cells in a row \textquotedbl{}affected\textquotedbl{} by multirow cells.
140 Therefore, visit\_entry() is only called for the remaining cells and the
141 LaTeX writer needs bookkeeping to write out the required number of extra
142 '\&'s.
144 \setlength{\DUtablewidth}{\linewidth}
145 \begin{longtable*}[c]{|p{0.075\DUtablewidth}|p{0.133\DUtablewidth}|p{0.133\DUtablewidth}|p{0.086\DUtablewidth}|}
146 \hline
156 \hline
159 & \multirow{2}{0.13\DUtablewidth}{%
160 2/3 2
161 } & \multirow{3}{0.13\DUtablewidth}{%
162 2…4 3
163 } &
166 \cline{1-1}
167 \cline{4-4}
170 & & &
173 \cline{1-1}
174 \cline{2-2}
175 \cline{4-4}
180 & &
183 \hline
184 \end{longtable*}
186 \setlength{\DUtablewidth}{\linewidth}
187 \begin{longtable*}[c]{|p{0.098\DUtablewidth}|p{0.098\DUtablewidth}|p{0.063\DUtablewidth}|}
188 \hline
196 \hline
197 \multirow{2}{0.10\DUtablewidth}{%
198 2/3 1
199 } & \multirow{2}{0.10\DUtablewidth}{%
200 2/3 2
201 } &
204 \cline{3-3}
205 & &
208 \hline
209 \end{longtable*}
211 \setlength{\DUtablewidth}{\linewidth}
212 \begin{longtable*}[c]{|p{0.098\DUtablewidth}|p{0.063\DUtablewidth}|}
213 \hline
219 \hline
220 \multirow{2}{0.10\DUtablewidth}{%
221 2/3 1
222 } &
225 \cline{2-2}
229 \hline
230 \end{longtable*}
232 \setlength{\DUtablewidth}{\linewidth}
233 \begin{longtable*}[c]{|p{0.063\DUtablewidth}|p{0.110\DUtablewidth}|p{0.063\DUtablewidth}|}
234 \hline
242 \hline
245 & \multirow{2}{0.11\DUtablewidth}{%
246 2/3 2
247 } &
250 \cline{1-1}
251 \cline{3-3}
254 & &
257 \hline
258 \end{longtable*}
260 \setlength{\DUtablewidth}{\linewidth}
261 \begin{longtable*}[c]{|p{0.063\DUtablewidth}|p{0.110\DUtablewidth}|}
262 \hline
268 \hline
271 & \multirow{2}{0.11\DUtablewidth}{%
272 2/3 1
273 } \\
274 \cline{1-1}
277 & \\
278 \hline
279 \end{longtable*}
281 \setlength{\DUtablewidth}{\linewidth}
282 \begin{longtable*}[c]{|p{0.063\DUtablewidth}|p{0.110\DUtablewidth}|}
283 \hline
286 & \multirow{2}{0.11\DUtablewidth}{%
287 1/2 1
288 } \\
289 \cline{1-1}
292 & \\
293 \hline
299 \hline
300 \end{longtable*}
302 \setlength{\DUtablewidth}{\linewidth}
303 \begin{longtable*}[c]{|p{0.063\DUtablewidth}|p{0.156\DUtablewidth}|p{0.110\DUtablewidth}|}
304 \hline
307 & \multirow{2}{0.16\DUtablewidth}{%
308 1/2 2
309 } & \multirow{2}{0.11\DUtablewidth}{%
310 1/2 3
311 } \\
312 \cline{1-1}
315 & & \\
316 \hline
317 \end{longtable*}
319 \setlength{\DUtablewidth}{\linewidth}
320 \begin{longtable*}[c]{|p{0.098\DUtablewidth}|p{0.063\DUtablewidth}|p{0.110\DUtablewidth}|}
321 \hline
322 \multirow{2}{0.10\DUtablewidth}{%
323 1/2 3
324 } &
326 & \multirow{2}{0.11\DUtablewidth}{%
327 1/2 3
328 } \\
329 \cline{2-2}
332 & \\
333 \hline
334 \end{longtable*}
336 \setlength{\DUtablewidth}{\linewidth}
337 \begin{longtable*}[c]{|p{0.098\DUtablewidth}|p{0.063\DUtablewidth}|}
338 \hline
339 \multirow{2}{0.10\DUtablewidth}{%
340 1/2 3
341 } &
344 \cline{2-2}
348 \hline
354 \hline
355 \end{longtable*}
357 \end{document}