mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Rename `\sphinxcaptionof
to
\sphinxcaption
`, only 2 args
This commit is contained in:
parent
069b937513
commit
cdc1dadd8e
@ -12,7 +12,7 @@
|
||||
<%- endif %>
|
||||
<% if table.caption -%>
|
||||
\sphinxcapstartof{table}
|
||||
\sphinxcaptionof{table}{<%= ''.join(table.caption) %>}<%= labels %>
|
||||
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
||||
\sphinxaftercaption
|
||||
<% endif -%>
|
||||
\begin{tabular}[t]<%= table.get_colspec() -%>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<%- endif %>
|
||||
<% if table.caption -%>
|
||||
\sphinxcapstartof{table}
|
||||
\sphinxcaptionof{table}{<%= ''.join(table.caption) %>}<%= labels %>
|
||||
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
||||
\sphinxaftercaption
|
||||
<% endif -%>
|
||||
\begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%>
|
||||
|
@ -113,7 +113,7 @@
|
||||
% move back vertically to compensate space inserted by next paragraph
|
||||
\vskip-\baselineskip\vskip-\parskip
|
||||
}%
|
||||
\newcommand\sphinxcaptionof[3][\LTcapwidth]{%
|
||||
\newcommand\sphinxcaption[2][\LTcapwidth]{%
|
||||
\noindent\hb@xt@\linewidth{\hss
|
||||
\vtop{\@tempdima\dimexpr#1\relax
|
||||
% don't exceed linewidth for the caption width
|
||||
@ -121,8 +121,8 @@
|
||||
% longtable ignores \abovecaptionskip/\belowcaptionskip, so do the same here
|
||||
\abovecaptionskip\z@skip
|
||||
\belowcaptionskip\z@skip
|
||||
\caption[{#3}]%
|
||||
{\strut\ignorespaces#3\ifhmode\unskip\@finalstrut\strutbox\fi}%
|
||||
\caption[{#2}]%
|
||||
{\strut\ignorespaces#2\ifhmode\unskip\@finalstrut\strutbox\fi}%
|
||||
}\hss}%
|
||||
\par\prevdepth\dp\strutbox
|
||||
}%
|
||||
|
@ -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 '\\sphinxcaptionof{table}{Table caption \\sphinxfootnotemark[4]' in result
|
||||
assert '\\sphinxcaption{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'
|
||||
@ -517,7 +517,7 @@ 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 ('\\sphinxcaptionof{table}{The table title with a reference'
|
||||
assert ('\\sphinxcaption{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'
|
||||
@ -528,7 +528,7 @@ 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 ('\\sphinxcaptionof{table}{footnote \\sphinxfootnotemark[7] in '
|
||||
assert ('\\sphinxcaption{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
|
||||
@ -896,7 +896,7 @@ def test_latex_table_tabulars(app, status, warning):
|
||||
table = tables['table having caption']
|
||||
assert ('\\begin{savenotes}\\sphinxattablestart\n\\centering\n'
|
||||
'\\sphinxcapstartof{table}\n'
|
||||
'\\sphinxcaptionof{table}{caption for table}'
|
||||
'\\sphinxcaption{caption for table}'
|
||||
'\\label{\\detokenize{tabular:id1}}\n'
|
||||
'\\sphinxaftercaption' in table)
|
||||
assert ('\\begin{tabulary}{\\linewidth}[t]{|T|T|}' in table)
|
||||
|
Loading…
Reference in New Issue
Block a user