summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-13 23:29:19 +0000
committerKarl Berry <karl@freefriends.org>2011-02-13 23:29:19 +0000
commit9fa55f9a7454d978f593a04380ba2fec148a72f1 (patch)
tree047975fc95d8593f3e0ef56a42593aed3348f337
parent12809cd1a2331fcb5d546f5e5077bf891e0a473e (diff)
finstrut (13feb11)
git-svn-id: svn://tug.org/texlive/trunk@21386 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/finstrut/README17
-rw-r--r--Master/texmf-dist/doc/latex/finstrut/SRCFILEs.txt11
-rw-r--r--Master/texmf-dist/doc/latex/finstrut/finstrut.pdfbin123568 -> 144162 bytes
-rw-r--r--Master/texmf-dist/doc/latex/finstrut/fstrutst.pdfbin0 -> 31365 bytes
-rw-r--r--Master/texmf-dist/source/latex/finstrut/finstrut.tex29
-rw-r--r--Master/texmf-dist/source/latex/finstrut/fstrutst.tex57
-rw-r--r--Master/texmf-dist/source/latex/finstrut/srcfiles.tex4
-rw-r--r--Master/texmf-dist/tex/latex/finstrut/finstrut.sty151
8 files changed, 214 insertions, 55 deletions
diff --git a/Master/texmf-dist/doc/latex/finstrut/README b/Master/texmf-dist/doc/latex/finstrut/README
index 42db4c37a8a..e7605fbc209 100644
--- a/Master/texmf-dist/doc/latex/finstrut/README
+++ b/Master/texmf-dist/doc/latex/finstrut/README
@@ -1,14 +1,15 @@
README for the `finstrut' package
\@finalstrut allowing vertical mode
- (C) Uwe Lueck 2011/02/09
+ (C) Uwe Lueck 2011/02/12
`finstrut.sty' changes LaTeX's \@finalstrut (that is
-automatically inserted at the end of footnote text) so that
-it does not produce an extra empty line in vertical mode,
-e.g., with \lipsum from lipsum.sty for dummy text.
+automatically inserted at the end of footnote text and
+paragraph table columns) so that it does not produce an
+extra empty line in vertical mode, e.g., with \lipsum from
+lipsum.sty for dummy text.
-KEYWORDs: footnotes; tables, dummy text, macro programming
+KEYWORDs: footnotes, tables; dummy text, macro programming
The package file `finstrut.sty' and the documentation files
`finstrut.pdf' and `finstrut.tex' can be redistributed and/or
@@ -34,6 +35,6 @@ Please report bugs, problems, and suggestions via
http://www.contact-ednotes.sty.de.vu
--- "Release r0.1a:" In correcting doc. dates, I see v0.1
-has redundancies. Before uploading my private v0.2 removing
-them, I must test it ... U.L., 2011-02-09"b" \ No newline at end of file
+-- v0.4: code and suggestions by Donald Arseneau
+(at package options), new for tables and package writers
+
diff --git a/Master/texmf-dist/doc/latex/finstrut/SRCFILEs.txt b/Master/texmf-dist/doc/latex/finstrut/SRCFILEs.txt
index 06e8b256a79..0e400d86c56 100644
--- a/Master/texmf-dist/doc/latex/finstrut/SRCFILEs.txt
+++ b/Master/texmf-dist/doc/latex/finstrut/SRCFILEs.txt
@@ -1,12 +1,11 @@
*File List*
-finstrut.sty 2010/12/20 v0.1 vmode final strut (UL)
-finstrut.tex 2011/02/09 documenting finstrut.sty (UL)
- makedoc.cfg 2011/01/24 documentation settings
-mdoccorr.cfg 2011/01/27 local typographical corrections with makedoc.sty
-srcfiles.tex 2011/02/09 collect file infos
+finstrut.sty 2011/02/12 v0.4 vmode final strut (DA/UL)
+finstrut.tex 2011/02/12 documenting finstrut.sty (UL)
+fstrutst.tex 2011/02/12 test/demo finstrut.sty (DA/UL)
+srcfiles.tex 2011/02/12 collect file infos
***********
- List made at 2011/02/09, 20:00
+ List made at 2011/02/12, 20:14
from script file srcfiles.tex
diff --git a/Master/texmf-dist/doc/latex/finstrut/finstrut.pdf b/Master/texmf-dist/doc/latex/finstrut/finstrut.pdf
index da4cd2fbfad..dd818d41ad0 100644
--- a/Master/texmf-dist/doc/latex/finstrut/finstrut.pdf
+++ b/Master/texmf-dist/doc/latex/finstrut/finstrut.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/finstrut/fstrutst.pdf b/Master/texmf-dist/doc/latex/finstrut/fstrutst.pdf
new file mode 100644
index 00000000000..5609111eb3c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/finstrut/fstrutst.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/finstrut/finstrut.tex b/Master/texmf-dist/source/latex/finstrut/finstrut.tex
index 5713dd16bca..c88180daa8a 100644
--- a/Master/texmf-dist/source/latex/finstrut/finstrut.tex
+++ b/Master/texmf-dist/source/latex/finstrut/finstrut.tex
@@ -1,11 +1,11 @@
-\ProvidesFile{finstrut.tex}[2011/02/09 documenting finstrut.sty (UL)]
+\ProvidesFile{finstrut.tex}[2011/02/12 documenting finstrut.sty (UL)]
\title{\textsf{finstrut.sty}\\---\\Final Strut Allowing Vertical
Mode\thanks{This document describes version
\textcolor{blue}{\UseVersionOf{finstrut.sty}}
of \textsf{finstrut.sty} as of \UseDateOf{finstrut.sty}.}}
% \listfiles %% 2010/12/22
{ \RequirePackage{makedoc}[2010/12/20] \ProcessLineMessage{}
- \MakeJobDoc{18}{\SectionLevelOneParseInput}
+ \MakeJobDoc{18}{\SectionLevelTwoParseInput}
}
\documentclass{article}%% TODO paper dimensions!?
\input{makedoc.cfg} %% shared formatting settings
@@ -16,6 +16,9 @@
\makeatletter \@beginparpenalty\@lowpenalty \makeatother
\sloppy
\begin{document}
+% \author{Uwe L\"uck\thanks{\urlhttpref{http://contact-ednotes.sty.de.vu}}
+% \and
+% Donald Arseneau}
\maketitle
\begin{abstract}\noindent
\LaTeX\ internally inserts `\@finalstrut<strutbox>'
@@ -34,6 +37,13 @@ macro programming
% \tableofcontents
% \newpage
+\section{Remark on 'lipsum'}
+Almost at the same moment that 'finstrut' v0.1 was installed
+(2011-02-09), a new version v1.1 %% v0.4: v1.1
+of 'lipsum' was uploaded that offers a package option
+`[nopar]' %% v0.4
+to avoid a final `\par'.
+
\section{Installing and Calling}
The package file 'finstrut.sty' is provided ready,
installation only requires putting it somewhere where \TeX\ finds it
@@ -41,17 +51,18 @@ installation only requires putting it somewhere where \TeX\ finds it
base).\urlfoot{ukfaqref}{inst-wlcf}
Below the `\documentclass' line(s) and above `\begin{document}',
-you load 'finstrut.sty' (as usually) by
-\begin{verbatim}
- \usepackage{finstrut}
-\end{verbatim}
-There are no package options.
+you load 'finstrut.sty' (as usually) by
+\[`\usepackage{finstrut}'\qquad \mbox{or by}\qquad
+ `\usepackage[<options>]{finstrut}'\]---<options> described below.
\section{The Package File}
+\subsection{Header (Legalize)}
\input{finstrut.doc}
\end{document}
VERSION HISTORY
-2011/02/09 cut out from `fnlineno.sty' [and corr. date+script]
-
+2011/02/09 cut out from `fnlineno.sty' [and corr. date+script]
+2011/02/09c remark on `lipsum' upload same day
+2011/02/11 \subsection
+2011/02/12 for v0.4
diff --git a/Master/texmf-dist/source/latex/finstrut/fstrutst.tex b/Master/texmf-dist/source/latex/finstrut/fstrutst.tex
new file mode 100644
index 00000000000..990c2affe09
--- /dev/null
+++ b/Master/texmf-dist/source/latex/finstrut/fstrutst.tex
@@ -0,0 +1,57 @@
+\ProvidesFile{fstrutst.tex}[2011/02/12 test/demo finstrut.sty (DA/UL)]
+\documentclass{article}
+\usepackage{readprov}
+\usepackage{array}
+\usepackage[full,show]{finstrut}[2011/02/12]
+\makeatletter
+ % with array.sty
+ \@ifpackageloaded{array}{%
+ \def\arraytest{%
+ \begin{tabular}{|l|b{2cm}|}\hline
+ b alignment & b alignment\par \\\hline
+ \end{tabular}
+ \nobreak\hfill
+ \begin{tabular}{|l|b{2cm}|}\hline
+ b alignment & b alignment \\\hline
+ \end{tabular}
+ \par\medskip\noindent
+ }%
+ }{\let\arraytest\relax}
+\makeatother
+\textheight=3.5in
+\begin{document}
+ \begin{center}
+ \bfseries
+ Trying \textsf{finstrut}
+ \UseVersionOf{finstrut.sty} as of \UseDateOf{finstrut.sty}
+ \end{center}
+% \edef\latexoutput{\the\output}
+% \output{\tracingonline=1 \showboxbreadth=10 \showboxdepth=1
+% \showbox\footins
+% \latexoutput
+% \global\output\expandafter{\latexoutput}}
+% \makeatletter \let\@finalstrut\@gobble \makeatother %% WITHOUT
+\begin{tabular}{|l|p{2cm}|}\hline
+ deep & $\displaystyle \int_j$\par \\\hline
+\end{tabular}
+ \nobreak\hfill
+\begin{tabular}{|l|p{2cm}|}\hline
+ deep & $\displaystyle \int_j$\\\hline
+\end{tabular}
+ \par\medskip\noindent
+\begin{tabular}{|l|p{2cm}|}\hline
+ bad prevdepth & Hello world\hrule \\\hline
+\end{tabular}
+ \nobreak\hfill
+\begin{tabular}{|l|p{2cm}|}\hline
+ bad prevdepth & Hello world \\\hline
+\end{tabular}
+ \par\medskip\noindent
+\arraytest
+O\footnote{\vrule depth22.22pt\par}
+A\footnote{x\par}
+B\footnote{y\par}
+O\footnote{\vrule depth22.22pt}
+A\footnote{x}
+B\footnote{y}
+\end{document}
diff --git a/Master/texmf-dist/source/latex/finstrut/srcfiles.tex b/Master/texmf-dist/source/latex/finstrut/srcfiles.tex
index 201d25b8809..a403521b4c5 100644
--- a/Master/texmf-dist/source/latex/finstrut/srcfiles.tex
+++ b/Master/texmf-dist/source/latex/finstrut/srcfiles.tex
@@ -1,6 +1,6 @@
\RequirePackage{myfilist}
-\ProvidesFile{srcfiles.tex}[2011/02/09 collect file infos]
+\ProvidesFile{srcfiles.tex}[2011/02/12 collect file infos]
\EmptyFileList %%% [readprov.sty,myfilist.sty]
\ReadPackageInfos{finstrut}
-\ReadFileInfos{finstrut,makedoc.cfg,mdoccorr.cfg,srcfiles}
+\ReadFileInfos{finstrut,fstrutst,srcfiles}
\ListInfos[SRCFILEs.txt]
diff --git a/Master/texmf-dist/tex/latex/finstrut/finstrut.sty b/Master/texmf-dist/tex/latex/finstrut/finstrut.sty
index 71604491c1f..102384df2d5 100644
--- a/Master/texmf-dist/tex/latex/finstrut/finstrut.sty
+++ b/Master/texmf-dist/tex/latex/finstrut/finstrut.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{finstrut}[2010/12/20 v0.1 vmode final strut (UL)]
+\ProvidesPackage{finstrut}[2011/02/12 v0.4 vmode final strut (DA/UL)]
-%% Copyright (C) 2010 Uwe Lueck,
+%% Copyright (C) 2010 2011 Uwe Lueck,
%% http://www.contact-ednotes.sty.de.vu
%% -- author-maintained in the sense of LPPL below --
%%
@@ -16,36 +16,127 @@
%%
%% http://www.contact-ednotes.sty.de.vu
%%
-%% This is a variant of LaTeX's `\@finalstrut'
-%% that doesn't produce a spurious empty line
-%% in vmode. In general, this deals with a
-%% closing `\par' from users in footnotes,
-%% the idea especially came from using the
-%% 'lipsum' package.
-%% See `source2e.pdf' for the rationale
-%% behind the original definition; it may imply
-%% that the present suggestion is bad with
-%% `p' columns in `tabular' etc.
-\renewcommand*{\@finalstrut}[1]{%
- \unskip
- \ifhmode
- \nobreak
-%% ... allows hyphenation of last word.
- \vrule \@width\z@ \@height\z@
- \@depth \expandafter \dp
- \else
-%% Assuming it's vmode:
- \kern -\prevdepth
- \kern \expandafter \dp
- \fi
-%% With the applications in `latex.ltx', namely with
-%% one-token parameters only, the parameter could be
-%% dropped. Keeping it may once be useful for referring
-%% to a box register by `\box<n>'.
- #1%
+%% % *** Another Introduction ***
+%% % This is a variant of LaTeX's `\@finalstrut'
+%% % that doesn't produce a spurious empty line
+%% % in vmode. In general, this deals with a
+%% % closing `\par' from users in footnotes,
+%% % the idea especially came from using the
+%% % 'lipsum' package.
+%% % See `source2e.pdf' (`ltboxes.dtx') for the rationale
+%% % behind the original definition; it may imply
+%% % that the present suggestion is bad with
+%% % `p' columns in `tabular' etc.
+%% %
+%% % With v0.4, the code essentially is Donald Arseneau's.
+%%
+%% === Outline ===
+%% v0.4 considers recommendations by Donald Arseneau.
+%% Some of them may break in applications that we do not
+%% know about, therefore they must be called by package
+%% options. Package Option |[full]| calls all of them.
+%%
+%% The choices shall not be checked at each invocation
+%% of `\@finalstrut', instead they are evaluated at the
+%% definition of `\@finalstrut', at the end of the package.
+%% Choices are prepended to this definition by defining
+%% `\@tempe', `\@tempd', `\@tempc', and `\@tempb'.
+%%
+%% === Options ===
+%% According to `ltboxes.dtx', a `vmode' test once
+%% was introduced for \LaTeXe, but in 1994 removed again---it
+%% ``broke" in `p' columns. For this reason, v0.1 and v0.3
+%% used an `hmode' test instead.
+%% `ltboxes.dtx' does not tell exactly what code broke in
+%% exactly which situation. Bad.
+%% Brave users may dare the `vmode' test again by choosing
+%% package option |[v]|. It sets `\@tempe' for
+%% `\edef\@finalstrut'. While other conditionals are disabled
+%% right before the latter, we disable the mode test here:
+\AtEndOfPackage{%
+ \def\@tempe#1#2{\noexpand\ifhmode#1\else#2\fi}}
+\DeclareOption{v}{%
+ \AtEndOfPackage{%
+ \def\@tempe#1#2{\noexpand\ifvmode#2\else#1\fi}}}
+%% |[argdelim]| appends a `\relax' to `\@finalstrut''s argument
+%% in case the box number is given as a string of digits
+%% (whereas `latex.ltx' only has `\strutbox' and
+%% `\@arstrutbox' as arguments).
+%% This does not work when somebody tries (e.g.\@)
+%% `\@finalstrut11 '. I.e., a ``multi-token" argument must
+%% be enclosed in braces indeed.
+\AtEndOfPackage{\let\@tempd\@empty}
+\DeclareOption{argdelim}{%
+ \AtEndOfPackage{\def\@tempd{\relax}}}
+\AtEndOfPackage{\let\@tempc\@secondoftwo}
+%% |[dptest]| caters for depth exceeeding the depth of the
+%% strut box and for negative depth. The test requires that
+%% a multi-token argument (see above) is enclosed in braces.
+\DeclareOption{dptest}{%
+ \AtEndOfPackage{%
+ \def\@tempd{\relax}%
+ \let\@tempc\@firstoftwo}}
+%% |[full]| enables all of Donald Arseneau's suggestions:
+\DeclareOption{full}{%
+ \AtEndOfPackage{%
+ \def\@tempe#1#2{\noexpand\ifvmode#2\else#1\fi}%
+ \def\@tempd{\relax}%
+ \let\@tempc\@firstoftwo
+}}
+%% |[show]| displays the definition of `\@finalstrut'
+%% actually resulting:
+\AtEndOfPackage{\let\@tempb\relax}
+\DeclareOption{show}{%
+ \AtEndOfPackage{\def\@tempb{\show\@finalstrut}}}
+%% Appending choices to the end-of-package hook:
+\ProcessOptions
+%%
+%% === Core Code ===
+%% Now we append the `\edef' of `\@finalstrut' to the
+%% end-of-package hook
+%% (we must hurry so that nobody changes `\@tempe' etc.).
+%% |\dp@only| will be an abbreviation for invoking a strut rule;
+%% it will only be enabled after the `\edef':
+\let\dp@only\relax
+\AtEndOfPackage{%
+ \begingroup
+%% Some conditionals are disabled for the `\edef':
+ \let\ifdim\relax \let\else\relax \let\fi\relax
+ \xdef\@gtempa#1{%
+ \unskip
+ \@tempe{% %% \ifhmode/\ifvmode
+ \noexpand\nobreak
+ \vrule \dp@only #1\@tempd %% maybe \relax
+ }{%
+%% Whereas v0.1 and v0.3 used `\kern' to get the bottom
+%% distance in `vmode', Donald Arseneau recommends `\hrule'
+%% for the sake of bottom alignment with 'array.sty'
+%% (`b' type columns):
+ \@tempc{% %% depth test or not
+ \ifdim\prevdepth<\dp#1\relax
+ \ifdim\prevdepth>\z@
+ \kern -\prevdepth
+ \fi
+ \hrule \dp@only#1\relax
+ \fi
+ }{\hrule \dp@only #1\@tempd}% %% maybe \relax
+ }%
+ }
+ \endgroup
+ \let\@finalstrut\@gtempa
+ \@tempb %% maybe \show
+%% |\dp@only|
+ \def\dp@only{\@width\z@ \@height\z@ \@depth\dp}
}
+%%
+%% === Leaving ===
\endinput
%%
-%% == VERSION HISTORY ==
+%% === VERSION HISTORY ===
v0.1 2010/12/20 very first
+v0.2 2011/02/09 redundancies removed -- still bad
+ NOT DISTRIBUTED
+v0.3 2011/02/11 code much reduced again (no \expandafter at all!);
+ wrong comments replaced; \subsection
+v0.4 2011/02/12 Donald Arseneau's full suggestions as options