forked from sphinx-doc/sphinx
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close sphinx-doc#6740: LaTeX: Support tables without column rules
- Loading branch information
Showing
7 changed files
with
212 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
tests/roots/test-latex-table/expects/gridtable_with_no_column_rules.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
\label{\detokenize{complex:grid-table}} | ||
|
||
\begin{savenotes}\sphinxattablestart | ||
\centering | ||
\begin{tabulary}{\linewidth}[t]{TTT} | ||
\hline | ||
\sphinxstyletheadfamily | ||
header1 | ||
&\sphinxstyletheadfamily | ||
header2 | ||
&\sphinxstyletheadfamily | ||
header3 | ||
\\ | ||
\hline | ||
cell1\sphinxhyphen{}1 | ||
&\sphinxmultirow{2}{5}{% | ||
\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} | ||
cell1\sphinxhyphen{}2 | ||
\par | ||
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% | ||
}% | ||
& | ||
cell1\sphinxhyphen{}3 | ||
\\ | ||
\cline{1-1}\cline{3-3}\sphinxmultirow{2}{7}{% | ||
\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} | ||
cell2\sphinxhyphen{}1 | ||
\par | ||
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% | ||
}% | ||
&\sphinxtablestrut{5}& | ||
cell2\sphinxhyphen{}3 | ||
\\ | ||
\cline{2-3}\sphinxtablestrut{7}&\sphinxstartmulticolumn{2}% | ||
\sphinxmultirow{2}{9}{% | ||
\begin{varwidth}[t]{\sphinxcolwidth{2}{3}} | ||
cell3\sphinxhyphen{}2 | ||
\par | ||
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% | ||
}% | ||
\sphinxstopmulticolumn | ||
\\ | ||
\cline{1-1} | ||
cell4\sphinxhyphen{}1 | ||
&\multicolumn{2}{l}{\sphinxtablestrut{9}}\\ | ||
\hline\sphinxstartmulticolumn{3}% | ||
\begin{varwidth}[t]{\sphinxcolwidth{3}{3}} | ||
cell5\sphinxhyphen{}1 | ||
\par | ||
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% | ||
\sphinxstopmulticolumn | ||
\\ | ||
\hline | ||
\end{tabulary} | ||
\par | ||
\sphinxattableend\end{savenotes} |
45 changes: 45 additions & 0 deletions
45
tests/roots/test-latex-table/expects/longtable_with_no_column_rules.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
\label{\detokenize{longtable:longtable}} | ||
|
||
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll} | ||
\hline | ||
\sphinxstyletheadfamily | ||
header1 | ||
&\sphinxstyletheadfamily | ||
header2 | ||
\\ | ||
\hline | ||
\endfirsthead | ||
|
||
\multicolumn{2}{c}% | ||
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\ | ||
\hline | ||
\sphinxstyletheadfamily | ||
header1 | ||
&\sphinxstyletheadfamily | ||
header2 | ||
\\ | ||
\hline | ||
\endhead | ||
|
||
\hline | ||
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\ | ||
\endfoot | ||
|
||
\endlastfoot | ||
|
||
cell1\sphinxhyphen{}1 | ||
& | ||
cell1\sphinxhyphen{}2 | ||
\\ | ||
\hline | ||
cell2\sphinxhyphen{}1 | ||
& | ||
cell2\sphinxhyphen{}2 | ||
\\ | ||
\hline | ||
cell3\sphinxhyphen{}1 | ||
& | ||
cell3\sphinxhyphen{}2 | ||
\\ | ||
\hline | ||
\end{longtable}\sphinxatlongtableend\end{savenotes} |
30 changes: 30 additions & 0 deletions
30
tests/roots/test-latex-table/expects/simple_table_with_no_column_rules.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
\label{\detokenize{tabular:simple-table}} | ||
|
||
\begin{savenotes}\sphinxattablestart | ||
\centering | ||
\begin{tabulary}{\linewidth}[t]{TT} | ||
\hline | ||
\sphinxstyletheadfamily | ||
header1 | ||
&\sphinxstyletheadfamily | ||
header2 | ||
\\ | ||
\hline | ||
cell1\sphinxhyphen{}1 | ||
& | ||
cell1\sphinxhyphen{}2 | ||
\\ | ||
\hline | ||
cell2\sphinxhyphen{}1 | ||
& | ||
cell2\sphinxhyphen{}2 | ||
\\ | ||
\hline | ||
cell3\sphinxhyphen{}1 | ||
& | ||
cell3\sphinxhyphen{}2 | ||
\\ | ||
\hline | ||
\end{tabulary} | ||
\par | ||
\sphinxattableend\end{savenotes} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters