diff options
author | Karl Berry <karl@freefriends.org> | 2015-08-10 22:24:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-08-10 22:24:57 +0000 |
commit | 347575815fc66f6b3e2ea01e66e7b26dd470f14a (patch) | |
tree | a43db842af1ca53a6a6506c71476ba19a33c802d /Master/texmf-dist | |
parent | 77f09e13542d0a67a8deb5ac7cabca478878d2e9 (diff) |
upmethodology (10aug15)
git-svn-id: svn://tug.org/texlive/trunk@38094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.pdf | bin | 359943 -> 361090 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex | 61 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/upmethodology/UPMVERSION.def | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty | 109 |
4 files changed, 113 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.pdf b/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.pdf Binary files differindex 8bb2203cf63..43653d84371 100644 --- a/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.pdf +++ b/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.pdf diff --git a/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex b/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex index 028e0e2fcca..e918b3e381f 100644 --- a/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex +++ b/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex @@ -23,6 +23,7 @@ \incversion{\makedate{09}{07}{2014}}{Add the environment \texttt{emphbox}.}{\upmpublic} \incsubversion{\makedate{10}{09}{2014}}{Complete the documentation of \texttt{enumerate}.}{\upmpublic} \incversion{\makedate{24}{04}{2015}}{Add explanations about the macros on the current language.}{\upmpublic} +\incversion{\makedate{10}{08}{2015}}{Add on enumeration counter saving mechanism.}{\upmpublic} \addauthorvalidator*[galland@arakhne.org]{St{\'e}phane}{Galland}{Original Author} \addauthor*{Frans}{van Dunn\'e}{Reviewer} @@ -727,21 +728,69 @@ Only once counter could be saved at a given time. It means that you cannot save the counters for an enumeration and for an enclosing enumeration at the same time. \end{upmcaution} +Two general macros are defined for helping you to save a counter value into the global variable: \begin{itemize} \item \texttt{{\textbackslash}savecounter\{name\}} \\ - save the counter identifier by the given name; + save the value of the counter identified by the given name in a global variable. + The name of the counter must be previously defined with one of thee standard \LaTeX\ or \TeX\ macros, e.g. \texttt{{\textbackslash}newcounter}; \item \texttt{{\textbackslash}restorecounter\{name\}} \\ - put the previously saved value into the given counter; + put the previously saved value into the counter with the given name. + The name of the counter must be previously defined with one of thee standard \LaTeX\ or \TeX\ macros, e.g. \texttt{{\textbackslash}newcounter}; +\end{itemize} + +The counter is extensively used in enumeration lists. The following macros will help you for managing the enumeration counter: +\begin{itemize} \item \texttt{{\textbackslash}setenumcounter\{value\}} \\ - force the value of the enumeration counter; + force the value of the counter used by the enumeration environments; \item \texttt{{\textbackslash}getenumcounter} \\ - replies the value of the enumeration counter; + replies the value of the counter used by the enumeration environments; \item \texttt{{\textbackslash}saveenumcounter} \\ - save the enumeration counter; + save the value of the counter used by the enumeration environment with \texttt{{\textbackslash}savecounter}; \item \texttt{{\textbackslash}restoreenumcounter} \\ - force the enumeration to use the saved counter's value; + restore the value of the counter used by the enumeration environment with \texttt{{\textbackslash}restorecounter}. \end{itemize} +\paragraph{Example:} The following \LaTeX~code produces the result below: +\begin{verbatim} +This is a text: \begin{enumerate} + \item This is an item. + \item This is another item. + \saveenumcounter +\end{enumerate} +This is a text in the between. +\begin{enumerate} + \restoreenumcounter + \item The list goes on + \item and on. +\end{enumerate} +This is a second text in the between. +\begin{enumerate} + \setenumcounter{18} + \item The list goes on again + \item and on. +\end{enumerate} This is the text after. +\end{verbatim} + +\fbox{\parbox{\linewidth}{ + This is a text: \begin{enumerate} + \item This is an item. + \item This is another item. + \saveenumcounter + \end{enumerate} + This is a text in the between. + \begin{enumerate} + \restoreenumcounter + \item The list goes on + \item and on. + \end{enumerate} + This is a second text in the between. + \begin{enumerate} + \setenumcounter{18} + \item The list goes on again + \item and on. + \end{enumerate} This is the text after. +}} + \subsection{Inline Enumeration} In several document, an enumeration of things is written inside a paragraph instead of inside a list of points. diff --git a/Master/texmf-dist/tex/latex/upmethodology/UPMVERSION.def b/Master/texmf-dist/tex/latex/upmethodology/UPMVERSION.def index a60390540ba..24838dad86e 100644 --- a/Master/texmf-dist/tex/latex/upmethodology/UPMVERSION.def +++ b/Master/texmf-dist/tex/latex/upmethodology/UPMVERSION.def @@ -1 +1 @@ -\def\UPMVERSION{20150626} +\def\UPMVERSION{20150810} diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty index 9edae0d83e0..b2413e34afe 100644 --- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty +++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty @@ -17,7 +17,7 @@ % write to the Free Software Foundation, Inc., 59 Temple Place - Suite % 330, Boston, MA 02111-1307, USA. -\global\edef\upm@package@fmt@ver{2015/06/26} +\global\edef\upm@package@fmt@ver{2015/08/10} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{upmethodology-fmt}[\upm@package@fmt@ver] @@ -464,60 +464,57 @@ % size=<length> \define@key[autolatex]{mtable}{size}{\gdef\@autolatex@mtable@size{#1}} % position: h t b p H ! -\define@key[autolatex]{mtable}{h}[\relax]{\gdef\@autolatex@mtable@position{h}} -\define@key[autolatex]{mtable}{t}[\relax]{\gdef\@autolatex@mtable@position{t}} -\define@key[autolatex]{mtable}{b}[\relax]{\gdef\@autolatex@mtable@position{b}} -\define@key[autolatex]{mtable}{p}[\relax]{\gdef\@autolatex@mtable@position{p}} -\define@key[autolatex]{mtable}{H}[\relax]{\gdef\@autolatex@mtable@position{H}} -\define@key[autolatex]{mtable}{ht}[\relax]{\gdef\@autolatex@mtable@position{ht}} -\define@key[autolatex]{mtable}{hb}[\relax]{\gdef\@autolatex@mtable@position{hb}} -\define@key[autolatex]{mtable}{hp}[\relax]{\gdef\@autolatex@mtable@position{hp}} -\define@key[autolatex]{mtable}{hH}[\relax]{\gdef\@autolatex@mtable@position{hH}} -\define@key[autolatex]{mtable}{h!}[\relax]{\gdef\@autolatex@mtable@position{h!}} -\define@key[autolatex]{mtable}{tb}[\relax]{\gdef\@autolatex@mtable@position{tb}} -\define@key[autolatex]{mtable}{tp}[\relax]{\gdef\@autolatex@mtable@position{tp}} -\define@key[autolatex]{mtable}{tH}[\relax]{\gdef\@autolatex@mtable@position{tH}} -\define@key[autolatex]{mtable}{t!}[\relax]{\gdef\@autolatex@mtable@position{t!}} -\define@key[autolatex]{mtable}{bp}[\relax]{\gdef\@autolatex@mtable@position{bp}} -\define@key[autolatex]{mtable}{bH}[\relax]{\gdef\@autolatex@mtable@position{bH}} -\define@key[autolatex]{mtable}{b!}[\relax]{\gdef\@autolatex@mtable@position{b!}} -\define@key[autolatex]{mtable}{pH}[\relax]{\gdef\@autolatex@mtable@position{pH}} -\define@key[autolatex]{mtable}{p!}[\relax]{\gdef\@autolatex@mtable@position{p!}} -\define@key[autolatex]{mtable}{H!}[\relax]{\gdef\@autolatex@mtable@position{H!}} -\define@key[autolatex]{mtable}{htb}[\relax]{\gdef\@autolatex@mtable@position{htb}} -\define@key[autolatex]{mtable}{htp}[\relax]{\gdef\@autolatex@mtable@position{htp}} -\define@key[autolatex]{mtable}{htH}[\relax]{\gdef\@autolatex@mtable@position{htH}} -\define@key[autolatex]{mtable}{ht!}[\relax]{\gdef\@autolatex@mtable@position{ht!}} -\define@key[autolatex]{mtable}{tbp}[\relax]{\gdef\@autolatex@mtable@position{tbp}} -\define@key[autolatex]{mtable}{tbH}[\relax]{\gdef\@autolatex@mtable@position{tbH}} -\define@key[autolatex]{mtable}{tb!}[\relax]{\gdef\@autolatex@mtable@position{tb!}} -\define@key[autolatex]{mtable}{bpH}[\relax]{\gdef\@autolatex@mtable@position{bpH}} -\define@key[autolatex]{mtable}{bp!}[\relax]{\gdef\@autolatex@mtable@position{bp!}} -\define@key[autolatex]{mtable}{pH!}[\relax]{\gdef\@autolatex@mtable@position{pH!}} -\define@key[autolatex]{mtable}{htbp}[\relax]{\gdef\@autolatex@mtable@position{htbp}} -\define@key[autolatex]{mtable}{htbH}[\relax]{\gdef\@autolatex@mtable@position{htbH}} -\define@key[autolatex]{mtable}{htb!}[\relax]{\gdef\@autolatex@mtable@position{htb!}} -\define@key[autolatex]{mtable}{tbpH}[\relax]{\gdef\@autolatex@mtable@position{tbpH}} -\define@key[autolatex]{mtable}{tbp!}[\relax]{\gdef\@autolatex@mtable@position{tbp!}} -\define@key[autolatex]{mtable}{bpH!}[\relax]{\gdef\@autolatex@mtable@position{bph!}} -\define@key[autolatex]{mtable}{htbpH}[\relax]{\gdef\@autolatex@mtable@position{htbpH}} -\define@key[autolatex]{mtable}{htbp!}[\relax]{\gdef\@autolatex@mtable@position{htbp!}} -\define@key[autolatex]{mtable}{htbpH!}[\relax]{\gdef\@autolatex@mtable@position{htbpH!}} +\define@key[autolatex]{mtable}{h}[\relax]{\gdef\@autolatex@mtable@position{[h]}} +\define@key[autolatex]{mtable}{t}[\relax]{\gdef\@autolatex@mtable@position{[t]}} +\define@key[autolatex]{mtable}{b}[\relax]{\gdef\@autolatex@mtable@position{[b]}} +\define@key[autolatex]{mtable}{p}[\relax]{\gdef\@autolatex@mtable@position{[p]}} +\define@key[autolatex]{mtable}{H}[\relax]{\gdef\@autolatex@mtable@position{[H]}} +\define@key[autolatex]{mtable}{ht}[\relax]{\gdef\@autolatex@mtable@position{[ht]}} +\define@key[autolatex]{mtable}{hb}[\relax]{\gdef\@autolatex@mtable@position{[hb]}} +\define@key[autolatex]{mtable}{hp}[\relax]{\gdef\@autolatex@mtable@position{[hp]}} +\define@key[autolatex]{mtable}{hH}[\relax]{\gdef\@autolatex@mtable@position{[hH]}} +\define@key[autolatex]{mtable}{h!}[\relax]{\gdef\@autolatex@mtable@position{[h!]}} +\define@key[autolatex]{mtable}{tb}[\relax]{\gdef\@autolatex@mtable@position{[tb]}} +\define@key[autolatex]{mtable}{tp}[\relax]{\gdef\@autolatex@mtable@position{[tp]}} +\define@key[autolatex]{mtable}{tH}[\relax]{\gdef\@autolatex@mtable@position{[tH]}} +\define@key[autolatex]{mtable}{t!}[\relax]{\gdef\@autolatex@mtable@position{[t!]}} +\define@key[autolatex]{mtable}{bp}[\relax]{\gdef\@autolatex@mtable@position{[bp]}} +\define@key[autolatex]{mtable}{bH}[\relax]{\gdef\@autolatex@mtable@position{[bH]}} +\define@key[autolatex]{mtable}{b!}[\relax]{\gdef\@autolatex@mtable@position{[b!]}} +\define@key[autolatex]{mtable}{pH}[\relax]{\gdef\@autolatex@mtable@position{[pH]}} +\define@key[autolatex]{mtable}{p!}[\relax]{\gdef\@autolatex@mtable@position{[p!]}} +\define@key[autolatex]{mtable}{H!}[\relax]{\gdef\@autolatex@mtable@position{[H!]}} +\define@key[autolatex]{mtable}{htb}[\relax]{\gdef\@autolatex@mtable@position{[htb]}} +\define@key[autolatex]{mtable}{htp}[\relax]{\gdef\@autolatex@mtable@position{[htp]}} +\define@key[autolatex]{mtable}{htH}[\relax]{\gdef\@autolatex@mtable@position{[htH]}} +\define@key[autolatex]{mtable}{ht!}[\relax]{\gdef\@autolatex@mtable@position{[ht!]}} +\define@key[autolatex]{mtable}{tbp}[\relax]{\gdef\@autolatex@mtable@position{[tbp]}} +\define@key[autolatex]{mtable}{tbH}[\relax]{\gdef\@autolatex@mtable@position{[tbH]}} +\define@key[autolatex]{mtable}{tb!}[\relax]{\gdef\@autolatex@mtable@position{[tb!]}} +\define@key[autolatex]{mtable}{bpH}[\relax]{\gdef\@autolatex@mtable@position{[bpH]}} +\define@key[autolatex]{mtable}{bp!}[\relax]{\gdef\@autolatex@mtable@position{[bp!]}} +\define@key[autolatex]{mtable}{pH!}[\relax]{\gdef\@autolatex@mtable@position{[pH!]}} +\define@key[autolatex]{mtable}{htbp}[\relax]{\gdef\@autolatex@mtable@position{[htbp]}} +\define@key[autolatex]{mtable}{htbH}[\relax]{\gdef\@autolatex@mtable@position{[htbH]}} +\define@key[autolatex]{mtable}{htb!}[\relax]{\gdef\@autolatex@mtable@position{[htb!]}} +\define@key[autolatex]{mtable}{tbpH}[\relax]{\gdef\@autolatex@mtable@position{[tbpH]}} +\define@key[autolatex]{mtable}{tbp!}[\relax]{\gdef\@autolatex@mtable@position{[tbp!]}} +\define@key[autolatex]{mtable}{bpH!}[\relax]{\gdef\@autolatex@mtable@position{[bph!]}} +\define@key[autolatex]{mtable}{htbpH}[\relax]{\gdef\@autolatex@mtable@position{[htbpH]}} +\define@key[autolatex]{mtable}{htbp!}[\relax]{\gdef\@autolatex@mtable@position{[htbp!]}} +\define@key[autolatex]{mtable}{htbpH!}[\relax]{\gdef\@autolatex@mtable@position{[htbpH!]}} % \newenvironment{mtable}[6][ht]{% - \global\let\@autolatex@mtable@position\relax% + \gdef\@autolatex@mtable@position{[ht]}% \gdef\@autolatex@mtable@size{\normalsize}% \setkeys[autolatex]{mtable}{#1}% - \ifx\@autolatex@mtable@position\relax% - \gdef\@autolatex@mtable@position{ht}% - \fi % \gdef\upm@table@caption{#5}% \xdef\upm@table@label{tab:#6}% \gdef\upm@table@note{}% \newcommand{\captionastitle}{\tabulartitle{\upm@table@caption}}% \newcommand{\tablenote}[1]{\gdef\upm@table@note{\bgroup ##1\egroup}}% - \expandafter\table[\@autolatex@mtable@position]% + \expandafter\table\@autolatex@mtable@position% \center\@autolatex@mtable@size% \mtabular[#2]{#3}{#4}% }{% @@ -893,10 +890,18 @@ \newcommand{\restorecounter}[1]{% \setcounter{#1}{\theupm@fmt@savedcounter}% } -\newcommand{\saveenumcounter}{\savecounter{\@enumctr}} -\newcommand{\restoreenumcounter}{\restorecounter{\@enumctr}} -\newcommand{\setenumcounter}[1]{\setcounter{\@enumctr}{#1}\addtocounter{\@enumctr}{-1}} -\newcommand{\getenumcounter}{\value{\@enumctr}} + +\ifupm@use@override@standard@lists + \newcommand{\saveenumcounter}{\savecounter{@upm@fmt@enumdescription@cnt@}} + \newcommand{\restoreenumcounter}{\restorecounter{@upm@fmt@enumdescription@cnt@}} + \newcommand{\setenumcounter}[1]{\setcounter{@upm@fmt@enumdescription@cnt@}{#1}} + \newcommand{\getenumcounter}{\the@upm@fmt@enumdescription@cnt@} +\else + \newcommand{\saveenumcounter}{\savecounter{@enumctr}} + \newcommand{\restoreenumcounter}{\restorecounter{@enumctr}} + \newcommand{\setenumcounter}[1]{\setcounter{@enumctr}{#1}\addtocounter{@enumctr}{-1}} + \newcommand{\getenumcounter}{\value{@enumctr}} +\fi %---------------------------------------- % FOOTNOTE @@ -1383,11 +1388,11 @@ %---------------------------------------- % Exponents and Indices %---------------------------------------- -\renewcommand{\textup}[1]{\textsuperscript{#1}\xspace} +\gdef\textup#1{\textsuperscript{#1}\xspace} \def\@textsubscript#1{% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} -\newcommand{\textsubscript}[1]{\@textsubscript{\selectfont#1}} -\newcommand{\textdown}[1]{\textsubscript{#1}\xspace} +\gdef\textsubscript#1{\@textsubscript{\selectfont#1}} +\gdef\textdown#1{\textsubscript{#1}\xspace} %---------------------------------------- |