mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use leaner TeX syntax (follow-up to #11319)
Because it is cool. And avoids overhead. Matter of principle.
This commit is contained in:
@@ -24,14 +24,14 @@
|
||||
<% endif -%>
|
||||
\makeatletter
|
||||
<%- if table.align in ('center', 'default') %>
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
<%- elif table.align == 'left' %>
|
||||
\setlength\LTleft{\@totalleftmargin}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
<%- elif table.align == 'right' %>
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax
|
||||
<%- endif %>
|
||||
\makeatother
|
||||
\begin{longtable}<%= table.get_colspec() %>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
\sphinxthistablewithglobalstyle
|
||||
\sphinxthistablewithborderlessstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{ll}
|
||||
\sphinxtoprule
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax
|
||||
\makeatother
|
||||
\begin{longtable}{|l|l|}
|
||||
\sphinxtoprule
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|l|l|}
|
||||
\sphinxthelongtablecaptionisattop
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|*{2}{\X{1}{2}|}}
|
||||
\sphinxtoprule
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|*{3}{\X{1}{3}|}}
|
||||
\sphinxtoprule
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|*{2}{\X{1}{2}|}}
|
||||
\sphinxtoprule
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|\X{30}{100}|\X{70}{100}|}
|
||||
\noalign{\phantomsection\label{\detokenize{longtable:namedlongtable}}\label{\detokenize{longtable:mylongtable}}}%
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
\sphinxatlongtablestart
|
||||
\sphinxthistablewithglobalstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|\X{30}{100}|\X{70}{100}|}
|
||||
\sphinxtoprule
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
\sphinxthistablewithglobalstyle
|
||||
\sphinxthistablewithvlinesstyle
|
||||
\makeatletter
|
||||
\setlength\LTleft{\@totalleftmargin plus1fill}
|
||||
\setlength\LTright{\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill}
|
||||
\LTleft \@totalleftmargin plus1fill
|
||||
\LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill
|
||||
\makeatother
|
||||
\begin{longtable}{|c|c|}
|
||||
\sphinxtoprule
|
||||
|
||||
Reference in New Issue
Block a user