]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/tabular-x-test.tex
Update tex2lyx tests
[lyx.git] / src / tex2lyx / test / tabular-x-test.tex
1 \documentclass{article}
2 \usepackage[T1]{fontenc}
3 \usepackage[latin9]{inputenc}
4 \PassOptionsToPackage{natbib=true}{biblatex}
5 \usepackage{tabularx}
6 \usepackage{xltabular}
7
8 \makeatletter
9
10 \makeatother
11
12 \usepackage[english]{babel}
13 \usepackage[style=authoryear]{biblatex}
14 \begin{document}
15 The first table is configured as longtable first, the selected variable
16 length in second column and set the table width 14cm.
17
18 \begin{xltabular}[c]{14cm}{|c|>{\centering\arraybackslash}X|c|>{\centering\arraybackslash}X|}
19 \hline
20 \hline 
21 \multicolumn{4}{|c|}{xltabular}\tabularnewline
22 \hline 
23 \hline
24 \endhead
25 \hline 
26  & stretching this column. expecting a line break &  & \tabularnewline
27 \hline 
28 Left  &  & Right1 & \tabularnewline
29 \hline 
30  &  &  & and this\tabularnewline
31 \hline 
32  &  &  & \tabularnewline
33 \hline 
34  &  &  & \tabularnewline
35 \hline 
36  &  &  & \tabularnewline
37 \hline 
38 \end{xltabular}
39
40 The next table is a normal table, variable length of forth column
41 and width 14cm table with, enclosing paragraph is not indented.
42
43 \noindent %
44 \begin{tabularx}{14cm}{|c|c|c|>{\raggedright\arraybackslash}X|c|}
45 \hline 
46 \multicolumn{5}{|c|}{tabularx}\tabularnewline
47 \hline 
48 \hline 
49  &  &  & stretching this column only, expecting a line break, which comes later.
50 The table width seems to be wrong & \tabularnewline
51 \hline 
52 Left1 & Left2 &  &  & Right1\tabularnewline
53 \hline 
54  &  & Left3long &  & \tabularnewline
55 \hline 
56 \end{tabularx}
57 \end{document}