diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:55:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:55:42 +0000 |
commit | c93827540c8875c270e3b91434ce97ce5d0d80a9 (patch) | |
tree | cfc0454dc2124a98873d3a5d6f631221ce52ea14 /Master/texmf-dist/source/latex/oberdiek | |
parent | 3c80959f183b98603d5637301189f1d53cd136b2 (diff) |
trunk/Master/texmf-dist/source/latex/oberdiek
git-svn-id: svn://tug.org/texlive/trunk@421 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/alphalph.dtx | 596 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/alphalph.ins | 72 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx | 481 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hypbmsec.ins | 76 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hypcap.dtx | 347 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hypcap.ins | 79 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.ins | 42 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/pagesel.dtx | 420 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/pagesel.ins | 80 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/twoopt.dtx | 295 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/twoopt.ins | 72 |
11 files changed, 2560 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx b/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx new file mode 100644 index 00000000000..8e6b906b92b --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx @@ -0,0 +1,596 @@ +% \iffalse meta-comment +% +% alphalph.dtx +% +% This file is part of the package `alphalph' for use with LaTeX2e. +% +% Function: Selecting shipout output pages. +% +% Copyright (C) 1999 Heiko Oberdiek. +% +% This program can be redistributed and/or modified +% under the terms of the LaTeX Project Public License +% distributed from CTAN archives in directory +% macros/latex/base/lppl.txt; either version 1 of +% the License, or (at your option) any later version. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. +% +% This is the desperate try to use only one identification string +% with the verion info: +%<*dtx> + \ProvidesFile{alphalph.dtx} +%</dtx> +%<package>\ifx\ProvidesPackage\UnDeFiNeD +%<package>\begingroup\def\x#1#2#3[#4]#5{\endgroup\csname fi\endcsname +%<package>\immediate\write-1{Package: #3 #4 }}\x +%<package>\else +%<package>\ProvidesPackage{alphalph}% +%<driver>\ProvidesFile{alphalph.drv} +% \fi +% \ProvidesFile{alphalph.dtx} + [1999/04/13 v1.1 Converting numbers to letters (HO)] +% +% \iffalse +%<package>\fi +% \fi +% \GetFileInfo{alphalph.dtx} +% +% \CheckSum{268} +% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\usepackage{holtxdoc,alphalph} +\begin{document} + \DocInput{alphalph.dtx} +\end{document} +%</driver> +% \fi +% +% ^^A\DoNotIndex{\ifnum,\ifx,\ifcase} +% \DoNotIndex{\or,\else,\fi,\csname,\endcsname} +% \DoNotIndex{\def,\edef,\long,\begingroup,\endgroup} +% \DoNotIndex{\@,\\} +% \DoNotIndex{\the,\relax,\expandafter} +% +% \newenvironment{param}{^^A +% \newcommand{\entry}[1]{\meta{\###1}:&}^^A +% \begin{tabular}[t]{@{}l@{ }l@{}}^^A +% }{^^A +% \end{tabular}^^A +% } +% +% \SetupTitle{number,count,alph,TeX} +% \maketitle +% +% \begin{abstract} +% The package provides the new expandable commands \cmd{\alphalph} +% and \cmd{\AlphAlph}. +% They are like \cmd{\number}, but the expansion consists of +% lowercase and uppercase letters respectively. +% \end{abstract} +% +% \tableofcontents +% +% \section{Usage} +% The package \Package{alphalph} can used with both plain\TeX\ +% and \LaTeX: +% \begin{description} +% \item[plain\TeX:] |\input alphalph.sty| +% \item[\LaTeXe:] |\usepackage{alphalph}|\\ +% There aren't any options. +% \end{description} +% +% \subsection{User commands} +% \begin{description} +% \item[\cmd{\alphalph}:]\DescribeMacro{\alphalph} +% This works like \cmd{\number}, but the expansion consists of +% lowercase letters. +% \item[\cmd{\AlphAlph}:]\DescribeMacro{\AlphAlph} +% It converts a number into uppercase letters. +% \end{description} +% Both commands have following properties: +% \begin{itemize} +% \item They are fully expandable. This means that they can safely +% \begin{itemize} +% \item be written to a file, +% \item used in moving arguments (\LaTeX: they are \emph{robust}), +% \item used in a \cmd{\csname}-\cmd{\endcsname} pair. +% \end{itemize} +% \item If the argument is zero or negative, the commands expand +% to nothing like \cmd{\romannumeral}. +% \item As argument is allowed all that can be used after a \cmd{\number}: +% \begin{itemize} +% \item explicite constants, +% \item macros that expand to a number, +% \item count registers, \LaTeX\ counter can used +% via \cmd{\value}, e.\,g.:\\ +% |\alphalph{\value{page}}| +% \end{itemize} +% \end{itemize} +% +% The following table shows, how the conversion is made: +% \begin{center} +% \catcode`\|=12 +% \catcode`\+\active +% \def+#1&{\alphalph{#1}&}% +% \begin{tabular}{@{}l|*{14}{r@{, }}r@{}} +% number & 1& 2&\dots& 26& 27&\dots& 52& 53& +% \dots& 78& 79&\dots& 702& 703&\dots +% \\\hline +% \cmd{\alphalph}&+1&+2&\dots&+26&+27&\dots&+52&+53& +% \dots&+78&+79&\dots&+702&+703&\dots +% \end{tabular} +% \end{center} +% +% \section{Installation} +% \InstallPackage +% Or for use with TeX: +% \begin{quote} +% \Verb{texmf/tex/generic/misc/alphalph.sty} +% \end{quote} +% \newcommand*{\ExtraDocumentation}{% +% For generating the documentation the \eTeX-extension is recommended, +% because it works faster with \Package{alphalph}. +% } +% \InstallDocumentation +% +% \StopEventually{} +% +% \section{Implementation} +% \subsection{Begin\texorpdfstring{ of package}{}} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% The package identification is done at the top of the |.dtx| file +% in order to use only one identification string. +% +% For unique command names this package uses |aa@| as prefix +% for internal command names. Because we need |@| as a letter +% we save the current catcode value. +% \begin{macrocode} +\expandafter\edef\csname aa@atcode\endcsname{\the\catcode`\@ } +\catcode`\@=11 +% \end{macrocode} +% +% \subsection{Help macros} +% \begin{macro}{\@ReturnAfterElseFi} +% \begin{macro}{\@ReturnAfterFi} +% The following commands moves the `then' and `else' part respectively +% behind the |\if|-construct. This prevents a too deep |\if|-nesting +% and so a \TeX\ capacity error because of a limited input stack size. +% I use this trick in several packages, so I don't prefix these internal +% commands in order not to have the same macros with different names. +% (It saves memory). +% \begin{macrocode} +\long\def\@ReturnAfterElseFi#1\else#2\fi{\fi#1} +\long\def\@ReturnAfterFi#1\fi{\fi#1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\aa@alph} +% \begin{macro}{\aa@Alph} +% The two commands \cmd{\aa@alph} and \cmd{\aa@Alph} convert a +% number into a letter (lowercase and uppercase respectivly). +% The character |@| is used as an error symbol, +% if the number isn't in the range of 1 until 26. +% Here we need no space after the number |#1|, because the error +% symbol |@| for the zero case stops scanning the number. +% \begin{macrocode} +\def\aa@alph#1{% + \ifcase#1% + @% + \or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m% + \or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z% + \else + @% + \fi +} +\def\aa@Alph#1{% + \ifcase#1% + @% + \or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\or M% + \or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z% + \else + @% + \fi +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{User commands} +% \begin{macro}{\alphalph} +% \begin{macro}{\AlphAlph} +% The whole difference between \cmd{\alphalph} and \cmd{\AlphAlph} +% is that the output consists of lowercase or uppercase letters. +% \begin{macrocode} +\def\alphalph{\aa@callmake\aa@alph} +\def\AlphAlph{\aa@callmake\aa@Alph} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\aa@callmake} +% \cmd{\aa@callmake} converts the number in +% the second argument |#2| into explicite decimal digits via +% the \TeX\ primitive \cmd{\number}. (The closing curly brace stops reading +% the number at the latest.) +% \begin{macrocode} +\def\aa@callmake#1#2{% + \expandafter\aa@make\expandafter{\number#2}#1% +} +% \end{macrocode} +% \end{macro} +% +% \eTeX provides the new primitive \cmd{\numexpr}. +% With this command the implementation is very simple +% (see \ref{sec:etex}). Therefore the package provides two +% methods: a fast and simple one that uses the \eTeX\ extension +% and a method that is restricted to the standard \TeX\ means. +% +% Now we distinguish between \TeX\ and \eTeX by checking +% whether \cmd{\numexpr} is defined or isn't. +% Because the \TeX\ primitive \cmd{\csname} defines an +% undefined command to be \cmd{\relax}, \cmd{\csname} +% is executed in a group. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname numexpr\endcsname\relax +% \end{macrocode} +% +% \subsection{\texorpdfstring{Conversion with standard \TeX\ means}{\TeX}} +% \begin{macro}{\aa@make} +% \cmd{\aa@make} catches the cases, if the number is zero or negative. +% Then it expands to nothing like \cmd{\romannumeral}. +% \begin{macrocode} +\def\aa@make#1#2{% + \ifnum#1<1 + \else + \@ReturnAfterFi{% + \aa@process1;#1;1..#2% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\aa@process} +% \cmd{\aa@process} contains the algorithm for the conversion. +% \TeX doesn't provide a simple method to divide or multiply +% numbers in a fully expandable way. An expandable addition by one +% is complicated enough. Therefore \cmd{\aa@process} uses +% only expandible versions of additions by one. The algorithm +% starts with one and increments it until the size of the wanted +% number is reached. The intermediate number that is incremented +% is present in two kinds: +% \begin{itemize} +% \item the normal decimal form for the \cs{ifnum}-comparison, +% \item a digit format: the end of each digit is marked by an dot, +% and the digits are in reserved order. An empty digit +% ends this format. The meaning of a digit is here the +% decimal representation of a letter, the range is +% from 1 until 26. +% \end{itemize} +% Example: The aim number is 100, the intermediate number 50, so +% following would be on the argument stack: +% \begin{quote} +% |50;100;24.1..\aa@alph| +% \end{quote} +% \cmd{\aa@process} increments the first argument |#1| (|50|), +% and calls \cmd{\aa@alphinc} to increment the digit form +% (|24.1..|). The middle part with the aim number |;#2;| (|;100;|) +% will not be changed. Neither \cmd{\aa@process} nor \cmd{\aa@alphinc} +% need the conversion command \cmd{\aa@alph} nor \cmd{\aa@Alph}. +% This command is read by \cmd{\aa@getresult}, if the digit form is +% ready. +% +% The expansion motor is \cmd{\number}. It reads and expands token +% to get decimal numbers until a token is reached that isn't a +% decimal digit. So the expansion doesn't stop, if \cmd{\aa@inc} +% is ready, because \cmd{\aa@inc} produces only decimal digits. +% \cmd{\aa@alphinc} is expanded to look for further digits. +% Now \cmd{\aa@alphinc} makes its job and returns with its +% argument |;#2;|. At last the first character |;| finishes \cmd{\number}. +% \begin{macrocode} +\def\aa@process#1;#2;{% + \ifnum#1=#2 + \expandafter\aa@getresult + \else + \@ReturnAfterFi{% + \expandafter\aa@process\number\aa@inc{#1}\aa@alphinc{;#2;}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\texorpdfstring{^^A +% Convert the separated digits to the letter result}{^^A +% Digits to letter result}}\label{sec:form} +% +% The single decimal digits of the final letter number are +% limited by a dot and come in reverse order. The end is +% marked by an empty digit. +% The next token is the command to convert a digit +% (\cmd{\aa@alph} or \cmd{\aa@Alph}), e.g.: +% \begin{quote} +% |11.3.1..\alph| $\Rightarrow$ |ack| +% \end{quote} +% +% \begin{macro}{\aa@getresult} +% \cmd{\aa@getresult} reads the digits |#1| and the converting +% command |#2|. Then it +% calls \cmd{\aa@@getresult} with its arguments. +% \begin{macrocode} +\def\aa@getresult#1..#2{% + \aa@@getresult!#2#1..% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\aa@@getresult} +% In its first argument |#1| \cmd{\aa@@getresult} collects the +% converted letters in the correct order. Character |!| is used +% as a parameter separator. The next token |#2| is the converting +% command (\cmd{\aa@alph} or \cmd{\aa@Alph}). The next digit |#3| +% is read, converted, and |\aa@@getresult| is called again. +% If the digit |#3| is empty, the end of the digit form is reached +% and the process stops and the ready letter number is output. +% \begin{macrocode} +\def\aa@@getresult#1!#2#3.{% + \ifx\\#3\\% + \@ReturnAfterElseFi{#1}% ready + \else + \@ReturnAfterFi{% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \aa@@getresult + \expandafter\expandafter\expandafter\expandafter + #2{#3}#1!#2% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Addition by one} +% +% \paragraph{Expandable addition of a decimal integer.} +% \begin{macro}{\aa@inc} +% \cmd{\aa@inc} increments its argument |#1| by one. +% The case, that the whole number is less than nine, is +% specially treated because of speed. (The space +% after |9| is neccessary.) +% \begin{macrocode} +% \aa@inc adds one to its argument #1. +\def\aa@inc#1{% + \ifnum#1<9 + \aa@nextdigit{#1}% + \else + \aa@reverse#1!!% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\aa@nextdigit} +% \cmd{\aa@nextdigit} increments the digit |#1|. The result +% is a digit again. \cmd{\aa@addone} works off the case ``9+1''. +% \begin{macrocode} +\def\aa@nextdigit#1{\ifcase#1 1\or2\or3\or4\or5\or6\or7\or8\or9\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\aa@reverse} +% Because the addition starts with the lowest significant digit +% of the number. But with the means of \TeX's macro expansion is +% the first digit of a number available. So \cmd{\aa@reverse} +% reverses the order of the digits and calls \cmd{\aa@addone}, +% if it is ready. +% \begin{macrocode} +\def\aa@reverse#1#2!#3!{% + \ifx\\#2\\% + \aa@addone#1#3!!% + \else + \@ReturnAfterFi{% + \aa@reverse#2!#1#3!% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\aa@addone} +% The addition is performed by the macro \cmd{\aa@addone}. +% The digits are in reversed order. The parameter text |#1#2| +% separates the next digit |#1| that have to be incremented. +% Already incremented digits are stored in |#3| in reversed order +% to take some work of \cmd{\aa@lastreverse}. +% \begin{macrocode} +\def\aa@addone#1#2!#3!{% + \ifnum#1<9 + \expandafter\aa@lastreverse\number\aa@nextdigit#1 #2!#3!% + \else + \@ReturnAfterFi{% + \ifx\\#2\\% + 10#3% + \else + \@ReturnAfterFi{% + \aa@addone#2!0#3!% + }% + \fi + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\aa@lastreverse} +% With \cmd{\aa@reverse} the order of the digits is changed to +% perform the addition in \cmd{\aa@addone}. Now we have to return +% to the original order that is done by \cmd{\aa@lastreverse}. +% \begin{macrocode} +\def\aa@lastreverse#1#2!#3!{% + \ifx\\#2\\% + #1#3% + \else + \@ReturnAfterFi{% + \aa@lastreverse#2!#1#3!% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \paragraph{Increment of the decimal digit result form.} +% \begin{macro}{\aa@alphinc} +% \cmd{\aa@alphinc} adds one to the intermediate number in +% the decimal digit result form (see \ref{sec:form}). +% Parameter |#1| consists of the tokens that come before the +% addition result (see |;#2;| of \cmd{\aa@process}). Then +% it is also used to store already incremented digits. +% |#2| contains the next digit in the range of 1 until 26. +% An empty |#2| marks the end of the number. +% \begin{macrocode} +\def\aa@alphinc#1#2.{% + \ifx\\#2\\% + \@ReturnAfterElseFi{% + #11..% ready + }% + \else + \@ReturnAfterFi{% + \ifnum#2<26 + \@ReturnAfterElseFi{% + \expandafter\aa@alphinclast\expandafter + {\number\aa@inc{#2}}{#1}% + }% + \else + \@ReturnAfterFi{% + \aa@alphinc{#11.}% + }% + \fi + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\aa@alphinclast} +% \cmd{\aa@alphinclast} is a help macro. Because |#2| consists of +% several tokens (e.g. |;100;|), we cannot jump over it via +% \cmd{\expandafter} in \cmd{\aa@alphinc}. +% \begin{macrocode} +\def\aa@alphinclast#1#2{#2#1.} +% \end{macrocode} +% \end{macro} +% +% \subsection{\texorpdfstring{Conversion with \eTeX\ features}{\eTeX}} +% \label{sec:etex} +% \begin{macrocode} +\else +% \end{macrocode} +% +% \begin{macro}{\aa@make} +% \cmd{\aa@make} catches the cases, if the number is zero or negative. +% Then it expands to nothing like \cmd{\romannumeral}. +% \begin{macrocode} +\def\aa@make#1#2{% + \ifnum#1<1 + \else + \@ReturnAfterFi{% + \aa@eprocess#1;#2% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\aa@eprocess} +% The first argument |#1| contains the number that have to be +% converted yet, the next argument |#2| the command for making +% the conversion of a digit (\cmd{\aa@alph} or \cmd{\aa@Alph}). +% The number is divided by 26 to get the rest. Command +% |#2| converts the rest to a letter that is put after the arguments +% of the next call of \cmd{\aa@eprocess}. +% +% The only feature of \eTeX\ we use the new primitive \cmd{\numexpr}. +% It provides expandible mathematical calculations. +% \begin{macrocode} +\def\aa@eprocess#1;#2{% + \ifnum#1<27 + \@ReturnAfterElseFi{% + #2{#1}% + }% + \else + \@ReturnAfterFi{% + \expandafter\aa@eprocess\number\numexpr(#1-14)/26% + \expandafter\expandafter\expandafter;% + \expandafter\expandafter\expandafter#2% + #2{\numexpr#1-((#1-14)/26)*26}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsection{End\texorpdfstring{ of package}{}} +% Now we can terminate the differentiation between \TeX\ and \eTeX. +% \begin{macrocode} +\fi +% \end{macrocode} +% +% At the end the catcode of the character |@| is restored. +% \begin{macrocode} +\catcode`\@=\aa@atcode +% \end{macrocode} +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \StartHistory +% \HistVersion{1999/03/19 v0.1} +% \begin{itemize} +% \item The first version was built as a response to a +% \URL{question}^^A +% {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=455791936}^^A +% of \Email[Will Douglas]{william.douglas@wolfson.ox.ac.uk} +% and the +% \URL{request}^^A +% {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=456358639}^^A +% of \Email[Donald Arsenau]{asnd@reg.triumf.ca}, +% published in the newsgroup +% \href{news:comp.text.tex}{comp.text.tex}: +% \URL{``Re: alph counters \textgreater\ 26''}^^A +% {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=456485421} +% \item Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt}) +% \end{itemize} +% \HistVersion{1999/04/12 v1.0} +% \begin{itemize} +% \item Documentation added in dtx format. +% \item \eTeX\ support added. +% \end{itemize} +% \HistVersion{1999/04/13 v1.1} +% \begin{itemize} +% \item Minor documentation change. +% \item First CTAN release. +% \end{itemize} +% +% \PrintIndex +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/alphalph.ins b/Master/texmf-dist/source/latex/oberdiek/alphalph.ins new file mode 100644 index 00000000000..33bd11f99f2 --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/alphalph.ins @@ -0,0 +1,72 @@ +% alphalph.ins +% +% This file is part of the package `alphalph' for use with LaTeX2e. +% +% Function: Selecting shipout output pages. +% +% Copyright (C) 1999 Heiko Oberdiek. +% +% This program can be redistributed and/or modified +% under the terms of the LaTeX Project Public License +% distributed from CTAN archives in directory +% macros/latex/base/lppl.txt; either version 1 of +% the License, or (at your option) any later version. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. +% + +\def\batchfile{alphalph.ins} +\input docstrip.tex +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old `docstrip.tex'.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\keepsilent + +\preamble + +This file is part of the package `alphalph' for use with LaTeX2e. + +Function: Selecting shipout output pages. + +Copyright (C) 1999 Heiko Oberdiek. + +This program can be redistributed and/or modified +under the terms of the LaTeX Project Public License +distributed from CTAN archives in directory +macros/latex/base/lppl.txt; either version 1 of +the License, or (at your option) any later version. + +Please send error reports and suggestions for improvements to + Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. + +\endpreamble + +\generateFile{alphalph.sty}{f}{\from{alphalph.dtx}{package}} +%\generateFile{alphalph.drv}{f}{\from{alphalph.dtx}{driver}} + +\Msg{***********************************************************} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space alphalph.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `alphalph.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx new file mode 100644 index 00000000000..8c65281e06c --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx @@ -0,0 +1,481 @@ +% \iffalse meta-comment +% +% hypbmsec.dtx +% +% This file is part of the package `hypbmsec' for use with LaTeX2e. +% +% Function: Bookmarks in sectioning commands. +% +% Copyright (C) 1998,1999,2000 Heiko Oberdiek. +% +% This program may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.2 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. +% +%<*dtx> + \ProvidesFile{hypbmsec.dtx} +%</dtx> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{hypbmsec} +%<driver>\ProvidesFile{hypbmsec.drv} +% \fi +% \ProvidesFile{hypbmsec.dtx} + [2000/03/22 v2.1 Bookmarks in sectioning commands (HO).] +% +% \GetFileInfo{hypbmsec.dtx} +% +% \CheckSum{159} +% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\usepackage{holtxdoc} +\begin{document} + \DocInput{hypbmsec.dtx} +\end{document} +%</driver> +% \fi +% +% \DoNotIndex{\csname,\endcsname,\expandafter,\noexpand,\string} +% \DoNotIndex{\begingroup,\endgroup,\def,\xdef,\long,\let} +% \DoNotIndex{\ifx,\newcommand,\renewcommand} +% +% \newcommand{\type}[1]{\textsf{#1}} +% +% \SetupTitle{hyperref,section,bookmark,pdf,LaTeX} +% \maketitle +% +% \begin{abstract} +% This package expands the syntax of the sectioning commands. If the +% argument of the sectioning commands isn't usable as outline entry, +% a replacement for the bookmarks can be given. +% \end{abstract} +% +% \tableofcontents +% +% \section{Usage} +% +% \subsection{Bookmarks restrictions}\label{sec:restrictions} +% Outline entries (bookmarks) are written to a file and have +% to obey the pdf specification. +% Therefore they have several restrictions: +% \begin{itemize} +% \item Bookmarks have to be encoded in PDFDocEncoding^^A +% \footnote{\Package{hyperref} doesn't support +% Unicode.}. +% \item They should only expand to letters and spaces. +% \item The result of expansion have to be a valid pdf string. +% \item Stomach commands like \cmd{\relax}, box commands, math, +% assignments, or definitions aren't allowed. +% \item Short entries are recommended, which allow a clear view. +% \end{itemize} +% +% \subsection{\texorpdfstring{\cmd{\texorpdfstring}}{^^A +% \textbackslash texorpdfstring}} +% The generic way in package \Package{hyperref} is the use +% of \cmd{\texorpdfstring}^^A +% \footnote{In versions of \Package{hyperref} below 6.54 see +% \cmd{\ifbookmark}.}: +% \begin{quote} +%\begin{verbatim} +%\section{Pythagoras: +% \texorpdfstring{$a^2+b^2=c^2}{% +% a\texttwosuperior\ + b\texttwosuperior\ = +% c\texttwosuperior}% +%} +%\end{verbatim} +% \end{quote} +% +% \subsection{Sectioning commands} +% The package \Package{hyperref} automatically generates +% bookmarks from the sectioning commands, +% unless it is suppressed by an option. +% Commands that structure the text are here called +% ``sectioning commands'': +% \begin{quote} +% \cmd{\part}, \cmd{\chapter},\\ +% \cmd{\section}, \cmd{\subsection}, \cmd{\subsubsection},\\ +% \cmd{\paragraph}, \cmd{\subparagraph} +% \end{quote} +% +% \subsection{Places\texorpdfstring{ for sectioning strings}{}} +% \label{sec:places} +% The argument(s) of these commands are used on several places: +% \begin{description} +% \item[\type{text}] +% The current text without restrictions. +% \item[\type{toc}] +% The headlines and the table of contents with the +% restrictions of ``moving arguments''. +% \item[\type{out}] +% The outlines with many restrictions: The outline +% have to expand to a valid pdf string with PDFDocEncoding +% (see \ref{sec:restrictions}). +% \end{description} +% +% \subsection{\texorpdfstring{Solution with o}{O}ptional arguments} +% If the user wants to use a footnote within a sectioning command, +% the \LaTeX{} solution is an optional argument: +% \begin{quote} +% |\section[Title]{Title\footnote{Footnote text}}| +% \end{quote} +% Now |Title| without the footnote is used in the headlines and +% the table of contents. Also \Package{hyperref} uses it for the +% bookmarks. +% +% This package \Package{\filename} offers two possibilities to +% specify a separate outline entry: +% \begin{itemize} +% \item An additional second optional argument in square brackets. +% \item An additional optional argument in parentheses (in +% assoziation with a pdf string that is internally surrounded +% by parentheses, too). +% \end{itemize} +% Because \Package{\filename} stores the original meaning of the +% sectioning commands and uses them again, there should be no +% problems with packages that redefine the sectioning commands, if +% these packages doesn't change the syntax. +% +% \subsection{Syntax} +% The following examples show the syntax of the sectioning +% commands. For the places the strings appear the abbreviations +% are used, that are introduced in \ref{sec:places}. +% +% \subsubsection{\texorpdfstring{Star form}{^^A +% \textbackslash section*\{\}}} +% The behaviour of the star form isn't changed. The string +% appears only in the current text: +% \begin{article}{Syntax} +% \begin{quote} +% |\section*{text}| +% \end{quote} +% \end{article} +% +% \subsubsection{\texorpdfstring{Without optional arguments}{^^A +% \textbackslash section\{\}}} +% The normal case, the string in the mandatory argument is +% used for all places: +% \begin{article}{Syntax} +% \begin{quote} +% |\section{text, toc, out}| +% \end{quote} +% \end{article} +% +% \subsubsection{\texorpdfstring{One optional argument}{^^A +% \textbackslash section[]\{\}}} +% Also the form with one optional parameter in square brackets isn't +% new; for the bookmarks the optional parameter is used: +% \begin{article}{Syntax} +% \begin{quote} +% |\section[toc, out]{text}| +% \end{quote} +% \end{article} +% +% \subsubsection{\texorpdfstring{Two optional arguments}{^^A +% \textbackslash section[][out]\{\}}}\label{sec:two} +% The second optional parameter in square brackets is introduced +% by this package to specify an outline entry: +% \begin{article}{Syntax} +% \begin{quote} +% |\section[toc][out]{text}| +% \end{quote} +% \end{article} +% +% \subsubsection{\texorpdfstring{Optional argument in parentheses}{^^A +% \textbackslash section(out)\{\}}} +% Often the \type{toc} and the \type{text} string would be the same. +% With the method of the two optional arguments in square brackets +% (see \ref{sec:two}) this string must be given twice, +% if the user only wants to specify a different outline entry. +% Therefore this package offers another possibility: +% In association with the internal representation in the pdf file +% an outline entry can be given in parentheses. +% So the package can easily distinguish between +% the two forms of optional arguments and the order does not matter: +% \begin{article}{Syntax} +% \begin{quote} +% |\section(out){toc, text}|\\ +% |\section[toc](out){text}|\\ +% |\section(out)[toc]{text}| +% \end{quote} +% \end{article} +% +% \subsection{Without \Package{hyperref}} +% Package \Package{\filename} uses \Package{hyperref} for support of +% the bookmarks, but this package is not required. +% If \Package{hyperref} isn't loaded, or +% is called with a driver that doesn't support bookmarks, +% package \Package{\filename} shouldn't be removed, +% because this would lead to +% a wrong syntax of the sectioning commands. +% In any cases package \Package{\filename} +% supports its syntax and ignores the outline entries, +% if there are no code for bookmarks. +% So it is possible to write texts, +% that are processed with several drivers to get different output +% formats. +% +% \subsection{Protecting parentheses} +% If the string itself contains parentheses, they have to be hidden +% from \TeX's argument parsing mechanism. +% The argument should be surrounded +% by curly braces: +% \begin{quote} +% |\section({outlines(bookmarks)}){text, toc}| +% \end{quote} +% With version 6.54 of \Package{hyperref} the other standard method +% works, too: The closing parenthesis is protected: +% \begin{quote} +% |\section(outlines(bookmarks{)}){text, toc}| +% \end{quote} +% +% \Installation +% +% \StopEventually{} +% +% \section{Implementation} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% Because of redifining the sectioning commands, it is dangerous +% to reload the package several times. +% \begin{macrocode} +\@ifundefined{hbs@do}{}{% + \PackageInfo{hypbmsec}{Package 'hypbmsec' is already loaded} + \endinput +} +% \end{macrocode} +% +% \begin{macro}{\hbs@do} +% The redefined sectioning commands calls \cmd{\hbs@do}. It does +% \begin{itemize} +% \item handle the star case. +% \item resets the macros that store the entries for the outlines +% (\cmd{\hbs@bmstring}) and table of contents (\cmd{\hbs@tocstring}). +% \item store the sectioning command |#1| in \cmd{\hbs@seccmd} +% for later reuse. +% \item at last call \cmd{\hbs@checkarg} that scans and interprets the +% parameters of the redefined sectioning command. +% \end{itemize} +% \begin{macrocode} +\def\hbs@do#1{% + \@ifstar{#1*}{% + \let\hbs@tocstring\relax + \let\hbs@bmstring\relax + \let\hbs@seccmd#1% + \hbs@checkarg + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hbs@checkarg} +% \cmd{\hbs@checkarg} determines the type of the next argument: +% \begin{itemize} +% \item An optional argument in square brackets can be an entry +% for the table of contents or the bookmarks. It will be +% read by \cmd{\hbs@getsquare} +% \item An optional argument in parentheses is an outline entry. +% This is worked off by \cmd{\hbs@getbookmark}. +% \item If there are no more optional arguments, \cmd{\hbs@process} +% reads the mandatory argument and calls the original +% sectioning commands. +% \end{itemize} +% \begin{macrocode} +\def\hbs@checkarg{% + \@ifnextchar[\hbs@getsquare{% + \@ifnextchar(\hbs@getbookmark\hbs@process + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hbs@getsquare} +% \cmd{\hbs@getsquare} reads an optional argument in square +% brackets and determines, if this is an entry for the table +% of contents or the bookmarks. +% \begin{macrocode} +\long\def\hbs@getsquare[#1]{% + \ifx\hbs@tocstring\relax + \def\hbs@tocstring{#1}% + \else + \hbs@bmdef{#1}% + \fi + \hbs@checkarg +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hbs@getbookmark} +% \cmd{\hbs@getbookmark} reads an outline entry in parentheses. +% \begin{macrocode} +\def\hbs@getbookmark(#1){% + \hbs@bmdef{#1}% + \hbs@checkarg +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hbs@bmdef} +% The command \cmd{\hbs@bmdef} save the bookmark entry in +% parameter |#1| in the macro \cmd{\hbs@bmstring} and catches +% the case, if the user has given several outline strings. +% \begin{macrocode} +\def\hbs@bmdef#1{% + \ifx\hbs@bmstring\relax + \def\hbs@bmstring{#1}% + \else + \PackageError{hypbmsec}{% + Sectioning command with too many parameters% + }{% + You can only give one outline entry.% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hbs@process} +% The parameter |#1| is the mandatory argument of the sectioning +% commands. \cmd{\hbs@process} calls the original sectioning command +% stored in \cmd{\hbs@seccmd} with arguments that depend of which +% optional argument are used previously. +% \begin{macrocode} +\long\def\hbs@process#1{% + \ifx\hbs@tocstring\relax + \ifx\hbs@bmstring\relax + \hbs@seccmd{#1}% + \else + \hbs@seccmd{\texorpdfstring{#1}\hbs@bmstring}% + \fi + \else + \ifx\hbs@bmstring\relax + \hbs@seccmd[\hbs@tocstring]{#1}% + \else + \hbs@seccmd[\texorpdfstring\hbs@tocstring\hbs@bmstring]{#1}% + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% We have to check, whether package \Package{hyperref} is loaded +% and have to provide a definition for \cmd{\texorpdfstring}. +% Because \Package{hyperref} can be loaded after this package, +% we do the work later (\cmd{\AtBeginDocument}). +% +% This code only checks versions of \Package{hyperref} that +% define \cmd{\ifbookmark} (v6.4x until v6.53) or +% \cmd{\texorpdfstring} (v6.54 and above). Older versions aren't +% supported. +% \begin{macrocode} +\AtBeginDocument{% + \@ifundefined{texorpdfstring}{% + \@ifundefined{ifbookmark}{% + \let\texorpdfstring\@firstoftwo + \@ifpackageloaded{hyperref}{% + \PackageInfo{hypbmsec}{% + \ifx\hy@driver\@empty + Default driver + \else + '\hy@driver' + \fi + of hyperref not supported,\MessageBreak + bookmark parameters will be ignored% + }% + }{% + \PackageInfo{hypbmsec}{% + Package hyperref not loaded,\MessageBreak + bookmark parameters will be ignored% + }% + }% + }% + {% + \newcommand\texorpdfstring[2]{\ifbookmark{#2}{#1}}% + \PackageWarningNoLine{hypbmsec}{% + Old hyperref version found,\MessageBreak + update of hyperref recommended% + }% + }% + }{}% +% \end{macrocode} +% +% Other packages are allowed to redefine the sectioning commands, +% if they does not change the syntax. Therefore the redefinitons +% of this package should be done after the other packages. +% \begin{macrocode} + \let\hbs@part \part + \let\hbs@section \section + \let\hbs@subsection \subsection + \let\hbs@subsubsection\subsubsection + \let\hbs@paragraph \paragraph + \let\hbs@subparagraph \subparagraph + \renewcommand\part {\hbs@do\hbs@part} + \renewcommand\section {\hbs@do\hbs@section} + \renewcommand\subsection {\hbs@do\hbs@subsection} + \renewcommand\subsubsection{\hbs@do\hbs@subsubsection} + \renewcommand\paragraph {\hbs@do\hbs@paragraph} + \renewcommand\subparagraph {\hbs@do\hbs@subparagraph} + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname chapter\endcsname\relax\else + \let\hbs@chapter \chapter + \renewcommand\chapter {\hbs@do\hbs@chapter} + \fi +} +% \end{macrocode} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \StartHistory +% \HistVersion{1998/11/20 v1.0} +% \begin{itemize} +% \item First version. +% \item It merges package \Package{hysecopt} and +% package \Package{hypbmpar}. +% \item Published for the DANTE'99 meating^^A +%\URL{}{http://dante99.cs.uni-dortmund.de/handouts/oberdiek/hypbmsec.sty}. +% \end{itemize} +% \HistVersion{1999/04/12 v2.0} +% \begin{itemize} +% \item Adaptation to \Package{hyperref} version 6.54. +% \item Documentation in dtx format. +% \item Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt}) +% \item First CTAN release. +% \end{itemize} +% \HistVersion{2000/03/22 v2.1} +% \begin{itemize} +% \item Bug fix in redefinition of \cmd{\chapter}. +% \item Copyright: LPPL 1.2 +% \end{itemize} +% +% \hfuzz10pt +% \PrintIndex +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/hypbmsec.ins b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.ins new file mode 100644 index 00000000000..5eee3aae7d6 --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.ins @@ -0,0 +1,76 @@ +% hypbmsec.ins +% +% This file is part of the package `hypbmsec' for use with LaTeX2e. +% +% Function: Bookmarks in sectioning commands. +% +% Copyright (C) 1998,1999,2000 Heiko Oberdiek. +% +% This program may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.2 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. +% + +\def\batchfile{hypbmsec.ins} +\input docstrip.tex +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old `docstrip.tex'.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\keepsilent + +\preamble + +This file is part of the package `hypbmsec' for use with LaTeX2e. + +Function: Bookmarks in sectioning commands. + +Copyright (C) 1998,1999,2000 Heiko Oberdiek. + +This program may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.2 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions of LaTeX +version 1999/12/01 or later. + +Please send error reports and suggestions for improvements to + Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. + +\endpreamble + +\generateFile{hypbmsec.sty}{f}{\from{hypbmsec.dtx}{package}} +%\generateFile{hypbmsec.drv}{f}{\from{hypbmsec.dtx}{driver}} + +\Msg{***********************************************************} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space hypbmsec.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `hypbmsec.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx b/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx new file mode 100644 index 00000000000..e43a8755f6c --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx @@ -0,0 +1,347 @@ +% \iffalse meta-comment +% +% hypcap.dtx +% +% This file is part of the package `hypcap' for use with LaTeX2e. +% +% Function: Adjusting anchors of captions. +% +% Copyright (C) 1999-2001 Heiko Oberdiek. +% +% This program may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.2 of this license or (at your option) +% any later version. The latest version of this license +% is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions +% of LaTeX version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@uni-freiburg.de>. +% +%<*dtx> +\ProvidesFile{hypcap.dtx} +%</dtx> +%<package>\ProvidesPackage{hypcap} +%<driver>\ProvidesFile{hypcap.drv} +% \fi +% \ProvidesFile{hypcap.dtx} + [2001/08/27 v1.3 Adjusting anchors of captions (HO)] +% +% \GetFileInfo{hypcap.dtx} +% \CheckSum{131} +% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\usepackage{holtxdoc} +\begin{document} + \DocInput{hypcap.dtx} +\end{document} +%</driver> +% \fi +% +% \DoNotIndex{\else,\fi,\csname,\endcsname} +% \DoNotIndex{\def,\edef,\long,\begingroup,\endgroup} +% \DoNotIndex{\the,\relax,\expandafter} +% +% \SetupTitle{hyperref, caption, anchor, TeX} +% \maketitle +% +% \begin{abstract} +% This package tries a solution of the problem with +% hyperref, that links to floats points below the +% caption and not at the beginning of the float. +% Therefore this package divides the task into two +% part, the link setting with \cmd{\capstart} or +% automatically at the beginning of a float and +% the rest in the \cmd{\caption} command. +% \end{abstract} +% +% \tableofcontents +% +% \section{Usage} +% The package \Package{hypcap} requires that \Package{hyperref} +% is loaded first: +% \begin{quote} +% |\usepackage[...]{hyperref}|\\ +% |\usepackage[...]{hypcap}| +% \end{quote} +% +% \subsection{Package options} +% The names of the four float environments |figure|, |figure*|, +% |table|, or |table*| can be used as option. Then the package +% overloads the environment in order to insert \cmd{\capstart} +% (see below) in the beginning of the environment automatically. +% +% Option |all| enables the overloading of all four +% float environments. For other environments see +% the user command \cmd{\hypcapredef}. +% +% \subsection{User commands} +% \begin{description} +% \item[\cmd{\capstart}:]\DescribeMacro{\capstart} +% First it increments the counter (\cmd{\@captype}). Then it +% makes an anchor for package \Package{hyperref}. +% At last \cmd{\caption} is redefined to remove the +% anchor setting part from \Package{hyperref}'s \cmd{\caption}. +% +% The package expects the following structure of a float +% environment: +% \begin{quote} +% |\begin{|\textit{|float|}|}...|\\ +% |\capstart|\\ +% |...|\\ +% |\caption{...}|\\ +% |...|\\ +% |\end{|\textit{|float|}|}| +% \end{quote} +% There can be several \cmd{\caption} commands. For these +% you need \cmd{\capstart} again: +% \begin{quote} +% |\capstart ... \caption... \capstart ... \caption...| +% \end{quote} +% And the \cmd{\caption} command itself can be put in a group. +% +% The options, described above, safe writing the +% first \cmd{\capstart} in the float environment. +% But also there must be a \cmd{\caption} in every +% environment of this type. +% \item[\cmd{\hypcapspace}:]\DescribeMacro{\hypcapspace} +% Because it looks poor, if the link points exactly at top of +% the figure, there is additional space: \cmd{\hypcapspace}, +% the default is |0.5\baselineskip|, examples: +% \begin{quote} +% |\renewcommand{\hypcapspace}{0pt}| removes the space\\ +% |\renewcommand{\hypcapspace}{1pt}| sets a fix value +% \end{quote} +% \item[\cmd{\hypcapredef}:]\DescribeMacro{\hypcapredef} +% If there are other float environments, that +% should automatically execute \cmd{\capstart}, then +% a redefinition with \cmd{\hypcapredef} can be tried: +% \begin{quote} +% |\hypcapredef{myfloat}| +% \end{quote} +% Only environments with one optional parameter are +% supported. +% \end{description} +% +% \subsection{Limitations} +% \begin{itemize} +% \item Package \Package{subfigure} does not work. +% \item Packages that redefine \cmd{\caption} or +% \cmd{\@caption}. +% \end{itemize} +% +% \Installation +% +% \StopEventually{} +% +% \section{Implementation} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% The package identification is done at the top of the |.dtx| file +% in order to use only one identification string. +% +% For unique command names this package uses |hc@| as prefix +% for internal command names. +% +% First we check, if package \Package{hyperref} is loaded: +% \begin{macrocode} +\@ifundefined{hyper@@anchor}{% + \PackageError{hypcap}{You have to load 'hyperref' first}\@ehc + \endinput +}{} +% \end{macrocode} +% +% \begin{macro}{\hc@org@caption} +% Save the original meaning of \cmd{\caption}: +% \begin{macrocode} +\newcommand*\hc@org@caption{} +\let\hc@org@caption\caption +% \end{macrocode} +% \end{macro} +% +% \newcommand*{\BeginMacro}[1]{\expandafter\DoBeginMacro\csname#1\endcsname} +% \newcommand*{\DoBeginMacro}[1]{\begin{macro}{#1}} +% \newcommand*{\Cmd}[1]{\expandafter\cmd\csname#1\endcsname} +% \BeginMacro{if@capstart} +% The switch \Cmd{if@capstart} helps to detect +% \cmd{\capstart} commands with missing \cmd{\caption} macros. +% Because \cmd{\caption} can occur inside a group, assignments +% to the switch have to be made global. +% \begin{macrocode} +\newif\if@capstart +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hypcapspace} +% The anchor is raised.by \cmd{\hypcapspace}. +% \begin{macrocode} +\newcommand*\hypcapspace{.5\baselineskip} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\capstart} +% The macro \cmd{\capstart} contains the first part of +% the \cmd{\caption} command: Incrementing the counter +% and setting the anchor. +% \begin{macrocode} +\newcommand*\capstart{% + \H@refstepcounter\@captype % first part of caption + \hyper@makecurrent\@captype + \vspace*{-\hypcapspace}% + \begingroup + \let\leavevmode\relax + \hyper@@anchor\@currentHref\relax + \endgroup + \vspace*{\hypcapspace}% + \let\caption\hc@caption + \global\@capstarttrue +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hc@caption} +% The new \cmd{\caption} command without the first part +% is defined in the macro \cmd{\hc@caption}. +% \begin{macrocode} +\def\hc@caption{% + \@dblarg{\hc@@caption\@captype}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hc@@caption} +% This is a copy of package \Package{hyperref}'s \cmd{\@caption} +% macro without making the anchor, because this is already done +% in \cmd{\capstart}. +% \begin{macrocode} +\long\def\hc@@caption#1[#2]#3{% + \let\caption\hc@org@caption + \global\@capstartfalse + \hyper@makecurrent\@captype + \par\addcontentsline{% + \csname ext@#1\endcsname}{#1}{% + \protect\numberline{% + \csname the#1\endcsname + }{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces#3% + }% + \par + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hypcapredef} +% The macro \cmd{\hypcapredef} prepares the call of +% \cmd{\hc@redef} that will redefine the environment +% that is given in the argument. +% \begin{macrocode} +\def\hypcapredef#1{% + \expandafter\hc@redef\csname hc@org#1\expandafter\endcsname + \csname hc@orgend#1\expandafter\endcsname + \expandafter{#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\hc@redef} +% The old meaning of the environment is saved. Then +% \cmd{\capstart} is appended in the begin part. +% The end part contains a check +% that produces an error message in case of \cmd{\capstart} +% without \cmd{\capstart} (\cmd{\capstart} has incremented +% the counter). +% \begin{macrocode} +\def\hc@redef#1#2#3{% + \newcommand#1{}% + \expandafter\let\expandafter#1\csname#3\endcsname + \expandafter\let\expandafter#2\csname end#3\endcsname + \renewenvironment*{#3}[1][]{% + \ifx\\##1\\% + #1\relax + \else + #1[##1]% + \fi + \capstart + }{% + \if@capstart + \PackageError{hypcap}{You have forgotten to use \string\caption}% + \global\@capstartfalse + \else + \fi + #2% + }% +} +% \end{macrocode} +% \end{macro} +% +% At last the options are defined and processed. +% \begin{macrocode} +\DeclareOption{figure}{\hypcapredef{\CurrentOption}} +\DeclareOption{figure*}{\hypcapredef{\CurrentOption}} +\DeclareOption{table}{\hypcapredef{\CurrentOption}} +\DeclareOption{table*}{\hypcapredef{\CurrentOption}} +\DeclareOption{all}{% + \hypcapredef{figure}% + \hypcapredef{figure*}% + \hypcapredef{table}% + \hypcapredef{table*}% +} +\ProcessOptions\relax +% \end{macrocode} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \StartHistory +% \HistVersion{1999/02/13 v1.0} +% \begin{itemize} +% \item A beginning version. +% \end{itemize} +% \HistVersion{2000/08/14 v1.1} +% \begin{itemize} +% \item Global assignments of |\if@capstart| +% in order to allow |\caption| in groups. +% \item Option |all| added. +% \end{itemize} +% \HistVersion{2000/09/07 v1.2} +% \begin{itemize} +% \item Package in dtx format. +% \end{itemize} +% \HistVersion{2001/08/27 v1.3} +% \begin{itemize} +% \item Bug fix with hyperref's pdfmark driver\\ +% (\verb|\leavevmode| in +% \verb|\hyper@@anchor|/\verb|\pdf@rect|). +% \end{itemize} +% +% \PrintIndex +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/hypcap.ins b/Master/texmf-dist/source/latex/oberdiek/hypcap.ins new file mode 100644 index 00000000000..185f234452b --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/hypcap.ins @@ -0,0 +1,79 @@ +% File: hypcap.ins +% Version: 2001/08/27 +% +% This file is part of the package `hypcap' for use with LaTeX2e. +% +% Function: Adjusting anchors of captions. +% +% Copyright (C) 1999-2001 Heiko Oberdiek. +% +% This program may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.2 of this license or (at your option) +% any later version. The latest version of this license +% is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions +% of LaTeX version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@uni-freiburg.de>. +% + +\def\batchfile{hypcap.ins} +\input docstrip.tex +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old `docstrip.tex'.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\keepsilent + +\preamble + +This file is part of the package `hypcap' for use with LaTeX2e. + +Function: Adjusting anchors of captions. + +Copyright (C) 1999-2001 Heiko Oberdiek. + +This program may be distributed and/or modified under +the conditions of the LaTeX Project Public License, +either version 1.2 of this license or (at your option) +any later version. The latest version of this license +is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions +of LaTeX version 1999/12/01 or later. + +Please send error reports and suggestions for improvements to + Heiko Oberdiek <oberdiek@uni-freiburg.de>. + +\endpreamble + +\generateFile{hypcap.sty}{f}{\from{hypcap.dtx}{package}} +%\generateFile{hypcap.drv}{f}{\from{hypcap.dtx}{driver}} + +\Msg{***********************************************************} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space hypcap.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `hypcap.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins new file mode 100644 index 00000000000..a1956291244 --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins @@ -0,0 +1,42 @@ +% oberdiek.ins +% 2001/08/27 +% +% This file will generate fast loadable files and documentation +% driver files from the doc files in this directory when run +% through LaTeX or TeX. +% +% Copyright (C) 1999, 2001 Heiko Oberdiek. +% +% This program may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.2 of this license or (at your option) +% any later version. The latest version of this license +% is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions +% of LaTeX version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@uni-freiburg.de>. +% +\input docstrip + +\batchinput{hypbmsec.ins} +\batchinput{pagesel.ins} +\batchinput{alphalph.ins} +\batchinput{twoopt.ins} +\batchinput{hypcap.ins} + +\Msg{***********************************************************} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files `*.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/oberdiek/pagesel.dtx b/Master/texmf-dist/source/latex/oberdiek/pagesel.dtx new file mode 100644 index 00000000000..2f9636d734c --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/pagesel.dtx @@ -0,0 +1,420 @@ +% \iffalse meta-comment +% +% pagesel.dtx +% +% This file is part of the package `pagesel' for use with LaTeX2e. +% +% Function: Selecting shipout output pages. +% +% Copyright (C) 1999, 2003 Heiko Oberdiek. +% +% This program may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.2 of this license or (at your option) +% any later version. The latest version of this license +% is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions +% of LaTeX version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@uni-freiburg.de>. +% +%<*dtx> + \ProvidesFile{pagesel.dtx} +%</dtx> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{pagesel} +%<driver>\ProvidesFile{pagesel.drv} +% \fi +% \ProvidesFile{pagesel.dtx} + [2003/06/05 v1.2 Selecting shipout output pages (HO)] +% +% \GetFileInfo{pagesel.dtx} +% +% \CheckSum{216} +% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\usepackage{holtxdoc} +\begin{document} + \DocInput{pagesel.dtx} +\end{document} +%</driver> +% \fi +% +% \DoNotIndex{\maxdimen,\\,\END} +% \DoNotIndex{\ifodd,\ifx,\ifnum} +% +% \newenvironment{param}{^^A +% \newcommand{\entry}[1]{\meta{\###1}:&}^^A +% \begin{tabular}[t]{@{}l@{ }l@{}}^^A +% }{^^A +% \end{tabular}^^A +% } +% +% \newcommand*{\Option}[1]{\textsf{#1}} +% +% \SetupTitle{page,select,shipout,LaTeX} +% \maketitle +% +% \begin{abstract} +% With this package single pages or page areas can be selected +% for output. +% \end{abstract} +% +% \tableofcontents +% +% \section{Usage} +% The package \Package{pagesel} is a \LaTeXe\ package: +% \begin{quote} +% |\usepackage|\oarg{options}|{pagesel}| +% \end{quote} +% (For plain\TeX\ and \LaTeX\,2.09 the similar package +% \URL{\Package{selectp}}^^A +% {ftp://ftp.dante.de/tex-archive/macros/latex209/contrib/misc/selectp.sty} +% from \Email[Donald Arsenau]{asnd@triumf.ca} can be used.) +% +% Depending on the options the package works in two modes: +% \begin{enumerate} +% \item If no page selecting option is present, so the package +% ignores the other options and finishes itself. So no +% page will be suppressed by the package and auxiliary files +% will be written. +% \item With at least one page selecting option the specified +% pages are selected and the other are suppressed. +% The default for this mode is that auxiliary will not be +% overwritten. (This can be changed by an option.) +% \end{enumerate} +% +% \subsection{Page selecting} +% The package \Package{pagesel} sets up a new counter that is +% incremented by each \cmd{\shipout}. +% In this way the package counts the output pages regardless the value +% of the page counter. So each page can individually by addressed, +% even if there are several pages with the same page number. +% +% \subsubsection{Options\texorpdfstring{ for selecting pages}{}} +% \begin{description} +% \item[\Option{odd}:] The output pages must have an odd number. +% All even output pages are suppressed. If there are no +% page areas specified so all odd pages are print. With +% page areas only the odd pages in this areas are selected. +% \item[\Option{even}:] The opposite of option \Option{odd}. +% \item[Page area:] A page area consists of three elements: +% the starting output page number, an ``area'' hyphen, and +% the output page number of the last page in this area. +% Each component is optional, so there are four kinds +% to spezify a page area: +% \begin{description} +% \item[\meta{m}\Option{-}\meta{n}:] All pages between +% \meta{m} and \meta{n} inclusive. +% \item[\Option{-}\meta{n}:] All pages until \meta{n} inclusive. +% \item[\meta{m}\Option{-}:] The page area starts with \meta{m} +% and all pages to the end of document are selected. +% \item[\Option{-}:] All pages (not very useful). +% \item[\meta{s}:] The single page \meta{s}. +% \end{description} +% \end{description} +% +% \subsubsection{Examples} +% \newcommand*{\exam}[1]{\texttt{\strut[#1]}} +% \begin{tabular}{ll} +% Options & Output pages\\ +% \hline +% \exam{1, 4, 9}& 1, 4, and 9\\ +% \exam{7-10, 3}& 3, 7, 8, 9, and 10\\ +% \exam{odd, 3-6}& 3, and 5\\ +% \exam{-4, 3, even, 7-8}& 2, 4, and 8\\ +% \end{tabular} +% +% \subsection{Auxiliary files} +% If a page is suppressed, the \cmd{\write} commands are not +% performed. Labels, index entries, or entries for the +% table of contents aren't written. So it is likely that +% the table of contents, registers, and lists are incomplete. +% \subsubsection{Options\texorpdfstring{ for handling auxiliary files}{}} +% \begin{description} +% \item[\Option{nofiles}:] This is the default. Auxiliary files are +% read but not written or changed. +% \item[\Option{nonofiles}/\Option{files}:] Auxiliary files are +% written. +% \end{description} +% \subsubsection{\texorpdfstring{Package }{}\Package{hyperref}} +% In old versions of \Package{hyperref} [1999/04/12 v6.55] (and below) +% there is a bug with \cmd{\nofiles}: +% \begin{itemize} +% \item Some ``garbage'' appears on terminal and in the log file. +% This is harmless and can be ignored. +% \item The outline auxiliary file \cmd{\jobname.out}, however, +% is opened and truncated to zero bytes. +% Version \ref{Hist10} of this package had +% loaded a patch file \File{hypnofil.tex}, if it detects +% \Package{hyperref} to get \cmd{\nofiles} work. +% +% With the new version of \Package{hyperref} [1999/04/13 v6.56] +% \cmd{\nofiles} works now. Therefore the workaround code +% is no longer needed and removed. +% \end{itemize} +% +% \Installation +% +% \StopEventually{} +% +% \section{Implementation} +% \subsection{Package} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% If the package is loaded twice, the package code does not +% work. So stop loading the package, if it is already loaded. +% \begin{macrocode} +\@ifundefined{ps@makevoid}{}{% + \PackageWarningNoLine{pagesel}{Package already loaded.}% + \endinput +} +% \end{macrocode} +% +% \begin{macro}{\ps@makevoid} +% Macro \cmd{\ps@makevoid} clears the output box. Because +% nothing is shipped out and this is intended, we reduce +% the counter \cmd{\deadcycles} in order to avoid problems, if +% more than \cmd{\maxdeadcycles} pages are omitted. +% \begin{macrocode} +\newcommand*{\ps@makevoid}{% + \global\setbox\@cclv\copy\voidb@x + \begingroup + \count@=\deadcycles + \advance\count@ by -1\relax + \deadcycles=\count@ + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@oddpages} +% \begin{macrocode} +\newcommand*\ps@oddpages{0} +\DeclareOption{odd}{\renewcommand*\ps@oddpages{1}} +\DeclareOption{even}{\renewcommand*\ps@oddpages{2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareOption{nofiles}{\let\ps@nofiles\nofiles} +\DeclareOption{nonofiles}{\let\ps@nofiles\@empty} +\DeclareOption{files}{\let\ps@nofiles\@empty} +\ExecuteOptions{nofiles} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareOption*{% + \begingroup + \expandafter\ps@checkoption\CurrentOption-\END + \edef\x{\endgroup\noexpand\ps@store{\ps@first}{\ps@last}}% + \x +} +% \end{macrocode} +% +% \begin{macro}{\ps@checkoption} +% \begin{macrocode} +\newcommand\ps@checkoption{} +\def\ps@checkoption#1-#2\END{% + \ifx\\#2\\% + \ifx\\#1\\% + % empty option + \def\ps@first{\maxdimen}% + \def\ps@last{\maxdimen}% + \else + \edef\ps@first{#1}% + \edef\ps@last{#1}% + \fi + \else + \ifx\\#1\\% + \def\ps@first{-\maxdimen}% + \else + \edef\ps@first{#1}% + \fi + \ps@checklast#2% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@checklast} +% \begin{macrocode} +\newcommand\ps@checklast{} +\def\ps@checklast#1-{% + \ifx\\#1\\% + \def\ps@last{\maxdimen}% + \else + \edef\ps@last{#1}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@store} +% \begin{macrocode} +\newcommand*{\ps@store}[2]{% + \expandafter\def\expandafter\ps@testlist\expandafter{% + \ps@testlist\ps@pagetest{#1}{#2}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@testlist} +% \begin{macrocode} +\newcommand*\ps@testlist{} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\ProcessOptions +% \end{macrocode} +% +% \begin{macrocode} +\begingroup + \edef\x{% + \ifnum\ps@oddpages>0 \relax\fi + \ifx\ps@testlist\@empty\else\relax\fi + }% + \ifx\x\@empty + \endgroup + \PackageInfo{pagesel}{Nothing to do} + \expandafter\endinput + \fi +\endgroup +% \end{macrocode} +% +% \begin{macrocode} +\RequirePackage{everyshi} +% \end{macrocode} +% +% \begin{macrocode} +\ps@nofiles +% \end{macrocode} +% +% \begin{macro}{\c@ps@count} +% \begin{macrocode} +\newcounter{ps@count} +\setcounter{ps@count}{0} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@ReturnAfterElseFi} +% \begin{macro}{\ps@ReturnAfterFi} +% \begin{macrocode} +\long\def\ps@ReturnAfterElseFi#1\else#2\fi{\fi#1} +\long\def\ps@ReturnAfterFi#1\fi{\fi#1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ps@ifinset} +% \begin{macrocode} +\newcommand{\ps@ifinset}[4]{% + \ifnum#1>\value{ps@count}% + \ps@ReturnAfterElseFi{#4}% + \else + \ps@ReturnAfterFi{% + \ifnum#2<\value{ps@count}% + \ps@ReturnAfterElseFi{#4}% + \else + \ps@ReturnAfterFi{#3}% + \fi + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@pagetest} +% \begin{macrocode} +\newcommand*{\ps@pagetest}[2]{% + \ps@ifinset{#1}{#2}{\let\ps@next\@empty}{} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\EveryShipout{% + \stepcounter{ps@count}% + \let\ps@next\@empty + \ifx\ps@testlist\@empty + \else + \let\ps@next\ps@makevoid + \ps@testlist + \fi + \ifnum\ps@oddpages=1 + \ifodd\value{ps@count}% + \else + \let\ps@next\ps@makevoid + \fi + \fi + \ifnum\ps@oddpages=2 + \ifodd\value{ps@count}% + \let\ps@next\ps@makevoid + \else + \fi + \fi + \ps@next +} +% \end{macrocode} +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \StartHistory +% \HistVersion{1999/03/01 v0.9} +% \begin{itemize} +% \item The first version was built as a response to a question +% of \Email[Dirk Kuypers]{dk@comnets.rwth-aachen.de}, +% published in the newsgroup +% \href{news:de.comp.text.tex}{de.comp.text.tex}:\\ +% \URL{``Re: pdflatex nur fuer bestimmte Seiten?!?''}^^A +% {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=450111880} +% \end{itemize} +% \HistVersion{1999/04/05 v1.0}\HistLabel{Hist10} +% \begin{itemize} +% \item Documentation added in dtx format. +% \item Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt}) +% \item Options |odd|, |even| added. +% \item \cmd{\nofiles} added, bug fix for \Package{hyperref}. +% \item Abort loading of package, if nothing to do. +% \end{itemize} +% \HistVersion{1999/04/13 v1.1} +% \begin{itemize} +% \item \cmd{\nofiles} bug fix removed +% because of \Package{hyperref} 6.55. +% \item First CTAN release. +% \end{itemize} +% \HistVersion{2003/06/05 v1.2} +% \begin{itemize} +% \item \cmd{\deadcyles} is decremented for omitted pages. +% \item LPPL 1.2. +% \end{itemize} +% \hfuzz10pt +% \PrintIndex +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/pagesel.ins b/Master/texmf-dist/source/latex/oberdiek/pagesel.ins new file mode 100644 index 00000000000..80816293660 --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/pagesel.ins @@ -0,0 +1,80 @@ +% pagesel.ins +% +% This file is part of the package `pagesel' for use with LaTeX2e. +% +% Function: Selecting shipout output pages. +% +% Copyright (C) 1999, 2003 Heiko Oberdiek. +% +% This program may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.2 of this license or (at your option) +% any later version. The latest version of this license +% is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions +% of LaTeX version 1999/12/01 or later. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@uni-freiburg.de>. +% + +\def\batchfile{pagesel.ins} +\input docstrip.tex +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old `docstrip.tex'.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\keepsilent + +\preamble + +This file is part of the package `pagesel' for use with LaTeX2e. + +Function: Selecting shipout output pages. + +Copyright (C) 1999, 2003 Heiko Oberdiek. + +This program may be distributed and/or modified under +the conditions of the LaTeX Project Public License, +either version 1.2 of this license or (at your option) +any later version. The latest version of this license +is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions +of LaTeX version 1999/12/01 or later. + +Please send error reports and suggestions for improvements to + Heiko Oberdiek <oberdiek@uni-freiburg.de>. + +\endpreamble + +\usedir{tex/latex/oberdiek} + +\generateFile{pagesel.sty}{f}{\from{pagesel.dtx}{package}} +%\generateFile{pagesel.drv}{f}{\from{pagesel.dtx}{driver}} + +\Msg{***********************************************************} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space pagesel.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `pagesel.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx b/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx new file mode 100644 index 00000000000..8e139668c6a --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx @@ -0,0 +1,295 @@ +% \iffalse meta-comment +% +% twoopt.dtx +% +% This file is part of the package `twoopt' for use with LaTeX2e. +% +% Function: Defining commands with two optional arguments. +% +% Copyright (C) 1998,1999 Heiko Oberdiek. +% +% This program can be redistributed and/or modified +% under the terms of the LaTeX Project Public License +% distributed from CTAN archives in directory +% macros/latex/base/lppl.txt; either version 1 of +% the License, or (at your option) any later version. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. +% +%<*dtx> + \ProvidesFile{twoopt.dtx} +%</dtx> +%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01] +%<package>\ProvidesPackage{twoopt} +%<driver>\ProvidesFile{twoopt.drv} +% \fi +% \ProvidesFile{twoopt.dtx} + [1999/04/12 v1.3 Definitions with two optional arguments (HO)] +% +% \GetFileInfo{twoopt.dtx} +% +% \CheckSum{103} +% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\usepackage{holtxdoc} +\begin{document} + \DocInput{twoopt.dtx} +\end{document} +%</driver> +% \fi +% +% \DoNotIndex{\csname,\endcsname,\expandafter,\noexpand,\string} +% \DoNotIndex{\begingroup,\endgroup,\def,\xdef,\long,\let} +% +% \newenvironment{param}{^^A +% \newcommand{\entry}[1]{\meta{\###1}:&}^^A +% \begin{tabular}[t]{@{}l@{ }l@{}}^^A +% }{^^A +% \end{tabular}^^A +% } +% +% \SetupTitle{definitions,optional,argument,LaTeX} +% \maketitle +% +% \begin{abstract} +% This package provides commands to define macros with two +% optional arguments. +% \end{abstract} +% +% \tableofcontents +% +% \section{Usage} +% \DescribeMacro{\newcommandtwoopt} +% \DescribeMacro{\renewcommandtwoopt} +% \DescribeMacro{\providecommandtwoopt} +% Similar to \cmd{\newcommand}, \cmd{\renewcommand} +% and \cmd{\providecommand} this package provides commands +% to define macros with two optional arguments. +% The names of the commands are built by appending the +% package name to the \LaTeX-pendants: +% \begingroup +% \def\x{\marg{cmd} \oarg{num} \oarg{default1}^^A +% \oarg{default2} \marg{def.}}^^A +% \begin{tabbing} +% \cmd{\providecommandtwoopt} \=\kill +% \cmd{\newcommandtwoopt}\>\x\\ +% \cmd{\renewcommandtwoopt}\>\x\\ +% \cmd{\providecommandtwoopt}\>\x\\ +% \end{tabbing} +% \endgroup +% +% Also the |*|-forms are supported. Indeed it is better to +% use this ones, unless it is intended to hold +% whole paragraphs in some of the arguments. If the macro +% is defined with the |*|-form, missing braces +% can be detected earlier. +% +% Example: +% \begin{quote} +% |\newcommandtwoopt{\bsp}[3][AA][BB]{%|\\ +% | \typeout{\string\bsp: #1,#2,#3}%|\\ +% |}|\\ +% \begin{tabular}{@{}l@{\quad$\rightarrow$\quad}l@{}} +% |\bsp[aa][bb]{cc}|&|\bsp: aa,bb,cc|\\ +% |\bsp[aa]{cc}|&|\bsp: aa,BB,cc|\\ +% |\bsp{cc}|&|\bsp: AA,BB,cc|\\ +% \end{tabular} +% \end{quote} +% +% \Installation +% +% \StopEventually{} +% +% \section{Implementation} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% \begin{macro}{\newcommandtwoopt} +% \begin{macrocode} +\newcommand{\newcommandtwoopt}{% + \@ifstar{\@newcommandtwoopt*}{\@newcommandtwoopt{}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@newcommandtwoopt} +% \begin{param} +% \entry1 star\\ +% \entry2 macro name to be defined +% \end{param} +% \begin{macrocode} +\newcommand{\@newcommandtwoopt}{} +\long\def\@newcommandtwoopt#1#2{% + \expandafter\@@newcommandtwoopt + \csname2\string#2\endcsname{#1}{#2}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@newcommandtwoopt} +% \begin{param} +% \entry1 help command to be defined +% (\expandafter\cmd\csname 2\bslash<name>\endcsname)\\ +% \entry2 star\\ +% \entry3 macro name to be defined\\ +% \entry4 number of total arguments\\ +% \entry5 default for optional argument one\\ +% \entry6 default for optional argument two +% \end{param} +% \begin{macrocode} +\newcommand{\@@newcommandtwoopt}{} +\long\def\@@newcommandtwoopt#1#2#3[#4][#5][#6]{% + \newcommand#2#3[1][{#5}]{% + \to@ScanSecondOptArg#1{##1}{#6}% + }% + \newcommand#2#1[{#4}]% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\renewcommandtwoopt} +% \begin{macrocode} +\newcommand{\renewcommandtwoopt}{% + \@ifstar{\@renewcommandtwoopt*}{\@renewcommandtwoopt{}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@renewcommandtwoopt} +% \begin{param} +% \entry1 star\\ +% \entry2 command name to be defined +% \end{param} +% \begin{macrocode} +\newcommand{\@renewcommandtwoopt}{} +\long\def\@renewcommandtwoopt#1#2{% + \begingroup + \escapechar\m@ne + \xdef\@gtempa{{\string#2}}% + \endgroup + \expandafter\@ifundefined\@gtempa{% + \@latex@error{\noexpand#2undefined}\@ehc + }{}% + \let#2\@undefined + \expandafter\let\csname2\string#2\endcsname\@undefined + \expandafter\@@newcommandtwoopt + \csname2\string#2\endcsname{#1}{#2}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\providecommandtwoopt} +% \begin{macrocode} +\newcommand{\providecommandtwoopt}{% + \@ifstar{\@providecommandtwoopt*}{\@providecommandtwoopt{}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@providecommandtwoopt} +% \begin{param} +% \entry1 star\\ +% \entry2 command name to be defined +% \end{param} +% \begin{macrocode} +\newcommand{\@providecommandtwoopt}{} +\long\def\@providecommandtwoopt#1#2{% + \begingroup + \escapechar\m@ne + \xdef\@gtempa{{\string#2}}% + \endgroup + \expandafter\@ifundefined\@gtempa{% + \expandafter\@@newcommandtwoopt + \csname2\string#2\endcsname{#1}{#2}% + }{% + \let\to@dummyA\@undefined + \let\to@dummyB\@undefined + \@@newcommandtwoopt\to@dummyA{#1}\to@dummyB + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\to@ScanSecondOptArg} +% \begin{param} +% \entry1 help command to be defined +% (\expandafter\cmd\csname 2\bslash<name>\endcsname)\\ +% \entry2 first arg of command to be defined\\ +% \entry3 default for second opt. arg. +% \end{param} +% \begin{macrocode} +\newcommand{\to@ScanSecondOptArg}[3]{% + \@ifnextchar[{% + \expandafter#1\to@ArgOptToArgArg{#2}% + }{% + #1{#2}{#3}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\to@ArgOptToArgArg} +% \begin{macrocode} +\newcommand{\to@ArgOptToArgArg}{} +\long\def\to@ArgOptToArgArg#1[#2]{{#1}{#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \StartHistory +% \HistVersion{1998/10/30 v1.0} +% \begin{itemize} +% \item The first version was built as a response to a question +% of \Email[Rebecca and Rowland]{rebecca@astrid.u-net.com}, +% published in the newsgroup +% \href{news:comp.text.tex}{comp.text.tex}:\\ +% \URL{``Re: [Q] LaTeX command with two optional arguments?''}^^A +% {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=406573518} +% \end{itemize} +% \HistVersion{1998/10/30 v1.1} +% \begin{itemize} +% \item Improvements added in response to +% \Email[Stefan Ulrich]{ulrich@cis.uni-muenchen.de} +% in the same thread:\\ +% \URL{``Re: [Q] LaTeX command with two optional arguments?''}^^A +% {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=406703373} +% \end{itemize} +% \HistVersion{1998/11/04 v1.2} +% \begin{itemize} +% \item Fixes for LaTeX bugs 2896, 2901, 2902 added. +% \end{itemize} +% \HistVersion{1999/04/12 v1.3} +% \begin{itemize} +% \item Fixes removed because of LaTeX [1998/12/01]. +% \item Documentation in dtx format. +% \item Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt}) +% \item First CTAN release. +% \end{itemize} +% +% \hfuzz10pt +% \PrintIndex +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/oberdiek/twoopt.ins b/Master/texmf-dist/source/latex/oberdiek/twoopt.ins new file mode 100644 index 00000000000..5fa883f6d02 --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/twoopt.ins @@ -0,0 +1,72 @@ +% twoopt.ins +% +% This file is part of the package `twoopt' for use with LaTeX2e. +% +% Function: Defining commands with two optional arguments. +% +% Copyright (C) 1998,1999 Heiko Oberdiek. +% +% This program can be redistributed and/or modified +% under the terms of the LaTeX Project Public License +% distributed from CTAN archives in directory +% macros/latex/base/lppl.txt; either version 1 of +% the License, or (at your option) any later version. +% +% Please send error reports and suggestions for improvements to +% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. +% + +\def\batchfile{twoopt.ins} +\input docstrip.tex +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old `docstrip.tex'.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\keepsilent + +\preamble + +This file is part of the package `twoopt' for use with LaTeX2e. + +Function: Defining commands with two optional arguments. + +Copyright (C) 1998,1999 Heiko Oberdiek. + +This program can be redistributed and/or modified +under the terms of the LaTeX Project Public License +distributed from CTAN archives in directory +macros/latex/base/lppl.txt; either version 1 of +the License, or (at your option) any later version. + +Please send error reports and suggestions for improvements to + Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. + +\endpreamble + +\generateFile{twoopt.sty}{f}{\from{twoopt.dtx}{package}} +%\generateFile{twoopt.drv}{f}{\from{twoopt.dtx}{driver}} + +\Msg{***********************************************************} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space twoopt.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `twoopt.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput |