LaTeX, follow-up to PR #5012, avoid label separated by pagebreak

PR #5012 took care of this for longtable, but the problem can also arise
with tabular/tabulary and is much easier to fix.
This commit is contained in:
jfbu 2018-06-08 18:45:29 +02:00
parent 738198022c
commit 45c63a8e2d
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %> \sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
\sphinxaftercaption \sphinxaftercaption
<% elif labels -%> <% elif labels -%>
\phantomsection<%= labels %> \phantomsection<%= labels %>\nobreak
<% endif -%> <% endif -%>
\begin{tabular}[t]<%= table.get_colspec() -%> \begin{tabular}[t]<%= table.get_colspec() -%>
\hline \hline

View File

@ -15,7 +15,7 @@
\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %> \sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %>
\sphinxaftercaption \sphinxaftercaption
<% elif labels -%> <% elif labels -%>
\phantomsection<%= labels %> \phantomsection<%= labels %>\nobreak
<% endif -%> <% endif -%>
\begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%> \begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%>
\hline \hline

View File

@ -2,7 +2,7 @@
\begin{savenotes}\sphinxattablestart \begin{savenotes}\sphinxattablestart
\centering \centering
\phantomsection\label{\detokenize{tabular:namedtabular}}\label{\detokenize{tabular:mytabular}} \phantomsection\label{\detokenize{tabular:namedtabular}}\label{\detokenize{tabular:mytabular}}\nobreak
\begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|} \begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|}
\hline \hline
\sphinxstyletheadfamily \sphinxstyletheadfamily