mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #5009: latex: a label for table is vanished if table does not have a caption
This commit is contained in:
parent
65cf7b2cb2
commit
7416e9907c
1
CHANGES
1
CHANGES
@ -21,6 +21,7 @@ Bugs fixed
|
|||||||
* #5016: ``character_level_inline_markup`` setting is not initialized for
|
* #5016: ``character_level_inline_markup`` setting is not initialized for
|
||||||
combination of non reST source parsers (ex. recommonmark) and docutils-0.13
|
combination of non reST source parsers (ex. recommonmark) and docutils-0.13
|
||||||
* #5022: latex: crashed with docutils package provided by Debian/Ubuntu
|
* #5022: latex: crashed with docutils package provided by Debian/Ubuntu
|
||||||
|
* #5009: latex: a label for table is vanished if table does not have a caption
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -9,8 +9,12 @@
|
|||||||
<%= table.get_colspec() %>
|
<%= table.get_colspec() %>
|
||||||
<%- if table.caption -%>
|
<%- if table.caption -%>
|
||||||
\caption{<%= ''.join(table.caption) %>\strut}<%= labels %>\\*[\sphinxlongtablecapskipadjust]
|
\caption{<%= ''.join(table.caption) %>\strut}<%= labels %>\\*[\sphinxlongtablecapskipadjust]
|
||||||
<% endif -%>
|
|
||||||
\hline
|
\hline
|
||||||
|
<% elif labels -%>
|
||||||
|
\hline\noalign{\phantomsection<%= labels %>}%
|
||||||
|
<% else -%>
|
||||||
|
\hline
|
||||||
|
<% endif -%>
|
||||||
<%= ''.join(table.header) %>
|
<%= ''.join(table.header) %>
|
||||||
\endfirsthead
|
\endfirsthead
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
\sphinxcapstartof{table}
|
\sphinxcapstartof{table}
|
||||||
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
||||||
\sphinxaftercaption
|
\sphinxaftercaption
|
||||||
|
<% elif labels -%>
|
||||||
|
\phantomsection<%= labels %>
|
||||||
<% endif -%>
|
<% endif -%>
|
||||||
\begin{tabular}[t]<%= table.get_colspec() -%>
|
\begin{tabular}[t]<%= table.get_colspec() -%>
|
||||||
\hline
|
\hline
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
\sphinxcapstartof{table}
|
\sphinxcapstartof{table}
|
||||||
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
||||||
\sphinxaftercaption
|
\sphinxaftercaption
|
||||||
|
<% elif labels -%>
|
||||||
|
\phantomsection<%= labels %>
|
||||||
<% endif -%>
|
<% endif -%>
|
||||||
\begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%>
|
\begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%>
|
||||||
\hline
|
\hline
|
||||||
|
Loading…
Reference in New Issue
Block a user