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
|
||||
combination of non reST source parsers (ex. recommonmark) and docutils-0.13
|
||||
* #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
|
||||
--------
|
||||
|
@ -9,8 +9,12 @@
|
||||
<%= table.get_colspec() %>
|
||||
<%- if table.caption -%>
|
||||
\caption{<%= ''.join(table.caption) %>\strut}<%= labels %>\\*[\sphinxlongtablecapskipadjust]
|
||||
<% endif -%>
|
||||
\hline
|
||||
<% elif labels -%>
|
||||
\hline\noalign{\phantomsection<%= labels %>}%
|
||||
<% else -%>
|
||||
\hline
|
||||
<% endif -%>
|
||||
<%= ''.join(table.header) %>
|
||||
\endfirsthead
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
\sphinxcapstartof{table}
|
||||
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
||||
\sphinxaftercaption
|
||||
<% elif labels -%>
|
||||
\phantomsection<%= labels %>
|
||||
<% endif -%>
|
||||
\begin{tabular}[t]<%= table.get_colspec() -%>
|
||||
\hline
|
||||
|
@ -14,6 +14,8 @@
|
||||
\sphinxcapstartof{table}
|
||||
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
|
||||
\sphinxaftercaption
|
||||
<% elif labels -%>
|
||||
\phantomsection<%= labels %>
|
||||
<% endif -%>
|
||||
\begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%>
|
||||
\hline
|
||||
|
Loading…
Reference in New Issue
Block a user