diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index ad882758c..d59e5e255 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -31,7 +31,7 @@ from test_build_html import ENV_WARNINGS LATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex'] DOCCLASSES = ['howto', 'manual'] STYLEFILES = ['article.cls', 'fancyhdr.sty', 'titlesec.sty', 'amsmath.sty', - 'framed.sty', 'color.sty', 'fancyvrb.sty', 'threeparttable.sty', + 'framed.sty', 'color.sty', 'fancyvrb.sty', 'fncychap.sty', 'geometry.sty', 'kvoptions.sty', 'hyperref.sty'] LATEX_WARNINGS = ENV_WARNINGS + """\ @@ -492,7 +492,7 @@ def test_footnote(app, status, warning): assert ('\\bibitem[bar]{\\detokenize{bar}}' '{\\phantomsection\\label{\\detokenize{footnote:bar}} ' '\ncite\n}') in result - assert '\\caption{Table caption \\sphinxfootnotemark[4]' in result + assert '\\sphinxcaptionof{table}{Table caption \\sphinxfootnotemark[4]' in result assert ('\\hline%\n\\begin{footnotetext}[4]\\sphinxAtStartFootnote\n' 'footnote in table caption\n%\n\\end{footnotetext}\\ignorespaces %\n' '\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n' @@ -501,7 +501,7 @@ def test_footnote(app, status, warning): assert ('Information about VIDIOC\\_CROPCAP %\n' '\\begin{footnote}[6]\\sphinxAtStartFootnote\n' 'footnote in table not in header\n%\n\\end{footnote}\n\\\\\n\\hline\n' - '\\end{tabulary}\n\\end{threeparttable}\n' + '\\end{tabulary}\n' '\\par\n\\sphinxattableend\\end{savenotes}\n') in result @@ -517,7 +517,8 @@ def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning): '{\\hyperref[\\detokenize{index:authoryear}]' '{\\sphinxcrossref{{[}AuthorYear{]}}}}.}' in result) assert '\\chapter{The section with a reference to {[}AuthorYear{]}}' in result - assert '\\caption{The table title with a reference to {[}AuthorYear{]}}' in result + assert ('\\sphinxcaptionof{table}{The table title with a reference' + ' to {[}AuthorYear{]}}' in result) assert '\\paragraph{The rubric title with a reference to {[}AuthorYear{]}}' in result assert ('\\chapter{The section with a reference to \\sphinxfootnotemark[4]}\n' '\\label{\\detokenize{index:the-section-with-a-reference-to}}' @@ -527,8 +528,8 @@ def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning): '\\sphinxfootnotemark[6].}\\label{\\detokenize{index:id27}}\\end{figure}\n' '%\n\\begin{footnotetext}[6]\\sphinxAtStartFootnote\n' 'Footnote in caption\n%\n\\end{footnotetext}')in result - assert ('\\caption{footnote \\sphinxfootnotemark[7] ' - 'in caption of normal table}\\label{\\detokenize{index:id28}}') in result + assert ('\\sphinxcaptionof{table}{footnote \\sphinxfootnotemark[7] in ' + 'caption of normal table}\\label{\\detokenize{index:id28}}') in result assert ('\\caption{footnote \\sphinxfootnotemark[8] ' 'in caption \\sphinxfootnotemark[9] of longtable\\strut}') in result assert ('\\endlastfoot\n%\n\\begin{footnotetext}[8]\\sphinxAtStartFootnote\n' @@ -894,10 +895,11 @@ def test_latex_table_tabulars(app, status, warning): # table having caption table = tables['table having caption'] assert ('\\begin{savenotes}\\sphinxattablestart\n\\centering\n' - '\\begin{threeparttable}\n\\capstart\\caption{caption for table}' - '\\label{\\detokenize{tabular:id1}}' in table) + '\\sphinxcaptionof{table}{caption for table}' + '\\label{\\detokenize{tabular:id1}}\n' + '\\sphinxaftercaption' in table) assert ('\\begin{tabulary}{\\linewidth}[t]{|T|T|}' in table) - assert ('\\hline\n\\end{tabulary}\n\\end{threeparttable}' + assert ('\\hline\n\\end{tabulary}' '\n\\par\n\\sphinxattableend\\end{savenotes}' in table) # table having verbatim