mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-26 05:57:17 +00:00
(\dotable): Don't inherit \rightskip from
surrounding environment. Add \leftskip to \hsize in the first column. Set \item to \crcr to avoid empty first row. Prepend \parskip glue before table. Set \everycr locally outside of alignment, don't reset it explicitly in \Emultitable. From Andreas Schwab. Also, work on leading commentary in file a bit.
This commit is contained in:
parent
aa9ec7c2c7
commit
dc70a3bc0b
1 changed files with 107 additions and 98 deletions
205
texinfo.tex
205
texinfo.tex
|
@ -1,32 +1,40 @@
|
||||||
%% TeX macros to handle Texinfo files.
|
% texinfo.tex -- TeX macros to handle Texinfo files.
|
||||||
%% $Id$
|
% $Id$
|
||||||
|
%
|
||||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
|
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
|
||||||
% 94, 95, 96, 97 Free Software Foundation, Inc.
|
% Free Software Foundation, Inc.
|
||||||
|
%
|
||||||
%This texinfo.tex file is free software; you can redistribute it and/or
|
% This texinfo.tex file is free software; you can redistribute it and/or
|
||||||
%modify it under the terms of the GNU General Public License as
|
% modify it under the terms of the GNU General Public License as
|
||||||
%published by the Free Software Foundation; either version 2, or (at
|
% published by the Free Software Foundation; either version 2, or (at
|
||||||
%your option) any later version.
|
% your option) any later version.
|
||||||
|
%
|
||||||
%This texinfo.tex file is distributed in the hope that it will be
|
% This texinfo.tex file is distributed in the hope that it will be
|
||||||
%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||||
%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
%General Public License for more details.
|
% General Public License for more details.
|
||||||
|
%
|
||||||
%You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
%along with this texinfo.tex file; see the file COPYING. If not, write
|
% along with this texinfo.tex file; see the file COPYING. If not, write
|
||||||
%to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
%Boston, MA 02111-1307, USA.
|
% Boston, MA 02111-1307, USA.
|
||||||
|
%
|
||||||
|
% In other words, you are welcome to use, share and improve this program.
|
||||||
%In other words, you are welcome to use, share and improve this program.
|
% You are forbidden to forbid anyone else to use, share and improve
|
||||||
%You are forbidden to forbid anyone else to use, share and improve
|
% what you give them. Help stamp out software-hoarding!
|
||||||
%what you give them. Help stamp out software-hoarding!
|
%
|
||||||
|
% Please try the latest version of texinfo.tex before submitting bug
|
||||||
|
% reports; you can get the latest version from:
|
||||||
% Send bug reports to bug-texinfo@prep.ai.mit.edu.
|
% ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex
|
||||||
% Please include a *precise* test case in each bug report.
|
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||||
|
%
|
||||||
|
% Send bug reports to bug-texinfo@gnu.org.
|
||||||
|
% Please include a precise test case in each bug report,
|
||||||
|
% including a complete document with which we can reproduce the problem.
|
||||||
|
%
|
||||||
|
% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You
|
||||||
|
% have to run makeinfo -E to expand macros first; the texi2dvi script
|
||||||
|
% does this.
|
||||||
|
|
||||||
|
|
||||||
% Make it possible to create a .fmt file just by loading this file:
|
% Make it possible to create a .fmt file just by loading this file:
|
||||||
|
@ -2063,10 +2071,7 @@ July\or August\or September\or October\or November\or December\fi
|
||||||
% @multitablelinespace is space to leave between table items, baseline
|
% @multitablelinespace is space to leave between table items, baseline
|
||||||
% to baseline.
|
% to baseline.
|
||||||
% 0pt means it depends on current normal line spacing.
|
% 0pt means it depends on current normal line spacing.
|
||||||
|
%
|
||||||
%%%%
|
|
||||||
% Dimensions
|
|
||||||
|
|
||||||
\newskip\multitableparskip
|
\newskip\multitableparskip
|
||||||
\newskip\multitableparindent
|
\newskip\multitableparindent
|
||||||
\newdimen\multitablecolspace
|
\newdimen\multitablecolspace
|
||||||
|
@ -2076,15 +2081,15 @@ July\or August\or September\or October\or November\or December\fi
|
||||||
\multitablecolspace=12pt
|
\multitablecolspace=12pt
|
||||||
\multitablelinespace=0pt
|
\multitablelinespace=0pt
|
||||||
|
|
||||||
%%%%
|
|
||||||
% Macros used to set up halign preamble:
|
% Macros used to set up halign preamble:
|
||||||
|
%
|
||||||
\let\endsetuptable\relax
|
\let\endsetuptable\relax
|
||||||
\def\xendsetuptable{\endsetuptable}
|
\def\xendsetuptable{\endsetuptable}
|
||||||
\let\columnfractions\relax
|
\let\columnfractions\relax
|
||||||
\def\xcolumnfractions{\columnfractions}
|
\def\xcolumnfractions{\columnfractions}
|
||||||
\newif\ifsetpercent
|
\newif\ifsetpercent
|
||||||
|
|
||||||
%% 2/1/96, to allow fractions to be given with more than one digit.
|
% 2/1/96, to allow fractions to be given with more than one digit.
|
||||||
\def\pickupwholefraction#1 {\global\advance\colcount by1 %
|
\def\pickupwholefraction#1 {\global\advance\colcount by1 %
|
||||||
\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
|
\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
|
||||||
\setuptable}
|
\setuptable}
|
||||||
|
@ -2110,80 +2115,84 @@ July\or August\or September\or October\or November\or December\fi
|
||||||
\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
|
\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
|
||||||
\fi\go}
|
\fi\go}
|
||||||
|
|
||||||
%%%%
|
|
||||||
% multitable syntax
|
% multitable syntax
|
||||||
\def\tab{&\hskip1sp\relax} % 2/2/96
|
\def\tab{&\hskip1sp\relax} % 2/2/96
|
||||||
% tiny skip here makes sure this column space is
|
% tiny skip here makes sure this column space is
|
||||||
% maintained, even if it is never used.
|
% maintained, even if it is never used.
|
||||||
|
|
||||||
|
|
||||||
%%%%
|
|
||||||
% @multitable ... @end multitable definitions:
|
% @multitable ... @end multitable definitions:
|
||||||
|
|
||||||
\def\multitable{\parsearg\dotable}
|
\def\multitable{\parsearg\dotable}
|
||||||
|
|
||||||
\def\dotable#1{\bgroup
|
\def\dotable#1{\bgroup
|
||||||
\let\item\cr
|
\vskip\parskip
|
||||||
\tolerance=9500
|
\let\item\crcr
|
||||||
\hbadness=9500
|
\tolerance=9500
|
||||||
\setmultitablespacing
|
\hbadness=9500
|
||||||
\parskip=\multitableparskip
|
\setmultitablespacing
|
||||||
\parindent=\multitableparindent
|
\parskip=\multitableparskip
|
||||||
\overfullrule=0pt
|
\parindent=\multitableparindent
|
||||||
\global\colcount=0\relax%
|
\overfullrule=0pt
|
||||||
\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
|
\global\colcount=0
|
||||||
% To parse everything between @multitable and @item :
|
\def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
|
||||||
\setuptable#1 \endsetuptable
|
%
|
||||||
% Need to reset this to 0 after \setuptable.
|
% To parse everything between @multitable and @item:
|
||||||
\global\colcount=0\relax%
|
\setuptable#1 \endsetuptable
|
||||||
%
|
%
|
||||||
% This preamble sets up a generic column definition, which will
|
% \everycr will reset column counter, \colcount, at the end of
|
||||||
% be used as many times as user calls for columns.
|
% each line. Every column entry will cause \colcount to advance by one.
|
||||||
% \vtop will set a single line and will also let text wrap and
|
% The table preamble
|
||||||
% continue for many paragraphs if desired.
|
% looks at the current \colcount to find the correct column width.
|
||||||
\halign\bgroup&\global\advance\colcount by 1\relax%
|
\everycr{\noalign{%
|
||||||
\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
|
%
|
||||||
% In order to keep entries from bumping into each other
|
% \filbreak%% keeps underfull box messages off when table breaks over pages.
|
||||||
% we will add a \leftskip of \multitablecolspace to all columns after
|
% Maybe so, but it also creates really weird page breaks when the table
|
||||||
% the first one.
|
% breaks over pages. Wouldn't \vfil be better? Wait until the problem
|
||||||
% If a template has been used, we will add \multitablecolspace
|
% manifests itself, so it can be fixed for real --karl.
|
||||||
% to the width of each template entry.
|
\global\colcount=0\relax}}%
|
||||||
% If user has set preamble in terms of percent of \hsize
|
%
|
||||||
% we will use that dimension as the width of the column, and
|
% This preamble sets up a generic column definition, which will
|
||||||
% the \leftskip will keep entries from bumping into each other.
|
% be used as many times as user calls for columns.
|
||||||
% Table will start at left margin and final column will justify at
|
% \vtop will set a single line and will also let text wrap and
|
||||||
% right margin.
|
% continue for many paragraphs if desired.
|
||||||
\ifnum\colcount=1
|
\halign\bgroup&\global\advance\colcount by 1\relax
|
||||||
\else
|
\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
|
||||||
\ifsetpercent
|
%
|
||||||
|
% In order to keep entries from bumping into each other
|
||||||
|
% we will add a \leftskip of \multitablecolspace to all columns after
|
||||||
|
% the first one.
|
||||||
|
%
|
||||||
|
% If a template has been used, we will add \multitablecolspace
|
||||||
|
% to the width of each template entry.
|
||||||
|
%
|
||||||
|
% If the user has set preamble in terms of percent of \hsize we will
|
||||||
|
% use that dimension as the width of the column, and the \leftskip
|
||||||
|
% will keep entries from bumping into each other. Table will start at
|
||||||
|
% left margin and final column will justify at right margin.
|
||||||
|
%
|
||||||
|
% Make sure we don't inherit \rightskip from the outer environment.
|
||||||
|
\rightskip=0pt
|
||||||
|
\ifnum\colcount=1
|
||||||
|
% The first column will be indented with the surrounding text.
|
||||||
|
\advance\hsize by\leftskip
|
||||||
\else
|
\else
|
||||||
% If user has <not> set preamble in terms of percent of \hsize
|
\ifsetpercent \else
|
||||||
% we will advance \hsize by \multitablecolspace
|
% If user has not set preamble in terms of percent of \hsize
|
||||||
\advance\hsize by \multitablecolspace
|
% we will advance \hsize by \multitablecolspace.
|
||||||
|
\advance\hsize by \multitablecolspace
|
||||||
|
\fi
|
||||||
|
% In either case we will make \leftskip=\multitablecolspace:
|
||||||
|
\leftskip=\multitablecolspace
|
||||||
\fi
|
\fi
|
||||||
% In either case we will make \leftskip=\multitablecolspace:
|
% Ignoring space at the beginning and end avoids an occasional spurious
|
||||||
\leftskip=\multitablecolspace
|
% blank line, when TeX decides to break the line at the space before the
|
||||||
\fi
|
% box from the multistrut, so the strut ends up on a line by itself.
|
||||||
% Ignoring space at the beginning and end avoids an occasional spurious
|
% For example:
|
||||||
% blank line, when TeX decides to break the line at the space before the
|
% @multitable @columnfractions .11 .89
|
||||||
% box from the multistrut, so the strut ends up on a line by itself.
|
% @item @code{#}
|
||||||
% For example:
|
% @tab Legal holiday which is valid in major parts of the whole country.
|
||||||
% @multitable @columnfractions .11 .89
|
% Is automatically provided with highlighting sequences respectively marking
|
||||||
% @item @code{#}
|
% characters.
|
||||||
% @tab Legal holiday which is valid in major parts of the whole country.
|
\noindent\ignorespaces##\unskip\multistrut}\cr
|
||||||
% Is automatically provided with highlighting sequences respectively marking
|
|
||||||
% characters.
|
|
||||||
\noindent\ignorespaces##\unskip\multistrut}\cr
|
|
||||||
% \everycr will reset column counter, \colcount, at the end of
|
|
||||||
% each line. Every column entry will cause \colcount to advance by one.
|
|
||||||
% The table preamble
|
|
||||||
% looks at the current \colcount to find the correct column width.
|
|
||||||
\global\everycr{\noalign{%
|
|
||||||
% \filbreak%% keeps underfull box messages off when table breaks over pages.
|
|
||||||
% Maybe so, but it also creates really weird page breaks when the table
|
|
||||||
% breaks over pages Wouldn't \vfil be better? Wait until the problem
|
|
||||||
% manifests itself, so it can be fixed for real --karl.
|
|
||||||
\global\colcount=0\relax}}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
|
\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
|
||||||
|
|
Loading…
Reference in a new issue