From ae0109dadfae2aeaf6c2c503fd54b95fecaddf66 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 5 Mar 2010 00:32:03 +0000 Subject: fwlw doc update, own package (4mar10) git-svn-id: svn://tug.org/texlive/trunk@17318 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/fwlw/fwlw.pdf | Bin 0 -> 152390 bytes Master/texmf-dist/doc/latex/fwlw/fwlw.tex | 90 +++++++++++++++ Master/texmf-dist/tex/latex/fwlw/fwlw.sty | 141 +++++++++++++++++++++++ Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty | 141 ----------------------- Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/fwlw.tlpsrc | 0 7 files changed, 233 insertions(+), 142 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/fwlw/fwlw.pdf create mode 100644 Master/texmf-dist/doc/latex/fwlw/fwlw.tex create mode 100644 Master/texmf-dist/tex/latex/fwlw/fwlw.sty delete mode 100644 Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty create mode 100644 Master/tlpkg/tlpsrc/fwlw.tlpsrc diff --git a/Master/texmf-dist/doc/latex/fwlw/fwlw.pdf b/Master/texmf-dist/doc/latex/fwlw/fwlw.pdf new file mode 100644 index 00000000000..84d4c7ace4c Binary files /dev/null and b/Master/texmf-dist/doc/latex/fwlw/fwlw.pdf differ diff --git a/Master/texmf-dist/doc/latex/fwlw/fwlw.tex b/Master/texmf-dist/doc/latex/fwlw/fwlw.tex new file mode 100644 index 00000000000..be27e0246a7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fwlw/fwlw.tex @@ -0,0 +1,90 @@ +\documentclass[pagesize=auto]{scrartcl} + +\usepackage{fixltx2e} +\usepackage{etex} +\usepackage{xspace} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage{booktabs} +\usepackage{microtype} +\usepackage[unicode=true]{hyperref} + +\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\cls}[1]{\textsf{#1}} +\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} +\makeatletter +\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} +\makeatother +\newcommand*{\env}[1]{\texttt{#1}} +\newcommand*{\opt}[1]{\texttt{#1}} +\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle} +\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}} +\newcommand*{\oarg}[1]{\texttt{[}\meta{#1}\texttt{]}} +\newcommand*{\BibTeX}{Bib\kern-0.08em\TeX\@\xspace} +\newcommand*{\BigTeX}{Big\kern-0.08em\TeX\@\xspace} + +\pdfstringdefDisableCommands{% + \def\BibTeX{BibTeX\xspace}% + \def\BigTeX{BigTeX\space}% +} + +\addtokomafont{title}{\rmfamily} + +\title{The \pkg{fwlw} package} +\subtitle{First Word, Last Word} +\author{Donald Arseneau} +\date{1995} + + +\begin{document} + +\maketitle + +\noindent +Modifications to \LaTeX\ output mechanism to determine the first and +last words on the current page, plus the first word on the \emph{next} +page. These can be used in head-lines or foot-lines. The `words' +you see may not be real words, but any unbreakable object. + +Such labelling does not make sense when \cmd{\chapter} generates a page +break, so the last page before a \cmd{\chapter} (or any \cmd{\clearpage}) gets +a blank ``next word'', and the first page of the chapter gets a blank +``first word''. There is a problem when footnotes split: the ``next word'' +is blank. + +Two pagestyles are defined to print these words: \verb+\pagestyle{NextWordFoot}+ +which helps you read ahead to the word on the next page; and \verb+\pagestyle{fwlwhead}+ +which is like the headers in a lexicon. Or you can use the +words in your own page-style\ldots + +The words are available in the box registers: +% +\begin{labeling}[\hspace{\labelsep}--]{\cmd{\FirstWordBox}} +\item[\cmd{\FirstWordBox}] first word on this page +\item[\cmd{\NextWordBox}] first word on next page +\item[\cmd{\LastWordBox}] last word on this page +\end{labeling} +% +Use them in your header lines like: \verb+\copy\LastWordBox+. + +Note that `words' may be things like: +% +\begin{itemize} +\item \verb+two~words+ +\item \verb+[ ]Word+ (\verb+[ ]+ represents a parindent box) +\item a whole displayed equation +\item the first column of an aligned equation +\item anomalously blank, if there are \cmd{\write}s or split footnotes etc. +\item partial words like \verb+par-+ or \verb+-tial+. +\end{itemize} + +An entirely different approach is possible using \cmd{\mark} and \cmd{\obeyspaces}, +and would have different problems. The problems with catcode changes +may be more or less serious for your particular application. You are +welcome to write a package using that method. The best solution would +involve \cmd{\mark} and an input filter program to +`\verb+\w{tag} \w{each} \w{word}, \w{in} \w{some} \w{way}+.' + +\end{document} diff --git a/Master/texmf-dist/tex/latex/fwlw/fwlw.sty b/Master/texmf-dist/tex/latex/fwlw/fwlw.sty new file mode 100644 index 00000000000..17498f0bd51 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fwlw/fwlw.sty @@ -0,0 +1,141 @@ +% F W L W . S T Y ( First Word, Last Word ) +% +% Donald Arseneau (1993, 1995) +% +% Modifications to LaTeX output mechanism to determine the first and +% last words on the current page, plus the first word on the *next* +% page. These can be used in head-lines or foot-lines. The `words' +% you see may not be real words, but any unbreakable object. +% +% Such labelling does not make sense when \chapter generates a page +% break, so the last page before a \chapter (or any \clearpage) gets +% a blank "next word", and the first page of the chapter gets a blank +% "first word". There is a problem when footnotes split: the "next word" +% is blank. +% +% Two pagestyles are defined to print these words: \pagestyle{NextWordFoot} +% which helps you read ahead to the word on the next page; and \pagestyle +% {fwlwhead} which is like the headers in a lexicon. Or you can use the +% words in your own page-style... +% The words are available in the box registers: +% \FirstWordBox - first word on this page +% \NextWordBox - first word on next page +% \LastWordBox - last word on this page +% Use them in your header lines like: \copy\LastWordBox. +% +% Note that `words' may be things like: +% - two~words +% - [ ]Word ( [ ] represents a parindent box) +% - a whole displayed equation +% - the first column of an aligned equation +% - anomalously blank, if there are \writes or split footnotes etc. +% - partial words like par- or -tial. +% +% An entirely different approach is possible using \mark and \obeyspaces, +% and would have different problems. The problems with catcode changes +% may be more or less serious for your particular application. You are +% welcome to write a package using that method. The best solution would +% involve \mark and an input filter program to +% `\w{tag} \w{each} \w{word}, \w{in} \w{some} \w{way}.' + +\mathchardef\LW@pen 12345 +\newbox\FirstWordBox \global\setbox\FirstWordBox\hbox{} +\newbox\NextWordBox \global\setbox\NextWordBox\hbox{} +\newbox\LastWordBox \global\setbox\LastWordBox\hbox{} +\newbox\LW@box \global\setbox\LW@box\hbox{} +\newbox\LW@saved + +\def\ps@fwlwhead{\let\@mkboth\@gobbletwo + \def\@oddhead{\if@fcolmade\else \copy\FirstWordBox\hfil\copy\LastWordBox\fi}% + \let\@evenhead\@oddhead % no word-heads on float pages. + \let\@oddfoot\@empty\let\@evenfoot\@oddfoot + \let\chaptermark\@gobble\let\sectionmark\@gobble\let\subsectionmark\@gobble + } + +\def\ps@NextWordFoot{\let\@mkboth\@gobbletwo + \let\@oddhead\@empty\let\@evenhead\@oddhead + \def\@oddfoot{\hfil\thepage\hfil\llap{\copy\NextWordBox}}\let\@evenfoot\@empty + \let\chaptermark\@gobble\let\sectionmark\@gobble\let\subsectionmark\@gobble + } + +% Shell around old output routine. Gets first word from next page by +% letting TeX continue with \vsize=0 to get a look at the next line. +% Values of \outputpenalty for \specialoutput ( -10001 to -19999 ) are +% simply run through the output routine. +% \supereject and \clearpage give a blank "next word" +% When called after making a stub-page the stub is returned to the vertical +% list, the previous page is restored and shipped out normally, but +% knowing what the next word will be. + +\edef\FWLWnorm@L@output{\the\output} + +\output{\@tempswafalse +\ifnum \outputpenalty>-\@MM \ifnum\outputpenalty<-\@M \@tempswatrue\fi\fi +\if@tempswa % special (float) output +% \message{Float handler: penalty=\the\outputpenalty}% + \FWLWnorm@L@output +\else + \ifvoid\LW@saved % end of real page +% \message{End of real page}% + \global\setbox\LW@saved\copy\@cclv % save page + \setbox\@tempboxa\vbox{\unvbox\@cclv \unskip\unkern\unpenalty + \unskip\unkern\unpenalty \unskip\unkern\unpenalty + \setbox\@tempboxa\lastbox + \LW@getlast@word\@tempboxa\LastWordBox + }\ifnum\outputpenalty>-\@MM % not \supereject + \xdef\LW@vsize{\global\vsize\the\vsize + \global\holdinginserts\the\holdinginserts}% + \global\vsize\z@ \global\holdinginserts\@ne + \else % \supereject, just output, don't look for word on next page +% \message{caused by super-eject.} + \global\setbox\@cclv\box\LW@saved + \global\setbox\NextWordBox\hbox{}% + \FWLWnorm@L@output + \global\setbox\FirstWordBox\box\NextWordBox + \fi + \else % saved page => just did tiny page to get next word +% \message{Just got next line:}{\tracingall\showboxdepth2 \showbox\@cclv}% + \setbox\@tempboxa\vbox{\penalty\LW@pen\unvcopy\@cclv \LW@getall@boxes + \ifvbox\LW@box \penalty\LW@pen\unvbox\LW@box \LW@getall@boxes\fi + \ifvbox\LW@box \global\setbox\NextWordBox\hbox{}\else + \LW@getfirst@word\LW@box\NextWordBox + \fi}% Return tiny page to page list: + \unvbox\@cclv \ifnum\outputpenalty<\@M \penalty\outputpenalty\fi + \LW@vsize\relax + \global\setbox\@cclv\box\LW@saved + \FWLWnorm@L@output + \global\setbox\FirstWordBox\box\NextWordBox +\fi\fi} + +% globally get last "word" from a box (#1) into another box (#2) +\def\LW@getlast@word#1#2{\setbox\@tempboxa\vbox{\hsize\maxdimen \@parboxrestore + \hyphenpenalty\@M \exhyphenpenalty\@M + \rightskip\fill \looseness\@M \linepenalty\z@ + \noindent\unhbox#1\endgraf + \unskip\unkern\unpenalty \global\setbox\LW@box\lastbox + }\LW@repack{#2}} + +% globally get first "word" from a box (#1) into another box (#2) +\def\LW@getfirst@word#1#2{\setbox\@tempboxa\vbox{\@parboxrestore + \parshape\thr@@ \z@\z@ \z@\z@ \z@\maxdimen \parfillskip\fill + \hyphenpenalty\@M \exhyphenpenalty\@M + \hbadness\@MM \overfullrule\z@ \hfuzz\maxdimen + \ifhbox#1\noindent + \vadjust{\penalty\LW@pen}\penalty-\@M\unhbox#1% eliminate previous \leftskip + \else\ifvbox#1\penalty\LW@pen\unvbox#1\fi\fi + \endgraf + \@tempcnta\z@ \LW@getall@boxes}\LW@repack{#2}} + +% Go through a vertical list that starts with special penalty +\def\LW@getall@boxes{\global\setbox\LW@box\lastbox \unskip\unkern \unskip\unkern + \let\@tempa\relax + \ifvoid \LW@box \advance\@tempcnta\@ne \else \@tempcnta\z@ \fi + \ifnum\lastpenalty=\LW@pen \else \unpenalty\fi + \ifnum\lastpenalty=\LW@pen \else \unpenalty\fi + \ifnum\lastpenalty=\LW@pen \else \ifnum\@tempcnta<5 + \let\@tempa\LW@getall@boxes \fi \fi \unpenalty \@tempa} + +% Put contents of \LW@box into hbox #1 +\def\LW@repack#1{\global\setbox#1\hbox{\ifhbox\LW@box + \unhbox\LW@box\unskip\unskip\unpenalty\unskip + \else\ifvbox\LW@box\box\LW@box\fi\fi}} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty b/Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty deleted file mode 100644 index 17498f0bd51..00000000000 --- a/Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty +++ /dev/null @@ -1,141 +0,0 @@ -% F W L W . S T Y ( First Word, Last Word ) -% -% Donald Arseneau (1993, 1995) -% -% Modifications to LaTeX output mechanism to determine the first and -% last words on the current page, plus the first word on the *next* -% page. These can be used in head-lines or foot-lines. The `words' -% you see may not be real words, but any unbreakable object. -% -% Such labelling does not make sense when \chapter generates a page -% break, so the last page before a \chapter (or any \clearpage) gets -% a blank "next word", and the first page of the chapter gets a blank -% "first word". There is a problem when footnotes split: the "next word" -% is blank. -% -% Two pagestyles are defined to print these words: \pagestyle{NextWordFoot} -% which helps you read ahead to the word on the next page; and \pagestyle -% {fwlwhead} which is like the headers in a lexicon. Or you can use the -% words in your own page-style... -% The words are available in the box registers: -% \FirstWordBox - first word on this page -% \NextWordBox - first word on next page -% \LastWordBox - last word on this page -% Use them in your header lines like: \copy\LastWordBox. -% -% Note that `words' may be things like: -% - two~words -% - [ ]Word ( [ ] represents a parindent box) -% - a whole displayed equation -% - the first column of an aligned equation -% - anomalously blank, if there are \writes or split footnotes etc. -% - partial words like par- or -tial. -% -% An entirely different approach is possible using \mark and \obeyspaces, -% and would have different problems. The problems with catcode changes -% may be more or less serious for your particular application. You are -% welcome to write a package using that method. The best solution would -% involve \mark and an input filter program to -% `\w{tag} \w{each} \w{word}, \w{in} \w{some} \w{way}.' - -\mathchardef\LW@pen 12345 -\newbox\FirstWordBox \global\setbox\FirstWordBox\hbox{} -\newbox\NextWordBox \global\setbox\NextWordBox\hbox{} -\newbox\LastWordBox \global\setbox\LastWordBox\hbox{} -\newbox\LW@box \global\setbox\LW@box\hbox{} -\newbox\LW@saved - -\def\ps@fwlwhead{\let\@mkboth\@gobbletwo - \def\@oddhead{\if@fcolmade\else \copy\FirstWordBox\hfil\copy\LastWordBox\fi}% - \let\@evenhead\@oddhead % no word-heads on float pages. - \let\@oddfoot\@empty\let\@evenfoot\@oddfoot - \let\chaptermark\@gobble\let\sectionmark\@gobble\let\subsectionmark\@gobble - } - -\def\ps@NextWordFoot{\let\@mkboth\@gobbletwo - \let\@oddhead\@empty\let\@evenhead\@oddhead - \def\@oddfoot{\hfil\thepage\hfil\llap{\copy\NextWordBox}}\let\@evenfoot\@empty - \let\chaptermark\@gobble\let\sectionmark\@gobble\let\subsectionmark\@gobble - } - -% Shell around old output routine. Gets first word from next page by -% letting TeX continue with \vsize=0 to get a look at the next line. -% Values of \outputpenalty for \specialoutput ( -10001 to -19999 ) are -% simply run through the output routine. -% \supereject and \clearpage give a blank "next word" -% When called after making a stub-page the stub is returned to the vertical -% list, the previous page is restored and shipped out normally, but -% knowing what the next word will be. - -\edef\FWLWnorm@L@output{\the\output} - -\output{\@tempswafalse -\ifnum \outputpenalty>-\@MM \ifnum\outputpenalty<-\@M \@tempswatrue\fi\fi -\if@tempswa % special (float) output -% \message{Float handler: penalty=\the\outputpenalty}% - \FWLWnorm@L@output -\else - \ifvoid\LW@saved % end of real page -% \message{End of real page}% - \global\setbox\LW@saved\copy\@cclv % save page - \setbox\@tempboxa\vbox{\unvbox\@cclv \unskip\unkern\unpenalty - \unskip\unkern\unpenalty \unskip\unkern\unpenalty - \setbox\@tempboxa\lastbox - \LW@getlast@word\@tempboxa\LastWordBox - }\ifnum\outputpenalty>-\@MM % not \supereject - \xdef\LW@vsize{\global\vsize\the\vsize - \global\holdinginserts\the\holdinginserts}% - \global\vsize\z@ \global\holdinginserts\@ne - \else % \supereject, just output, don't look for word on next page -% \message{caused by super-eject.} - \global\setbox\@cclv\box\LW@saved - \global\setbox\NextWordBox\hbox{}% - \FWLWnorm@L@output - \global\setbox\FirstWordBox\box\NextWordBox - \fi - \else % saved page => just did tiny page to get next word -% \message{Just got next line:}{\tracingall\showboxdepth2 \showbox\@cclv}% - \setbox\@tempboxa\vbox{\penalty\LW@pen\unvcopy\@cclv \LW@getall@boxes - \ifvbox\LW@box \penalty\LW@pen\unvbox\LW@box \LW@getall@boxes\fi - \ifvbox\LW@box \global\setbox\NextWordBox\hbox{}\else - \LW@getfirst@word\LW@box\NextWordBox - \fi}% Return tiny page to page list: - \unvbox\@cclv \ifnum\outputpenalty<\@M \penalty\outputpenalty\fi - \LW@vsize\relax - \global\setbox\@cclv\box\LW@saved - \FWLWnorm@L@output - \global\setbox\FirstWordBox\box\NextWordBox -\fi\fi} - -% globally get last "word" from a box (#1) into another box (#2) -\def\LW@getlast@word#1#2{\setbox\@tempboxa\vbox{\hsize\maxdimen \@parboxrestore - \hyphenpenalty\@M \exhyphenpenalty\@M - \rightskip\fill \looseness\@M \linepenalty\z@ - \noindent\unhbox#1\endgraf - \unskip\unkern\unpenalty \global\setbox\LW@box\lastbox - }\LW@repack{#2}} - -% globally get first "word" from a box (#1) into another box (#2) -\def\LW@getfirst@word#1#2{\setbox\@tempboxa\vbox{\@parboxrestore - \parshape\thr@@ \z@\z@ \z@\z@ \z@\maxdimen \parfillskip\fill - \hyphenpenalty\@M \exhyphenpenalty\@M - \hbadness\@MM \overfullrule\z@ \hfuzz\maxdimen - \ifhbox#1\noindent - \vadjust{\penalty\LW@pen}\penalty-\@M\unhbox#1% eliminate previous \leftskip - \else\ifvbox#1\penalty\LW@pen\unvbox#1\fi\fi - \endgraf - \@tempcnta\z@ \LW@getall@boxes}\LW@repack{#2}} - -% Go through a vertical list that starts with special penalty -\def\LW@getall@boxes{\global\setbox\LW@box\lastbox \unskip\unkern \unskip\unkern - \let\@tempa\relax - \ifvoid \LW@box \advance\@tempcnta\@ne \else \@tempcnta\z@ \fi - \ifnum\lastpenalty=\LW@pen \else \unpenalty\fi - \ifnum\lastpenalty=\LW@pen \else \unpenalty\fi - \ifnum\lastpenalty=\LW@pen \else \ifnum\@tempcnta<5 - \let\@tempa\LW@getall@boxes \fi \fi \unpenalty \@tempa} - -% Put contents of \LW@box into hbox #1 -\def\LW@repack#1{\global\setbox#1\hbox{\ifhbox\LW@box - \unhbox\LW@box\unskip\unskip\unpenalty\unskip - \else\ifvbox\LW@box\box\LW@box\fi\fi}} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 4a144317576..d91c5ecba17 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -131,7 +131,7 @@ my @TLP_working = qw( fp fpl fragmaster fragments framed frankenstein frcursive free-math-font-survey frenchle fribrief frletter frontespizio ftcap ftnxtra - fullblck fullpict functan + fullblck fullpict functan fwlw gaceta galois garrigues gastex gatech-thesis gb4e gcard gchords gcite gene-logic genmisc genmpage gentium gentle geometry diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index a89cded8443..0e3df60ee1f 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -244,6 +244,7 @@ depend fribrief depend fullblck depend fullpict depend fundus +depend fwlw depend g-brief depend gauss depend gcard diff --git a/Master/tlpkg/tlpsrc/fwlw.tlpsrc b/Master/tlpkg/tlpsrc/fwlw.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3