From 4d5ea40067f8dca80c5bc08220a04cb67fc9beb6 Mon Sep 17 00:00:00 2001 From: "Dr. Clea F. Rees" Date: Fri, 7 Aug 2009 00:50:27 +0000 Subject: tablists new version git-svn-id: svn://tug.org/texlive/trunk@14566 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/tablists/README | 34 +++-- .../texmf-dist/doc/latex/tablists/tablists-rus.pdf | Bin 123709 -> 128353 bytes .../texmf-dist/doc/latex/tablists/tablists-rus.tex | 141 +++++++++++++------- Master/texmf-dist/doc/latex/tablists/tablists.pdf | Bin 116319 -> 119207 bytes .../texmf-dist/source/latex/tablists/tablists.dtx | 146 +++++++++++++-------- Master/texmf-dist/tex/latex/tablists/tablists.sty | 38 +++--- 6 files changed, 230 insertions(+), 129 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/tablists/README b/Master/texmf-dist/doc/latex/tablists/README index be911a0b46a..13c87e78107 100644 --- a/Master/texmf-dist/doc/latex/tablists/README +++ b/Master/texmf-dist/doc/latex/tablists/README @@ -1,12 +1,28 @@ -tablists 0.0d (beta) +tablists 0.0e (beta) Tabulated list of short items (exersizes in textbooks). - Package offers environments and commands for one-level and two-level - lists of short items (exersizes in textbooks). The two-level lists can - be created in one of two variants: 1) with usage of sublevel environment; - and 2) with usage of the \subitem command and second optional argument). - The environments follow support of optional arguments of item numbering - as enumerate or paralist packages. This package also offers the command - for the QED sign at the end of the proof environment (amsmath package). + Package offers environments and commands for one-level and two-level + lists of short items (exersizes in textbooks). The environments follow + support of optional arguments of item numbering as enumerate or paralist + packages. + +Documentation: tablists.pdf, tablist-rus.pdf. + +Installation hints: +The tablists.dtx is self-installation file. +Run LaTeX (pdfLaTeX) with this file, you get: + tablists.dvi (or .pdf) file -- documentation, + tablists.sty file -- the package file, + and other LaTeX files. + +Copy tablists.sty file in the folder (directory) with other packages: +(the way to LaTeX package looks like + %texmf folder%/tex/latex/tablists/tablists.sty) +Then you need to refresh your databases -- see documentation +of your local TeX distribution (MikTeX, TeXlive etc.) + +Also to get help for installation please visit: +http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages +http://www.tex.ac.uk/cgi-bin/texfaq2html?label=miktexinst +http://www.tex.ac.uk/cgi-bin/texfaq2html?label=privinst -Documentation: tablists.pdf. diff --git a/Master/texmf-dist/doc/latex/tablists/tablists-rus.pdf b/Master/texmf-dist/doc/latex/tablists/tablists-rus.pdf index a03336bc2c5..65fff179004 100644 Binary files a/Master/texmf-dist/doc/latex/tablists/tablists-rus.pdf and b/Master/texmf-dist/doc/latex/tablists/tablists-rus.pdf differ diff --git a/Master/texmf-dist/doc/latex/tablists/tablists-rus.tex b/Master/texmf-dist/doc/latex/tablists/tablists-rus.tex index 4587e136318..a2b5a70abe7 100644 --- a/Master/texmf-dist/doc/latex/tablists/tablists-rus.tex +++ b/Master/texmf-dist/doc/latex/tablists/tablists-rus.tex @@ -45,7 +45,7 @@ \clubpenalty10000 \makeatother \providecommand*{\file}[1]{\texttt{#1}} -\providecommand*{\pkg}[1]{\textsf{#1}} +\providecommand*{\package}[1]{\textsf{#1}} \providecommand*{\cls}[1]{\textsf{#1}} \providecommand*{\env}[1]{\texttt{#1}} @@ -95,11 +95,11 @@ % %^^A% Each item starts with |\tabenumitem| command. %^^A% First example of \env{tabenum} list---please note that you may set optional -%^^A% argument in the same way as in \pkg{paralist} +%^^A% argument in the same way as in \package{paralist} %^^A% environments: % Каждый пункт начинается с~команды |\tabenumitem|. % Первый вариант окружения \env{tabenum}---обратите внимание что можно задать -% опцию так же как и~в~окружениях пакетов \pkg{enumerate} или \pkg{paralist}: +% опцию так же как и~в~окружениях пакетов \package{enumerate} или \package{paralist}: %\par\begin{small} %\begin{verbatim} %\begin{tabenum}[\bfseries1)]% @@ -290,31 +290,26 @@ % Вертикальные отбивки вокруг перечня равны отбивкам вокруг обычного перечня: % |\topsep+\partopsep|. % -%^^A% Space between rows depends on the |\jot| value, like in \pkg{amsmath} environments -%^^A% like \env{align}, \pkg{gather} etc. +%^^A% Space between rows depends on the |\jot| value, like in \package{amsmath} environments +%^^A% like \env{align}, \package{gather} etc. % Отбивки между рядами зависят от величины |\jot|, как и~в~окружениях многострочных -% формул в~окружениях пакета \pkg{amsmath}: -% \env{align}, \pkg{gather} и~т.\,д. +% формул в~окружениях пакета \package{amsmath}: +% \env{align}, \package{gather} и~т.\,д. % % \DescribeMacro{\tabenumsep} %^^A% The horizontal spacing between items of list. It defined like: % Определяет горизонтальные отбивки между пунктами. Задаётся следующим образом: % \begin{quote} -% |\newcommand\tabenumsep{\hskip1em}| +% |\renewcommand\tabenumsep{\hskip1em}| % \end{quote} %^^A% The |\labelsep| parameter is used after item number. % Отбивка |\labelsep| задаётся после номера. % -%^^A% \subsection{The \env{tabenum} environment inside a proper list} -% \subsection{Окружение \env{tabenum} внутри настоящего перечня} -% % \DescribeMacro{\tabenumindent} -%^^A% The |\tabenumindent| macro sets left margin of \env{tabenum}. That could be useful -%^^A% inside, e.g., a proper list environments like \env{enumerate} or \env{itemise}. -%^^A% It can be defined like horizontal space/skip or text. -%^^A% For example: -% Команда |\tabenumindent| определяет левое поле \env{tabenum}. Это может быть полезно -% внутри настоящего перечня, типа \env{enumerate} или \env{itemise}. +%^^A% The |\tabenumindent| command sets left margin of \env{tabenum} environment. +%^^A% It can be defined like horizontal space/skip or text, +%^^A% for example: +% Команда |\tabenumindent| определяет левое поле \env{tabenum}. % Она может быть определена как отбивка или текст (или всё вместе). % Например: % \begin{quote} @@ -324,35 +319,57 @@ % \begin{quote} % |\renewcommand\tabenumindent{Word }| % \end{quote} +%^^A% That could be useful also +%^^A% inside, e.g., a proper list environments like \env{enumerate} or \env{itemise} +%^^A% for corrections of left margins. +% Это может быть также полезно внутри настоящего перечня, типа +% \env{enumerate} или \env{itemise} для выравнивании левого поля. % -% \DescribeMacro{\liststrut} -%^^A% This command can be useful after alone list number (and not only with -%^^A% \env{tabenum} environment). The command raises first line of next -%^^A% text block at the baseline of previous. Without any option it puts negative -%^^A% baselineskip. If there is a high element (any math sentence) in the first -%^^A% line of next text, you may repeat this element in option argument without |$|'s. -% Эта команда пригодится если окружение \env{tabenum} идёт сразу после номера перечня. -% Команда поднимает первую строку следующего за пунктом блока текста -% на базовую линию предыдущего. Команда без опции даёт отбивку равную отрицательному -% интерлиньяжу. Если в~первой строке следующего блока текста встретился высокий элемент -% (обычно это математическое выражение) -% его повторяют в~опции команды |\liststrut| и~по его высоте рассчитываются -% компенсирующие отбивки. Элемент записывается без знаков |$|. -% -%^^A% Here the combination of these two commands: -% В~примере комбинация этих двух команд: +%^^A% \subsection{The \env{tabenum} environment inside a proper list} +% \subsection{Окружение \env{tabenum} внутри настоящего перечня} +% +% +%^^A% The version 0.0e of \package{tablists} package enlarges left margin +%^^A% of \env{tabenum}, when environment appears inside proper list, +%^^A% by the value of left margin of this list. Sometimes left edges +%^^A% of \env{tabenum} labels and list labels of the same level are not aligned +%^^A% correctly (it happens when |\labelwidth| value is not equal to the natural +%^^A% width of labels). In these cases you may define the correction skip +%^^A% with the |\tabenumindent| command. +% Версия 0.0e пакета \package{tablists} увеличивает левое поле окружения +% \env{tabenum}, если последнее оказывается внутри окружения обычного перечня, +% на величину левого поля этого перечня. Иногда левый край меток в~окружении +% \env{tabenum} и~меток в~перечне того же уровня не выравниваются корректно +% (из-за того, что значение ширины поля для меток |\labelwidth| не равно натуральной +% ширине меток). В~этих случаях вы можете корректирующую отбивку с~помощью +% команды |\tabenumindent|. +% +%^^A% Also the version 0.0e loads labels of empty items of upper/outer list +%^^A% at the left side of the first item of \env{tabenum} automatically. It follows +%^^A% mechanism similar to building of empty items in list environment. +%^^A% (Empty items of \LaTeX\ list are consecutively stored to special box register +%^^A% and printed out at the beginning when the list text appears; +%^^A% the same happens at the beginning of \env{tabenum} environment: +%^^A% this box, if not empty, is printed at the left of first \env{tabenum} item.) +% Кроме этого, версия 0.0e помещает номера пустых пунктов старшего перечня +% слева, перед номером первого пункта окружения \env{tabenum} автоматически. +% Здесь используется результат работы механизма для построения/""накопления +% пустых меток в~окружении перечней. +% (Пустые номера"=метки, которые не сопровождаются текстом, в~\LaTeX'овском окружении +% перечней последовательно записываются в~специальный регистр бокса, +% который выводится вначале при появлении текста перечня; также происходит +% и~в~начале окружения \env{tabenum}: этот бокс, если не пустой, печатается +% слева от номера первого пункта.) %\par\begin{small} %\begin{verbatim} %\begin{enumerate}[\bfseries1)]% -%\item\renewcommand\tabenumindent{1)\hskip\labelsep}% -% \liststrut[\displaystyle\frac /y] +%\item %\begin{rtabenum}[a)]% %... %\end{verbatim}% %\end{small} % \begin{enumerate}[\bfseries1)]% -% \item\renewcommand\tabenumindent{1)\hskip\labelsep}% -% \liststrut[\displaystyle\frac /y] +% \item % \begin{rtabenum}[a)]% % \item % {$z=\displaystyle\frac xy$}; @@ -378,13 +395,49 @@ % \item % $2+5+8+ \ldots +(3n+2)=155$, $n\in \mathrm{N};$\hidewidth\skipitem % \item -% $t=5u^2+8v^2$; +% $t=5u^2+8v^2$. % \end{rtabenum} % \end{enumerate}% +%\par\kern-\baselineskip % Обратите внимание на использование окружения \env{rtabenum} и~нумерацию русскими буквами. % -%^^A% \emph{Note}: The |\liststrut| not always works correctly. -% \emph{Замечание}: Команда |\liststrut| не всегда работает корректно. +%^^A% \emph{Please note} that for the case of \env{tabenum} environment inside list, +%^^A% there is not compatibility between version 0.0e and earlier +%^^A% versions---left margin of \env{tabenum} is changed (mechanism +%^^A% of placing empty list items on one baseline using compensating vertical +%^^A% spaces could work but its calculation was changed). +% \emph{Обратите также внимание}, что в~случае появления окружения +% \env{tabenum} внутри окружения перечня, нет совместимости между версией 0.0e +% и~более ранними \cdash--- левое поле окружения \env{tabenum} изменено (макрокоманда +% помещения пустых меток старшего перечня путём компенсирующих вертикальных отбивок +% может работать, но механизм подсчёта также отличается в~версии 0.0e от предыдущих, +% см.~также следующий абзац).\smallskip +% +% \begin{small}% +% \DescribeMacro{\liststrut} +%^^A% \emph{Note}: In versions until 0.0d there was offered the |\liststrut| command in the +%^^A% cases when needed to put empty list item on the same line with first item of +%^^A% \env{tabenum}. The command raises first line of next text block at the baseline of +%^^A% previous. (Without any option it puts negative +%^^A% baselineskip. If there is a high element (any math sentence) in the first +%^^A% line of next text, it must be written in option without |$|'s, +%^^A% the height of this argument is used for compensating skips argument.) +%^^A% Since this command must take into account various vertical skips, which +%^^A% appear at the start of new item and also height of printing text, +%^^A% the adjusting of baselines does not always work correctly.\par +% В~версиях вплоть до 0.0d, +% в~случаях если окружение \env{tabenum} шло сразу после пустого номера старшего перечня, +% предлагалась команда |\liststrut|. +% Команда поднимает первую строку следующего за пунктом блока текста +% на базовую линию предыдущего. (Команда без опции даёт отбивку равную отрицательному +% интерлиньяжу (|\baselineskip|). Если в~первой строке следующего блока текста встретился +% высокий элемент (предполагается, что это математическое выражение) +% его повторяют в~опции команды |\liststrut| без знаков |$| и~по его высоте +% рассчитываются компенсирующие отбивки.) +% Поскольку при подсчёте компенсирующей отбивки должно быть принято значение нескольких +% вертикальных отбивок, а~также высота элементов в~тексте, выравнивание базовых линий +% не всегда получается корректным.\par +% \end{small}% % %\RestoreSpaces %^^A% \subsection{The \env{subtabenum} environment: second level, variant I} @@ -485,7 +538,7 @@ %^^A% cancels this skip. % Если задать команду |\subitem| сразу после |\item|, то получится лишний % пробел между нумерацией, созданный отбивкой |\tabenumsep|. Команда |\negtabenumsep| -% отменяет эту отбивку: в~версии 0.1с она задана уже внутри команды |\tabenumitem|. +% отменяет эту отбивку: в~версии 0.0с она задана уже внутри команды |\tabenumitem|. %\par\begin{small}\openup-1pt\enlargethispage{2\baselineskip} %\begin{verbatim} %\def\tabenumsep{\qquad} @@ -506,14 +559,14 @@ %\subitem %$v=gt+\displaystyle\frac{g}{4}t$, %\subitem -%$u=2^{5x-3y+z}$.\\ +%$u=2^{5x-3y+z}$.\\ %\startsubnumber{7}\subtabrow %\subitem %$w=(v+7)^2+(u-3)^2$; %\subitem %$5^x=\displaystyle\frac{4}{3} ;$ %\subitem -%$z=(x+1)^2+y^2$;\\ +%$z=(x+1)^2+y^2$;\\ %\subtabrow %\subitem %$2+5+8+ \ldots +(3n+2)=155$, $n\in \mathrm{N};$\hidewidth\skipitem @@ -592,7 +645,7 @@ % \end{theorem}% % \begin{proof}% % Поместим знакомое нам окружение \env{tabenum} внутри окружения \env{proof}, -% и~в~конце первого поместим команду |\tabqedhere|: +% и~в~конце первого поместим команду |\tabqedhere| (|\qedhere|): %\begin{verbatim} %\begin{theorem} % ... diff --git a/Master/texmf-dist/doc/latex/tablists/tablists.pdf b/Master/texmf-dist/doc/latex/tablists/tablists.pdf index 68580b22570..e64f4b909a3 100644 Binary files a/Master/texmf-dist/doc/latex/tablists/tablists.pdf and b/Master/texmf-dist/doc/latex/tablists/tablists.pdf differ diff --git a/Master/texmf-dist/source/latex/tablists/tablists.dtx b/Master/texmf-dist/source/latex/tablists/tablists.dtx index b9cf47e5550..df558fa4f94 100644 --- a/Master/texmf-dist/source/latex/tablists/tablists.dtx +++ b/Master/texmf-dist/source/latex/tablists/tablists.dtx @@ -16,7 +16,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{tablists} %<*package> - [2008/01/14 v0.0d (beta) Tabulated list of short items] + [2009/08/04 v0.0e (beta) Tabulated list of short items] % % %<*batchfile> @@ -59,7 +59,7 @@ \clubpenalty10000 \makeatother \providecommand*{\file}[1]{\texttt{#1}} -\providecommand*{\pkg}[1]{\textsf{#1}} +\providecommand*{\package}[1]{\textsf{#1}} \providecommand*{\cls}[1]{\textsf{#1}} \providecommand*{\env}[1]{\texttt{#1}} @@ -105,8 +105,8 @@ % % Each item starts with |\tabenumitem| command. % First example of \env{tabenum} list---please note that you may set optional -% argument in the same way as in modified environments from \pkg{enumerate} -% or \pkg{paralist} packages: +% argument in the same way as in modified environments from \package{enumerate} +% or \package{paralist} packages: %\par\begin{small}% %\begin{verbatim} %\begin{tabenum}[\bfseries1)]% @@ -265,23 +265,20 @@ % % Vertical spaces around tabulated list are equal to the list ones |\topsep+\partopsep|. % -% Space between rows depends on the |\jot| value, like in \pkg{amsmath} environments -% like \env{align}, \pkg{gather} etc. +% Space between rows depends on the |\jot| value, like in \package{amsmath} environments +% like \env{align}, \package{gather} etc. % % \DescribeMacro{\tabenumsep} % The horizontal spacing between items of list. It defined like: % \begin{quote} -% |\newcommand\tabenumsep{\hskip1em}| +% |\renewcommand\tabenumsep{\hskip1em}| % \end{quote} % The |\labelsep| parameter is used after item number. % -% \subsection{The \env{tabenum} environment inside a proper list} -% % \DescribeMacro{\tabenumindent} -% The |\tabenumindent| macro sets left margin of \env{tabenum}. That could be useful -% inside, e.g., a proper list environments like \env{enumerate} or \env{itemise}. -% It can be defined like horizontal space/skip or text. -% For example: +% The |\tabenumindent| command sets left margin of \env{tabenum} environment. +% It can be defined like horizontal space/skip or text, +% for example: % \begin{quote} % |\renewcommand\tabenumindent{\hskip\parindent}| % \end{quote} @@ -289,28 +286,37 @@ % \begin{quote} % |\renewcommand\tabenumindent{Word }| % \end{quote} +% That could be useful also +% inside, e.g., a proper list environments like \env{enumerate} or \env{itemise} +% for corrections of left margins. % -% \DescribeMacro{\liststrut} -% This command can be useful after alone list number (and not only with -% \env{tabenum} environment). The command raises first line of next -% text block at the baseline of previous. Without any option it puts negative -% baselineskip. If there is a high element (any math sentence) in the first -% line of next text, it must be written in option, the height of this argument used for -% compensating skips argument without |$|'s. +% \subsection{The \env{tabenum} environment inside a proper list} % -% Here the combination of these two commands: +% The version 0.0e of \package{tablists} package enlarges left margin +% of \env{tabenum}, when environment appears inside proper list, +% by the value of left margin of this list. Sometimes left edges +% of \env{tabenum} labels and list labels of the same level are not aligned +% correctly (it happens when |\labelwidth| value is not equal to the natural +% width of labels). In these cases you may define the correction skip +% with the |\tabenumindent| command. +% +% Also the version 0.0e loads labels of empty items of upper/outer list +% at the left side of the first item of \env{tabenum} automatically. It follows +% mechanism similar to building of empty items in list environment. +% (Empty items of \LaTeX\ list are consecutively stored to special box register +% and printed out at the beginning when the list text appears; +% the same happens at the beginning of \env{tabenum} environment: +% this box, if not empty, is printed at the left of first \env{tabenum} item.) %\par\begin{small}% %\begin{verbatim} %\begin{enumerate}[\bfseries1)]% -%\item\renewcommand\tabenumindent{1)\hskip\labelsep}% -% \liststrut[\displaystyle\frac /y] +%\item %\begin{tabenum}[a)]% %... %\end{verbatim}% %\end{small}% % \begin{enumerate}[\bfseries1)]% -% \item\renewcommand\tabenumindent{1)\hskip\labelsep}% -% \liststrut[\displaystyle\frac /y] +% \item % \begin{tabenum}[a)]% % \item % {$z=\displaystyle\frac xy$}; @@ -336,11 +342,30 @@ % \item % $2+5+8+ \ldots +(3n+2)=155$, $n\in \mathrm{N};$\hidewidth\skipitem % \item -% $t=5u^2+8v^2$; -% \end{tabenum} +% $t=5u^2+8v^2$.% +% \end{tabenum}% % \end{enumerate}% -% \emph{Note}: The |\liststrut| not always works correctly.\RestoreSpaces -% +%\par\kern-\baselineskip +% \emph{Please note} that for the case of \env{tabenum} environment inside list, +% there is not compatibility between version 0.0e and earlier +% versions---left margin of \env{tabenum} is changed (mechanism +% of placing empty list items on one baseline using compensating vertical +% spaces could work but its calculation was changed, see also next paragraph).\smallskip +% +% \begin{small}% +% \DescribeMacro{\liststrut} +% In versions until 0.0d there was offered the |\liststrut| command in the +% cases when needed to put empty list item on the same line with first item of +% \env{tabenum}. The command raises first line of next text block at the baseline of +% previous. (Without any option it puts negative +% baselineskip. If there is a high element (any math sentence) in the first +% line of next text, it must be written in option without |$|'s, +% the height of this argument is used for compensating skips argument.) +% Since this command must take into account various vertical skips, which +% appear at the start of new item and also height of printing text, +% the adjusting of baselines does not always work correctly.\par +% \end{small}% +% \RestoreSpaces % \subsection{The \env{subtabenum} environment: second level, variant I} % % \DescribeMacro{subtabenum} @@ -423,7 +448,7 @@ % % If you put |\subtabenumitem| (|\subitem|) after |\tabenumitem| (|\item|), you get extra space between % two numbers, created by |\tabenumsep| skip. The |\negtabenumsep| command -% cancels this skip: the version 0.1c included this command inside the |\tabenumitem| definition. +% cancels this skip: the version 0.0c included this command inside the |\tabenumitem| definition. %\par\begin{small}\openup-1pt\enlargethispage{2\baselineskip} %\begin{verbatim} %\def\tabenumsep{\qquad} @@ -444,14 +469,14 @@ %\subitem %$v=gt+\displaystyle\frac{g}{4}t$, %\subitem -%$u=2^{5x-3y+z}$.\\ +%$u=2^{5x-3y+z}$.\\ %\startsubnumber{7}\subtabrow %\subitem %$w=(v+7)^2+(u-3)^2$; %\subitem %$5^x=\displaystyle\frac{4}{3} ;$ %\subitem -%$z=(x+1)^2+y^2$;\\ +%$z=(x+1)^2+y^2$;\\ %\subtabrow %\subitem %$2+5+8+ \ldots +(3n+2)=155$, $n\in \mathrm{N};$\hidewidth\skipitem @@ -477,14 +502,14 @@ % \subitem % $v=gt+\displaystyle\frac{g}{4}t$, % \subitem -% $u=2^{5x-3y+z}$.\\ +% $u=2^{5x-3y+z}$.\\ %\startsubnumber{7}\subtabrow % \subitem % $w=(v+7)^2+(u-3)^2$; % \subitem % $5^x=\displaystyle\frac{4}{3} ;$ % \subitem -% $z=(x+1)^2+y^2$;\\ +% $z=(x+1)^2+y^2$;\\ %\subtabrow % \subitem % $2+5+8+ \ldots +(3n+2)=155$, $n\in \mathrm{N};$\hidewidth\skipitem @@ -571,7 +596,7 @@ % % \section{Code of package} % -% First goes request of \pkg{makecell} package. +% First goes request of \package{makecell} package. % \begin{macrocode} \RequirePackage{makecell} \@ifpackagelater{makecell}{2007/05/24 V0.1d}{}{\PackageError @@ -593,9 +618,10 @@ % \begin{macro}{\subtabenumitem} % Definition of aligned items of `tabular'ed list % \begin{macrocode} -\newcommand\tabenumitem{&\@ifnextchar[%] +\newcommand\tabenumitem{\ifvoid\@labels\else\llap{\box\@labels\hspace{-\@totalleftmargin}}\fi + &\@ifnextchar[% {\TeXr@@tabenumitem{&}}% - {\TeXr@tabenumitem{&}{\@enumctr}}\setcounter{\@subenumctr}\z@} + {\TeXr@tabenumitem{&}{\@enumctr}\setcounter{\@subenumctr}\z@}} % \end{macrocode} % The macro for second level of tabulated items. % \begin{macrocode} @@ -606,14 +632,14 @@ {\TeXr@tabenumitem{&}{\@subenumctr}}} % \end{macrocode} % The macros for list and optional numeration. For a successful usage of |\label|--|\ref| mechanism -% the |\refstepcounter| contains were divided in two parts: the |\stepcounter| command was plased in the +% the |\refstepcounter| contains were divided in two parts: the |\stepcounter| command was placed in the % first column, before printing of label, on the second column was placed mechanism of creation % labels. % \changes{0.0b}{2007/09/07}{The \cmd{\refstepcounter} command divided into two parts to allow % labels for tabular items.} % \begin{macrocode} \newcommand\TeXr@tabenumitem[2]{% - \stepcounter{#2}\@nameuse{label#2}#1 + \stepcounter{#2}{\@nameuse{label#2}}#1 \protected@edef \@currentlabel{\csname p@#2\endcsname\csname the#2\endcsname}} \@ifdefinable\TeXr@@tabenumitem{} @@ -673,7 +699,7 @@ % Start of definition of tabulated lists themselves---\env{tabenum} % and \env{rtabenum}. % They allow usage of optional argument in the same way as in -% \env{enumerate} environment from \pkg{paralist} package. +% \env{enumerate} environment from \package{paralist} package. % The second definition, \env{rtabenum}, replaces |\Alph|/|\alph| % numeration for \texttt{A}/texttt{a} entries by Russian % |\Asbuk|/|\asbuk| numeration. @@ -703,12 +729,12 @@ \@topsepadd\topsep\advance\@topsepadd\partopsep \advance\@topsepadd-\jot \ifdim\@topsepadd<\z@\@topsepadd=\z@\fi - \if@nobreak\else\addvspace\@topsepadd\fi + \if@nobreak\vspace{-\jot}\else\addvspace\@topsepadd\fi % \end{macrocode} -% Interline spacing enlarged by |\jot| as in \pkg{amsmath}'s environments like +% Interline spacing enlarged by |\jot| as in \package{amsmath}'s environments like % \env{align} etc. % \begin{macrocode} - \openup\jot% + \openup\jot % \end{macrocode} % Check for list depth and settings for first level. % If it exceeded, the error message pops out. @@ -767,17 +793,19 @@ % \begin{macrocode} \newcommand{\@TeXr@tabenum}{\begingroup \let\\\TeXr@arraycr\TeXr@tlist@arrayjot\let\par=\cr - \settowidth\@tempdima{\tabenumindent}% + \settowidth\@tempdima{\tabenumindent}\gdef\tabenumindent{}% \settowidth\@tempdimb{\tabenumsep}% + \ifnum\@listdepth>\z@\advance\@tempdima\@totalleftmargin\fi \let\qedhere\tabqedhere \halign\bgroup \strut##\hskip\@tempdima - \hskip-\@tempdimb&&\tabenumsep\hfil##\hskip\labelsep&##\hfil\cr} + \hskip-\@tempdimb&&\hskip\@tempdimb\hfil##\hskip\labelsep + &##\hfil\cr} % \end{macrocode} % % Finish of \env{tabenum} environment. % \begin{macrocode} -\def\endtabenum{\crcr\egroup\endgroup\gdef\tabenumindent{}\par +\def\endtabenum{\crcr\egroup\endgroup\par \addpenalty\@endparpenalty \advance\@topsepadd\jot \addvspace\@topsepadd} @@ -789,7 +817,7 @@ % \begin{environment}{rsubtabenum} % The tabulated list of second level. This list uses a real \env{tabular} % environment. In this case it is placed in one page. This list as its -% parent environment use optional argument in the way of \pkg{paralist}'s +% parent environment use optional argument in the way of \package{paralist}'s % \env{enumerate}. % \begin{macrocode} \newcommand\subtabenum[1][]{\TeXr@tlist@arrayjot @@ -862,20 +890,22 @@ % This command inserts negative |\baselineskip| and put start of % `tabular'ed list on the baseline of list number. % -% Optional argument allows to align baselines in the case of height -% elements in first line of \env{tablist} +% Optional argument allows to align baselines in the case of high +% elements in first line of \env{tablist}. In the version 0.0e the calculation +% of compensating space was changed. % \begin{macrocode} \newcommand\liststrut[1][]{\def\tempa{#1}\ifx\tempa\empty - \strut - \@tempdima-1.3\baselineskip - \vspace*{\@tempdima}\par% - \else\settoheight\@tempdima{{$#1$}}\strut - \advance\@tempdima\lineskip - \noindent\vrule\@height\@tempdima\@width\z@\@depth\z@ - \strut\advance\@tempdima.3\baselineskip - \vspace*{-\@tempdima}\par% + \strut\@tempskipa\z@ + \else\settoheight\@tempdima{{$#1$}}\vrule height\@tempdima depth\dp\strutbox width\z@ + \advance\@tempdima-\ht\strutbox + \ifdim\@tempdima>\lineskip\advance\@tempdima\lineskip\fi + \@tempskipa\@tempdima \fi - \@nobreaktrue} + \advance\@tempskipa\baselineskip +% \advance\@tempskipa-\@outerparskip + \par\nobreak\vskip-\parskip +% \advance\@tempskipa\lastskip + \nobreak\kern-\@tempskipa\@nobreaktrue} % \end{macrocode} % \end{macro} % diff --git a/Master/texmf-dist/tex/latex/tablists/tablists.sty b/Master/texmf-dist/tex/latex/tablists/tablists.sty index b7c26d026ea..986c9376907 100644 --- a/Master/texmf-dist/tex/latex/tablists/tablists.sty +++ b/Master/texmf-dist/tex/latex/tablists/tablists.sty @@ -22,7 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{tablists} - [2008/01/14 v0.0d (beta) Tabulated list of short items] + [2009/08/04 v0.0e (beta) Tabulated list of short items] \RequirePackage{makecell} \@ifpackagelater{makecell}{2007/05/24 V0.1d}{}{\PackageError {tablists}{For a successful cooperation we need at least\MessageBreak @@ -33,16 +33,17 @@ \newcommand\tabenumsep{\hskip1em} \newcommand\negtabenumsep{% \settowidth\@tempdima{\tabenumsep}\hspace*{-\@tempdima}} -\newcommand\tabenumitem{&\@ifnextchar[%] +\newcommand\tabenumitem{\ifvoid\@labels\else\llap{\box\@labels\hspace{-\@totalleftmargin}}\fi + &\@ifnextchar[% {\TeXr@@tabenumitem{&}}% - {\TeXr@tabenumitem{&}{\@enumctr}}\setcounter{\@subenumctr}\z@} + {\TeXr@tabenumitem{&}{\@enumctr}\setcounter{\@subenumctr}\z@}} \newcommand\subtabenumitem{\ifnum\value{\@subenumctr}=\z@\negtabenumsep \let\negtabenumsep\relax\fi& \@ifnextchar[%] {\TeXr@@tabenumitem{&}}% {\TeXr@tabenumitem{&}{\@subenumctr}}} \newcommand\TeXr@tabenumitem[2]{% - \stepcounter{#2}\@nameuse{label#2}#1 + \stepcounter{#2}{\@nameuse{label#2}}#1 \protected@edef \@currentlabel{\csname p@#2\endcsname\csname the#2\endcsname}} \@ifdefinable\TeXr@@tabenumitem{} @@ -72,8 +73,8 @@ \@topsepadd\topsep\advance\@topsepadd\partopsep \advance\@topsepadd-\jot \ifdim\@topsepadd<\z@\@topsepadd=\z@\fi - \if@nobreak\else\addvspace\@topsepadd\fi - \openup\jot% + \if@nobreak\vspace{-\jot}\else\addvspace\@topsepadd\fi + \openup\jot \ifnum\@enumdepth>\thr@@ \@toodeep \else @@ -110,13 +111,15 @@ } \newcommand{\@TeXr@tabenum}{\begingroup \let\\\TeXr@arraycr\TeXr@tlist@arrayjot\let\par=\cr - \settowidth\@tempdima{\tabenumindent}% + \settowidth\@tempdima{\tabenumindent}\gdef\tabenumindent{}% \settowidth\@tempdimb{\tabenumsep}% + \ifnum\@listdepth>\z@\advance\@tempdima\@totalleftmargin\fi \let\qedhere\tabqedhere \halign\bgroup \strut##\hskip\@tempdima - \hskip-\@tempdimb&&\tabenumsep\hfil##\hskip\labelsep&##\hfil\cr} -\def\endtabenum{\crcr\egroup\endgroup\gdef\tabenumindent{}\par + \hskip-\@tempdimb&&\hskip\@tempdimb\hfil##\hskip\labelsep + &##\hfil\cr} +\def\endtabenum{\crcr\egroup\endgroup\par \addpenalty\@endparpenalty \advance\@topsepadd\jot \addvspace\@topsepadd} @@ -159,16 +162,15 @@ \newcommand\startsubnumber[1]{\count@#1\advance\count@-1% \global\expandafter\csname c@\@subenumctr\endcsname\count@} \newcommand\liststrut[1][]{\def\tempa{#1}\ifx\tempa\empty - \strut - \@tempdima-1.3\baselineskip - \vspace*{\@tempdima}\par% - \else\settoheight\@tempdima{{$#1$}}\strut - \advance\@tempdima\lineskip - \noindent\vrule\@height\@tempdima\@width\z@\@depth\z@ - \strut\advance\@tempdima.3\baselineskip - \vspace*{-\@tempdima}\par% + \strut\@tempskipa\z@ + \else\settoheight\@tempdima{{$#1$}}\vrule height\@tempdima depth\dp\strutbox width\z@ + \advance\@tempdima-\ht\strutbox + \ifdim\@tempdima>\lineskip\advance\@tempdima\lineskip\fi + \@tempskipa\@tempdima \fi - \@nobreaktrue} + \advance\@tempskipa\baselineskip + \par\nobreak\vskip-\parskip + \nobreak\kern-\@tempskipa\@nobreaktrue} \newcommand\tabqedhere{\cr \noalign{\@par\@tempdima\prevdepth \kern-\@tempdima\kern-\baselineskip\kern\lineskip -- cgit v1.2.3