diff options
Diffstat (limited to '')
23 files changed, 1296 insertions, 0 deletions
diff --git a/tests/roots/test-latex-table/expects/complex_spanning_cell.tex b/tests/roots/test-latex-table/expects/complex_spanning_cell.tex new file mode 100644 index 0000000..d2d6189 --- /dev/null +++ b/tests/roots/test-latex-table/expects/complex_spanning_cell.tex @@ -0,0 +1,69 @@ +\label{\detokenize{complex:complex-spanning-cell}} +\sphinxAtStartPar +table having … +\begin{itemize} +\item {} +\sphinxAtStartPar +consecutive multirow at top of row (1\sphinxhyphen{}1 and 1\sphinxhyphen{}2) + +\item {} +\sphinxAtStartPar +consecutive multirow at end of row (1\sphinxhyphen{}4 and 1\sphinxhyphen{}5) + +\end{itemize} + + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithstandardstyle +\centering +\begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|} +\sphinxtoprule +\sphinxtableatstartofbodyhook\sphinxmultirow{3}{1}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{5}} +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +&\sphinxmultirow{3}{2}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{5}} +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +& +\sphinxAtStartPar +cell1\sphinxhyphen{}3 +&\sphinxmultirow{3}{4}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{5}} +\sphinxAtStartPar +cell1\sphinxhyphen{}4 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +&\sphinxmultirow{2}{5}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{5}} +\sphinxAtStartPar +cell1\sphinxhyphen{}5 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +\\ +\sphinxvlinecrossing{1}\sphinxcline{3-3}\sphinxvlinecrossing{4}\sphinxfixclines{5}\sphinxtablestrut{1}&\sphinxtablestrut{2}&\sphinxmultirow{2}{6}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{5}} +\sphinxAtStartPar +cell2\sphinxhyphen{}3 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +&\sphinxtablestrut{4}&\sphinxtablestrut{5}\\ +\sphinxvlinecrossing{1}\sphinxvlinecrossing{2}\sphinxvlinecrossing{3}\sphinxcline{5-5}\sphinxfixclines{5}\sphinxtablestrut{1}&\sphinxtablestrut{2}&\sphinxtablestrut{6}&\sphinxtablestrut{4}& +\sphinxAtStartPar +cell3\sphinxhyphen{}5 +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/gridtable.tex b/tests/roots/test-latex-table/expects/gridtable.tex new file mode 100644 index 0000000..407abe7 --- /dev/null +++ b/tests/roots/test-latex-table/expects/gridtable.tex @@ -0,0 +1,73 @@ +\label{\detokenize{complex:grid-table}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithnocolorrowsstyle +\centering +\begin{tabulary}{\linewidth}[t]{|T|T|T|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header3 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +&\sphinxmultirow{2}{5}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +& +\sphinxAtStartPar +cell1\sphinxhyphen{}3 +\\ +\sphinxcline{1-1}\sphinxcline{3-3}\sphinxfixclines{3}\sphinxmultirow{2}{7}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +&\sphinxtablestrut{5}& +\sphinxAtStartPar +cell2\sphinxhyphen{}3 +\\ +\sphinxcline{2-3}\sphinxfixclines{3}\sphinxtablestrut{7}&\sphinxstartmulticolumn{2}% +\sphinxmultirow{2}{9}{% +\begin{varwidth}[t]{\sphinxcolwidth{2}{3}} +\sphinxAtStartPar +cell3\sphinxhyphen{}2\sphinxhyphen{}par1 + +\sphinxAtStartPar +cell3\sphinxhyphen{}2\sphinxhyphen{}par2 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +\sphinxstopmulticolumn +\\ +\sphinxcline{1-1}\sphinxfixclines{3} +\sphinxAtStartPar +cell4\sphinxhyphen{}1 +&\multicolumn{2}{l|}{\sphinxtablestrut{9}}\\ +\sphinxhline\sphinxstartmulticolumn{3}% +\begin{varwidth}[t]{\sphinxcolwidth{3}{3}} +\sphinxAtStartPar +cell5\sphinxhyphen{}1 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +\sphinxstopmulticolumn +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/gridtable_with_tabularcolumn.tex b/tests/roots/test-latex-table/expects/gridtable_with_tabularcolumn.tex new file mode 100644 index 0000000..c77b990 --- /dev/null +++ b/tests/roots/test-latex-table/expects/gridtable_with_tabularcolumn.tex @@ -0,0 +1,73 @@ +\label{\detokenize{complex:grid-table-with-tabularcolumns-having-no-vline}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithnovlinesstyle +\centering +\begin{tabulary}{\linewidth}[t]{TTT} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header3 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +&\sphinxmultirow{2}{5}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +& +\sphinxAtStartPar +cell1\sphinxhyphen{}3 +\\ +\sphinxcline{1-1}\sphinxcline{3-3}\sphinxfixclines{3}\sphinxmultirow{2}{7}{% +\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +&\sphinxtablestrut{5}& +\sphinxAtStartPar +cell2\sphinxhyphen{}3 +\\ +\sphinxcline{2-3}\sphinxfixclines{3}\sphinxtablestrut{7}&\sphinxstartmulticolumn{2}% +\sphinxmultirow{2}{9}{% +\begin{varwidth}[t]{\sphinxcolwidth{2}{3}} +\sphinxAtStartPar +cell3\sphinxhyphen{}2\sphinxhyphen{}par1 + +\sphinxAtStartPar +cell3\sphinxhyphen{}2\sphinxhyphen{}par2 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +}% +\sphinxstopmulticolumn +\\ +\sphinxcline{1-1}\sphinxfixclines{3} +\sphinxAtStartPar +cell4\sphinxhyphen{}1 +&\multicolumn{2}{l}{\sphinxtablestrut{9}}\\ +\sphinxhline\sphinxstartmulticolumn{3}% +\begin{varwidth}[t]{\sphinxcolwidth{3}{3}} +\sphinxAtStartPar +cell5\sphinxhyphen{}1 +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% +\sphinxstopmulticolumn +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable.tex b/tests/roots/test-latex-table/expects/longtable.tex new file mode 100644 index 0000000..754d102 --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable.tex @@ -0,0 +1,66 @@ +\label{\detokenize{longtable:longtable}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithborderlessstyle +\begin{longtable}[c]{ll} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook + +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_having_align.tex b/tests/roots/test-latex-table/expects/longtable_having_align.tex new file mode 100644 index 0000000..dcf8f83 --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_align.tex @@ -0,0 +1,65 @@ +\label{\detokenize{longtable:longtable-having-align-option}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[r]{|l|l|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook + +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_having_caption.tex b/tests/roots/test-latex-table/expects/longtable_having_caption.tex new file mode 100644 index 0000000..dd2a87f --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_caption.tex @@ -0,0 +1,67 @@ +\label{\detokenize{longtable:longtable-having-caption}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[c]{|l|l|} +\sphinxthelongtablecaptionisattop +\caption{caption for longtable\strut}\label{\detokenize{longtable:id1}}\\*[\sphinxlongtablecapskipadjust] +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook + +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_having_problematic_cell.tex b/tests/roots/test-latex-table/expects/longtable_having_problematic_cell.tex new file mode 100644 index 0000000..8258612 --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_problematic_cell.tex @@ -0,0 +1,72 @@ +\label{\detokenize{longtable:longtable-having-problematic-cell}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[c]{|*{2}{\X{1}{2}|}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook +\begin{itemize} +\item {} +\sphinxAtStartPar +item1 + +\item {} +\sphinxAtStartPar +item2 + +\end{itemize} +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_having_stub_columns_and_problematic_cell.tex b/tests/roots/test-latex-table/expects/longtable_having_stub_columns_and_problematic_cell.tex new file mode 100644 index 0000000..44114ce --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_stub_columns_and_problematic_cell.tex @@ -0,0 +1,77 @@ +\label{\detokenize{longtable:longtable-having-both-stub-columns-and-problematic-cell}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[c]{|*{3}{\X{1}{3}|}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header3 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{3}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header3 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{3}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook +\sphinxstyletheadfamily \begin{itemize} +\item {} +\sphinxAtStartPar +instub1\sphinxhyphen{}1a + +\item {} +\sphinxAtStartPar +instub1\sphinxhyphen{}1b + +\end{itemize} +&\sphinxstyletheadfamily +\sphinxAtStartPar +instub1\sphinxhyphen{}2 +& +\sphinxAtStartPar +notinstub1\sphinxhyphen{}3 +\\ +\sphinxhline\sphinxstyletheadfamily +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}3 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_having_verbatim.tex b/tests/roots/test-latex-table/expects/longtable_having_verbatim.tex new file mode 100644 index 0000000..fc78914 --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_verbatim.tex @@ -0,0 +1,66 @@ +\label{\detokenize{longtable:longtable-having-verbatim}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[c]{|*{2}{\X{1}{2}|}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook + +\begin{sphinxVerbatimintable}[commandchars=\\\{\}] +\PYG{n}{hello} \PYG{n}{world} +\end{sphinxVerbatimintable} +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_having_widths.tex b/tests/roots/test-latex-table/expects/longtable_having_widths.tex new file mode 100644 index 0000000..5bf1507 --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_widths.tex @@ -0,0 +1,69 @@ +\label{\detokenize{longtable:longtable-having-widths-option}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[c]{|\X{30}{100}|\X{70}{100}|} +\noalign{\phantomsection\label{\detokenize{longtable:namedlongtable}}\label{\detokenize{longtable:mylongtable}}}% +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook + +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} + +\sphinxAtStartPar +See {\hyperref[\detokenize{longtable:mylongtable}]{\sphinxcrossref{mylongtable}}}, same as {\hyperref[\detokenize{longtable:namedlongtable}]{\sphinxcrossref{\DUrole{std,std-ref}{this one}}}}. diff --git a/tests/roots/test-latex-table/expects/longtable_having_widths_and_problematic_cell.tex b/tests/roots/test-latex-table/expects/longtable_having_widths_and_problematic_cell.tex new file mode 100644 index 0000000..bf91920 --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_having_widths_and_problematic_cell.tex @@ -0,0 +1,72 @@ +\label{\detokenize{longtable:longtable-having-both-widths-and-problematic-cell}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\begin{longtable}[c]{|\X{30}{100}|\X{70}{100}|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook +\begin{itemize} +\item {} +\sphinxAtStartPar +item1 + +\item {} +\sphinxAtStartPar +item2 + +\end{itemize} +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/longtable_with_tabularcolumn.tex b/tests/roots/test-latex-table/expects/longtable_with_tabularcolumn.tex new file mode 100644 index 0000000..6383d9d --- /dev/null +++ b/tests/roots/test-latex-table/expects/longtable_with_tabularcolumn.tex @@ -0,0 +1,66 @@ +\label{\detokenize{longtable:longtable-with-tabularcolumn}} + +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithvlinesstyle +\begin{longtable}[c]{|c|c|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endfirsthead + +\multicolumn{2}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}% +}\\ +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\endhead + +\sphinxbottomrule +\multicolumn{2}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook + +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/simple_table.tex b/tests/roots/test-latex-table/expects/simple_table.tex new file mode 100644 index 0000000..7bd85c7 --- /dev/null +++ b/tests/roots/test-latex-table/expects/simple_table.tex @@ -0,0 +1,40 @@ +\label{\detokenize{tabular:simple-table}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\begin{tabulary}{\linewidth}[t]{|T|T|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/table_having_caption.tex b/tests/roots/test-latex-table/expects/table_having_caption.tex new file mode 100644 index 0000000..f2ce553 --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_caption.tex @@ -0,0 +1,44 @@ +\label{\detokenize{tabular:table-having-caption}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\sphinxcapstartof{table} +\sphinxthecaptionisattop +\sphinxcaption{caption for table}\label{\detokenize{tabular:id1}} +\sphinxaftertopcaption +\begin{tabulary}{\linewidth}[t]{|T|T|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/table_having_problematic_cell.tex b/tests/roots/test-latex-table/expects/table_having_problematic_cell.tex new file mode 100644 index 0000000..7d7ad4b --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_problematic_cell.tex @@ -0,0 +1,47 @@ +\label{\detokenize{tabular:table-having-problematic-cell}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\begin{tabular}[t]{|*{2}{\X{1}{2}|}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook\begin{itemize} +\item {} +\sphinxAtStartPar +item1 + +\item {} +\sphinxAtStartPar +item2 + +\end{itemize} +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/table_having_stub_columns_and_problematic_cell.tex b/tests/roots/test-latex-table/expects/table_having_stub_columns_and_problematic_cell.tex new file mode 100644 index 0000000..fbd797a --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_stub_columns_and_problematic_cell.tex @@ -0,0 +1,49 @@ +\label{\detokenize{tabular:table-having-both-stub-columns-and-problematic-cell}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\begin{tabular}[t]{|*{3}{\X{1}{3}|}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header3 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook\sphinxstyletheadfamily \begin{itemize} +\item {} +\sphinxAtStartPar +instub1\sphinxhyphen{}1a + +\item {} +\sphinxAtStartPar +instub1\sphinxhyphen{}1b + +\end{itemize} +&\sphinxstyletheadfamily +\sphinxAtStartPar +instub1\sphinxhyphen{}2 +& +\sphinxAtStartPar +notinstub1\sphinxhyphen{}3 +\\ +\sphinxhline\sphinxstyletheadfamily +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}3 +\\ +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/table_having_threeparagraphs_cell_in_first_col.tex b/tests/roots/test-latex-table/expects/table_having_threeparagraphs_cell_in_first_col.tex new file mode 100644 index 0000000..9acd9a8 --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_threeparagraphs_cell_in_first_col.tex @@ -0,0 +1,26 @@ +\label{\detokenize{tabular:table-with-cell-in-first-column-having-three-paragraphs}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\begin{tabulary}{\linewidth}[t]{|T|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1\sphinxhyphen{}par1 + +\sphinxAtStartPar +cell1\sphinxhyphen{}1\sphinxhyphen{}par2 + +\sphinxAtStartPar +cell1\sphinxhyphen{}1\sphinxhyphen{}par3 +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/table_having_verbatim.tex b/tests/roots/test-latex-table/expects/table_having_verbatim.tex new file mode 100644 index 0000000..a002de5 --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_verbatim.tex @@ -0,0 +1,41 @@ +\label{\detokenize{tabular:table-having-verbatim}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\begin{tabular}[t]{|*{2}{\X{1}{2}|}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\begin{sphinxVerbatimintable}[commandchars=\\\{\}] +\PYG{n}{hello} \PYG{n}{world} +\end{sphinxVerbatimintable} +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/table_having_widths.tex b/tests/roots/test-latex-table/expects/table_having_widths.tex new file mode 100644 index 0000000..fe5f4c4 --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_widths.tex @@ -0,0 +1,46 @@ +\label{\detokenize{tabular:table-having-widths-option}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithbooktabsstyle +\sphinxthistablewithcolorrowsstyle +\centering +\phantomsection\label{\detokenize{tabular:namedtabular}}\label{\detokenize{tabular:mytabular}}\nobreak +\begin{tabular}[t]{\X{30}{100}\X{70}{100}} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} + +\sphinxAtStartPar +See {\hyperref[\detokenize{tabular:mytabular}]{\sphinxcrossref{\DUrole{std,std-ref}{this}}}}, same as {\hyperref[\detokenize{tabular:namedtabular}]{\sphinxcrossref{namedtabular}}}. diff --git a/tests/roots/test-latex-table/expects/table_having_widths_and_problematic_cell.tex b/tests/roots/test-latex-table/expects/table_having_widths_and_problematic_cell.tex new file mode 100644 index 0000000..1baf92c --- /dev/null +++ b/tests/roots/test-latex-table/expects/table_having_widths_and_problematic_cell.tex @@ -0,0 +1,47 @@ +\label{\detokenize{tabular:table-having-both-widths-and-problematic-cell}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\centering +\begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook\begin{itemize} +\item {} +\sphinxAtStartPar +item1 + +\item {} +\sphinxAtStartPar +item2 + +\end{itemize} +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/tabular_having_widths.tex b/tests/roots/test-latex-table/expects/tabular_having_widths.tex new file mode 100644 index 0000000..15321d6 --- /dev/null +++ b/tests/roots/test-latex-table/expects/tabular_having_widths.tex @@ -0,0 +1,40 @@ +\label{\detokenize{tabular:table-having-align-option-tabular}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\raggedright +\begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/tabularcolumn.tex b/tests/roots/test-latex-table/expects/tabularcolumn.tex new file mode 100644 index 0000000..fcb01be --- /dev/null +++ b/tests/roots/test-latex-table/expects/tabularcolumn.tex @@ -0,0 +1,41 @@ +\label{\detokenize{tabular:table-with-tabularcolumn}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\sphinxthistablewithnovlinesstyle +\centering +\begin{tabulary}{\linewidth}[t]{cc} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/tests/roots/test-latex-table/expects/tabulary_having_widths.tex b/tests/roots/test-latex-table/expects/tabulary_having_widths.tex new file mode 100644 index 0000000..2463416 --- /dev/null +++ b/tests/roots/test-latex-table/expects/tabulary_having_widths.tex @@ -0,0 +1,40 @@ +\label{\detokenize{tabular:table-having-align-option-tabulary}} + +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +\raggedleft +\begin{tabulary}{\linewidth}[t]{|T|T|} +\sphinxtoprule +\sphinxstyletheadfamily +\sphinxAtStartPar +header1 +&\sphinxstyletheadfamily +\sphinxAtStartPar +header2 +\\ +\sphinxmidrule +\sphinxtableatstartofbodyhook +\sphinxAtStartPar +cell1\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell1\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell2\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell2\sphinxhyphen{}2 +\\ +\sphinxhline +\sphinxAtStartPar +cell3\sphinxhyphen{}1 +& +\sphinxAtStartPar +cell3\sphinxhyphen{}2 +\\ +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} |