mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#380: use correct command to determine line width when two-column layout is in effect.
This commit is contained in:
parent
f4f3066581
commit
9e01551178
@ -140,7 +140,7 @@
|
|||||||
\newlength\leftsidespace
|
\newlength\leftsidespace
|
||||||
\def\mycolorbox#1{%
|
\def\mycolorbox#1{%
|
||||||
\setlength\leftsidespace{\@totalleftmargin}%
|
\setlength\leftsidespace{\@totalleftmargin}%
|
||||||
\setlength\distancetoright{\textwidth}%
|
\setlength\distancetoright{\linewidth}%
|
||||||
\advance\distancetoright -\@totalleftmargin %
|
\advance\distancetoright -\@totalleftmargin %
|
||||||
\noindent\hspace*{\@totalleftmargin}%
|
\noindent\hspace*{\@totalleftmargin}%
|
||||||
\fcolorbox{VerbatimBorderColor}{VerbatimColor}{%
|
\fcolorbox{VerbatimBorderColor}{VerbatimColor}{%
|
||||||
@ -233,7 +233,7 @@
|
|||||||
\newcommand{\pysiglinewithargsret}[3]{%
|
\newcommand{\pysiglinewithargsret}[3]{%
|
||||||
\settowidth{\py@argswidth}{#1\code{(}}%
|
\settowidth{\py@argswidth}{#1\code{(}}%
|
||||||
\addtolength{\py@argswidth}{-2\py@argswidth}%
|
\addtolength{\py@argswidth}{-2\py@argswidth}%
|
||||||
\addtolength{\py@argswidth}{\textwidth}%
|
\addtolength{\py@argswidth}{\linewidth}%
|
||||||
\item[#1\code{(}\py@sigparams{#2}{#3}]}
|
\item[#1\code{(}\py@sigparams{#2}{#3}]}
|
||||||
|
|
||||||
% This version is being checked in for the historical record; it shows
|
% This version is being checked in for the historical record; it shows
|
||||||
|
@ -374,7 +374,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
|
|
||||||
def visit_topic(self, node):
|
def visit_topic(self, node):
|
||||||
self.body.append('\\setbox0\\vbox{\n'
|
self.body.append('\\setbox0\\vbox{\n'
|
||||||
'\\begin{minipage}{0.95\\textwidth}\n')
|
'\\begin{minipage}{0.95\\linewidth}\n')
|
||||||
def depart_topic(self, node):
|
def depart_topic(self, node):
|
||||||
self.body.append('\\end{minipage}}\n'
|
self.body.append('\\end{minipage}}\n'
|
||||||
'\\begin{center}\\setlength{\\fboxsep}{5pt}'
|
'\\begin{center}\\setlength{\\fboxsep}{5pt}'
|
||||||
@ -608,13 +608,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
elif self.table.has_verbatim:
|
elif self.table.has_verbatim:
|
||||||
self.body.append('\n\\begin{tabular}')
|
self.body.append('\n\\begin{tabular}')
|
||||||
else:
|
else:
|
||||||
self.body.append('\n\\begin{tabulary}{\\textwidth}')
|
self.body.append('\n\\begin{tabulary}{\\linewidth}')
|
||||||
if self.table.colspec:
|
if self.table.colspec:
|
||||||
self.body.append(self.table.colspec)
|
self.body.append(self.table.colspec)
|
||||||
else:
|
else:
|
||||||
if self.table.has_verbatim:
|
if self.table.has_verbatim:
|
||||||
colwidth = 0.95 / self.table.colcount
|
colwidth = 0.95 / self.table.colcount
|
||||||
colspec = ('p{%.3f\\textwidth}|' % colwidth) * \
|
colspec = ('p{%.3f\\linewidth}|' % colwidth) * \
|
||||||
self.table.colcount
|
self.table.colcount
|
||||||
self.body.append('{|' + colspec + '}\n')
|
self.body.append('{|' + colspec + '}\n')
|
||||||
elif self.table.longtable:
|
elif self.table.longtable:
|
||||||
|
Loading…
Reference in New Issue
Block a user