From 71fb1b25309a75d246b0896063f0940332c85919 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 21 Jul 2017 22:02:07 +0000 Subject: limap (21jul17) git-svn-id: svn://tug.org/texlive/trunk@44863 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/limap/limap.dtx | 51 +++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/source/latex/limap') diff --git a/Master/texmf-dist/source/latex/limap/limap.dtx b/Master/texmf-dist/source/latex/limap/limap.dtx index 4422438581e..1a3ea7bb9db 100644 --- a/Master/texmf-dist/source/latex/limap/limap.dtx +++ b/Master/texmf-dist/source/latex/limap/limap.dtx @@ -13,7 +13,7 @@ %% 64521 Gro\ss-Gerau (Germany) %% Mail: gene@gerd-neugebauer.de %% -%% Copyright (C) 1999-2016 Gerd Neugebauer +%% Copyright (C) 1999-2017 Gerd Neugebauer %% %% limap.dtx may be distributed under the terms of the LaTeX Project %% Public License version 1.3c, as described in lppl.txt. @@ -125,7 +125,7 @@ % \DoNotIndex{\wd,\widowpenalty,\write,\xdef,\z@,\(,\)} % %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% \CheckSum{798} +% \CheckSum{813} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -965,6 +965,30 @@ % boxed & a boxed style for the TOC\\\bottomrule % \end{MapTabular}% % \vspace*{-5ex} +% \begin{Map}{Blocks in the Table of Contents} +% +% \Block{Motivation}% +% Sometimes it can be desirable to add the blocks to the global +% table of contents. Here we will see how this can be achieved. +% +% \DescribeMacro{\MapBlockStartHook} +% The macro |\MapBlockStartHook| is expanded at the beginning of +% each block it if is defined. It takes a single argument which +% is the title of the block. +% +% \DescribeMacro{\MapBlockTOC} +% The macro |\MapBlockTOC| is a macro which adds one line to the +% table of contents. It takes one argument which is the text to +% be added. +% +% \Block{Example}% +% Put the following code in the preamble to get the blocks into +% the table of contents. +% \begin{verbatim} +% \let\MapBlockStartHook\MapBlockTOC \end{verbatim} +% +% %\vspace*{-5ex} +% \end{Map} % \end{Map} % \begin{Map}{Tables} % @@ -1136,7 +1160,7 @@ % |\fileversion| is the version number of the |dtx| file. It is % used as a version number for the class and package. % \begin{macrocode} -\def\fileversion{2.1} +\def\fileversion{2.2} % \end{macrocode} % \end{macro} % @@ -1302,7 +1326,7 @@ % % \Block{Preliminaries}% % First of all we request a descent version of \LaTeX\ to be -% used. I don't think ikt does not have to be too new. +% used. I don't think it does have to be too new. % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} @@ -1736,6 +1760,20 @@ % \end{macro} % % \Block{}% +% \begin{macro}{\MapBlockTOC} +% The macro |\MapBlockTOC| can be used to add an entry for a +% block to the table of contents. +% \changes{2.2}{2017/07/20}{new} +% \begin{macrocode} +\newcommand\MapBlockTOC[1]{% + \begingroup\count0=\Map@level \advance\count0 1% + \addcontentsline{toc}{\@nameuse{Map@TOC@name\the\count0}}{#1}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \Block{}% % \begin{macro}{\MapTOCname} % The macro |\MapTOCname| contains the heading for the section % title in contents blocks. This macro is reset when the @@ -2049,6 +2087,7 @@ % \begin{environment}{Map@Block} % This macro is used to typeset a block inside a Map. To avoid % abuse outside of a map it is activated within a Map only. +% \changes{2.2}{2017/07/20}{|MapBlockStartHook| added.} % \begin{macrocode} \newenvironment{Map@Block}[1]{\par \vspace*{-\parskip}\vspace*{-1ex}% @@ -2056,10 +2095,12 @@ \vspace*{\MapParskip}% \raggedright\hspace{0pt}\MapFont{\MapBlockLabelFont{#1}}% \gdef\@currentlabel{#1}% -% \global\advance\Map@blockcount1 &\parskip=\MapParskip {\MapRuleStart \rule{\MapTextFraction\textwidth}{\MapRuleWidth}}\par + \ifx\@undefined\MapBlockStartHook\else + \MapBlockStartHook{#1}% + \fi % \end{macrocode} % % The final action is empty. Thus the block can be used as a simple -- cgit v1.2.3