summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-06-01 15:57:43 +0000
committerKarl Berry <karl@freefriends.org>2006-06-01 15:57:43 +0000
commit1c8c8267b4a08baa184fc3ac92fdaf39ba303465 (patch)
treead9d8f811bf2faf53242d960b81be6251906d926
parenta27e39077f6da32d6a49b9af54b92a8380fee0af (diff)
new package tabto-ltx
git-svn-id: svn://tug.org/texlive/trunk@1640 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt49
-rw-r--r--Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty160
-rw-r--r--Master/texmf-dist/tpm/tabto-ltx.tpm22
-rw-r--r--Master/texmf/lists/tabto-ltx6
-rw-r--r--Master/texmf/tpm/collection-latexextra.tpm1
5 files changed, 238 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt b/Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt
new file mode 100644
index 00000000000..fdce2375802
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tabto-ltx/tabto.txt
@@ -0,0 +1,49 @@
+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
new file mode 100644
index 00000000000..1bc952fadd0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tabto-ltx/tabto.sty
@@ -0,0 +1,160 @@
+% tabto.sty
+%
+% version 1.0 (May 2006)
+%
+% Tabbing to fixed positions in a paragraph.
+%
+% Copyright 2006 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'.
+%
+% 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}
+%
+
+\newdimen\CurrentLineWidth
+
+\newcommand\tabto[1]{%
+ \leavevmode
+ \begingroup
+ \def\@tempa{*}\def\@tempb{#1}%
+ \ifx\@tempa\@tempb
+ \endgroup
+ \TTo@overlaptrue
+ \expandafter\tabto
+ \else
+ \ifinner % in a \hbox, so ignore
+ \else % unrestricted horizontal mode
+ \null% \predisplaysize will tell the position of this box (must be box)
+ \parfillskip\fill
+ \everydisplay{}\everymath{}%
+ \predisplaypenalty\@M \postdisplaypenalty\@M
+ $$% math display so we can test \predisplaysize
+ \lineskiplimit=-999pt % so we get pure \baselineskip
+ \abovedisplayskip=-\baselineskip \abovedisplayshortskip=-\baselineskip
+ \belowdisplayskip\z@skip \belowdisplayshortskip\z@skip
+ \halign{##\cr\noalign{%
+ % get the width of the line above
+ \ifdim\predisplaysize<\z@
+ \CurrentLineWidth\z@
+ \else
+ \CurrentLineWidth\predisplaysize
+ % Correct the 2em offset, but avoid error when -\maxdimen
+ \advance\CurrentLineWidth -2em
+ \advance\CurrentLineWidth -\displayindent
+ \advance\CurrentLineWidth -\leftskip
+ \fi
+ % Enshrine the tab-to position; #1 might reference \CurrentLineWidth
+ \@tempdimb=#1\relax
+ %\message{*** Tab to \the\@tempdimb, previous width
+ % is \the\CurrentLineWidth. ***}%
+ % Build the action to perform
+ \protected@xdef\TTo@action{%
+ \vrule\@width\z@\@depth\the\prevdepth
+ \ifdim\CurrentLineWidth>\@tempdimb
+ \ifTTo@overlap\else
+ \protect\newline \protect\null
+ \fi\fi
+ \protect\nobreak
+ \protect\hskip\the\@tempdimb\relax
+ }%
+ % get back to the baseline, regardless of its depth.
+ \vskip-\prevdepth
+ \prevdepth-99\p@
+ \vskip\prevdepth
+ }}%
+ $$
+ % 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
+ \fi
+ \endgroup
+ \TTo@overlapfalse
+ \ignorespaces
+ \fi
+}
+
+% \tab -- to the next position
+% \hskip so \tab\tab moves two positions
+% Allow a (penalized but flexible) line-break right after the tab.
+%
+\newcommand\tab{\leavevmode\hskip2sp\tabto{\NextTabStop}%
+ \nobreak\hskip\z@\@plus 30\p@\penalty4000\hskip\z@\@plus-30\p@\relax}
+
+
+% Expandable macro to select the next tab position from the list
+
+\newcommand\NextTabStop{%
+ \expandafter \TTo@nexttabstop \TabStopList,\maxdimen,>%
+}
+
+\def\TTo@nexttabstop #1,{%
+ \ifdim#1<\CurrentLineWidth
+ \expandafter\TTo@nexttabstop
+ \else
+ \ifdim#1<0.9999\linewidth#1\else\z@\fi
+ \expandafter\strip@prefix
+ \fi
+}
+\def\TTo@foundtabstop#1>{}
+
+\newcommand\TabPositions[1]{\def\TabStopList{\z@,#1}}
+
+\newcommand\NumTabs[1]{%
+ \def\TabStopList{}%
+ \@tempdimb\linewidth
+ \divide\@tempdimb by#1\relax
+ \advance\@tempdimb 1sp % counteract rounding-down by \divide
+ \CurrentLineWidth\z@
+ \@whiledim\CurrentLineWidth<\linewidth\do {%
+ \edef\TabStopList{\TabStopList\the\CurrentLineWidth,}%
+ \advance\CurrentLineWidth\@tempdimb
+ }%
+ \edef\TabStopList{\TabStopList\linewidth}%
+}
+
+% default setting of tab positions:
+\TabPositions{\parindent,.5\linewidth}
+
+\newif\ifTTo@overlap \TTo@overlapfalse
diff --git a/Master/texmf-dist/tpm/tabto-ltx.tpm b/Master/texmf-dist/tpm/tabto-ltx.tpm
new file mode 100644
index 00000000000..df529665f71
--- /dev/null
+++ b/Master/texmf-dist/tpm/tabto-ltx.tpm
@@ -0,0 +1,22 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/tabto-ltx.zip">
+ <TPM:Name>tabto-ltx</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2006/05/10 05:22:05</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The tabto-ltx package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>7159</TPM:Size>
+ <TPM:Build/>
+ <TPM:RunFiles size="6305">
+texmf-dist/tex/latex/tabto-ltx/tabto.sty
+texmf-dist/tpm/tabto-ltx.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="1692">texmf-dist/doc/latex/tabto-ltx/tabto.txt</TPM:DocFiles>
+ <TPM:Provides>Package/tabto-ltx</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+
diff --git a/Master/texmf/lists/tabto-ltx b/Master/texmf/lists/tabto-ltx
new file mode 100644
index 00000000000..68a94011019
--- /dev/null
+++ b/Master/texmf/lists/tabto-ltx
@@ -0,0 +1,6 @@
+texmf-dist/doc/latex/tabto-ltx/tabto.txt
+
+texmf-dist/tex/latex/tabto-ltx/tabto.sty
+texmf-dist/tpm/tabto-ltx.tpm
+
+texmf/lists/tabto-ltx
diff --git a/Master/texmf/tpm/collection-latexextra.tpm b/Master/texmf/tpm/collection-latexextra.tpm
index 531b4c8a4d5..92c9fc3a636 100644
--- a/Master/texmf/tpm/collection-latexextra.tpm
+++ b/Master/texmf/tpm/collection-latexextra.tpm
@@ -490,6 +490,7 @@ A large collection of add-on packages for LaTeX.
<TPM:Package name="t-angles"/>
<TPM:Package name="tableaux"/>
<TPM:Package name="tabulary"/>
+ <TPM:Package name="tabto-ltx"/>
<TPM:Package name="tabvar"/>
<TPM:Package name="talk"/>
<TPM:Package name="taupin"/>