diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.pdf | bin | 170694 -> 118394 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.tex | 61 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt | 49 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty | 92 |
4 files changed, 108 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.pdf b/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.pdf Binary files differindex 683e5e1ba62..f40b4c9510c 100644 --- a/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.pdf +++ b/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.pdf diff --git a/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.tex b/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.tex index f0b4b35f97c..b073c7f3cdb 100644 --- a/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.tex +++ b/Master/texmf-dist/doc/latex/tabto-ltx/tabto-doc.tex @@ -1,37 +1,57 @@ -\documentclass[a4paper]{article} -\usepackage[a4paper]{geometry} -\usepackage{miscdoc} -\usepackage[scaled=0.85]{luximono} +\documentclass[11pt,a4paper]{article} +\usepackage[a4paper,margin=3cm]{geometry} +\setlength{\parskip}{2pt} +\makeatletter + +\newcommand\cs[1]{\texttt{\char`\\#1}} +\renewcommand\arg[1]{\nolinebreak[2]\mbox{\texttt{\string{#1\string}}}} +\newcommand\oarg[1]{\nolinebreak[2]\mbox{\texttt{[#1]}}} +\newcommand\sarg{\texttt{*}} + +\newcommand\meta[1]{\mbox{\ensuremath{\langle}\textit{#1}\ensuremath{\rangle}}} +\newcommand\prototype[1]{\par\pagebreak[1]\bigskip\begingroup + \noindent\samepage #1\par \nopagebreak \smallskip \endgroup \@afterheading} + +% meaningful names, as in faq.sty +\let\environment\texttt +\let\Package\textsf +\makeatother + \begin{document} \title{The \Package{tabto} package} \author{Donald Arseneau\thanks{Documentation file assembled by Robin Fairbairns}} -\date{May 2006, version 1.0} +\date{Mar 2013, version 1.3} \maketitle \section*{Tabbing to fixed positions in a paragraph} Two new text positioning commands are defined: \cs{tabto} and \cs{tab}. -\vspace*{\baselineskip} -\noindent\cmdinvoke{tabto}{\meta{length}} +\prototype{\cs{tabto}\arg{\meta{length}}} Tab to a position relative to the left margin in a paragraph (any indentation due to a list is part of the `margin' in this context). If the text on the line already goes past the desired position, the tab starts a new line and moves to the requested -horizontal position. +horizontal position. + -\vspace*{\baselineskip} -\noindent\cmdinvoke{tabto*}{\meta{length}} +\prototype{\cs{tabto}\sarg\arg{\meta{length}}} -Similar to \cs{tabto}, except it will perform backspacing, and over- -print previous text on the line whenever that text is already +Similar to \cs{tabto}, except it will perform backspacing, and +over-print previous text on the line whenever that text is already longer than the specified length (i.e., no linebreak is produced). Line-breaks are suppressed immediately after \cs{tabto} or \cs{tabto*}. -\vspace*{\baselineskip} -\noindent\cs{tab} +The length register \cs{CurrentLineWidth} will report the width +of the existing text on the line, and it may be used in the +\meta{length} argument (using calc.sty, for example). Also, there +is \cs{TabPrevPos} which stores the \cs{CurrentLineWidth} from the +previous tab command, and can be used to return to that position +if no line breaks have occurred in between. + +\prototype{\cs{tab}} Tab to the next tab-stop chosen from a list of tab positions, in the traditional style of typewriters. A \cs{tab} will always move @@ -43,22 +63,21 @@ ensuing text does not fit well in the remaining space. The tab-stop positions are declared using either \cs{TabPositions} or \cs{NumTabs}: -\vspace*{\baselineskip} -\noindent\cmdinvoke{TabPositions}{\meta{length}, \meta{length}, ... \meta{length}} +\prototype{\cs{TabPositions}\arg{\meta{length}, \meta{length}, + \textrm{\dots}\meta{length}}} Declares the tab stops as a comma-separated list of positions relative to the left margin. A tab-stop at \texttt{0pt} is implicit, and need not be listed. -\vspace*{\baselineskip} -\noindent\cmdinvoke{NumTabs}{\meta{number}} +\prototype{\cs{NumTabs}\arg{\meta{number}}} Declares a list of \meta{number} equally-spaced tabs, starting at the left margin and spanning \cs{linewidth}. For example -\cmdinvoke{NumTabs}{2} declares tab-stops at \texttt{0pt} and +\cs{NumTabs}\arg{2} declares tab-stops at \texttt{0pt} and \texttt{0.5}\cs{linewidth}, the same as -\cmdinvoke{TabPositions}{\texttt{0pt}, \texttt{0.5}\cs{linewidth}} -or \cmdinvoke{TabPositions}{\texttt{0.5}\cs{linewidth}} +\cs{TabPositions}\arg{0pt, 0.5\cs{linewidth}} +or \cs{TabPositions}\arg{0.5\cs{linewidth}}. \end{document} diff --git a/Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt b/Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt deleted file mode 100644 index fdce2375802..00000000000 --- a/Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt +++ /dev/null @@ -1,49 +0,0 @@ -tabto.sty - -version 1.0 (May 2006) - -Donald Arseneau, Vancouver, Canada (asnd@triumf.ca) - -Tabbing to fixed positions in a paragraph. - -Two new text positioning commands are defined: \tabto and \tab. - -\tabto{<length>} - -Tab to a position relative to the left margin in a paragraph -(any indentation due to a list is part of the `margin' in this -context). If the text on the line already goes past the desired -position, the tab starts a new line and moves to the requested -horizontal position. - -\tabto*{<length>} - -Similar to \tabto, except it will perform backspacing, and over- -print previous text on the line whenever that text is already -longer than the specified length (i.e., no linebreak is produced). -Line-breaks are suppressed immediately after \tabto or \tabto*. - -\tab - -Tab to the next tab-stop chosen from a list of tab positions, in -the traditional style of typewriters. A \tab will always move -to the next tab stop (or the next line), even if it is already -exactly at a tab stop. Thus, "\tab\tab" skips a position. A -linebreak is permitted immediately following a \tab, in case the -ensuing text does not fit well in the remaining space. - -The tab-stop positions are declared using either \TabPositions -or \NumTabs: - -\TabPositions{<length>, <length>,...<length>} - -Declares the tab stops as a comma-separated list of positions -relative to the left margin. A tab-stop at 0pt is implicit, and -need not be listed. - -\NumTabs{<number>} - -Declares a list of <number> equally-spaced tabs, starting at the -left margin and spanning \linewidth. For example \NumTabs{2} -declares tab-stops at 0pt and 0.5\linewidth, the same as -\TabPositions{0pt, 0.5\linewidth} or \TabPositions{0.5\linewidth} diff --git a/Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty b/Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty index 1bc952fadd0..d7b70de1173 100644 --- a/Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty +++ b/Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty @@ -1,27 +1,27 @@ % tabto.sty % -% version 1.0 (May 2006) +% version 1.3 (Mar 2013) % % Tabbing to fixed positions in a paragraph. % -% Copyright 2006 by Donald Arseneau, -% Vancouver, Canada (asnd@triumf.ca) +% Copyright 2006,2009,2012,2013 by +% Donald Arseneau, Vancouver, Canada (asnd@triumf.ca) % Permission to use, distribute and modify this software is granted % under the conditions of the LaTeX Project Public License, either % version 1.3 or (at your option) any later version. The license is % found at http://www.latex-project.org/lppl.txt, and is part of all % recent distributions of LaTeX. % -% This work has the LPPL maintenance status `maintained'. +% This work has the LPPL maintenance status `maintained' (by author). % % Two new text positioning commands are defined: \tabto and \tab. % % \tabto{<length>} -% Tab to a position relative to the left margin in a paragraph -% (any indentation due to a list is part of the `margin' in this -% context). If the text on the line already goes past the desired +% Tab to a position relative to the left margin in a paragraph (any +% indentation due to a list or \leftskip is part of the `margin' in +% this context). If the text on the line already goes past the desired % position, the tab starts a new line and moves to the requested -% horizontal position. +% horizontal position. % % \tabto*{<length>} % Similar to \tabto, except it will perform backspacing, and over- @@ -29,13 +29,26 @@ % longer than the specified length (i.e., no linebreak is produced). % Line-breaks are suppressed immediately after \tabto or \tabto*. % +% The length register "\CurrentLineWidth" will report the width +% of the existing text on the line, and it may be used in the +% <length> argument (using calc.sty, for example). Also, there +% is "\TabPrevPos" which gives the "\CurrentLineWidth" from the +% previous tab command, and can be used to return to that position +% if no line breaks have occurred in between. +% % \tab % Tab to the next tab-stop chosen from a list of tab positions, in % the traditional style of typewriters. A \tab will always move % to the next tab stop (or the next line), even if it is already -% exactly at a tab stop. Thus, "\tab\tab" skips a position. A -% linebreak is permitted immediately following a \tab, in case the -% ensuing text does not fit well in the remaining space. +% exactly at a tab stop. Thus, "\tab" at the beginning of a line, +% or "\tab\tab" elsewhere skips a position. A linebreak is permitted +% immediately following a \tab, in case the ensuing text does not +% fit well in the remaining space. +% +% If you do not want to skip positions, use "\tabto{\NextTabStop}" +% instead of "\tab". This is particularly useful when you want to +% use \tab in some other command, but do not want to skip a column +% for the first item. % % The tab-stop positions are declared using either \TabPositions % or \NumTabs: @@ -51,16 +64,29 @@ % declares tab-stops at 0pt and 0.5\linewidth, the same as % \TabPositions{0pt, 0.5\linewidth} or \TabPositions{0.5\linewidth} % +% After these declarations, the list of tab positions is saved in +% \TabStopList, and the next tab position, relative to the current +% position, is given by \NextTabStop. You do not normally need +% to access them, but they are available. +% +% Problems: +% +% Tall objects after a tab stop may overlap the line above, rather +% than forcing a greater separation between lines. + +\ProvidesPackage{tabto}[2013/03/25 \space v 1.3 \space + Another tabbing mechanism]\relax \newdimen\CurrentLineWidth +\let\TabPrevPos\z@ \newcommand\tabto[1]{% \leavevmode \begingroup \def\@tempa{*}\def\@tempb{#1}% - \ifx\@tempa\@tempb + \ifx\@tempa\@tempb % \tab* \endgroup - \TTo@overlaptrue + \TTo@overlaptrue % ... set a flag and re-issue \tabto to get argument \expandafter\tabto \else \ifinner % in a \hbox, so ignore @@ -75,19 +101,29 @@ \belowdisplayskip\z@skip \belowdisplayshortskip\z@skip \halign{##\cr\noalign{% % get the width of the line above - \ifdim\predisplaysize<\z@ - \CurrentLineWidth\z@ + \ifdim\predisplaysize=\maxdimen %\message{Mixed R and L, so say the line is full. }% + \CurrentLineWidth\linewidth \else - \CurrentLineWidth\predisplaysize - % Correct the 2em offset, but avoid error when -\maxdimen - \advance\CurrentLineWidth -2em - \advance\CurrentLineWidth -\displayindent - \advance\CurrentLineWidth -\leftskip - \fi + \ifdim\predisplaysize=-\maxdimen + % \message{Not in a paragraph, so call the line empty. }% + \CurrentLineWidth\z@ + \else + \ifnum\TTo@Direction<\z@ + \CurrentLineWidth\linewidth \advance\CurrentLineWidth\predisplaysize + \else + \CurrentLineWidth\predisplaysize + \fi + % Correct the 2em offset + \advance\CurrentLineWidth -2em + \advance\CurrentLineWidth -\displayindent + \advance\CurrentLineWidth -\leftskip + \fi\fi + \ifdim\CurrentLineWidth<\z@ \CurrentLineWidth\z@\fi % Enshrine the tab-to position; #1 might reference \CurrentLineWidth \@tempdimb=#1\relax - %\message{*** Tab to \the\@tempdimb, previous width - % is \the\CurrentLineWidth. ***}% + %\message{*** Tab to \the\@tempdimb, previous width is \the\CurrentLineWidth. ***}% + % Save width for possible return use + \xdef\TabPrevPos{\the\CurrentLineWidth}% % Build the action to perform \protected@xdef\TTo@action{% \vrule\@width\z@\@depth\the\prevdepth @@ -98,6 +134,7 @@ \protect\nobreak \protect\hskip\the\@tempdimb\relax }% + %\message{\string\TTo@action: \meaning \TTo@action. }% % get back to the baseline, regardless of its depth. \vskip-\prevdepth \prevdepth-99\p@ @@ -107,7 +144,7 @@ % Don't count the display as lines in the paragraph \count@\prevgraf \advance\count@-4 \prevgraf\count@ \TTo@action -%% \penalty\@m % to allow a penalized line break + %% \penalty\@m % to allow a penalized line break \fi \endgroup \TTo@overlapfalse @@ -158,3 +195,10 @@ \TabPositions{\parindent,.5\linewidth} \newif\ifTTo@overlap \TTo@overlapfalse + +\@ifundefined{predisplaydirection}{ + \let\TTo@Direction\predisplaysize + \let\predisplaydirection\@undefined +}{ + \let\TTo@Direction\predisplaydirection +} |