#380: use correct command to determine line width when two-column layout is in effect.

This commit is contained in:
Georg Brandl 2010-04-17 12:50:26 +02:00
parent f4f3066581
commit 9e01551178
2 changed files with 5 additions and 5 deletions

View File

@ -140,7 +140,7 @@
\newlength\leftsidespace
\def\mycolorbox#1{%
\setlength\leftsidespace{\@totalleftmargin}%
\setlength\distancetoright{\textwidth}%
\setlength\distancetoright{\linewidth}%
\advance\distancetoright -\@totalleftmargin %
\noindent\hspace*{\@totalleftmargin}%
\fcolorbox{VerbatimBorderColor}{VerbatimColor}{%
@ -233,7 +233,7 @@
\newcommand{\pysiglinewithargsret}[3]{%
\settowidth{\py@argswidth}{#1\code{(}}%
\addtolength{\py@argswidth}{-2\py@argswidth}%
\addtolength{\py@argswidth}{\textwidth}%
\addtolength{\py@argswidth}{\linewidth}%
\item[#1\code{(}\py@sigparams{#2}{#3}]}
% This version is being checked in for the historical record; it shows

View File

@ -374,7 +374,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
def visit_topic(self, node):
self.body.append('\\setbox0\\vbox{\n'
'\\begin{minipage}{0.95\\textwidth}\n')
'\\begin{minipage}{0.95\\linewidth}\n')
def depart_topic(self, node):
self.body.append('\\end{minipage}}\n'
'\\begin{center}\\setlength{\\fboxsep}{5pt}'
@ -608,13 +608,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
elif self.table.has_verbatim:
self.body.append('\n\\begin{tabular}')
else:
self.body.append('\n\\begin{tabulary}{\\textwidth}')
self.body.append('\n\\begin{tabulary}{\\linewidth}')
if self.table.colspec:
self.body.append(self.table.colspec)
else:
if self.table.has_verbatim:
colwidth = 0.95 / self.table.colcount
colspec = ('p{%.3f\\textwidth}|' % colwidth) * \
colspec = ('p{%.3f\\linewidth}|' % colwidth) * \
self.table.colcount
self.body.append('{|' + colspec + '}\n')
elif self.table.longtable: