diff --git a/sphinx/templates/latex/longtable.tex_t b/sphinx/templates/latex/longtable.tex_t index 862a9eae5d7..a1c8e9b7fb9 100644 --- a/sphinx/templates/latex/longtable.tex_t +++ b/sphinx/templates/latex/longtable.tex_t @@ -10,19 +10,19 @@ <%- if table.caption -%> \sphinxthelongtablecaptionisattop \caption{<%= ''.join(table.caption) %>\strut}<%= labels %>\\*[\sphinxlongtablecapskipadjust] -<%- if table.booktabs -%> +<% if table.booktabs -%> \toprule <% else -%> \hline <% endif -%> <% elif labels -%> -<%- if table.booktabs -%> +<% if table.booktabs -%> \toprule\noalign{\phantomsection<%= labels %>}% <% else -%> \hline\noalign{\phantomsection<%= labels %>}% <% endif -%> <% else -%> -<%- if table.booktabs -%> +<% if table.booktabs -%> \toprule <% else -%> \hline @@ -33,18 +33,18 @@ \multicolumn{<%= table.colcount %>}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} <%= _('continued from previous page') %>}}}\\ -<%- if table.booktabs -%> +<% if table.booktabs -%> \toprule <% else -%> \hline <% endif -%> <%= ''.join(table.header) %> -<%- if table.header and table.booktabs -%> +<% if table.header and table.booktabs -%> \midrule <% endif -%> \endhead -<%- if table.booktabs -%> +<% if table.booktabs -%> \bottomrule <% else -%> \hline @@ -54,7 +54,7 @@ \endlastfoot <%= ''.join(table.body) %> -<%- if table.booktabs -%> +<% if table.booktabs -%> \bottomrule <% endif -%> \end{longtable}\sphinxatlongtableend\end{savenotes} diff --git a/sphinx/templates/latex/tabular.tex_t b/sphinx/templates/latex/tabular.tex_t index e1cb39311b2..5002b35e997 100644 --- a/sphinx/templates/latex/tabular.tex_t +++ b/sphinx/templates/latex/tabular.tex_t @@ -19,19 +19,19 @@ \phantomsection<%= labels %>\nobreak <% endif -%> \begin{tabular}[t]<%= table.get_colspec() -%> -<%- if table.booktabs -%> +<% if table.booktabs -%> \toprule -<%- else -%> +<% else -%> \hline -<%- endif -%> +<% endif -%> <%= ''.join(table.header) %> -<%- if table.header and table.booktabs -%> +<%- if table.header and table.booktabs %> \midrule -<%- endif -%> +<% endif -%> <%=- ''.join(table.body) %> -<%- if table.booktabs -%> +<% if table.booktabs -%> \bottomrule -<%- endif -%> +<% endif -%> \end{tabular} \par \sphinxattableend\end{savenotes} diff --git a/sphinx/templates/latex/tabulary.tex_t b/sphinx/templates/latex/tabulary.tex_t index 15a8f058a8f..917ecfbe644 100644 --- a/sphinx/templates/latex/tabulary.tex_t +++ b/sphinx/templates/latex/tabulary.tex_t @@ -19,19 +19,19 @@ \phantomsection<%= labels %>\nobreak <% endif -%> \begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%> -<%- if table.booktabs -%> +<% if table.booktabs -%> \toprule -<%- else -%> +<% else -%> \hline -<%- endif -%> +<% endif -%> <%= ''.join(table.header) %> -<%- if table.header and table.booktabs -%> +<%- if table.header and table.booktabs %> \midrule -<%- endif -%> +<% endif -%> <%=- ''.join(table.body) %> -<%- if table.booktabs -%> +<% if table.booktabs -%> \bottomrule -<%- endif -%> +<% endif -%> \end{tabulary} \par \sphinxattableend\end{savenotes}