diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:01:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:01:05 +0000 |
commit | 7dc48e4d760aa8e703387e96794effaad3c24a78 (patch) | |
tree | 7d99efb2359a56ffe56c80d6c2192ffcc41e2d92 /Master/texmf-dist/tex | |
parent | fd257bd5c75a905dfa0ca6e3e507d9ed29338e1f (diff) |
oberdiek
git-svn-id: svn://tug.org/texlive/trunk@1150 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
21 files changed, 4871 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/alphalph.sty b/Master/texmf-dist/tex/latex/oberdiek/alphalph.sty new file mode 100644 index 00000000000..047bff393c6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/alphalph.sty @@ -0,0 +1,198 @@ +%% +%% This is file `alphalph.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% alphalph.dtx (with options: `package') +%% +%% 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>. +%% +\ifx\ProvidesPackage\UnDeFiNeD +\begingroup\def\x#1#2#3[#4]#5{\endgroup\csname fi\endcsname +\immediate\write-1{Package: #3 #4 }}\x +\else +\ProvidesPackage{alphalph}% + [1999/04/13 v1.1 Converting numbers to letters (HO)] +\fi +%% \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 \~} +%% +\expandafter\edef\csname aa@atcode\endcsname{\the\catcode`\@ } +\catcode`\@=11 +\long\def\@ReturnAfterElseFi#1\else#2\fi{\fi#1} +\long\def\@ReturnAfterFi#1\fi{\fi#1} +\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 +} +\def\alphalph{\aa@callmake\aa@alph} +\def\AlphAlph{\aa@callmake\aa@Alph} +\def\aa@callmake#1#2{% + \expandafter\aa@make\expandafter{\number#2}#1% +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname numexpr\endcsname\relax +\def\aa@make#1#2{% + \ifnum#1<1 + \else + \@ReturnAfterFi{% + \aa@process1;#1;1..#2% + }% + \fi +} +\def\aa@process#1;#2;{% + \ifnum#1=#2 + \expandafter\aa@getresult + \else + \@ReturnAfterFi{% + \expandafter\aa@process\number\aa@inc{#1}\aa@alphinc{;#2;}% + }% + \fi +} +\def\aa@getresult#1..#2{% + \aa@@getresult!#2#1..% +} +\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 +} +\def\aa@inc#1{% + \ifnum#1<9 + \aa@nextdigit{#1}% + \else + \aa@reverse#1!!% + \fi +} +\def\aa@nextdigit#1{\ifcase#1 1\or2\or3\or4\or5\or6\or7\or8\or9\fi} +\def\aa@reverse#1#2!#3!{% + \ifx\\#2\\% + \aa@addone#1#3!!% + \else + \@ReturnAfterFi{% + \aa@reverse#2!#1#3!% + }% + \fi +} +\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 +} +\def\aa@lastreverse#1#2!#3!{% + \ifx\\#2\\% + #1#3% + \else + \@ReturnAfterFi{% + \aa@lastreverse#2!#1#3!% + }% + \fi +} +\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 +} +\def\aa@alphinclast#1#2{#2#1.} +\else +\def\aa@make#1#2{% + \ifnum#1<1 + \else + \@ReturnAfterFi{% + \aa@eprocess#1;#2% + }% + \fi +} +\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 +} +\fi +\catcode`\@=\aa@atcode +\endinput +%% +%% End of file `alphalph.sty'. diff --git a/Master/texmf-dist/tex/latex/oberdiek/chemarr.sty b/Master/texmf-dist/tex/latex/oberdiek/chemarr.sty new file mode 100644 index 00000000000..defcfb3b925 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/chemarr.sty @@ -0,0 +1,77 @@ +% File: chemarr.sty +% Version: 2001/06/22 v1.1 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 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. +% +% Function: Very often chemists need a longer version +% of reaction arrows (\rightleftharpoons) with +% the possibility to put text above and below. +% Analogous to amsmath's \xrightarrow and +% \xleftarrow this package provides the macro +% \xrightleftharpoons. +% +% Requirement: amsmath +% Use: LaTeX: \usepackage{chemarr} +% \xrightleftharpoons[below]{above} +% +% History: 2001/06/21 v1.0: +% * first public version +% 2001/06/22 v1.1: +% * documentation fixes +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{chemarr}% + [2001/06/22 v1.1 Chemical reaction arrows (HO)] +% +\RequirePackage{amsmath} +% The package amsmath is needed for the following commands: +% \ext@arrow, \@ifnotempty, \arrowfill@ +% \relbar, \std@minus +% \@ifempty, \@xifempty, \@xp +% +% In fontmath.ltx \rightleftharpoons is defined with +% a vertical space of 2pt. +% +\newcommand{\xrightleftharpoons}[2][]{% + \ensuremath{% + \mathrel{% + \settoheight{\dimen@}{\raise 2pt\hbox{$\rightharpoonup$}}% + \setlength{\dimen@}{-\dimen@}% + \edef\CA@temp{\the\dimen@}% + \settoheight\dimen@{$\rightleftharpoons$}% + \addtolength{\dimen@}{\CA@temp}% + \raisebox{\dimen@}{% + \rlap{% + \raisebox{2pt}{% + $% + \ext@arrow 0359\rightharpoonupfill@{\hphantom{#1}}{#2}% + $% + }% + }% + \hbox{% + $% + \ext@arrow 3095\leftharpoondownfill@{#1}{\hphantom{#2}}% + $% + }% + }% + }% + }% +} +\newcommand*{\leftharpoondownfill@}{% + \arrowfill@\leftharpoondown\relbar\relbar +} +\newcommand*{\rightharpoonupfill@}{% + \arrowfill@\relbar\relbar\rightharpoonup +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/classlist.sty b/Master/texmf-dist/tex/latex/oberdiek/classlist.sty new file mode 100644 index 00000000000..a1707a6a02f --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/classlist.sty @@ -0,0 +1,176 @@ +% File: classlist.sty +% Version: 2005/06/19 v1.1 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 2005 Heiko Oberdiek. +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 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.3 or later is part of all distributions of +% LaTeX version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% Function: This package records the loaded classes and stores +% them in a list. +% +% Background: This packages is an answer of a newsgroup question: +% Newsgroup: comp.text.tex +% Subject: Finding the Document Class +% From: Herber Schulz <> +% Date: 18 Jun 2005 13:16:49 -0500 +% Message-ID: +% <herbs-D55DB9.13170418062005@news.isp.giganews.com> +% +% Use: Load this package before \documentclass: +% \RequirePackage{classlist} +% \documentclass[some,options]{whatever} +% +% If used after \documentclass, \@filelist is +% parsed for classes. The additional data +% specified options and requested version is no +% longer available here. +% +% \MainClass contains the first loaded class. +% \ClassList stores the class entries, eg. +% \ClassList -> \ClassListEntry{myarticle}{a4paper}{} +% \ClassListEntry{article}{}{} +% \ClassListEntry has three arguments: +% #1: class name +% #2: options given in \documentclass/\LoadClass +% #3: requested version, not the version of class +% \PrintClassList prints the list on screen it can be +% configured by +% \PrintClassListTitle for the title and +% \PrintClassListEntry for formatting the entries. +% +% History: +% 2005/06/19 v1.0: +% * first published version +% (comp.text.tex, CTAN). +% 2005/06/19 v1.1: +% * After \documentclass the package looks +% at \@filelist instead of aborting with error. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{classlist}% + [2005/06/19 v1.0 Record loaded classes (HO)] + +\let\ClassList\@empty +\let\MainClassName\relax + +\ifx\@classoptionslist\relax + + % before \documentclass + + \let\CL@org@fileswith@pti@ns\@fileswith@pti@ns + \def\@fileswith@pti@ns#1[#2]#3[#4]{% + % #1: \@clsextension + % #2: options of \documentclass/\LoadClass + % #3: class name + % #4: requested version + \ifx#1\@clsextension + \@ifl@aded#1{#3}{% + \PackageInfo{classlist}{% + Skipping class `#3', because\MessageBreak + this class is already loaded% + }% + }{% + \@ifundefined{MainClassName}{% + \def\MainClassName{#3}% + }{}% + \@temptokena\expandafter{% + \ClassList + \ClassListEntry{#3}{#2}{#4}% + }% + \edef\ClassList{\the\@temptokena}% + }% + \fi + \CL@org@fileswith@pti@ns{#1}[{#2}]{#3}[{#4}]% + } + +\else + + % after \documentclass + \PackageInfo{classlist}{Use \string\@filelist\space method}% + + \let\ClassListEntry\relax + \expandafter\def\expandafter\CL@test + \expandafter#\expandafter1\@clsextension#2\@nil{% + \ifx\\#2\\% + % name does not contain \@clsextension + \else + \expandafter\CL@test@i\CL@entry\@nil + \fi + }% + \expandafter\def\expandafter\CL@test@i + \expandafter#\expandafter1\@clsextension#2\@nil{% + \ifx\\#2\\% + \@ifundefined{opt@\CL@entry}{% + }{% + \@ifundefined{MainClassName}{% + \let\MainClassName\CL@entry + }{% + }% + \edef\ClassList{% + \ClassList + \ClassListEntry{\CL@entry}{}{}% + }% + }% + \else + % names with more than one \@clsextension are not supported. + \fi + } + \@for\CL@entry:=\@filelist\do{% + \expandafter\expandafter\expandafter\CL@test\expandafter + \CL@entry\@clsextension\@nil + }% +\fi + +\providecommand*{\PrintClassListEntry}[3]{% + \toks@{* #1}% + \typeout{\the\toks@}% +} +\providecommand*{\PrintClassListTitle}{% + \typeout{Class list:}% +} +\providecommand*{\PrintClassList}{% + \begingroup + \let\ClassListEntry\PrintClassListEntry + \PrintClassListTitle + \ClassList + \endgroup +} + +\def\CL@InfoEntry#1#2#3{% + \advance\count@ by \@ne + \def\x{#2}% + \@onelevel@sanitize\x + \edef\CL@Info{% + \CL@Info + \noexpand\MessageBreak + (\the\count@) % + #1 [\x]% + \ifx\\#3\\% + \else + \space[#3]% + \fi + }% +} +\AtBeginDocument{% + \begingroup + \count@=\z@ + \def\CL@Info{Class List:}% + \let\ClassListEntry\CL@InfoEntry + \ClassList + \let\on@line\@empty + \PackageInfo{classlist}{\CL@Info} + \endgroup +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/dvipscol.sty b/Master/texmf-dist/tex/latex/oberdiek/dvipscol.sty new file mode 100644 index 00000000000..bd53221b757 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/dvipscol.sty @@ -0,0 +1,92 @@ +% File: dvipscol.sty +% Version: 2000/08/31 v1.0 +% Author: Heiko Oberdiek +% Email: <oberdiek@ruf.uni-freiburg.de> +% +% Copyright: Copyright (C) 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. +% +% Function: This package tries a solution, if the program +% dvips complains: +% "! out of color stack space" +% The driver file `dvips.def' contains the +% low level color commands for the package `color'. +% Each time a color is set, the current color is +% pushed on the color stack before and after the +% current group the old color is popped from +% the stack and set again (via \aftergroup). +% But the color stack size of dvips is limited, +% so a stack overflow can occur, if there are +% too many color setting operations in a group. +% Only at the bottom group level (no group), +% the color can be set directly without pushing +% the current color on the stack before, because +% there is no group at bottom level that can end. +% With e-TeX the group level can easily be +% detected (\currentgrouplevel). Alone with TeX +% this is not possible. +% +% Recommended: e-TeX (explanation see above) +% +% Use: * With e-TeX the package fixes \set@color, therefore +% no interaction with the user is required. +% * Without e-TeX the package defines \nogroupcolor, +% that the user can use manually instead of \color. +% But caution: it should only be used outside of all +% groups, for example the following will not work: +% \textcolor{black}{\nogroupcolor{blue}...} +% +% History: 2000/08/31 v1.0: +% first public release created as answer to +% a question of Deepak Goel in comp.text.tex: +% "\color{} problems.. :Out of stack space.." +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dvipscol}[2000/08/31 v1.0 Fix for dvips.def (HO)] + +\@ifundefined{ver@dvips.def}{% + \PackageWarningNoLine{dvipscol}{% + Nothing to fix, because \string`dvips.def\string' not loaded% + }% + \endinput +} + +\CheckCommand*{\set@color}{% + \special{color push \current@color}% + \aftergroup\reset@color +} + +\newcommand*{\nogroupcolor}{% + \let\saved@org@set@color\set@color + \def\set@color{% + \let\set@color\saved@org@set@color + \special{color \current@color}% + }% + \color +} + +\ifx\currentgrouplevel\@undefined + \PackageWarningNoLine{dvipscol}{% + \string\set@color\space cannot be fixed, % + because the\MessageBreak + e-TeX extensions are not available% + }% + \expandafter\endinput +\fi +\def\set@color{% + \ifcase\currentgrouplevel + \special{color \current@color}% + \else + \special{color push \current@color}% + \aftergroup\reset@color + \fi +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/engord.sty b/Master/texmf-dist/tex/latex/oberdiek/engord.sty new file mode 100644 index 00000000000..0df08d33c6a --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/engord.sty @@ -0,0 +1,171 @@ +% File: engord.sty +% Version: 2003/04/28 v1.1 +% Author: Heiko Oberdiek <oberdiek@uni-freiburg.de> +% +% Function: Converts numbers to english ordinal numbers. +% +% Copyright: Copyright (C) 2000, 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. +% +% Use: +% * \engord{<LaTeX counter name>} +% It prints the value of the LaTeX counter as English +% ordinal number. It can be used so as \arabic, \roman, +% or \alph. +% * \engordnumber{<any TeX number>} +% It prints the number as English ordinal number. +% * \engordletters#1 +% This command formats the English ordinal letters +% after the number. It defaults to \textsuperscript. +% * \engorderror#1 +% It can be redefined, if an other error handling is +% wanted. The argument is a negative number or zero. +% +% Examples: +% * \engordnumber{1} ==> 1st +% \engordnumber{12} ==> 12th +% \engordnumber{123} ==> 123rd +% \engord{page} ==> 1st (if page has the value of one) +% * The default output of a counter can be redefined: +% \newcounter{mycounter} +% \renewcommand{\theengcounter}{\engord{mycounter}} +% * Because the implementation of \engord and \engordnumber +% is kept expandable, these commands can be used to make +% command names with an appropriate definition of +% \engordletters: +% \renewcommand*{\engordletters}[#1]{#1} +% \@namedef{My\engordnumber{3}Command}{...} +% This generates the command name `\My4rdCommand'. +% * If the letters should not be raised, \engordletters +% can be redefined as follows: +% \renewcommand*{\engordletters}[1]{#1} +% +% History: +% 2000/05/23 v1.0: first public release +% 2003/04/28 v1.1: +% * Bug fix for 30, 40, 50, ..., 100, 130, ... +% * \ordletters renamed to documented \engordletters +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{engord}% + [2003/04/28 v1.1 English ordinal numbers (HO)] + +% \engordletters is called with one argument, the english +% ord letters, and contains the code to format them. It +% defaults to \textsuperscript: +\providecommand{\engordletters}{\textsuperscript} + +% \engorderror is called, if the number is zero +% or negative. +\providecommand*{\engorderror}[1]{% + #1\engordletters{!ERROR!}% + \PackageWarning{engord}{% + `#1' is not an ordinal number% + }% +} + +% \engord expects a LaTeX counter name as argument and +% calls \engordnumber +\newcommand*{\engord}[1]{% + \engordnumber{\value{#1}}% +} + +% \engordnumber is the user command to print a number as +% english ordinal number. The argument can be any +% TeX number like explicit numbers, register values, ... +% +% In a safe way it converts the TeX number argument +% into a form that only consists of decimal digits +\newcommand*{\engordnumber}[1]{% + \expandafter\EO@number\expandafter{\number#1}% +} + +% \EO@number expects a number with decimal digits as +% argument and looks at the size of the number and +% the count of the digits: +\def\EO@number#1{% + \ifnum#1<1 % handle the error case + \engorderror{#1}% + \else + \ifnum#1<21 + \EO@ord{#1}% + \else + \ifnum#1<100 + \EO@twodigits#1% + \else + \@ReturnAfterFi{% + \EO@reverse#1\@nil{}\EO@afterreverse + }% + \fi + \fi + \fi +} + +% An internal help macro to prevent a too deep \if nesting. +\long\def\@ReturnAfterFi#1\fi{\fi#1} + +% \EO@ord prints the number with ord letters +% #1: decimal digits, #1 < 21 +\def\EO@ord#1{% + #1% + \expandafter\engordletters + \ifcase#1{th}\or + {st}\or + {nd}\or + {rd}\else + {th}% + \fi +} + +% \EO@twodigits expects a number with two digits, +% 20 < number < 100 +\def\EO@twodigits#1#2{% + #1\EO@ord{#2}% +} + +% \EO@reverse reverses the digits of the number +% #1: next digit +% #2: rest of the digits +% #3: already reversed digits +% #4: next command to call with the reversed number +% as argument +\def\EO@reverse#1#2\@nil#3#4{% + \ifx\\#2\\% + #4{#1#3}% + \else + \@ReturnAfterFi{% + \EO@reverse#2\@nil{#1#3}{#4}% + }% + \fi +} + +% \EO@afterreverse calls \EO@reverseback so that +% \EO@reverseback can inspect the digits of the number +\def\EO@afterreverse#1{% + \EO@reverseback#1\@nil +} + +% \EO@reverseback reverses the reversion +% #1: the last digit of the number +% #2: the second last digit of the number +% #3: first digits of the number in reversed order, +% it is not empty, because \EO@reverseback is +% only called with numbers > 100. +\def\EO@reverseback#1#2#3\@nil{% + \EO@reverse#3\@nil{}\@firstofone + \ifnum#2#1<21 + \EO@ord{#2#1}% + \else + #2\EO@ord{#1}% + \fi +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty b/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty new file mode 100644 index 00000000000..1c1ab79be76 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty @@ -0,0 +1,90 @@ +% File: epstopdf.sty +% Version: 2001/02/04 v1.1 +% Author: Heiko Oberdiek +% Email: <oberdiek@ruf.uni-freiburg.de> +% +% Copyright: Copyright (C) 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. +% +% Function: This packages adds support of handling eps images +% to package graphic{s,x} with option `pdftex'. +% If an eps image is detected, epstopdf is automatically +% called to convert it to pdf format. +% +% Required: * The program `epstopdf'. +% * The feature `\write18' has to be enabled to get +% the conversion via the program epstopdf work: +% * command line option: -shell-escape +% example: pdflatex -shell-escape test.tex +% * configuraton file `texmf.cnf': shell_escape = 1 +% +% Use: The package is loaded after graphic{s,x}, eg: +% \usepackage[pdftex]{graphicx} +% \usepackage{epstopdf} +% Images with extension `.eps' are now detected +% and supported: +% * Implicitly: \includegraphics{bild} +% If `bild.eps' can only be found, +% then it is converted to the file `bild.pdf', +% that will be used by pdfTeX. +% On the next ocurrences or on the next pdfTeX run, +% the pdf file is already available, so the +% conversion step is skipped. +% * Explicitly: \includegraphics{bild.eps} +% Each time the conversion program is called. +% +% History: 2001/01/06 v1.0: +% * first public version, +% published in the pdftex mailing list. +% 2001/02/04 v1.1: +% * minor documentation update. +% * CTAN. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{epstopdf}% + [2001/02/04 v1.1 Conversion with epstopdf on the fly (HO)] + +% Check, whether package graphics is loaded +% (also graphicx loads graphics) +\@ifpackageloaded{graphics}{}{% + \PackageWarningNoLine{epstopdf}{% + No graphics package \string`graphic{s,x}\string' loaded% + }% + \endinput +} +% Check, whether pdftex.def is loaded +\@ifundefined{ver@pdftex.def}{% + \PackageWarningNoLine{epstopdf}{% + Graphics driver file \string`pdftex.def\string' not loaded% + } + \endinput +} + +% Patch \Gin@setfile to execute #3, if it contains +% a command +\let\orgGin@setfile\Gin@setfile +\def\Gin@setfile#1#2#3{% + \if`\@car #3\relax\@nil + \immediate\write18{\@cdr #3\@empty\@nil}% + \orgGin@setfile{#1}{#2}{\Gin@base #2}% + \else + \orgGin@setfile{#1}{#2}{#3}% + \fi +} + +% Adding .eps at the end of the list of extensions, +% defined by \DeclareGraphicsExtensions +\g@addto@macro\Gin@extensions{,.eps} + +% \DeclareGraphicsRule for .eps +\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf #1}} + +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/hypbmsec.sty b/Master/texmf-dist/tex/latex/oberdiek/hypbmsec.sty new file mode 100644 index 00000000000..3f55dd5d6d4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/hypbmsec.sty @@ -0,0 +1,149 @@ +%% +%% This is file `hypbmsec.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hypbmsec.dtx (with options: `package') +%% +%% 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>. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hypbmsec} + [2000/03/22 v2.1 Bookmarks in sectioning commands (HO).] +%% \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 \~} +%% +\@ifundefined{hbs@do}{}{% + \PackageInfo{hypbmsec}{Package 'hypbmsec' is already loaded} + \endinput +} +\def\hbs@do#1{% + \@ifstar{#1*}{% + \let\hbs@tocstring\relax + \let\hbs@bmstring\relax + \let\hbs@seccmd#1% + \hbs@checkarg + }% +} +\def\hbs@checkarg{% + \@ifnextchar[\hbs@getsquare{% + \@ifnextchar(\hbs@getbookmark\hbs@process + }% +} +\long\def\hbs@getsquare[#1]{% + \ifx\hbs@tocstring\relax + \def\hbs@tocstring{#1}% + \else + \hbs@bmdef{#1}% + \fi + \hbs@checkarg +} +\def\hbs@getbookmark(#1){% + \hbs@bmdef{#1}% + \hbs@checkarg +} +\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 +} +\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 +} +\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% + }% + }% + }{}% + \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 +} +\endinput +%% +%% End of file `hypbmsec.sty'. diff --git a/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty b/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty new file mode 100644 index 00000000000..641c2dbc349 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty @@ -0,0 +1,125 @@ +%% +%% This is file `hypcap.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hypcap.dtx (with options: `package') +%% +%% 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>. +%% +\ProvidesPackage{hypcap} + [2001/08/27 v1.3 Adjusting anchors of captions (HO)] +%% \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 \~} +%% +\@ifundefined{hyper@@anchor}{% + \PackageError{hypcap}{You have to load 'hyperref' first}\@ehc + \endinput +}{} +\newcommand*\hc@org@caption{} +\let\hc@org@caption\caption +\newif\if@capstart +\newcommand*\hypcapspace{.5\baselineskip} +\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 +} +\def\hc@caption{% + \@dblarg{\hc@@caption\@captype}% +} +\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 +} +\def\hypcapredef#1{% + \expandafter\hc@redef\csname hc@org#1\expandafter\endcsname + \csname hc@orgend#1\expandafter\endcsname + \expandafter{#1}% +} +\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% + }% +} +\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 +\endinput +%% +%% End of file `hypcap.sty'. diff --git a/Master/texmf-dist/tex/latex/oberdiek/ifdraft.sty b/Master/texmf-dist/tex/latex/oberdiek/ifdraft.sty new file mode 100644 index 00000000000..8443447372c --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/ifdraft.sty @@ -0,0 +1,119 @@ +% File: ifdraft.sty +% Version: 2005/10/05 v1.1 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Function: Switch for option draft. +% +% Copyright: Copyright (C) 1999, 2005 Heiko Oberdiek. +% +% This work may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.3 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.3 or later is part of all distributions +% of LaTeX version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% Use: \usepackage{ifdraft} +% \ifdraft{<draft case>}{<final case>} +% \ifoptiondraft{<option draft is given}% +% {<option draft is not given} +% \ifoptionfinal{<option final is given}% +% {<option final is not given} +% +% If none of the options "draft" or "final" is used, +% then this package assumes "final" as default setting +% for \ifdraft. All classes that I know have this +% behaviour. (Otherwise you can find out with +% \ifoptiondraft and \ifoptionfinal, whether none of +% the options is set.) +% +% If either "draft" or "final" is used, \ifdraft is +% enough to distinguish between these cases. +% +% Both options "draft" and "final" should not be used +% at the same time. This is contradictionary input. +% Which option is more important? The result is +% unpredictable in general. +% * article, report, book, scrartcl, scrreprt, scrbook: +% draft, final -> "final" is effective. +% final, draft -> "final" is effective. +% "final wins, if given" +% * memoir: +% draft, final -> "draft" is effective. +% final, draft -> "draft" is effective. +% "you can forget final, draft wins if given anywhere" +% These classes evaluates the options in declaration order. +% Because the declaration order of these options in this +% package is not really interesting, this packages evaluates +% the options in the order specified in the calling commands: +% * ifdraft: +% draft, final -> \ifdraft selects final clause. +% final, draft -> \ifdraft selects draft clause. +% "latest option wins" +% Thus you know with \ifdraft the latest given option +% and you can emulate the behaviour of the different +% classes with the help of \ifoptiondraft and \ifoptionfinal. +% +% Summary: \ifdraft is sufficient to deal with the +% normal use cases "one or none out of draft and final". +% +% Installation: +% CTAN location: CTAN:macros/latex/contrib/oberdiek/ifdraft.sty +% TDS location: TDS:tex/latex/oberdiek/ifdraft.sty +% +% History: 1999/12/28 v1.0: +% * first public release +% * LPPL 1.1 +% 2005/10/05 v1.1: +% * \ifoptiondraft and \ifoptionfinal added. +% * \ProcessOptions changed to \ProcessOptions*. +% (Order of given class options matters instead +% of the order of option declaration in this +% package.) +% * LPPL 1.3 +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{ifdraft}[2005/10/05 v1.1 Switch for option draft (HO)] + +\newif\if@draft +\newif\if@option@draft +\newif\if@option@final +\DeclareOption{draft}{% + \@drafttrue + \@option@drafttrue +} +\DeclareOption{final}{% + \@draftfalse + \@option@finaltrue +} +\ProcessOptions*\relax + +\newcommand*{\ifdraft}{% + \if@draft + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\ifoptiondraft}{% + \if@option@draft + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\ifoptionfinal}{% + \if@option@final + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/ifpdf.sty b/Master/texmf-dist/tex/latex/oberdiek/ifpdf.sty new file mode 100644 index 00000000000..83a6c8718a8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/ifpdf.sty @@ -0,0 +1,167 @@ +% File: ifpdf.sty +% Version: 2005/07/22 v1.3 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 2001, 2005 Heiko Oberdiek. +% +% This work may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.3 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.3 or later is part of all distributions +% of LaTeX version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% Function: This package looks for pdfTeX in pdf mode and +% implements and sets the switch \ifpdf. +% The detection is based on \pdfoutput and +% the package will not change this value. +% It works with plain or LaTeX formats. +% +% Use: LaTeX: \usepackage{ifpdf} +% plain: \input ifpdf.sty +% The package provides the switch \ifpdf: +% \ifpdf +% ... do things, if pdfTeX is running in pdf mode ... +% \else +% ... other TeX or pdfTeX in dvi mode ... +% \fi +% The package can also be used to set global +% documentclass options: +% \RequirePackage{ifpdf} +% \ifpdf +% \documentclass[pdftex,...]{...} +% \else +% \documentclass[...]{...} +% \fi +% +% Installation: +% CTAN location: CTAN:macros/latex/contrib/oberdiek/ifpdf.sty +% TDS location: TDS:tex/generic/oberdiek/ifpdf.sty +% (Rationale: ifpdf.sty can be used with both plain and +% LaTeX formats.) +% +% History: 2001/06/14 v1.0: +% * first public version, +% 2001/07/14 v1.1: +% * documentation addition: global options +% 2001/09/26 v1.2: +% * documentation typo corrected. +% * version number corrected. +% * line number in log entry removed. +% 2005/07/22 v1.3: +% * Some source code comments from Robin Fairbairns added. +% * Bug fix for negative values of \pdfoutput +% (Oleg Katsitadze) +% * LPPL 1.3 +% * Installation section with locations added. +% +% Prevent reloading more than one: +\begingroup + \expandafter\let\expandafter\x\csname ver@ifpdf.sty\endcsname + \ifcase 0% + \ifx\x\relax % plain + \else + \ifx\x\empty % LaTeX + \else + 1% + \fi + \fi + \else + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{ifpdf}{The package is already loaded}% + \endgroup + \expandafter\endinput + \fi +\endgroup +% +% Package identification: +\begingroup + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \immediate\write-1{Package: #3 #4}% + \xdef#1{#4}% + }% + \else + \def\x#1#2[#3]{\endgroup + #2[#3]% + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@ifpdf.sty\endcsname +\ProvidesPackage{ifpdf}% + [2005/07/22 v1.3 % + Providing \expandafter\string\csname ifpdf\endcsname\space (HO)] +% +% Check, whether \ifpdf is already defined: +\begingroup + \expandafter\ifx\csname ifpdf\endcsname\relax + \else + \edef\i/{\expandafter\string\csname ifpdf\endcsname}% + \expandafter\ifx\csname PackageError\endcsname\relax + \def\x#1#2{% + \edef\z{#2}% + \expandafter\errhelp\expandafter{\z}% + \errmessage{Package ifpdf Error: #1}% + }% + \def\y{^^J}% + \newlinechar=10 + \else + \def\x#1#2{% + \PackageError{ifpdf}{#1}{#2}% + }% + \def\y{\MessageBreak}% + \fi + \x{Name clash, \i/ is already defined}{% + Incompatible versions of \i/ can cause problems,\y + therefore package loading is aborted.% + }% + \endgroup + \expandafter\endinput + \fi +\endgroup +% +% Implementing the switch: +\newif\ifpdf +% so \pdffalse, initally +\ifx\pdfoutput\undefined +\else + \ifx\pdfoutput\relax +% \pdfoutput was undefined, but someone has used LaTeX internal +% \@ifundefined, or something else involving \csname pdfoutput\endcsname + \else + \ifnum\pdfoutput<1 % +% \pdfoutput=0 or negative, so not generating pdf + \else + \pdftrue + \fi + \fi +\fi +% +% Log comment: +\begingroup + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \let\x\PackageInfo + \expandafter\let\csname on@line\endcsname\empty + \fi + \x{ifpdf}{pdfTeX in pdf mode \ifpdf\else not \fi detected}% +\endgroup +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/ifvtex.sty b/Master/texmf-dist/tex/latex/oberdiek/ifvtex.sty new file mode 100644 index 00000000000..d99f18989ac --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/ifvtex.sty @@ -0,0 +1,195 @@ +% File: ifvtex.sty +% Version: 2001/09/26 v1.0 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 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. +% +% Function: This package looks for VTeX and implements +% and sets the switches \ifvtex, \ifvtex<mode>, +% and \ifvtexgex. +% It works with plain or LaTeX formats. +% +% Use: LaTeX: \usepackage{ifvtex} +% plain: \input ifvtex.sty +% The package provides the switch \ifvtex: +% \ifvtex +% ... do things, if VTeX is running ... +% \else +% ... other TeX ... +% \fi +% The package can also be used to set global +% documentclass options: +% \RequirePackage{ifvtex} +% \ifvtex +% \documentclass[vtex,...]{...} +% \else +% \documentclass[...]{...} +% \fi +% +% For the different output modes the following switches +% can be used: +% \ifvtexdvi, \ifvtexpdf, \ifvtexps, \ifvtexhtml +% And for GeX mode: +% \ifvtexgex +% +% For detecting VTeX \VTeXversion and \OpMode +% has to be defined. The modes are detected by +% \OpMode and GeX by \gexmode. +% +% History: 2001/09/26 v1.0: +% * first public version, +% +% Prevent reloading more than one: +\begingroup + \expandafter\let\expandafter\x\csname ver@ifvtex.sty\endcsname + \ifcase 0% + \ifx\x\relax % plain + \else + \ifx\x\empty % LaTeX + \else + 1% + \fi + \fi + \else + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{ifvtex}{The package is already loaded}% + \endgroup + \expandafter\endinput + \fi +\endgroup +% +% Package identification: +\begingroup + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \immediate\write-1{Package: #3 #4}% + \xdef#1{#4}% + }% + \else + \def\x#1#2[#3]{\endgroup + #2[#3]% + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@ifvtex.sty\endcsname +\ProvidesPackage{ifvtex}% + [2001/06/14 v1.0 *TEST* Providing % + \expandafter\string\csname ifvtex\endcsname\space switches (HO)] +% +% Check, whether \ifvtex is already defined: +\begingroup + \expandafter\ifx\csname ifvtex\endcsname\relax + \else + \edef\i/{\expandafter\string\csname ifvtex\endcsname}% + \expandafter\ifx\csname PackageError\endcsname\relax + \def\x#1#2{% + \edef\z{#2}% + \expandafter\errhelp\expandafter{\z}% + \errmessage{Package ifvtex Error: #1}% + }% + \def\y{^^J}% + \newlinechar=10 + \else + \def\x#1#2{% + \PackageError{ifvtex}{#1}{#2}% + }% + \def\y{\MessageBreak}% + \fi + \x{Name clash, \i/ is already defined}{% + Incompatible versions of \i/ can cause problems,\y + therefore package loading is aborted.% + }% + \endgroup + \expandafter\endinput + \fi +\endgroup +% +% Implementing the switch \ifvtex: +\newif\ifvtex +\ifx\VTeXversion\undefined +\else + \ifx\VTeXversion\relax + \else + \ifx\OpMode\undefined + \else + \ifx\OpMode\relax + \else + \vtextrue + \fi + \fi + \fi +\fi +% +% Implementing the mode and GeX switches: +\newif\ifvtexdvi +\newif\ifvtexpdf +\newif\ifvtexps +\newif\ifvtexhtml +\newif\ifvtexgex +\ifvtex + \ifcase\OpMode\relax + \vtexdvitrue + \or % 1 + \vtexpdftrue + \or % 2 + \vtexpstrue + \or % 3 + \vtexpstrue + \or\or\or\or\or\or\or % 10 + \vtexhtmltrue + \fi + \ifx\gexmode\undefined + \else + \ifx\gexmode\relax + \else + \ifnum\gexmode>0 % + \vtexgextrue + \fi + \fi + \fi +\fi +% +% Log comment: +\begingroup + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \let\x\PackageInfo + \expandafter\let\csname on@line\endcsname\empty + \fi + \x{ifvtex}{% + VTeX % + \ifvtex + in \ifvtexdvi DVI\fi + \ifvtexpdf PDF\fi + \ifvtexps PS\fi + \ifvtexhtml HTML\fi + \space mode % + with\ifvtexgex\else out\fi\space GeX % + \else + not % + \fi + detected% + }% +\endgroup +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/pagesel.sty b/Master/texmf-dist/tex/latex/oberdiek/pagesel.sty new file mode 100644 index 00000000000..dc00d265270 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/pagesel.sty @@ -0,0 +1,163 @@ +%% +%% This is file `pagesel.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagesel.dtx (with options: `package') +%% +%% 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>. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{pagesel} + [2003/06/05 v1.2 Selecting shipout output pages (HO)] +%% \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 \~} +%% +\@ifundefined{ps@makevoid}{}{% + \PackageWarningNoLine{pagesel}{Package already loaded.}% + \endinput +} +\newcommand*{\ps@makevoid}{% + \global\setbox\@cclv\copy\voidb@x + \begingroup + \count@=\deadcycles + \advance\count@ by -1\relax + \deadcycles=\count@ + \endgroup +} +\newcommand*\ps@oddpages{0} +\DeclareOption{odd}{\renewcommand*\ps@oddpages{1}} +\DeclareOption{even}{\renewcommand*\ps@oddpages{2}} +\DeclareOption{nofiles}{\let\ps@nofiles\nofiles} +\DeclareOption{nonofiles}{\let\ps@nofiles\@empty} +\DeclareOption{files}{\let\ps@nofiles\@empty} +\ExecuteOptions{nofiles} +\DeclareOption*{% + \begingroup + \expandafter\ps@checkoption\CurrentOption-\END + \edef\x{\endgroup\noexpand\ps@store{\ps@first}{\ps@last}}% + \x +} +\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 +} +\newcommand\ps@checklast{} +\def\ps@checklast#1-{% + \ifx\\#1\\% + \def\ps@last{\maxdimen}% + \else + \edef\ps@last{#1}% + \fi +} +\newcommand*{\ps@store}[2]{% + \expandafter\def\expandafter\ps@testlist\expandafter{% + \ps@testlist\ps@pagetest{#1}{#2}% + }% +} +\newcommand*\ps@testlist{} +\ProcessOptions +\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 +\RequirePackage{everyshi} +\ps@nofiles +\newcounter{ps@count} +\setcounter{ps@count}{0} +\long\def\ps@ReturnAfterElseFi#1\else#2\fi{\fi#1} +\long\def\ps@ReturnAfterFi#1\fi{\fi#1} +\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 +} +\newcommand*{\ps@pagetest}[2]{% + \ps@ifinset{#1}{#2}{\let\ps@next\@empty}{} +} +\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 +} +\endinput +%% +%% End of file `pagesel.sty'. diff --git a/Master/texmf-dist/tex/latex/oberdiek/pdfcolmk.sty b/Master/texmf-dist/tex/latex/oberdiek/pdfcolmk.sty new file mode 100644 index 00000000000..20f972aede8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/pdfcolmk.sty @@ -0,0 +1,531 @@ +% File: pdfcolmk.sty +% Version: 2005/07/09 v0.7 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 2000, 2005 Heiko Oberdiek. +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 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.3 or later is part of all distributions of +% LaTeX version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% Function: This package tries a solution for the missing color +% stack of pdfTeX. +% +% Background: After the Dante meeting (Clausthal 2000) I have started +% to experiment with the eTeX method of a `colour' mark. +% One of the major problems is the understanding of the +% output routine and the need to rewrite it because of +% missing hooks. Currently I have made some tests in +% in onecolumn and twocolumn mode, but the state is +% experimental. +% +% Limitations: * mark limitations: page breaks in math +% * LaTeX's output routine is redefinded. +% * Changes in the output routine of newer versions +% of LaTeX are not detected. +% * Packages that change the output routine are not +% supported. +% * It does not support several independent text +% streams like footnotes. +% +% Recommended: e-TeX (for additional mark register) +% Without e-TeX LaTeX's mark commands are redefined +% to store an additional color value. +% +% Use: Load after package color: +% \usepackage[pdftex]{color} +% \usepackage{pdfcolmk} +% +% Compatibility: +% * Load the following packages after `pdfcolmk': +% mparhack.sty +% * Load the following packages before `pdfcolmk': +% marn.sty +% newmarn.sty +% * Supported \@addmarginpar patch: +% latex/base/latex.ltx +% memoir.cls +% poemscol/marn.sty, poemscol/newmarn.sty +% mparhack.sty +% * Unsupported \@addmarginpar patch: +% lineno.sty +% sttools/marginal.sty +% revtex4.cls +% +% History: 2000/08/27 v0.1: +% first published version +% (comp.text.tex, pdftex@tug.org) +% 2000/09/02 v0.2: +% * next try. +% 2000/09/02 v0.3: +% * solution without e-TeX added. +% 2000/09/06 v0.4: +% * Patch commands added. +% * Patch for seminar.cls added. +% 2000/09/06 v0.5: +% * Bug fix: initialization of \pec@value added. +% 2005/06/15 v0.6: +% * Support for \marginpar added. +% See thread in comp.text.tex +% (Message-ID: d86d3r$kpv$1@news.BelWue.DE). +% 2005/07/09 v0.7: +% * Output support added for memoir, +% provided by Lars Madsen. +% +\NeedsTeXFormat{LaTeX2e}[1997/11/09] +\ProvidesPackage{pdfcolmk}[2005/07/09 v0.7 PDFtex COLor MarK (HO)] + +\@ifundefined{ver@pdftex.def}{% + \PackageWarningNoLine{pdfcolmk}{% + Nothing to fix, because \string`pdftex.def\string' not loaded% + }% + \endinput +}{} +\@ifpackageloaded{color}{}{% + \PackageWarningNoLine{pdfcolmk}{% + Nothing to fix, because \string`color.sty\string' not loaded% + }% + \endinput +} + +\PackageInfo{pdfcolmk}{% + This package tries to simulate dvips's color stack\MessageBreak + for pdfTeX based on a mark register of e-TeX.\MessageBreak + It redefines LaTeX's output routine. Therefore\MessageBreak + use with care, no warranties% +} + +\ifx\marks\@undefined + + \let\pec@mark\mark + \let\pec@value\empty + \long\def\mark#1{% + \protected@xdef\pec@value{#1}% + \pec@setmark + } + \def\pec@setmark{% + \begingroup + \@temptokena\expandafter{\pec@value}% + \pec@mark{{\current@color}\the\@temptokena}% + \endgroup + } + \def\pec@getmark{% + \xdef\pec@botcolor{% + \expandafter\@firstofthree\botmark\@empty\@empty\@empty + }% + } + \long\def\@firstofthree#1#2#3{#1}% + \CheckCommand{\@leftmark}[2]{#1} + \CheckCommand{\@rightmark}[2]{#2} + \CheckCommand*{\leftmark}{% + \expandafter\@leftmark\botmark\@empty\@empty + } + \CheckCommand*{\rightmark}{% + \expandafter\@rightmark\firstmark\@empty\@empty + } + \long\def\@leftmark#1#2#3{#2} + \long\def\@rightmark#1#2#3{#3} + \g@addto@macro\leftmark\@empty + \g@addto@macro\rightmark\@empty + +\else + + \RequirePackage{etex}[1998/03/26] + \newmarks\pec@marks + \def\pec@setmark{\marks\pec@marks{\current@color}} + \def\pec@getmark{\xdef\pec@botcolor{\botmarks\pec@marks}} + +\fi + +% \marginpar fix + +\chardef\pec@result\z@ +\def\pec@temp#1{% + \chardef\pec@result\@ne + \begingroup + \let\on@line\@empty + \PackageInfo{pdfcolmk}{% + Patch for \string\@addmarginpar\space applied (#1)% + }% + \endgroup +} + +% Variant: latex/base/latex.ltx +\def\pec@addmarginpar{% + \@next\@marbox\@currlist{% + \@cons\@freelist\@marbox + \@cons\@freelist\@currbox + }\@latexbug + \@tempcnta\@ne + \if@twocolumn + \if@firstcolumn + \@tempcnta\m@ne + \fi + \else + \if@mparswitch + \ifodd\c@page + \else + \@tempcnta\m@ne + \fi + \fi + \if@reversemargin \@tempcnta -\@tempcnta \fi + \fi + \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi + \@tempdima\@mparbottom + \advance\@tempdima -\@pageht + \advance\@tempdima\ht\@marbox + \ifdim\@tempdima >\z@ + \@latex@warning@no@line{Marginpar on page \thepage\space moved}% + \else + \@tempdima\z@ + \fi + \global\@mparbottom\@pageht + \global\advance\@mparbottom\@tempdima + \global\advance\@mparbottom\dp\@marbox + \global\advance\@mparbottom\marginparpush + \advance\@tempdima -\ht\@marbox + \global\setbox\@marbox\vbox{% + \vskip \@tempdima + \box \@marbox + }% + \global \ht\@marbox \z@ + \global \dp\@marbox \z@ + \kern -\@pagedp + \nointerlineskip + \hb@xt@\columnwidth{% + \ifnum \@tempcnta >\z@ + \hskip\columnwidth + \hskip\marginparsep + \else + \hskip -\marginparsep + \hskip -\marginparwidth + \fi + \box\@marbox \hss + }% + \nointerlineskip + \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}% +} +\ifx\pec@addmarginpar\@addmarginpar + \pec@temp{latex/base}% +\fi + +% Variant: memoir.cls +\def\pec@addmarginpar{% + \checkoddpage + \@next\@marbox\@currlist{% + \@cons\@freelist\@marbox + \@cons\@freelist\@currbox + }\@latexbug + \@tempcnta\@ne + \if@twocolumn + \if@firstcolumn + \@tempcnta\m@ne + \fi + \else + \if@mparswitch + \ifoddpage + \else + \@tempcnta\m@ne + \fi + \fi + \if@reversemargin + \@tempcnta -\@tempcnta + \fi + \fi + \ifnum\@tempcnta <\z@ + \global\setbox\@marbox\box\@currbox + \fi + \@tempdima\@mparbottom + \advance\@tempdima -\@pageht + \advance\@tempdima\ht\@marbox + \ifdim\@tempdima >\z@ + \@latex@warning@no@line{% + Marginpar on page \thepage\space moved by \the\@tempdima + }% + \else + \@tempdima\z@ + \fi + \global\@mparbottom\@pageht + \global\advance\@mparbottom\@tempdima + \global\advance\@mparbottom\dp\@marbox + \global\advance\@mparbottom\marginparpush + \advance\@tempdima -\ht\@marbox + \global\setbox\@marbox\vbox{% + \vskip \@tempdima + \box \@marbox + }% + \global \ht\@marbox \z@ + \global \dp\@marbox \z@ + \kern -\@pagedp + \nointerlineskip + \hb@xt@\columnwidth{% + \ifnum \@tempcnta >\z@ + \hskip\columnwidth + \hskip\marginparsep + \else + \hskip -\marginparsep + \hskip -\marginparwidth + \fi + \box\@marbox + \hss + }% + \nointerlineskip + \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}% +}% +\ifx\pec@addmarginpar\@addmarginpar + \pec@temp{memoir.cls}% +\fi + +% Variant: poemscol/marn.sty, poemscol/newmarn.sty +\def\pec@addmarginpar{% + \@next \@marbox\@currlist{% + \@cons\@freelist\@marbox + \@cons\@freelist\@currbox + }\@latexbug + \global\advance\@mpar@count\m@ne + \@ifundefined{@marn@\the\@mpar@count @}{% was location logged last time? + \@tempcnta\@ne % NO: use original LaTeX logic + \if@twocolumn + \if@firstcolumn + \@tempcnta\m@ne + \fi + \else + \if@mparswitch + \ifodd\c@page + \else + \@tempcnta\m@ne + \fi + \fi + \if@reversemargin + \@tempcnta -\@tempcnta + \fi + \fi + }{% + \@tempcnta % YES: use record from last time to decide side. + \@nameuse{@marn@\the\@mpar@count @}% + \if@reversemargin -\fi \@ne + }% + \ifnum\@tempcnta <\z@ + \global\setbox\@marbox\box\@currbox + \global\let\@marnbottom\@mparbottoml + \else + \global\let\@marnbottom\@mparbottom + \fi + \@tempdima\@marnbottom \advance\@tempdima -\@pageht + \advance\@tempdima\ht\@marbox + \ifdim\@tempdima >\z@ + \@@warning{Marginpar on page \thepage\space moved}% + \else + \@tempdima\z@ + \fi + \global\@marnbottom\@pageht + \global\advance\@marnbottom\@tempdima + \global\advance\@marnbottom\dp\@marbox + \global\advance\@marnbottom\marginparpush + \advance\@tempdima -\ht\@marbox + \global\ht\@marbox\z@ + \global\dp\@marbox\z@ + \vskip -\@pagedp + \vskip\@tempdima\nointerlineskip + \hbox to\columnwidth{% + \ifnum \@tempcnta >\z@ + \hskip\columnwidth + \hskip\marginparsep + \else + \hskip -\marginparsep + \hskip -\marginparwidth + \fi + \if@filesw % record where this is for use next time: + \@marn@log\@mpar@count + \fi + \box\@marbox + \hss + }% + \nobreak %% RmS 91/06/21 \nobreak added + \vskip -\@tempdima + \nointerlineskip + \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}% +} +\ifx\pec@addmarginpar\@addmarginpar + \pec@temp{poemscol/(new)marn.sty}% +\fi + +% Variant: refman/refart.cls, refnam/refrep.cls +\def\pec@addmarginpar{% + \@next\@marbox\@currlist{% + \@cons\@freelist\@marbox + \@cons\@freelist\@currbox + }\@latexbug + \@tempcnta\@ne + \if@twocolumn + \if@firstcolumn + \@tempcnta\m@ne + \fi + \else + \@tempcnta\m@ne + \fi + \ifnum\@tempcnta <\z@ + \global\setbox\@marbox\box\@currbox + \fi + \@tempdima\@mparbottom + \advance\@tempdima -\@pageht + \advance\@tempdima\ht\@marbox + \ifdim\@tempdima >\z@ + \@@warning{Marginpar on page \thepage\space moved}% + \else + \@tempdima\z@ + \fi + \global\@mparbottom\@pageht + \global\advance\@mparbottom\@tempdima + \global\advance\@mparbottom\dp\@marbox + \global\advance\@mparbottom\marginparpush + \advance\@tempdima -\ht\@marbox + \global\setbox\@marbox\vbox{% + \vskip \@tempdima \box \@marbox + }% + \global \ht\@marbox \z@ + \global \dp\@marbox \z@ + \kern -\@pagedp + \nointerlineskip + \hb@xt@\columnwidth{% + \ifnum \@tempcnta >\z@ + \hskip\columnwidth + \hskip\marginparsep + \else + \hskip -\marginparsep + \hskip -\marginparwidth + \fi + \box\@marbox + \hss + }% + \nointerlineskip + \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}% +} +\ifx\pec@addmarginpar\@addmarginpar + \pec@temp{ref(art|rep).cls}% +\fi + +\ifcase\pec@result + \PackageInfo{pdfcolmk}{% + Fix for \string\@addmarginpar\space is omitted, % + because this variant\MessageBreak + of \string\@addmarginpar\space + is not recognized% + }% +\else + % apply patch for \@addmarginpar + \def\pec@PatchAddMarginpar#1\columnwidth#2#3\@nil{% + \pec@PatchAddMarginparI#2\@nil{#1}{#3}% + }% + \def\pec@PatchAddMarginparI#1\box\@marbox\hss#2\@nil#3#4{% + \def\@addmarginpar{% + #3% + \columnwidth{% + #1% + \pdfliteral{q}% + \rlap{% + \box\@marbox + }% + \pdfliteral{Q}% + \hss + #2% + }% + #4% + }% + }% + \expandafter\pec@PatchAddMarginpar\@addmarginpar\@nil +\fi + +% color fix + +\def\set@color{% + \pdfliteral{\current@color}% + \ifinner + \else + \pec@setmark + \fi + \aftergroup\reset@color +} +\def\reset@color{% + \pdfliteral{\current@color}% + \ifinner + \else + \pec@setmark + \fi +} + +\let\pec@botcolor\current@color + +\def\pec@PatchVBoxCCLV{% + \ifx\pec@botcolor\@empty + \else + \setbox\@cclv\vbox{% + \pdfliteral{\pec@botcolor}% + \unvbox\@cclv + }% + \fi + \pec@getmark +} + +\def\pec@PatchAlreadyInBox{% + \ifx\pec@botcolor\@empty + \else + \pdfliteral{\pec@botcolor}% + \fi + \pec@getmark +} + +\@ifclassloaded{memoir}{% + \expandafter\def\expandafter\mem@makecol\expandafter{% + \expandafter\pec@PatchVBoxCCLV + \mem@makecol + }% + \endinput +}{} + +\@ifclassloaded{seminar}{% + \newcommand\pec@org@makeslide{} + \let\pec@org@makeslide\@makeslide + \def\@makeslide{% + \pec@PatchVBoxCCLV + \pec@org@makeslide + }% + \endinput +}{} + +\long\def\pec@output#1\@specialoutput\else#2\pec@end{% + \begingroup + \def\x{#2}% + \expandafter\endgroup + \ifx\x\@empty + \PackageWarningNoLine{pdfcolmk}{% + Unexpected \string\output\space routine detected,% + \MessageBreak + loading of package stopped% + }% + \expandafter\endinput + \fi +} +\expandafter\expandafter\expandafter\pec@output +\expandafter\@firstofone\the\output\@specialoutput\else\pec@end + +\long\def\pec@output#1\@specialoutput\else#2\pec@end{% + \output{% + #1\@specialoutput\else + \pec@PatchVBoxCCLV + #2% + }% +} +\expandafter\expandafter\expandafter\pec@output +\expandafter\@firstofone\the\output\pec@end + +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/pdfcrypt.sty b/Master/texmf-dist/tex/latex/oberdiek/pdfcrypt.sty new file mode 100644 index 00000000000..fd8f39b0c00 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/pdfcrypt.sty @@ -0,0 +1,398 @@ +% File: pdfcrypt.sty +% Version: 2001/08/09 v0.6 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 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. +% +% Function: This package allows the setting of pdf encryption +% options for +% * pdfTeX, patched by Ricardo Sanchez Carmenes +% <carmenes@bioquimica.uniovi.es>. +% * VTeX, version 7.35, http://www.micropress-inc.com/. +% +% Required: pdfTeX-1.00a, pdfTeX-0.14h-pdfcrypt-20010310, +% pdfcrypt-20010331 +% or +% VTeX 7.35, tested with linux version. +% +% Use: The options can be set as package options or +% in the command \pdfcryptsetup: +% owner=OwnerPassword +% user=UserPassword +% print, copy, edit, annotate=true, false +% all, none +% debug +% The encryption is set at \begin{document} by default, +% but this can be forced for an earlier time +% by option `set'. +% Example: +% \usepackage[owner=Donald,user=Knuth,print=false]{pdfcrypt} +% ... +% \begin{document} +% or +% \usepackage{pdfcrypt} +% \pdfcryptsetup{owner=Donald,user=Knut} +% \pdfcryptsetup{print=false,set} +% ... +% \begin{document} +% +% The characters `{', `}', and `\' has to be +% escaped with `\'. Then the string should not +% be specified as package option but in with +% the macro \pdfcryptsetup, eg: +% \pdfcryptsetup{user={\{\\Hello\}},print=false} +% The password here is "{\Hello}". +% Active characters can be used and are not expanded. +% Macros except for \{, \}, and \\ should not be used +% and are not expanded. +% +% Hints for pdfTeX: +% * There are packages such as thumbpdf that ships out +% some stuff (\immediate\pdfobj{...}). In this cases +% \pdfcrypt will be ignored without warning or error +% message. Therefore package pdfcrypt should be +% loaded before and option "set" should be used in +% order to force the call of \pdfcrypt, for example: +% \usepackage{pdfcrypt} +% \pdfcryptsetup{..., set} +% ... +% \usepackage{thumbpdf} +% +% * Compiling pdfTeX (eg. version 1.00a-pretest-20010804): +% pdfTeX versions are available at +% ftp://ftp.cstug.cz/pub/tex/local/cstug/thanh/ +% pdftex/snapshots/ +% Unpack the latest .tgz file: +% > tar xzf pdftex-20010804.tgz +% Enable encryption support: +% src> cd src/texk/web2c/pdftexdir +% src/texk/web2c/pdftexdir> ln -fs pdfcrypt-full.c pdfcrypt.c +% Compile: +% src/texk/web2c/pdftexdir> cd ../../.. +% src> ./configure +% src> cd texk/web2c +% src/texk/web2c> make pdftexbin +% At last install the binary and pool files. +% +% History: 2001/04/02 v0.1: +% First public version, published in the pdftex +% mailing list for testing with pdfcrypt-20010331 +% 2001/07/19 v0.2: +% * Default: all allowed. +% * Support for VTeX added. +% 2001/07/19 v0.3: +% * Bug fix: VTeX letter for edit is M (modify). +% 2001/07/19 v0.4: +% * Bug fix: \VTeXversion is correct after +% regenerating the format file. +% 2001/08/05 v0.5: +% * Syntax change in pdfTeX 1.00a. +% 2001/08/09 v0.6: +% * Support of special characters: +% input: \{, \}, \\ for {, }, \ +% output: " in VTeX +% * Option debug added. + +\ProvidesPackage{pdfcrypt}% + [2001/08/09 v0.6 *TEST* Setting pdf encryption (HO)] + +\let\pc@driver\@empty +\let\pdfcryptsetup\@gobble +\begingroup + % pdfTeX detection + \@ifundefined{pdfoutput}{% + }{% + \ifcase\pdfoutput + \else + \@ifundefined{pdfcrypt}{% + \PackageError{pdfcrypt}{% + PDF encryption is not supported with this pdfTeX% + }{% + You need pdfTeX 3.14159-14h-pdfcrypt-20010310 or higher.% + }% + \endgroup\endinput + }{% + \gdef\pc@driver{pdftex}% + } + \fi + }% + % VTeX detection + \@ifundefined{OpMode}{% + }{% + \ifnum\OpMode=1 % + \ifnum\@ifundefined{VTeXversion}0\VTeXversion<735 % + \PackageError{pdfcrypt}{% + PDF encryption is not supported with this VTeX% + }{% + You need VTeX 7.35 or higher.% + }% + \endgroup\endinput + \else + \gdef\pc@driver{vtex}% + \fi + \fi + }% +\endgroup + +\RequirePackage{keyval} + +\newif\ifpc@set +\newif\ifpc@print +\newif\ifpc@copy +\newif\ifpc@edit +\newif\ifpc@annotate +\newif\ifpc@debug +\let\pc@owner\@empty +\let\pc@user\@empty + +% default: allow all +\pc@printtrue +\pc@copytrue +\pc@edittrue +\pc@annotatetrue + +\edef\pc@temp{\catcode`\noexpand\"=\the\catcode`\"\relax} +\@makeother\" +\def\pc@set{% + \PackageInfo{pdfcrypt}{% + \ifpc@debug + \ifx\pc@owner\@empty + No owner password% + \else + Owner password: `\pc@owner'% + \fi + \MessageBreak + \ifx\pc@user\@empty + No user password% + \else + User password: `\pc@user'% + \fi + \MessageBreak + Flags: % + \ifpc@print \else no\fi print, % + \ifpc@copy \else no\fi copy, % + \ifpc@edit \else no\fi edit, % + \ifpc@annotate\else no\fi annotate% + \MessageBreak + \fi + Encryption is set for `\pc@driver'% + } + \@ifundefined{pc@set@\pc@driver}{% + \ifx\pc@driver\@empty + \PackageError{pdfcrypt}{No driver for encryption % + support found}\@ehc + \else + \PackageError{pdfcrypt}{Cannot set encryption for % + unknown driver `\pc@driver'}\@ehc + \fi + }{% + \@nameuse{pc@set@\pc@driver}% + }% +} +\def\pc@set@pdftex{% + \ifnum\pdftexversion<100 % + \pc@set@pdftexold + \else + \pc@set@pdftexnew + \fi +} +\def\pc@set@pdftexold{% + \pdfcrypt{% + owner "\pc@owner" + user "\pc@user" + \ifpc@print \else no\fi print + \ifpc@copy \else no\fi copy + \ifpc@edit \else no\fi edit + \ifpc@annotate\else no\fi annotate% + }% +} +\def\pc@set@pdftexnew{% + \pdfcrypt + owner{\pc@owner}% + user{\pc@user}% + \ifpc@print \else no\fi print + \ifpc@copy \else no\fi copy + \ifpc@edit \else no\fi edit + \ifpc@annotate\else no\fi annotate% + \relax +} +\def\pc@set@vtex{% + \immediate\special{!security % + O=\pc@MakeVTeXString\pc@owner,% + U=\pc@MakeVTeXString\pc@user,% + P\ifpc@print +\else -\fi,% + C\ifpc@copy +\else -\fi,% + M\ifpc@edit +\else -\fi,% + A\ifpc@annotate +\else -\fi + }% +} +\def\pc@MakeVTeXString#1{% + "\expandafter\pc@@MakeVTeXString#1"\@nil"% +} +\def\pc@@MakeVTeXString#1"#2\@nil{% + #1% + \ifx\\#2\\% + \else + ""% + \@ReturnAfterFi{% + \pc@@MakeVTeXString#2\@nil + }% + \fi +} +\long\def\@ReturnAfterFi#1\fi{\fi#1} +\pc@temp + +\begingroup + \catcode`\ =12 \gdef\pc@spaceother{ }\catcode`\ =10\relax + \catcode`\|=0 % + \catcode`\\=12 % + |gdef|pc@DefString#1#2{% + |def#1{#2}% + |edef#1{|expandafter|strip@prefix|meaning#1}% + |edef#1{|expandafter|pc@SpaceToOther#1 |@nil}% + |edef#1{|expandafter|pc@EscapeRemove#1|@empty\|@empty|@nil}% + } + |gdef|pc@EscapeRemove#1\#2#3|@nil{% + #1#2% + |ifx|\#3|\% + |else + |@ReturnAfterFi{% + |pc@EscapeRemove#3|@nil + }% + |fi + } +|endgroup +\def\pc@SpaceToOther#1 #2\@nil{% + #1% + \ifx\\#2\\% + \else + \pc@spaceother + \@ReturnAfterFi{% + \pc@SpaceToOther#2\@nil + }% + \fi +} + +\def\pc@boolkey{\@dblarg\pc@@boolkey} +\def\pc@@boolkey[#1]#2#3{% + \lowercase{\def\pc@temp{#3}}% + \ifx\pc@temp\@empty + \let\pc@temp\pc@true + \fi + \ifx\pc@temp\pc@true + \else + \ifx\pc@temp\pc@false + \else + \let\pc@temp\relax + \fi + \fi + \ifx\pc@temp\relax + \PackageWarning{pdfcrypt}{% + Unexpected value \string`#3\string' of + option \string`#2\string'\MessageBreak + instead of + \string`true\string' or \string`false\string'% + }% + \else + \csname pc@#2\pc@temp\endcsname + \fi +} +\def\pc@true{true} +\def\pc@false{false} + +\define@key{pc}{set}[true]{% + \pc@boolkey{set}{#1}% +} +\define@key{pc}{pdftex}[]{% + \def\pc@driver{pdftex}% +} +\define@key{pc}{vtex}[]{% + \def\pc@driver{vtex}% +} +\define@key{pc}{print}[true]{% + \pc@boolkey{print}{#1}% +} +\define@key{pc}{copy}[true]{% + \pc@boolkey{copy}{#1}% +} +\define@key{pc}{edit}[true]{% + \pc@boolkey{edit}{#1}% +} +\define@key{pc}{annotate}[true]{% + \pc@boolkey{annotate}{#1}% +} +\define@key{pc}{all}[]{% + \pc@boolkey{print}{true}% + \pc@boolkey{copy}{true}% + \pc@boolkey{edit}{true}% + \pc@boolkey{annotate}{true}% +} +\define@key{pc}{none}[]{% + \pc@boolkey{print}{false}% + \pc@boolkey{copy}{false}% + \pc@boolkey{edit}{false}% + \pc@boolkey{annotate}{false}% +} + +\define@key{pc}{owner}{% + \pc@DefString\pc@owner{#1}% +} +\define@key{pc}{user}{% + \pc@DefString\pc@user{#1}% +} +\define@key{pc}{debug}[true]{% + \pc@boolkey{debug}{#1}% +} + +\def\pdfcryptsetup#1{% + \setkeys{pc}{#1}% + \ifpc@set + \pc@set + \global\let\pc@set\relax + \gdef\pdfcryptsetup##1{% + \PackageWarning{pdfcrypt}{% + Encryption options are already set\MessageBreak + new values are ignored% + }% + }% + \fi +} +\@onlypreamble\pdfcryptsetup + +% support of configuration file +\let\pc@ExecuteOptions\ExecuteOptions +\InputIfFileExists{pdfcrypt.cfg}{}{} +\let\ExecuteOptions\pc@ExecuteOptions + +% process global and local options +\def\pc@ProcessOptionsWithKV{% + \let\pc@temp\@empty + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@pc@\CurrentOption}{}{% + \edef\pc@temp{\pc@temp,\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + \edef\pc@temp{% + \noexpand\pdfcryptsetup{% + \pc@temp\@ptionlist{\@currname.\@currext}% + }% + }% + \pc@temp +} +\pc@ProcessOptionsWithKV +\AtEndOfPackage{\let\@unprocessedoptions\relax} +\AtBeginDocument{\pc@set} + +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty b/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty new file mode 100644 index 00000000000..0fc8932e243 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty @@ -0,0 +1,269 @@ +% File: pdflscape.sty +% Version: 2004/05/11 v0.3 +% Author: Heiko Oberdiek +% Email: oberdiek@uni-freiburg.de +% +% Copyright: Copyright (C) 2004 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. +% +% Function: Package `pdflscape' adds PDF support to the +% environment `landscape' of package `lscape' +% by setting the PDF page attribute `/Rotate'. +% Driver options: +% `pdftex' +% `dvips', `dvipsone', `pctex32', `pctexps' +% (and other drivers that provide a +% non-empty \Gin@PS@raw) +% `dvipdfm' +% +% Required: * The package `lscape'. +% +% Use: Load this package instead of package `lscape': +% \usepackage{pdflscape} +% \begin{landscape}...\end{landscape} +% +% History: 2001/01/15 v0.1: +% * first public version, +% published in de.comp.text.tex. +% 2001/02/04 v0.2: +% * minor documentation update. +% * CTAN. +% 2004/05/11 v0.3: +% * Support for dvipdfm added. +% +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{pdflscape} + [2004/05/11 v0.3 Landscape pages in PDF (HO)] +\let\PLS@driver\@empty +\DeclareOption{pdftex}{% + \PassOptionsToPackage\CurrentOption{lscape}% + \def\PLS@driver{pdftex}% +} +\DeclareOption{dvips}{% + \PassOptionsToPackage\CurrentOption{lscape}% + \def\PLS@driver{dvips}% +} +\DeclareOption{dvipsone}{% + \PassOptionsToPackage\CurrentOption{lscape}% + \def\PLS@driver{dvips}% +} +\DeclareOption{pctexps}{% + \PassOptionsToPackage\CurrentOption{lscape}% + \def\PLS@driver{dvips}% +} +\DeclareOption{dvipdfm}{% + \PassOptionsToPackage\CurrentOption{dvipdfm}% + \def\PLS@driver{dvipdfm}% +} +\DeclareOption*{\PassOptionsToPackage\CurrentOption{lscape}} +\ProcessOptions +\RequirePackage{lscape} + +% Autodetection of driver +\def\PLS@temp{pdftex} +\ifnum 1=0\ifx\pdfoutput\@undefined + \else + \ifx\pdfoutput\relax + \else + \ifnum\pdfoutput>0 % + 1% + \fi + \fi + \fi + \space + \ifx\PLS@driver\@empty + \let\PLS@driver\PLS@temp + \PackageInfo{pdflscape}{Auto-detected driver: `\PLS@temp'}% + \fi + \ifx\PLS@driver\PLS@temp + \else + \PackageError{pdflscape}{% + The driver option `\PLS@driver' is not compatible\MessageBreak + with pdfTeX in PDF mode, using driver `pdftex' instead% + }\@ehc + \let\PLS@driver\PLS@temp + \fi +\fi + +\def\PLS@temp{dvips} +\ifnum 1=0\ifx\Gin@PS@raw\@undefined + \else + \ifx\Gin@PS@raw\relax + \else + \ifx\Gin@PS@raw\@empty + \else + 1% + \fi + \fi + \fi + \space + \ifx\PLS@driver\@empty + \let\PLS@driver\PLS@temp + \PackageInfo{pdflscape}{Auto-detected driver: `\PLS@temp'}% + \fi + \ifx\PLS@driver\PLS@temp + \else + \PackageError{pdflscape}{% + The driver option `\PLS@driver' is not compatible\MessageBreak + with detected PostScript driver,\MessageBreak + Will try using driver `dvips'% + }\@ehc + \let\PLS@driver\PLS@temp + \fi +\fi + +% dvipdfm +\def\PLS@temp{dvipdfm.def} +\ifx\PLS@temp\Gin@driver + \def\PLS@temp{dvipdfm}% + \ifx\PLS@driver\@empty + \let\PLS@driver\PLS@temp + \PackageInfo{pdflscape}{Auto-detected driver: `\PLS@temp'}% + \fi + \ifx\PLS@driver\PLS@temp + \else + \PackageError{pdflscape}{% + Graphics driver `dvipdfm.def' is loaded, but this\MessageBreak + is incompatible with driver `\PLS@driver'.\MessageBreak + Will try using driver `dvipdfm'% + }\@ehc + \let\PLS@driver\PLS@temp + \fi +\fi + +\ifx\PLS@driver\@empty + \PackageError{pdflscape}{% + Neither pdfTeX, PostScript, nor dvipdfm driver found% + }\@ehc +\fi + +% Driver stuff: +% * \PLS@AddRotate#1 +% it expects the correct rotation number in #1 +% and implements the adding of the /Rotation entry +% in the /Page object of the current page. +% * \PLS@RemoveRotate +% it removes a previous /Rotate entry, if necessary. + +% Driver pdfTeX +\def\PLS@temp{pdftex} +\ifx\PLS@temp\PLS@driver + \def\PLS@AddRotate#1{% + \ifnum#1=0 + % already the default + \else + \global\pdfpageattr\expandafter{% + \the\pdfpageattr + /Rotate #1% + }% + \fi + } + % Removes a /Rotate entry. It has to be called inside + % a group. + \def\PLS@RemoveRotate{% + \global\pdfpageattr\expandafter{\expandafter}% + \expandafter\PLS@@RemoveRotate + \the\pdfpageattr /Rotate\@nil + } + \def\PLS@@RemoveRotate#1/Rotate#2\@nil{% + % append /Rotate free stuff to \pdfpageattr + \global\pdfpageattr\expandafter{\the\pdfpageattr#1}% + \ifx\\#2\\% + % ready, because the detected /Rotate is part of + % the end marker: /Rotate\@nil + \else + % first read in the argument of /Rotate, + % then continue parsing. + \afterassignment\PLS@@RemoveRotate + \count0=#2\@nil + \fi + } +\fi + +% Driver PostScript +\def\PLS@temp{dvips} +\ifx\PLS@temp\PLS@driver + \def\PLS@AddRotate#1{% + \ifnum#1=0 + \else + \Gin@PS@raw{% + [{ThisPage}\string<\string</Rotate #1\string>\string>% + /PUT pdfmark% + }% + \fi + }% + \let\PLS@RemoveRotate\relax +\fi + +% Driver dvipdfm +\def\PLS@temp{dvipdfm} +\ifx\PLS@temp\PLS@driver + \def\PLS@AddRotate#1{% + \ifnum#1=0 + \else + \special{pdf: put @thispage << /Rotate #1 >>}% + \fi + }% + \let\PLS@RemoveRotate\relax +\fi + +% Driver independent stuff +% +% The landscape environment is extended by +% adding the correct /Rotate entries. +\g@addto@macro{\landscape}{\PLS@Rotate{90}} +\g@addto@macro{\endlandscape}{\PLS@Rotate{0}} + +% Main macro, that sets the /Rotate entry. +% Argument: any TeX number or +% nothing, that means zero. +% Driver independent. +\def\PLS@Rotate#1{% + \begingroup + % 1. Check and validate the argument + \PLS@CheckAngle{#1}% + % 2. Delete an existing /Rotate entry + \PLS@RemoveRotate + % 3. Add /Rotate entry + \expandafter\PLS@AddRotate\expandafter{\the\count@}% + \endgroup +} + +% Validates the rotation angle. +% The result is stored in the count register \count@. +% Driver independent. +\def\PLS@CheckAngle#1{% + % noting means zero: + \ifx\\#1\\% + \count@=0 + \else + \count@=#1\relax + \fi + % normalise to interval -360 < \count@ < 360 + \@whilenum\count@>359\do{\addtocounter\count@ -360 }% + \@whilenum\count@<-359\do{\addtocounter\count@ 360 }% + % check values: 0, +/-90, +/-180, +/-270 + \ifnum 1=0\ifnum\count@=0 \else + \ifnum\count@=90 \else + \ifnum\count@=-90 \else + \ifnum\count@=180 \else + \ifnum\count@=-180 \else + \ifnum\count@=270 \else + \ifnum\count@=-270 \else + 1\fi\fi\fi\fi\fi\fi\fi\relax + \PackageError{pdflscape}{% + Invalid value \the\count@\space for /Rotate% + }\@ehc + \count@=0 + \fi +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/refcount.sty b/Master/texmf-dist/tex/latex/oberdiek/refcount.sty new file mode 100644 index 00000000000..12baec3f1c1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/refcount.sty @@ -0,0 +1,124 @@ +% File: refcount.sty +% Version: 2000/09/07 v2.0 +% Author: Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de> +% +% Function: Converting references to numbers. +% +% Copyright: Copyright (C) 1998, 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. +% +% Use: +% * Commands similar to LaTeX's \setcounter and \addtocounter, +% but that extracts the number value from a reference: +% \setcounterref, \addtocounterref +% \setcounterpageref, \addtocounterpageref +% They take two arguments: +% \...counter...ref{<LaTeX counter>}{<reference>} +% An undefined references produces the usual LaTeX warning +% and its value is assumed to be zero. +% Example: +% \newcounter{ctrA} +% \newcounter{ctrB} +% \refstepcounter{ctrA}\label{ref:A} +% \setcounterref{ctrB}{ref:A} +% \addtocounterpageref{ctrB}{ref:A} +% * Commands that can be used in expandible contexts: +% \getrefnumber, \getpagerefnumber +% They take one argument, the reference: +% \get...refnumber{<reference>} +% Because warnings and assignments cannot be used in +% expandible contexts, undefined references do not +% produce a warning, their values are assumed to be zero. +% Example: +% \label{ref:here}% somewhere +% \ifodd\getpagerefnumber{ref:here}% +% reference is on an odd page +% \else +% reference is on an even page +% \fi +% * The default for undefined references can be changed +% with macro \setrefcountdefault, for example this +% package calls: +% \setrefcountdefault{0} +% * This method of extracting the number is more safe +% than the use of the reference directly, because +% there are packages such as hyperref, that add +% additional stuff, so that the reference cannot +% be used as number any more. +% * If the reference does not contain a number, +% assignments to a counter will fail of course. +% * Tested with packages hyperref and calc. +% +% History: +% 1998/04/08 v1.0: +% * First public release, written as answer in the +% newsgroup `comp.text.tex' in the thread +% `Re: Adding a \ref to a counter?', date: 1998/08/04. +% 2000/09/07 v2.0: +% * Documentation added. +% * LPPL 1.2 +% * Package rewritten, new commands added. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{refcount} + [2000/09/07 v2.0 Converting references to numbers (HO)] + +\def\setrefcountdefault#1{% + \def\rc@default{#1}% +} +\setrefcountdefault{0} + +% \def\@car#1#2\@nil{#1} % defined in LaTeX kernel +\def\rc@cartwo#1#2#3\@nil{#2} + +% Generic command for "\{set,addto}counter{page,}ref": +% #1: \setcounter, \addtocounter +% #2: \@car (for \ref), \@cartwo (for \pageref) +% #3: LaTeX counter +% #4: reference +\def\rc@set#1#2#3#4{% + \expandafter\ifx\csname r@#4\endcsname\relax + \protect\G@refundefinedtrue % LaTeX: rerun warning + \@latex@warning{Reference `#4' on page \thepage\space + undefined}% + #1{#3}{\rc@default}% + \else + #1{#3}{% + \expandafter\expandafter\expandafter#2% + \csname r@#4\endcsname\rc@default\rc@default\@nil + }% + \fi +} + +% user commands: + +\newcommand*{\setcounterref}{\rc@set\setcounter\@car} +\newcommand*{\addtocounterref}{\rc@set\addtocounter\@car} +\newcommand*{\setcounterpageref}{\rc@set\setcounter\rc@cartwo} +\newcommand*{\addtocounterpageref}{\rc@set\addtocounter\rc@cartwo} + +\newcommand*{\getrefnumber}[1]{% + \expandafter\ifx\csname r@#1\endcsname\relax + \rc@default + \else + \expandafter\expandafter\expandafter\@car + \csname r@#1\endcsname\@nil + \fi +} +\newcommand*{\getpagerefnumber}[1]{% + \expandafter\ifx\csname r@#1\endcsname\relax + \rc@default + \else + \expandafter\expandafter\expandafter\rc@cartwo + \csname r@#1\endcsname\rc@default\rc@default\@nil + \fi +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/settobox.sty b/Master/texmf-dist/tex/latex/oberdiek/settobox.sty new file mode 100644 index 00000000000..5e46a1941b8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/settobox.sty @@ -0,0 +1,53 @@ +% File: settobox.sty +% Version: 2000/09/07 v1.1 +% Author: Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de> +% +% Function: Command for getting box sizes. +% +% Copyright: Copyright (C) 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. +% +% Use: +% For easier reusing of boxes, that can be saved +% with `\sbox' or environment `lrbox' commands +% are defined similar to \settowidth ... +% \settoboxwidth +% \settoboxheight +% \settoboxdepth +% \settoboxtotalheight +% They all take two arguments: +% \settobox...{<LaTeX length>}{<LaTeX box name>} +% +% Example: +% \newsavebox{\mybox} +% \newlength{\mylength} +% \sbox{\mybox}{Hello World} +% \settoboxwidth{\mylength}{\mybox} +% +% History: +% 2000/02/11 v1.0: +% * First public release, written as answer in the +% newsgroup `de.comp.text.tex' in the thread +% `Die Hoehe von Minipages und Bild', date: 2000/02/11. +% 2000/09/07 v1.1: +% * Documentation added. +% * CTAN release. +% +\NeedsTeXFormat{LaTeX2e}% +\ProvidesPackage{settobox}[2000/09/07 v1.1 Getting box sizes (HO)] +\newcommand*{\settoboxwidth}[2]{\setlength{#1}{\wd#2}} +\newcommand*{\settoboxheight}[2]{\setlength{#1}{\ht#2}} +\newcommand*{\settoboxdepth}[2]{\setlength{#1}{\dp#2}} +\newcommand*{\settoboxtotalheight}[2]{% + \setlength{#1}{\ht#2}% + \addtolength{#1}{\dp#2}% +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/tabularht.sty b/Master/texmf-dist/tex/latex/oberdiek/tabularht.sty new file mode 100644 index 00000000000..da3150adc1e --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/tabularht.sty @@ -0,0 +1,743 @@ +% File: tabularht.sty +% Version: 2005/10/18 v2.1 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 2005 Heiko Oberdiek. +% +% This work may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.3 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.3 or later is part of all distributions +% of LaTeX version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% Function: This package defines some environments that adds +% a height specification to tabular and array. +% +% Use: \usepackage{tabularht} +% +% The package provides the following environments +% that extend the tabular/array environment by +% a height specification as first argument: +% * tabularht, tabularht* +% * arrayht +% * tabularxht, tabularxht* +% (if package tabularx is loaded) +% +% The height argument allows a length specification, +% package calc is supported if used. This means, +% the tabular will have the specified height. +% You can also use the prefixes "to=" and "spread=". +% "to=" is the default, "spread=" means, the natural +% height of the tabular box is changed by the length +% after "spread=". +% Examples: +% \begin{tabularht}{1in} -> height is 1in +% \begin{tabularht}{to=1in} -> height is 1in +% \begin{tabularht}{spread=0pt} +% -> natural height, same as \begin{tabular} +% \begin{tabularht}{spread=1in} +% -> natural height increased by 1in +% +% \interrowspace{...} +% Adds space between table rows. It is essentially +% the same as \noalign{\vspace{...}}. +% \interrowfill +% Short for \interrowspace{\fill} +% \interrowstart ...\interrowstop +% Marker commands, useful for option `vlines'. +% +% Option `vlines'. +% +% Vertical lines are interrupted, if space is inserted +% in \noalign, \interrowspace, \addlinespace (booktabs), +% between double \hlines. This option tries to detect +% and add the vertical lines. The lines in a tabular +% with tabularht support (environments of this package) +% are numbered from left to right. The gap that is +% controlled by \interrowspace or inbetween \interrowstart +% and \interrowstop is then filled with the detected +% vertical lines. +% If only a limited selection of the lines should be +% drawn, the commands know an optional argument with a +% list of line numbers, e.g. +% \begin{tabularht}{50mm}{|l|l|} +% Hello & World\\ +% \interrowfill[1,3] +% Foo & Bar +% \end{tabularht} +% There are three lines, but the middle line is not drawn +% in the gap between the first and second row. +% Zero can be used to suppress all lines: +% \interrowspace[0]{10mm} +% The syntax of the commands with the optional argument +% with the line number list <list>. <list> is a comma +% separated list of numbers, <height> means the +% height specification described above with the optional +% prefixes "to=" or "spread=". +% \interrowspace[<list>]{<height>} +% \interrowfill[<list>] +% \interrowstart[<list>]...\interrowstop +% +% Option `vlines' is driver dependent and uses eTeX features. +% * `pdftex': pdfTeX in PDF mode. +% Here the positions of the lines are written with the +% help of the \pdfsavepos feature into the .aux file(s). +% Therefore you need two LaTeX runs to get the lines. +% * `dvips': +% Here, PostScript's currentpoint it used to get +% the line positions. The lines are then drawn at the end +% of the page. Thus one LaTeX/dvips run is sufficient +% for this option. +% * Other drivers: +% * PostScript drivers: probably possible, an end of page +% hook would be nice. +% * VTeX: with GeX (PostScript interpreter) probably possible. +% * dvipdfm: no idea. The big problem is, how to get the +% current position? +% +% Hint: See also package `tabularkv', it provides an interface, +% where most parameters for the environments can be given +% by key-value pairs. +% +% Caution: At last a caution warning, the package, especially the +% stuff of option `vlines' is experimental. +% +% Example 1: +% \documentclass{article} +% \usepackage{tabularht} +% +% \begin{document} +% \fbox{% +% \begin{tabularht*}{1in}{4in}{@{}l@{\extracolsep{\fill}}r@{}} +% upper left corner & upper right corner\\% +% \noalign{\vfill}% +% \multicolumn{2}{@{}c@{}}{bounding box}\\ +% \noalign{\vfill}% +% lower left corner & lower right corner\\ +% \end{tabularht*}% +% } +% \end{document} +% +% Example 2: +% \documentclass{article} +% \usepackage{booktabs} +% \usepackage[dvips,vlines]{tabularht} +% +% \begin{document} +% +% \begin{tabularht}{spread=0pt}{|l|l|} +% \hline +% First&Line\\ +% \hline +% \interrowstart +% \addlinespace[10mm] +% \interrowstop +% \hline +% Second&Line\\ +% \interrowstart +% \hline +% \hline +% \interrowstop +% Third&Line\\ +% \hline +% \interrowspace{10mm} +% \hline +% Fourth&Line\\ +% \hline +% \end{tabularht} +% +% \end{document} +% +% Limitations: +% * Vertical lines are interrupted by \noalign{\vfill}. +% +% Compatibility: +% * array, delarray, tabularx are supported. +% * There can be problems with packages that +% redefine \@array (or \@@array, \@tabarray) and +% \@arrayrule (for option vlines). +% * colortbl: it should at least work, but there isn't +% support for filling the gaps with color, neither +% the rules nor the backgrounds +% +% Installation: +% CTAN location: CTAN:macros/latex/contrib/oberdiek/tabularht.sty +% TDS location: TDS:tex/latex/oberdiek/tabularht.sty +% +% History: 2005/09/22 v1.0: +% * first public version +% 2005/10/16 v2.0: +% * height specification allows +% "to=..." or "spread=...", default is "to=". +% * option vlines added, drivers pdftex and dvips +% * \interrowspace, \interrowfil, and +% \interrowstart ...\interrowstop added +% 2005/10/18 v2.1: +% * fix for package colortbl, but the colors +% of colortbl remain unsupported. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tabularht}% + [2005/10/18 v2.1 Tabular with height specification] + +\let\@toarrayheight\@empty +\let\tabH@array@init\@empty + +\toks@={% + \begingroup + \long\def\x#1\vcenter\fi\fi\bgroup#2\@sharp#3#4\@nil{% + \endgroup + \gdef\@array[##1]##2{% + \tabH@array@init + #1% + \vcenter\fi\fi + \@toarrayheight + \bgroup + \let\@toarrayheight\@empty + #2\@sharp###3#4% + }% + }% + \expandafter\x\@array[#1]{#2}\@nil +} +\edef\tabH@patch@array{\the\toks@} +\def\tabH@patch@@array{% + \ifx\@array\@@array + \def\reserved@a{\let\@@array\@array}% + \else + \let\reserved@a\relax + \fi + \tabH@patch@array + \reserved@a +} +\tabH@patch@@array + +\@ifpackageloaded{array}{}{% + \AtBeginDocument{% + \@ifpackageloaded{array}{% + \tabH@patch@@array + }{}% + }% +} + +\def\tabH@setheight#1{% +\tracingmacros=1 + \tabH@@setheight#1==\@nil +} +\def\tabH@@setheight#1=#2=#3\@nil{% + \ifx\\#2#3\\% + \setlength{\dimen@}{#1}% + \edef\@toarrayheight{to\the\dimen@}% + \else + \edef\tabH@temp{\zap@space#1 \@empty}% + \ifx\tabH@temp\tabH@to + \else + \ifx\tabH@temp\tabH@spread + \else + \PackageError{tabularht}{% + Unknown height specifier % + `\expandafter\strip@prefix\meaning\tabH@temp'% + }{% + The height dimension for tabular height can be prefixed% + \MessageBreak + with `to=' or `spread=', default is `to='.% + }% + \let\tabH@temp\tabH@to + \fi + \fi + \setlength{\dimen@}{#2}% + \edef\@toarrayheight{\tabH@temp\the\dimen@}% + \fi +} +\def\tabH@to{to} +\def\tabH@spread{spread} + +% First argument is the height of the table, +% then the orignal arguments for tabular follow. +\newenvironment{tabularht}[1]{% + \tabH@setheight{#1}% + \tabular +}{% + \endtabular +} + +\newenvironment{tabularht*}[1]{% + \tabH@setheight{#1}% + \@nameuse{tabular*}% +}{% + \@nameuse{endtabular*}% +} + +\newenvironment{tabularhtx}[1]{% + \tabH@setheight{#1}% + \tabularx +}{% + \endtabularx +} + +\newenvironment{arrayht}[1]{% + \tabH@setheight{#1}% + \array +}{% + \endarray +} + +\def\interrowspace{% + \noalign\bgroup + \tabH@interrowspace +} +\newcommand*{\tabH@interrowspace}[2][]{% + \tabH@vspace{#1}{#2}% + \egroup +} +\def\interrowfill{% + \noalign\bgroup + \tabH@interrowfill +} +\newcommand*{\tabH@interrowfill}[1][]{% + \tabH@vspace{#1}{\fill}% + \egroup +} +\def\tabH@vspace#1#2{% + \tabH@vspace@start{#1}% + \vspace{#2}% + \tabH@vspace@stop +} +\let\tabH@vspace@start\@gobble +\let\tabH@vspace@stop\@empty + +\newcommand*{\interrowstart}{% + \noalign\bgroup + \tabH@interrowstart +} +\newcommand*{\tabH@interrowstart}[1][]{% + \tabH@vspace@start{#1}% + \egroup +} +\newcommand*{\interrowstop}{% + \noalign{\tabH@vspace@stop}% +} + +%%% Options + +\providecommand*{\tabH@driver}{} + +\DeclareOption{vlines}{% + \let\tabH@temp\relax +} +\DeclareOption{pdftex}{} +\DeclareOption{dvips}{% + \def\tabH@driver{dvips}% +} +\ProcessOptions*\relax + +\ifx\tabH@temp\relax +\else + \expandafter\endinput +\fi + +\begingroup + \@ifundefined{eTeXversion}{% + \PackageError{tabularht}{% + Option `vlines' requires eTeX% + }{% + Use of eTeX is recommended for LaTeX, see ltnews16.% + }% + \endgroup + \endinput + }{}% +\endgroup + +%%% Option vlines, driver independent stuff + +\newcounter{tabH@unique} +\setcounter{tabH@unique}{0} +\let\tabH@currenttab\@empty + +\def\tabH@array@init{% + \ifx\@toarrayheight\@empty + % ignore vertical lines of nested tabular environments + \let\tabH@currenttab\@empty + \else + \stepcounter{tabH@unique}% + \edef\tabH@currenttab{\the\c@tabH@unique}% + \fi +} + +\renewcommand*{\@arrayrule}{% + \@addtopreamble{% + \hskip -.5\arrayrulewidth + \ifx\tabH@currenttab\@empty + \else + \tabH@vrule{\tabH@currenttab}% + \fi + \begingroup + \csname CT@arc@\endcsname\vline + \endgroup + \hskip -.5\arrayrulewidth + }% +} +\let\tabH@arrayrule\@arrayrule +\AtBeginDocument{% + \@ifpackageloaded{colortbl}{% + \let\@arrayrule\tabH@arrayrule + }{}% +} + +\let\tabH@vrule\@gobble + + +%%% Driver pdftex + +\RequirePackage{ifpdf} +\ifpdf + \begingroup + \@ifundefined{pdfsavepos}{% + \PackageError{tabularht}{% + Your pdfTeX is too old% + }{% + \string\pdfsavepos\space is missing.% + }% + \endgroup + \csname fi\endcsname + \endinput + }{}% + + \let\on@line\@empty + \PackageInfo{tabularht}{% + Using driver `pdftex' because of pdfTeX in PDF mode% + }% + \endgroup + + \protected\def\tabH@vrule#1{% + \if@filesw + \pdfsavepos + \protected@write\@auxout{% + \let\tabH@lastxpos\relax + }{% + \tabH@aux@vrule{#1}{\tabH@lastxpos}% + }% + \fi + } + + \def\tabH@lastxpos{\the\pdflastxpos} + \def\tabH@lastypos{\the\pdflastypos} + + % The .aux file contains three commands: + % \tabH@aux@vrule{tabular id}{x position} + % \tabH@aux@vstart{tabular id}{row id}{x position}{y position} + % \tabH@aux@vstop{y position} + % + \AtBeginDocument{% + % The .aux files are read the first time before + % \AtBeginDocument and later at \end{document}. + % \tabH@aux@done is a marker to distinguish + % between these two readings. Only in the first + % case we need the \tabH@aux@... commands. + \let\tabH@aux@done\@empty + \if@filesw + \immediate\write\@mainaux{% + \@percentchar\@percentchar BeginProlog: tabularht + }% + % items in the aux file are executed, + % if tabularht is loaded + % and during the aux file read at \begin{document} only + \immediate\write\@mainaux{% + \detokenize{% + % the \tabH@aux@... commands are needed only if + % tabularht is loaded with driver pdftex. + \@ifundefined{tabH@aux@vrule}\@secondoftwo\@firstofone + {% + % disable commands except for the first .aux files reading + \@ifundefined{tabH@aux@done}\@gobble\@firstofone + }% + {% + \let\tabH@aux@vrule\@gobbletwo + \let\tabH@aux@vstart\@gobblefour + \let\tabH@aux@vstop\@gobble + }% + }% + }% + \immediate\write\@mainaux{% + \@percentchar\@percentchar EndProlog: tabularht + }% + \fi + } + + % the x positions of vrules are stored in + % \tabH@<tabcount>list with distinct values + \protected\def\tabH@aux@vrule#1#2{% + \@ifundefined{tabH@#1list}{% + \expandafter\xdef\csname tabH@#1list\endcsname{% + \noexpand\do{#2}% + }% + }{% + \begingroup + \def\x{#2}% + \let\y\@undefined + \let\do\tabH@do@add + \expandafter\xdef\csname tabH@#1list\endcsname{% + \csname tabH@#1list\endcsname\@empty + \ifx\y\@undefined + \noexpand\do{\x}% + \fi + }% + \endgroup + }% + } + \def\tabH@do@add#1{% + \ifx\y\@undefined + \ifnum#1<\x\space + \else + \expandafter\ifx\csname y\endcsname\relax\fi + \ifnum#1>\x\space + \noexpand\do{\x}% + \fi + \fi + \fi + \noexpand\do{#1}% + } + + \def\tabH@vspace@start#1{% + \if@filesw + \stepcounter{tabH@unique}% + \edef\tabH@currentrow{\the\c@tabH@unique}% + \pdfsavepos + \protected@write\@auxout{% + \let\tabH@lastxpos\relax + \let\tabH@lastypos\relax + }{% + \tabH@aux@vstart{\tabH@currenttab}{\tabH@currentrow}% + {\tabH@lastxpos}{\tabH@lastypos}% + }% + \fi + \begingroup + \edef\a{tabH@\tabH@currenttab row\tabH@currentrow}% + \expandafter\let\expandafter\x\csname\a x\endcsname + \ifx\x\relax + \else + \expandafter\let\expandafter\y\csname\a y\endcsname + \expandafter\let\expandafter\l + \csname tabH@\tabH@currenttab list\endcsname + \ifx\l\relax + \else + \def\f{#1}% + \ifx\f\@empty + \let\do\tabH@do@set + \else + \count@=\z@ + \let\do\tabH@do@filter + \fi + \setbox\z@=\hbox{\l}% + \wd\z@=\z@ + \dp\z@=\z@ + \copy\z@ + \fi + \fi + \endgroup + }% + \def\tabH@vspace@stop{% + \if@filesw + \pdfsavepos + \protected@write\@auxout{% + \let\tabH@lastypos\relax + }{% + \tabH@aux@vstop{\tabH@lastypos}% + }% + \fi + } + \def\tabH@do@set#1{% + \hbox to \z@{% + \hskip \dimexpr #1sp - \x sp\relax + \vrule \@width\arrayrulewidth + \@depth\dimexpr \y sp\relax + \hss + }% + } + \def\tabH@do@filter{% + \@tempswafalse + \advance\count@\@ne + \@for\e:=\f\do{% + \ifnum\e=\count@ + \@tempswatrue + \fi + }% + \if@tempswa + \expandafter\tabH@do@set + \else + \expandafter\@gobble + \fi + } + + \protected\def\tabH@aux@vstart#1#2#3#4{% + \def\tabH@current@vstart{{#1}{#2}{#3}{#4}}% + } + \protected\def\tabH@aux@vstop{% + \expandafter\tabH@aux@v\tabH@current@vstart + } + \def\tabH@aux@v#1#2#3#4#5{% + \expandafter\gdef\csname tabH@#1row#2x\endcsname{#3}% + \expandafter\xdef\csname tabH@#1row#2y\endcsname{% + \the\numexpr #4 - #5\relax + }% + } + + \csname fi\endcsname + \endinput + +\fi + +%%% DVI drivers + +\ifx\tabH@driver\@empty + \PackageError{tabularht}{% + Missing DVI driver, option `vlines' disabled% + }{% + Supported DVI drivers: dvips.% + }% + \expandafter\endinput +\fi + +\def\tabH@driver@dvips{% + \def\tabH@literalps##1{\special{ps:SDict begin ##1 end}}% + \def\tabH@headerps##1{\special{! ##1}}% +} + +\@onelevel@sanitize\tabH@driver +\@ifundefined{tabH@driver@\tabH@driver}{% + \PackageError{tabularht}{% + Unsupported driver `\tabH@driver'% + }{% + Supported DVI drivers: dvips.% + }% + \endinput +}{} + +\begingroup + \let\on@line\@empty + \PackageInfo{tabularht}{% + Using driver `\tabH@driver'% + }% +\endgroup +\csname tabH@driver@\tabH@driver\endcsname + +\protected\def\tabH@vrule#1#2\vrule#3\arrayrulewidth{% + #2% \fi or empty + % hack to get rid of maxdrift rounding of dvips, + % thus simulate a large motion + \kern1in\relax + \tabH@literalps{% + #1 tabH.vrule + Resolution neg 0 translate% + }% + \vrule#3\arrayrulewidth + \tabH@literalps{Resolution 0 translate}% + \kern-1in\relax +} + +\def\tabH@vspace@start#1{% + \begingroup + \let\y\@empty + \@for\x:=#1\do{% + \ifx\y\@empty + \edef\y{\x}% + \else + \edef\y{\y\space\x}% + \fi + }% + \tabH@literalps{\tabH@currenttab[\y]currentpoint exch pop}% + \endgroup +} +\def\tabH@vspace@stop{% + \tabH@literalps{% + currentpoint exch pop % + \number\dimexpr\arrayrulewidth\relax\space + tabH.vspace% + }% +} + +\tabH@headerps{% + userdict begin + /tabH.list 10 dict def + /tabH.job [] def + end% + /tabH.vrule{% + 10 string cvs cvn dup tabH.list exch known{% + tabH.list exch dup [ exch tabH.list exch get + currentpoint pop round exch true exch{% + % tabH.list key [ ... x true i + % tabH.list key [ ... false i + exch{% + % ... [ ... x i + 2 copy lt{false}{% + 2 copy eq{pop false}{exch true}ifelse% + }ifelse + }{false}ifelse + }forall + pop% + ]put% + }{% + tabH.list exch[currentpoint pop round]put + }ifelse + }bind def + % <tab num> <cols array> <ytop> <ybottom> <rulewidth[sp]> + /tabH.vspace{% + userdict begin + 10 dict dup begin + exch 65536 div Resolution mul 72.27 div + % dvips uses a poor man's ceil function + % see dopage.c before "drawrule": (int)(... + 0.9999999) + 0.9999999 add truncate% + /rulewidth exch def + exch/ybottom exch def + exch/ytop exch def + exch/cols exch def + exch/tabkey exch 10 string cvs cvn def + end + /tabH.job exch[exch userdict/tabH.job get aload pop]def + end% + }bind def + % Now we do the work at the end of the page. + % Unhappily "eop-hook" cannot be used, because "eop" + % executes "restore" before, so that all data are lost. + TeXDict begin% + /eop% + [% + {% + tabH.job{% + begin% + /colarray + tabH.list tabkey known{tabH.list tabkey get}{[]}ifelse + def + cols length 0 eq not{% + /colarray[% + cols{1 sub + dup 0 lt{pop}{% + dup colarray length ge{pop}{% + colarray exch get% + }ifelse% + }ifelse% + }forall% + ]def% + }if + colarray{% + % (rulewidth) == rulewidth == % debug + Resolution sub + ytop rulewidth ytop ybottom sub v + }forall + end + }forall + % tabH.list{== ==}forall % debug + }bind aload pop + TeXDict /eop get aload pop + ]cvx def + end% +} +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/tabularkv.sty b/Master/texmf-dist/tex/latex/oberdiek/tabularkv.sty new file mode 100644 index 00000000000..6d84a1f82e1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/tabularkv.sty @@ -0,0 +1,107 @@ +% File: tabularkv.sty +% Version: 2005/07/22 v1.0 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 2005 Heiko Oberdiek. +% +% This work may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.3 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.3 or later is part of all distributions +% of LaTeX version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% Function: This package adds a key value interface for tabular +% by the new environment "tabularkv". Thus the TeX +% source code looks better by named parameters, +% especially if package "tabularht" is used. +% +% Use: \usepackage{tabularkv} +% +% The package provides the environment "tabularkv" +% that takes an optional argument with tabular +% parameters: +% * width (width specification, "tabular*" is used) +% * x (width specification, "tabularx" is used, +% package "tabularx" must be loaded) +% * height (height specification, see package tabularht) +% * valign (vertical positioning, this option is optional) +% values: top, bottom, center +% +% Parameter "valign" optional, the following are +% equivalent: +% \begin{tabularkv}[..., valign=top]{l}...\end{tabularkv} +% \begin{tabularkv}[...][t]{l}...\end{tabularkv} +% +% Example: +% \documentclass{article} +% \usepackage{tabularkv} +% +% \begin{document} +% \fbox{% +% \begin{tabularkv}[ +% width=4in, +% height=1in, +% valign=center +% ]{@{}l@{\extracolsep{\fill}}r@{}} +% upper left corner & upper right corner\\% +% \noalign{\vfill}% +% \multicolumn{2}{@{}c@{}}{bounding box}\\ +% \noalign{\vfill}% +% lower left corner & lower right corner\\ +% \end{tabularkv}% +% } +% \end{document} +% +% Installation: +% CTAN location: CTAN:macros/latex/contrib/oberdiek/tabularkv.sty +% TDS location: TDS:tex/latex/oberdiek/tabularkv.sty +% +% History: 2005/09/22 v1.0: +% * first public version, +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tabularkv} + [2005/09/22 v1.0 Key value interface for tabular parameters] + +\RequirePackage{keyval} +\RequirePackage{tabularht} + +\let\tabKV@star@x\@empty +\let\tabKV@width\@empty +\let\tabKV@valign\@empty + +\define@key{tabKV}{height}{% + \setlength{\dimen@}{#1}% + \edef\@toarrayheight{to\the\dimen@}% +} +\define@key{tabKV}{width}{% + \def\tabKV@width{{#1}}% + \def\tabKV@star@x{*}% +} +\define@key{tabKV}{x}{% + \def\tabKV@width{{#1}}% + \def\tabKV@star@x{x}% +} +\define@key{tabKV}{valign}{% + \edef\tabKV@valign{[\@car #1c\@nil]}% +} + +\newenvironment{tabularkv}[1][]{% + \setkeys{tabKV}{#1}% + \@nameuse{% + tabular\tabKV@star@x\expandafter\expandafter\expandafter + }% + \expandafter\tabKV@width\tabKV@valign +}{% + \@nameuse{endtabular\tabKV@star@x}% +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/oberdiek/twoopt.sty b/Master/texmf-dist/tex/latex/oberdiek/twoopt.sty new file mode 100644 index 00000000000..f27201202a1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/twoopt.sty @@ -0,0 +1,104 @@ +%% +%% This is file `twoopt.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% twoopt.dtx (with options: `package') +%% +%% 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>. +%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{twoopt} + [1999/04/12 v1.3 Definitions with two optional arguments (HO)] +%% \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 \~} +%% +\newcommand{\newcommandtwoopt}{% + \@ifstar{\@newcommandtwoopt*}{\@newcommandtwoopt{}}% +} +\newcommand{\@newcommandtwoopt}{} +\long\def\@newcommandtwoopt#1#2{% + \expandafter\@@newcommandtwoopt + \csname2\string#2\endcsname{#1}{#2}% +} +\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}]% +} +\newcommand{\renewcommandtwoopt}{% + \@ifstar{\@renewcommandtwoopt*}{\@renewcommandtwoopt{}}% +} +\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}% +} +\newcommand{\providecommandtwoopt}{% + \@ifstar{\@providecommandtwoopt*}{\@providecommandtwoopt{}}% +} +\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 + }% +} +\newcommand{\to@ScanSecondOptArg}[3]{% + \@ifnextchar[{% + \expandafter#1\to@ArgOptToArgArg{#2}% + }{% + #1{#2}{#3}% + }% +} +\newcommand{\to@ArgOptToArgArg}{} +\long\def\to@ArgOptToArgArg#1[#2]{{#1}{#2}} +\endinput +%% +%% End of file `twoopt.sty'. diff --git a/Master/texmf-dist/tex/latex/oberdiek/vpe.sty b/Master/texmf-dist/tex/latex/oberdiek/vpe.sty new file mode 100644 index 00000000000..0271ce64df6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/vpe.sty @@ -0,0 +1,820 @@ +% File: vpe.sty +% Project: vpe +% Version: 2000/09/15 v0.1 +% Author: Heiko Oberdiek +% +% Function: Source specials for pdf files. +% +% Copyright: Copyright (C) 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. +% +% See file `vpe.txt' for a list of files that +% belong to this project. +% +% Requirement: * Linux/Unix or Windows/Dos +% * enabled \write18 feature. +% * LaTeX2e +% +% Use: * \usepackage{vpe} +% See file `vpe.txt' for further documentation. +% +% History: 2000/09/15 v0.1: first public release +% +% \vpe@ is the prefix for internal command names. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{vpe}% +[2000/09/15 v0.1 Source specials for pdf files (HO)] + +\RequirePackage{keyval} + +%*** options + +%*** active/inactive +\DeclareOption{active}{\vpe@oktrue} +\DeclareOption{inactive}{\vpe@okfalse} +\newif\ifvpe@ok +\vpe@oktrue + +%*** dupes +\DeclareOption{dupes}{\vpe@dupestrue} +\DeclareOption{nodupes}{\vpe@dupesfalse} +\newif\ifvpe@dupes +\vpe@dupestrue + +%*** form, revert, acroform +\DeclareOption{form}{\vpe@formtrue} +\DeclareOption{noform}{\vpe@formfalse} +\newif\ifvpe@form +\vpe@formfalse +\DeclareOption{acroform}{\vpe@acroformtrue} +\DeclareOption{noacroform}{\vpe@acroformfalse} +\newif\ifvpe@acroform +\vpe@acroformtrue + +%*** debug +\DeclareOption{debug}{% + \def\vpe@debug#1{\typeout{*** #1 ***}}% +} +\let\vpe@debug\@gobble + +%*** system +\DeclareOption{linux}{\def\vpe@system{linux}} +\DeclareOption{unix}{\def\vpe@system{linux}} +\DeclareOption{win}{\def\vpe@system{win}} +\DeclareOption{dos}{\def\vpe@system{win}} +\let\vpe@system\@empty + + +%*** driver specific options +\DeclareOption{pdftex}{\let\vpe@annot\vpe@annotpdftex} +\DeclareOption{dvips}{\let\vpe@annot\vpe@annotdvips} +\DeclareOption{ps2pdf}{\let\vpe@annot\vpe@annotdvips} +\DeclareOption{pdfmark}{\let\vpe@annot\vpe@annotdvips} +\def\vpe@annotpdftex#1{\pdfannot\vpe@rule{#1}} +\def\vpe@dvips@pdfmark#1{\special{ps:SDict begin[#1 pdfmark end}} +\def\vpe@annotdvips#1{% + \vpe@dvips@pdfmark{% + /Rect[% + currentpoint + exch 1 72 div Resolution mul sub + exch \vpe@depth\space 1 add 72 div Resolution mul add + currentpoint + exch \vpe@width\space 1 add 72 div Resolution mul add + exch \vpe@height\space 1 add 72 div Resolution mul sub% + ]% + #1% + /ANN% + }% +} +\let\vpe@annot\vpe@annotdvips + + +\DeclareOption{everyhbox}{\vpe@everyhboxtrue} +\DeclareOption{noeveryhbox}{\vpe@everyhboxfalse} +\newif\ifvpe@everyhbox + +%*** disable options +\DeclareOption*{% + \expandafter\let\csname vpeorg@\expandafter + \@gobbletwo\CurrentOption\@empty\@empty\endcsname \@empty% +} + +%*** keyval options +\def\vpe@revert#1#2{% + \expandafter\ifx\csname vpe@#1\endcsname\relax + \else + \csname vpe@#1% + \@gobble\iftrue\csname if#1\endcsname + false% + \else + true% + \fi + \endcsname + \fi +} + +\define@key{vpe}{active}[true]{\csname vpe@ok#1\endcsname} +\define@key{vpe}{inactive}[true]{\vpe@revert{ok}{#1}} +\define@key{vpe}{dupes}[true]{\csname vpe@dupes#1\endcsname} +\define@key{vpe}{nodupes}[true]{\vpe@revert{dupes}{#1}} +\define@key{vpe}{form}[true]{\csname vpe@form#1\endcsname} +\define@key{vpe}{noform}[true]{\vpe@revert{form}{#1}} +\define@key{vpe}{acroform}[true]{\csname vpe@acroform#1\endcsname} +\define@key{vpe}{noacroform}[true]{\vpe@revert{acroform}{#1}} +\define@key{vpe}{command}{\def\vpe@command{#1}} +\define@key{vpe}{system}{\def\vpe@system{#1}} +\define@key{vpe}{width}{\def\vpe@width{#1}} +\define@key{vpe}{height}{\def\vpe@height{#1}} +\define@key{vpe}{depth}{\def\vpe@depth{#1}} +\define@key{vpe}{color}{\def\vpe@color{#1}} +\define@key{vpe}{border}{\def\vpe@border{#1}} +\define@key{vpe}{flag}{\def\vpe@flag{#1}} +\define@key{vpe}{attr}{\def\vpe@attr{#1}} +\define@key{vpe}{application}{\def\vpe@application{#1}} +\define@key{vpe}{parameters}{\def\vpe@parameters{#1}} +\define@key{vpe}{progname}{\def\vpe@progname{#1}} +\define@key{vpe}{everyhbox}[true]{\csname vpe@everyhbox#1\endcsname} +\def\vpesetup{\setkeys{vpe}} +\def\vpe@command{vpe} +\def\vpe@width{12} +\def\vpe@height{12} +\def\vpe@depth{2} +\def\vpe@border{0 0 1} +\def\vpe@color{1 1 0} +\def\vpe@flag{0}% 8 = not zoomed, 16 = not rotated +\let\vpe@attr\@empty +\def\vpe@application{pfe.exe} +\def\vpe@parameters{-g $d $s} +\newif\ifvpe@pdftex +\ifx\eTeXversion\@undefined + \def\vpe@progname{latex} +\else + \def\vpe@progname{elatex} +\fi +\ifx\pdfoutput\@undefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \let\vpe@annot\vpe@annotpdftex + \vpe@pdftextrue + \ifx\eTeXversion\@undefined + \def\vpe@progname{pdflatex}% + \else + \def\vpe@progname{pdfelatex}% + \fi + \fi + \fi +\fi + +%*** option processing + +\InputIfFileExists{vpe.cfg}{}{} + +\ProcessOptions + +%*** help file +% File for read informations of commands +% launched by \write18: +\newread\vpe@read +\immediate\openout\vpe@read=\jobname.vpe +\immediate\closeout\vpe@read +\openin\vpe@read=\jobname.vpe + +%*** get system info +\ifx\vpe@system\@empty + \immediate\write18{\vpe@command\space -system \jobname.vpe} + \def\vpesystem#1{\gdef\vpe@system{#1}}% + \begingroup + \endlinechar-1 % + \read\vpe@read to \vpe@temp + \vpe@temp + \endgroup + \ifx\vpe@system\@empty + \PackageWarningNoLine{vpe}{% + Option \string`system\string' is not specified and\MessageBreak + the automatic detection failed,\MessageBreak + therefore package loading is aborted% + }% + \closein\vpe@read + \let\VPE\relax + \expandafter\expandafter\expandafter\endinput + \fi +\fi +\let\vpesystem\@gobble + +\newif\ifvpe@linux +\def\vpe@temp{linux} +\ifx\vpe@system\vpe@temp + \vpe@linuxtrue +\else + \def\vpe@temp{win} + \ifx\vpe@system\vpe@temp + \else + \PackageWarningNoLine{vpe}{% + Unknown value `\vpe@system' of option \string`system\string',% + \MessageBreak + therfore package loading is aborted% + }% + \closein\vpe@read + \let\VPE\relax + \expandafter\expandafter\expandafter\endinput + \fi +\fi + +%*** /AcroForm in the catalog for `revert' menu item of AR4.05 +\ifvpe@acroform + \ifvpe@pdftex + \AtEndDocument{% + \@ifundefined{SubmitObject}{% + \pdfcatalog{/AcroForm<</Fields[]/NeedAppearances true>>}% + }{% + % /AcroForm already set by hyperref's pdftex driver + }% + }% + \else + \vpe@dvips@pdfmark{% + \string{Catalog\string}% + <</AcroForm<</Fields[]/NeedAppearances true>>>>% + /PUT% + }% + \fi +\fi + +%*** form variant + +% definition without form: +\def\vpe@insertmark{% + \vpe@annot{% + /Subtype/Link% + \ifx\vpe@border\vpe@borderdefault + \else + /Border[\vpe@border]% + \fi + \ifx\vpe@color\vpe@colordefault + \else + /C[\vpe@color]% + \fi + \ifnum\vpe@flag=0 + \else + /F \vpe@flag + \fi + /A<<% + /Type/Action% + /S/Launch% + \ifvpe@linux + /F(\vpe@temp\vpe@removeslash\vpe@peekfile.vpe)% + \else + /Win<<% + /F(\vpe@application)% + /P(\vpe@temp)% + >>% + \fi + >>% + \vpe@attr + }% +}% + +\ifvpe@form + \ifvpe@pdftex + + \RequirePackage[pdftex]{color} + \RequirePackage{pifont} + + \newcount\vpe@count + \vpe@count0 + + \setbox\@tempboxa=\hbox{% + \color{yellow}% + \raisebox{-.4\totalheight}{% + \ding{56}% + }% + } + \edef\vpe@mark@width{\the\wd\@tempboxa} + \edef\vpe@mark@height{\the\ht\@tempboxa} + \edef\vpe@mark@depth{\the\dp\@tempboxa} + \immediate\pdfxform\@tempboxa + \edef\vpe@mark@objN{ \the\pdflastxform\space 0 R} + \setbox\@tempboxa=\hbox{% + \colorbox{yellow}{% + \color{black}% + \ding{56}% + }% + } + \immediate\pdfxform\@tempboxa + \edef\vpe@mark@objD{ \the\pdflastxform\space 0 R} + + \def\vpe@insertmark{% + \global\advance\vpe@count1 % + \begingroup + \setbox\@tempboxa\hbox{% + \normalfont + \kern\vpe@mark@width + \scriptsize\ttfamily + \setlength{\fboxsep}{0.5ex}% + \colorbox{yellow}{% + \color{black}% + \space\vpe@peekfile, \vpe@line + }% + }% + \dimen@\ht\@tempboxa + \advance\dimen@-\vpe@mark@height + \advance\dimen@-\vpe@mark@depth + \edef\vpe@temp{% + width\the\wd\@tempboxa + height\the\dimen@ + }% + \dimen@\dp\@tempboxa + \advance\dimen@\vpe@mark@height + \advance\dimen@\vpe@mark@depth + \edef\vpe@temp{% + \vpe@temp + depth\the\dimen@ + }% + \immediate\pdfxform\@tempboxa + \pdfannot\vpe@temp{% + /Subtype/Widget% + /FT/Btn% + /Ff 65537% readonly (bit 1) + checkbox button (bit 17) + /T(v\the\vpe@count)% + /AS/X% + /AP<</N<</F \the\pdflastxform\space 0 R>>>>% + }% + \endgroup + \pdfannot width\vpe@mark@width + height\vpe@mark@height + depth\vpe@mark@depth{% + /Subtype/Widget% + /FT/Btn% + /Ff 65536% + /T(m\the\vpe@count)% + /H/P% + /AP<</N\vpe@mark@objN/D\vpe@mark@objD>>% + /AA<<% + /E<<% + /Type/Action% + /S/SetState% + /T(v\the\vpe@count)% + /AS/F% + >>% + /X<<% + /Type/Action% + /S/SetState% + /T(v\the\vpe@count)% + /AS/X% + >>% + >>% + /A<<% + /Type/Action% + /S/Launch% + \ifvpe@linux + /F(\vpe@temp\vpe@removeslash\vpe@peekfile.vpe)% + \else + /Win<<% + /F(\vpe@application)% + /P(\vpe@temp)% + >>% + \fi + >>% + \vpe@attr + }% + }% + \fi +\fi +\let\vpe@formtrue\relax +\let\vpe@formfalse\relax + +%*** src marker + +\def\vpe@src{\vpe@special{\the\inputlineno}} +\def\vpe@src@sphack{\vpe@special@sphack{\the\inputlineno}} +\def\vpe@srcfirst{\vpe@special1} +\def\vpe@srclast{\vpe@special\vpe@peeklast} + +\let\VPE\vpe@src + +\newif\ifvpe@document +\AtBeginDocument{% + \vpe@documenttrue + \vpe@src +} + +\def\vpe@special{% + \ifcase + \ifvpe@ok + \ifvpe@document + \ifnum\lastpenalty=\z@ + \ifdim\lastskip=\z@ + \else 1% + \fi + \else 1% + \fi + \else 1% + \fi + \else 1% + \fi + 0 % + \expandafter\vpe@@special + \else + \expandafter\@gobble + \fi +} +\def\vpe@special@sphack{% + \ifcase + \ifvpe@ok + \ifvpe@document + \ifhmode + \else 1% + \fi + \else 1% + \fi + \else 1% + \fi + 0 % + \expandafter\vpe@@special + \else + \expandafter\@gobble + \fi +} +\let\vpe@lastspecial\@empty +\def\vpe@@special#1{% + \begingroup + \vpe@okfalse % prevent nesting + \let\vpe@temp\vpe@lastspecial + \xdef\vpe@lastspecial{#1 \vpe@peekfile}% + \ifvpe@dupes + \vpe@@@special{#1}% + \else + \ifx\vpe@temp\vpe@lastspecial + \else + \vpe@@@special{#1}% + \fi + \fi + \endgroup +} +\def\vpe@@@special#1{% + \count@=#1\relax + \ifnum\count@<1 \count@=1 \fi + \edef\vpe@line{\the\count@}% + \ifvpe@linux + \let\vpe@temp\@empty + \expandafter\vpe@scan\the\count@\@nil + \vpe@debug{SRC: \vpe@peekfile, \vpe@line\space(\vpe@temp)}% + \else + \let\vpe@temp\vpe@parameters + \expandafter\vpe@setline\vpe@temp$d\@nil{\the\count@}% + \expandafter\vpe@setfile\vpe@temp$s\@nil\vpe@peekfile + \vpe@debug{SRC: \vpe@peekfile, \vpe@line}% + \fi + \vpe@insertmark +} + +\def\vpe@rule{% + width\vpe@width bp height\vpe@height bp depth\vpe@depth bp% +} +\def\vpe@borderdefault{0 0 1} +\def\vpe@colordefault{0 0 0} +\def\vpe@scan#1#2\@nil{% + \count@=#1\relax + \ifnum\count@>\ifx\vpe@temp\@empty 5 \else 4 \fi + \advance\count@ by -5 + \def\p{.}% + \else + \let\p\@empty + \fi + \@whilenum\count@>0 \do{% + \advance\count@ by -1 + \edef\vpe@temp{\vpe@temp/}% + }% + \edef\vpe@temp{\vpe@temp\p./}% + \ifx\\#2\\% + \else + \@ReturnAfterFi{% + \vpe@scan#2\@nil + }% + \fi +} +\long\def\@ReturnAfterFi#1\fi{\fi#1} + +\def\vpe@removeslash#1{% + \if/#1% + \else + #1% + \fi +} + +\def\vpe@setline#1$d#2\@nil#3{% + \ifx\limits#2\limits + \else + \edef\vpe@temp{#1#3\vpe@remline#2\@nil}% + \fi +} +\def\vpe@remline#1$d\@nil{#1} +\def\vpe@setfile#1$s#2\@nil#3{% + \ifx\limits#2\limits + \else + \def\vpe@temp{#1#3\vpe@remfile#2\@nil}% + \fi +} +\def\vpe@remfile#1$s\@nil{#1} + +%*** def check +\def\vpe@redef#1{% + \expandafter\ifx\csname vpeorg@#1\endcsname\@empty + \begingroup + \let\on@line\@empty + \PackageInfo{vpe}{src marker in % + \expandafter\string\csname #1\endcsname\space + disabled% + }% + \endgroup + \expandafter\@gobble + \else + \expandafter\let + \csname vpeorg@#1\expandafter\endcsname + \csname #1\endcsname + \expandafter\@firstofone + \fi +} +% #1: active character or special case (eg: ~, \\) +% #2: string for command names (eg: TILDE, NL) +\def\vpe@redefspecial#1#2{% + \expandafter\ifx\csname vpeorg@#2\endcsname\@empty + \begingroup + \let\on@line\@empty + \PackageInfo{vpe}{src marker in \string#1 disabled}% + \endgroup + \expandafter\@gobble + \else + \expandafter\let\csname vpeorg@#2\endcsname#1% + \expandafter\@firstofone + \fi +} +\def\vpe@check#1{% + \expandafter\ifx\csname vpeorg@#1\endcsname\@empty + \begingroup + \let\on@line\@empty + \PackageInfo{vpe}{src marker in % + \expandafter\string\csname #1\endcsname\space + disabled% + }% + \endgroup + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} + +%*** file name stack +\newcount\vpe@sp % stack pointer +\global\vpe@sp=0 + +\newif\ifvpe@stack +\vpe@stacktrue +\AtEndDocument{\global\vpe@stackfalse} + +\def\vpe@push#1{% + \ifvpe@stack + \global\advance\vpe@sp by 1 + \vpe@debug{PUSH(\the\vpe@sp): #1}% + \immediate\write18{% + \vpe@command\space + -sty + -progname=\vpe@progname\space + \ifx\vpe@debug\@gobble\else -v \fi + #1 % + \jobname.vpe% + }% + \gdef\vpe@file{#1}% + \gdef\vpe@last{10000}% + \ifeof\vpe@read + \vpe@debug{EOF: \jobname.vpe}% + \else + \begingroup + \endlinechar-1 % + \read\vpe@read to \vpe@temp + \vpe@temp + \endgroup + \fi + \vpe@debug{% + LEVEL: \the\vpe@sp, FILE: \vpe@file, LAST: \vpe@last + }% + \expandafter\xdef\csname vpeF\the\vpe@sp\endcsname{\vpe@file}% + \expandafter\xdef\csname vpeL\the\vpe@sp\endcsname{\vpe@last}% + \fi +} +\def\vpeentry#1#2{% + \gdef\vpe@file{#1}% + \gdef\vpe@last{#2}% +} +\def\vpe@pop{% + \ifvpe@stack + \global\advance\vpe@sp by -1 % + \vpe@debug{POP(\the\vpe@sp)}% + \fi +} +\def\vpe@peekfile{% + \csname vpeF\the\vpe@sp\endcsname +} +\def\vpe@peeklast{% + \csname vpeL\the\vpe@sp\endcsname +} + +\vpe@push{\jobname} + +\AtEndDocument{% + \vpe@debug{MAKE SYMBOL LINKS}% + \immediate\write18{% + \vpe@command\space + \ifx\vpe@debug\@gobble\else -v \fi\jobname.pdf% + }% +} + +%*** file input +\def\vpe@doinput#1#2{% + \VPE + \vpe@push{#2}% + \vpe@srcfirst + #1{#2}% + \vpe@srclast + \vpe@pop + \VPE +} + +\vpe@redef{input}{% + \def\input{\@ifnextchar\bgroup\vpe@input\vpeorg@input} + \def\vpe@input{\vpe@doinput\vpeorg@input} +} +\vpe@redef{@input}{% + \def\@input#1{% + \IfFileExists{#1}\@firstofone\@gobble\vpe@doinput + \vpeorg@@input{#1}% + }% +} + +\vpe@redef{include}{\def\include{\vpe@doinput\vpeorg@include}} + +\vpe@redef{newpage}{% + \def\newpage{% + \VPE + \vpeorg@newpage + \vpe@emptyeverypar + }% +} +\vpe@redef{clearpage}{\def\clearpage{\vpeorg@clearpage\VPE}} + +%*** everypar +\def\vpe@everypar{\everypar\expandafter{\the\everypar\VPE}} +\def\vpe@emptyeverypar{% + \edef\vpe@temp{\the\everypar}% + \ifx\vpe@temp\@empty + \everypar{\VPE}% + \fi +} +\iffalse +\vpe@redef{everypar}{% + \def\everypar#1#{\vpe@everypar} + \def\vpe@everypar#1{% + \vpeorg@everypar{#1\VPE}% + }% +} +\fi +\vpe@redef{document}{% + \def\document{% + \global\vpe@stackfalse + \vpeorg@document + \global\vpe@stacktrue + \VPE + \vpe@emptyeverypar + \ignorespaces + }% +} +\vpe@redef{@item}{% + \def\@item[#1]{% + \vpeorg@@item[{#1}]% + \VPE + \vpe@doubleeverypar + \ignorespaces + }% +} +\iffalse +\vpe@redef{@verbatim}{% + \def\@verbatim{% + \vpeorg@@verbatim + \vpe@everypar + }% +} +\fi +\vpe@check{@doendpe}{% + \def\@doendpe{% + \@endpetrue + \def\par{% + \@restorepar + \everypar{\VPE}% + \par + \@endpefalse + }% + \everypar{% + {\setbox\z@\lastbox}% + \everypar{\VPE}% + \@endpefalse + \VPE + }% + }% +} +\vpe@redef{@arrayparboxrestore}{% + \def\@arrayparboxrestore{% + \vpeorg@@arrayparboxrestore + \vpe@everypar + }% +} +\vpe@redef{@xsect}{% + \def\@xsect#1{% + \vpeorg@@xsect{#1}% + \vpe@doubleeverypar + \ignorespaces + }% +} +\vpe@redef{@afterheading}{% + \def\@afterheading{% + \vpeorg@@afterheading + \vpe@doubleeverypar + }% +} +\vpe@redef{@setminipage}{% + \def\@setminipage{% + \vpeorg@@setminipage + \vpe@doubleeverypar + }% +} +\def\vpe@doubleeverypar{% + \expandafter\vpe@@doubleeverypar\the\everypar\everypar!!\@nil +} +\def\vpe@@doubleeverypar#1\everypar#2#3\@nil{% + \def\vpe@temp{#2}% + \ifx\vpe@temp\@empty + \everypar\expandafter{\the\everypar\vpe@everypar}% + \fi + \vpe@everypar +} +\vpe@redef{@startsection}{% + \def\@startsection{% + \if@nobreak + \let\vpe@orgeverypar\everypar + \let\everypar\vpe@tempeverypar + \fi + \vpeorg@@startsection + }% +} +\def\vpe@tempeverypar#1{% + \let\everypar\vpe@orgeverypar + \everypar{#1\VPE}% +} + +\vpe@check{everymath}{\everymath{\VPE}} + +\ifvpe@everyhbox + \everyhbox\expandafter{\the\everyhbox\VPE}% +\fi + +\vpe@redef{newline}{\def\newline{\VPE\vpeorg@newline}} +\vpe@redefspecial{\\}{NL}{\def\\{\VPE\vpeorg@NL}} +\vpe@redef{tabularnewline}{% + \def\tabularnewline{\VPE\tabularnewline} +} + +\vpe@redef{mbox}{% + \def\mbox{\VPE\vpe@mbox} + \long\def\vpe@mbox#1{\vpeorg@mbox{#1\VPE}} +} + +\vpe@redefspecial{~}{TILDE}{\def~{\VPE\vpeorg@TILDE}} + +\vpe@redef{ref}{\def\ref{\VPE\vpeorg@ref}} +\vpe@redef{cite}{\def\cite{\VPE\vpeorg@cite}} + +\vpe@redef{item}{\def\item{\VPE\vpeorg@item}} +\vpe@redef{trivlist}{\def\trivlist{\VPE\vpeorg@trivlist}} +\vpe@redef{endtrivlist}{\def\endtrivlist{\VPE\vpeorg@endtrivlist}} + +\vpe@redef{@bsphack}{\def\@bsphack{\vpeorg@@bsphack\VPE}} +\vpe@redef{@esphack}{\def\@esphack{\VPE\vpeorg@@esphack}} +\vpe@redef{@Esphack}{\def\@Esphack{\VPE\vpeorg@@Esphack}} +\vpe@redef{@xaddvskip}{\def\@xaddvskip{\vpeorg@@xaddvskip\VPE}} + +\vpe@redef{@tabularcr}{\def\@tabularcr{\VPE\vpeorg@@tabularcr}} +\vpe@redef{@arraycr}{\def\@arraycr{\VPE\vpeorg@@arraycr}} + +\vpe@redef{hrule}{\def\hrule{\VPE\vpeorg@hrule}} +\vpe@redef{vrule}{\def\vrule{\VPE\vpeorg@vrule}} +\endinput |