diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:22 +0000 |
commit | c6b827c6f5aab4beff40b7bef80e869c6815d826 (patch) | |
tree | 1ed61d883ba88897fbf68a71547b4a7286e57368 | |
parent | 7f9543ffaf295484b99beae71350a519562df613 (diff) |
ltxmisc
git-svn-id: svn://tug.org/texlive/trunk@1056 c570f23f-e606-0410-a88d-b1316a301751
74 files changed, 11445 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxmisc/2in1.sty b/Master/texmf-dist/tex/latex/ltxmisc/2in1.sty new file mode 100644 index 00000000000..801f59f0789 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/2in1.sty @@ -0,0 +1,70 @@ +% This LaTex Style File is for printing two pages on a single page (landscape) +% Page numbers are at bottom. Header is blank. +% +% Author Sanjeev Saxena, ssax@computer.org +% last modified on 23/July/2001 (prints title correctly with \maketitle) +% +%Usage +%\documentclass[10pt,landscape]{article} (or 11pt or 12pt) +% OR +%\documentclass[10pt]{article} (or 11pt or 12pt) +%\usepackage{2in1} +% +\pagestyle{plain} +\newcount\evenpage +\newcount\oddpage +\twocolumn +\def\@oddfoot{\evenpage=\thepage% +\multiply\evenpage by 2% +\oddpage=\the\evenpage% +\advance\oddpage by -1% +\hfil\the\oddpage\hfil\hfil\the\evenpage\hfil}% +\def\@evenfoot{\evenpage=\thepage% +\multiply\evenpage by 2% +\oddpage=\the\evenpage% +\advance\oddpage by -1% +\hfil\the\oddpage\hfil\hfil\the\evenpage\hfil}% +\textwidth 9.49in +\textheight 6.7in +\columnsep 0.9in +\columnseprule 0.125pt +\headheight 0cm +\topmargin 0in +\marginparwidth 0in +\marginparsep 0in +%\hoffset 0.1in %pageoffset is 1.0in by default +\hoffset 0.05in % Corrected +\voffset -0.5in %top margin space is 1.0in by default +\oddsidemargin 0in +\evensidemargin 0in +\headsep 0cm +\topskip 0cm +%\parskip 0pt % +\parskip 0.15in % +\headsep 0pt +\special{papersize=11.69in,8.26in} %For use with dvips +\renewcommand\maketitle{\par +\begingroup +\renewcommand\thefootnote{\@fnsymbol\c@footnote}% +\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% +\long\def\@makefntext##1{\parindent 1em\noindent +\hb@xt@1.8em{% +\hss\@textsuperscript{\normalfont\@thefnmark}}##1}% +\@maketitle +\@thanks +\endgroup +\setcounter{footnote}{0}% +\global\let\thanks\relax +\global\let\maketitle\relax +\global\let\@maketitle\relax +\global\let\@thanks\@empty +\global\let\@author\@empty +\global\let\@date\@empty +\global\let\@title\@empty +\global\let\title\relax +\global\let\author\relax +\global\let\date\relax +\global\let\and\relax +} +% +% End of file diff --git a/Master/texmf-dist/tex/latex/ltxmisc/3parttable.sty b/Master/texmf-dist/tex/latex/ltxmisc/3parttable.sty new file mode 120000 index 00000000000..bff08a99507 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/3parttable.sty @@ -0,0 +1 @@ +threeparttable.sty
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/ltxmisc/a4wide.sty b/Master/texmf-dist/tex/latex/ltxmisc/a4wide.sty new file mode 100644 index 00000000000..9f651505d72 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/a4wide.sty @@ -0,0 +1,39 @@ +%NAME: a4wide.sty +% "moretext" document style option. +% Jean-Francois Lamy, July 86 +% +% Redefines the margins so that they are more in line with +% what we are used to see. +% +% [Minimally modified for LaTeX2e, Alexander Holt, August 1994] + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{a4wide}[1994/08/30] +\RequirePackage{a4} + +\ifcase \@ptsize + % mods for 10 pt + \oddsidemargin 0.15 in % Left margin on odd-numbered pages. + \evensidemargin 0.35 in % Left margin on even-numbered pages. + \marginparwidth 1 in % Width of marginal notes. + \oddsidemargin 0.25 in % Note that \oddsidemargin = \evensidemargin + \evensidemargin 0.25 in + \marginparwidth 0.75 in + \textwidth 5.875 in % Width of text line. +\or % mods for 11 pt + \oddsidemargin 0.1 in % Left margin on odd-numbered pages. + \evensidemargin 0.15 in % Left margin on even-numbered pages. + \marginparwidth 1 in % Width of marginal notes. + \oddsidemargin 0.125 in % Note that \oddsidemargin = \evensidemargin + \evensidemargin 0.125 in + \marginparwidth 0.75 in + \textwidth 6.125 in % Width of text line. +\or % mods for 12 pt + \oddsidemargin -10 pt % Left margin on odd-numbered pages. + \evensidemargin 10 pt % Left margin on even-numbered pages. + \marginparwidth 1 in % Width of marginal notes. + \oddsidemargin 0 in % Note that \oddsidemargin = \evensidemargin + \evensidemargin 0 in + \marginparwidth 0.75 in + \textwidth 6.375 true in % Width of text line. +\fi diff --git a/Master/texmf-dist/tex/latex/ltxmisc/a5comb.sty b/Master/texmf-dist/tex/latex/ltxmisc/a5comb.sty new file mode 100644 index 00000000000..5053eeaf6b2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/a5comb.sty @@ -0,0 +1,31 @@ +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% author = "Mario Wolczko", +%%% version = "4", +%%% date = "21 May 1992", +%%% time = "20:50:55 BST", +%%% filename = "a5comb.sty", +%%% email = "mario@acm.org", +%%% codetable = "ISO/ASCII", +%%% keywords = "LaTeX, A5 page size, page layout", +%%% supported = "no", +%%% docstring = "Sets page layout to A5 size, with equal +%%% spaces to left and right, and twice the amount of centre space +%%% (for comb-bound documents) and top:side:bottom space = 2:2:4. +%%% See also a5.sty, a4.sty", +%%% } +%%% ==================================================================== +% +% This file is in the public domain +% +% based on ratios suggested by Dick Wakefield + +\headheight=12truept \headsep=18truept +\topmargin= -35.62truept % Nominal distance from top of paper to top of page +% top paper margin of 48.72pt +% (between top of page and top of text, excluding header) +\textwidth=313truept +\evensidemargin=-18.12truept \oddsidemargin=-18.12truept +\textheight=426truept % 10pt only (\baselineskip=12pt) +% +\footskip=36truept \footheight=12truept diff --git a/Master/texmf-dist/tex/latex/ltxmisc/abstbook.cls b/Master/texmf-dist/tex/latex/ltxmisc/abstbook.cls new file mode 100644 index 00000000000..ff699c941c4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/abstbook.cls @@ -0,0 +1,266 @@ +% +% This is second version of the class. It redefines Chapters +% sections and subsections, in order to use the minitoc style! +% +% +% DESCRIPTION: +% +% -``Quick and dirty'' class file for ``book of abstracts'' +% (used for IWEPNM - Kirchberg 1997) +% +% - It's getting less Quick and dirty, but it's far from beeing +% what i want, should be much more flexible for that. +% +% -Written by Havlik Denis (havlik@pap.univie.ac.at) 02/1997. +% -Based on the report class. +% +% This .cls file has been written for the conference in Kirchberg. +% It has been designed to produce a4-size pages, +% which are later converted into a5. Output is double-sided. +% +% Abstracts are suposed to be in separate files, with simple +% formating (title, name, adress, text). +% +% As i have a feeling that many conferences need something +% like this booklet, i will try to document this file as good as +% i can. In the case anybody is interesting to use this class, +% but neads more flexibility or new features, i would be pleased +% to help. This is a first time ever that i write a Latex class, +% but i'm learning. +% +% Features: +% -Conferences consist of days and sessions. +% -In every day there can be one or more sessions, in every +% session there can be several abstracts. Abstracts appear +% two on a page, with short name of the session, the number +% of the abstract and an additional entry WRITTEN ON THE MARGIN. +% -In the headings, day appears on the even, and session on the odd +% pages. +% -For every day, a table of abstracts is printed +% -names of the authors are automatically added to index of authors +% (don't forget to run the ``makeindex''!!!) +% +% I would like to thank the ``\"Osterreichischen Fonds zur F\"orderung +% der wissenschaftlichen Forschung'' for financing my work +% under project Nr. +P10924-PHY. Furthermore, a Linux, and \TeX/\LaTeX +% comunity, for providing wonderfull free software, that i use for all my +% work. Special thanks to Jean-Pierre Drucbert +% Havlik Denis +% +% TODO: +% 1. redefine \titl, \name and \adr, so i can get automatic: +% indexing of authors and automatic referencing of authors to adress +% 2. automatic resizing of abstracts to fit other page-sizes, +% (not only a4) and other margines etc. +% 3. add formatting stuff like: +% \newcommand{\titlstyle}{\bf \Large \MakeUppercase} +% with some logical names and use it consequently for all the macros +% in the whole class +% 4. ?% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{abstbook}[1997/02/10 for typseting book of abstracts] +\DeclareOption{twocolumn}{\OptionNotUsed} % makes no sense to use it... +% All other options go to ``report'' class. +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} +\ProcessOptions +\LoadClass[a4,twoside]{report} +\RequirePackage{makeidx} % neaded to make index +\RequirePackage{graphicx} % neaded to input graphics into booklet. +%\RequirePackage{minitoc} +% page - size related stuff. Looks good on my printer... +\setlength{\unitlength}{1cm} +%\setlength{\topmargin}{1.5cm} +\setlength{\hoffset}{-0.8in} +%\setlength{\voffset}{-1in} +\setlength{\textwidth}{16.5cm} +\setlength{\textheight}{24.8cm} +\setlength{\topskip}{0cm} +\setlength{\footskip}{0cm} +\setlength{\oddsidemargin}{1.5cm} +\setlength{\evensidemargin}{1.5cm} +\setlength{\marginparsep}{0.3cm} +\setlength{\marginparwidth}{1.0 cm} +\setlength{\parindent}{0cm} +\pagestyle{myheadings} % to get the day - session in headings! + +% I had to redefine \chapter because i have to use it, if i want +% mini-tables-of-contents... +\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} +\def\@makechapterhead#1{\relax} %write nothing... +\RequirePackage{minitoc} + +\AtBeginDocument{% this comes after \begin{document} + \makeindex + \dominitoc + \faketableofcontents} + +\AtEndDocument{\printindex} % dont forget to run the ``makeindex'' program! +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% COMMANDS +% +\newcounter{Cabstract}[section] +\newsavebox{\ConferenceDay} % hier comes the name of the day +\newsavebox{\SessionName} % name of the session +\newsavebox{\ShortSessionName}% short name of the session +% Counters for days, sessions and abstracts. +% hope this will work.... + +\sbox{\ConferenceDay}{} +\sbox{\SessionName}{} +\markboth{\usebox{\ConferenceDay}}{\usebox{\SessionName}} + +\def\mtctitle{\relax}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Command: \conferenceday +% Usage: \conferenceday{some day} +% Provides: advances day-counter, adds the day-name to TOC +% and clears the page +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\conferenceday}[1]{% + \chapter{#1} + {\Large \bf #1}\par + \minitoc + \sbox{\ConferenceDay}{#1} + \sbox{\SessionName}{#1} + } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Command: \sessionname +% Usage: \sessionname{shortname}{longname} +% Provides: advances session-counter, adds the session-name to TOC +% and clears the page +% Important: I'm not using \section here. Instead, i try to emulate +% the part that i nead. It worked with my version +% of minitoc, but didn't work with an older version +% we had at the university. Bad. Redefining \section +% would be better, but i can't figure it out. +% Well, Jean-Pierre Drucbert <Jean-Pierre.Drucbert@onecert.fr> +% said it should be O.K., so be it. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\sessionname}[2]{% + \clearpage + \refstepcounter{section} + \sbox{\ShortSessionName}{#1} + \sbox{\SessionName}{#2} + \addcontentsline{toc}{section}{\MakeUppercase{#2}} + } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Following definitions determine how to deal with the abstracts % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ABSTRACTS SHOULD BE IN SEPARATE FILES, FORMATED LIKE THIS: +% +% Abstract example: +% \index{Name1} \index{Name2}... - this is nessesary for authornames +% to appear in index!!! +% \titl{Title of the abstract} +% \name{A. First$^1$, A. Second$^1$, A. Third$^2$} +% \adr{1~First address\\ +% 2~Second addrass} +% +% \begin{abstr} +% Abstracts text (in Latex notation). Most of the Latex commands +% can be used here... +% \end{abstr} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +% TO DO: +% I would like to change \name and \adr in such a way that +% +% \name[mark1]{name1} +% \name[mark2]{name2} +% \name[mark1]{name3} +% \adr[adr1]{adress1} +% \adr[adr2]{adress2} +% +% produces the same result as one obtained in the previous example +% and automaticaly includes the names into index list... +% Unfortunately, i don't know how to do it. +% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% COMMANDS TO BE USED IN ABSTRACTS: +% +% Title of the abstract +\newcommand{\titl}[1]{\large \bf \MakeUppercase{#1}\par\medskip} +% author(s) name(s) +\newcommand{\name}[1]{\rm \normalsize #1\par\smallskip} +% author(s) addres(es) +\newcommand{\adr}[1]{\it \normalsize #1\par\smallskip} +% enviroment ``abstr'' +\newenvironment{abstr}{\par\medskip \normalsize \rm}{\par\bigskip} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% COMMANDS TO BE USED IN THE MAIN DOCUMENT +% +% Command: \loadabstr +% Usage: \loadabstr[additional]{TOC-entry}{filename.tex} +% Provides: reserves 1/2 page for the abstract, loads the abstract +% from the file ``filename.tex'', writes the ``TOC-entry'' +% to table of contents, advances the abstracts-counter +% and writes the short name of the session, abstract-number +% and an additional entry to the margin. +% (We have used the additional entry for the time..) +%usage: \loadabstr[additional]{toc-entry}{name.tex} +\newcommand{\loadabstr}[3][\relax]{% + \stepcounter{Cabstract} + \par + \rule[-6cm]{0cm}{12cm} % well, you might nead to change this + % if you change the size/format of the page + \marginpar{% + \large\centering + #1\par\smallskip + \usebox{\ShortSessionName}\par\smallskip + \arabic{Cabstract}} + \IfFileExists{#3}{% + \begin{minipage}{16.5cm} % this too... + \input{#3} + \end{minipage}} + {File #3 not found} + \addcontentsline{toc}{subsection}{#2} + } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Command: \loadpsabstr +% Usage: \loadpsabstr[additional]{toc-entry}{name.ps}{formating} +% Provides: Some of our abstracts arrived as postscript or with s-mail +% This commands loads the postscript file, cuts part of it out +% and puts it on its place, just like \loadabstr does with +% an latex file. Additional parameter goes directly to +% ``includegraphics'' (see explanation of graphicx package) +% try something like: scale=1, bb=2.5cm 16cm 19cm 28cm +\newcommand{\loadpsabstr}[4][\relax]{% + \stepcounter{Cabstract} + \par + \rule[-6cm]{0cm}{12cm} % well, you might nead to change this + % if you change the size/format of the page + \marginpar{% + \large\centering + #1\par\smallskip + \usebox{\ShortSessionName}\par\smallskip + \arabic{Cabstract}} + \begin{minipage}{16.5cm} % this too... + \unitlength 1cm + \IfFileExists{#3}{% + \begin{picture}(16.5,12) % and this, too! + \put(0,0){% + \includegraphics[% + angle=0, clip=true, #4]{#3}} + \end{picture}} + {File #3 not found!} + \end{minipage} + \addcontentsline{toc}{subsection}{#2} + } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% end of the Kirchberg.cls +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/acromake.sty b/Master/texmf-dist/tex/latex/ltxmisc/acromake.sty new file mode 100644 index 00000000000..9056d3ff4d9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/acromake.sty @@ -0,0 +1,112 @@ +%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This is file `acromake.sty', written on
+%% on <1995/7/16> by Paul A. Thompson, Ph.D.
+%%
+%% Copyright (C) 1995 Paul A. Thompson
+%% All rights reserved.
+%%
+%% Advice and suggestions of D. Carlisle, D. Arseneau and P. Schmitt noted.
+%% Errors responsibility of author.
+%%
+%% This file requires LaTeX2e.
+%% ---------------------------
+%%
+%% No permission is granted to modify this file.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This algorithm is presented and discussed in TeX and TUG News, V4, #1. +%% The algorithm as presented there has several small problems, which are +%% solved here. +%% +%% This file generates acronyms. There are three parameters which may be
+%% set by the user
+%% 1. To generate an acronym
+%% \acromk{ANSA}{{\tt ANSA}}{another nasty stupid acronym}
+%%
+%% The first argument is the name used in text to implement the acronym.
+%% The second argument is the name printed in the text when the acronym
+%% is used. The final argument is the full, non-acronymized version.
+%%
+%% So, if there was an acronym
+%% \acromake{ANSA}{{\tt ANSA}}{another nasty stupid acronym}
+%% it could be used as
+%%
+%% \ANSA is a new approach to the use of \ANSA, where \ANSA is ...
+%%
+%% This would result in +%% +%% another nasty stupid acronym ({\tt ANSA}) is a new approach to
+%% the use of {\tt ANSA}, where {\tt ANSA} is ...
+%%
+%% 2. To use the acronym
+%% here \ANSA whatever {foo}lish use of acronym you wish
+%% This will generate the following:
+%% Usage number Resolved text
+%% 1 another nasty stupid acronym (ANSA)
+%% 2 ANSA (page 2)
+%% 3 (and beyond) ANSA
+%%
+%% 3. The following may be set by the user:
+%% ACRcnta - count of uses of acronym macro which will be in full form
+%% (default is 1)
+%% ACRcntb - count of uses of acronym macro which will include page of
+%% acronym def (default is 1 reference, or ACRcntb-ACRcnta)
+%% useACRlb - should the page reference be used - 1-yes, 0-no
+%%
+%% For every acronym, the macro generates the acronym macro and a macro which
+%% acts like a counter for acronym use. Since counters are quite rare, it is
+%% not responsible to use a counter for every acronym - rather, a macro is
+%% generated which fills this function. The acronym macro is called \foo,
+%% while the counter macro is called \fooz. Thus, I would avoid calling any
+%% acronym fooz, as this may be confoozing.
+%%
+%% The .sty file generates 1 counter if it is included. For each acronym
+%% specified, the .sty file generates two macros, 1 for the acronym, and 1 for
+%% the count of acronym use
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+\NeedsTeXFormat{LaTeX2e}% % 1
+\RequirePackage{xspace}
+\newcommand{\pv}{} \newcounter{util}
+\newcommand{\ACRcnta}{1}% full acronym generations
+\newcommand{\ACRcntb}{2}% ACRcntb - ACRcnta = acronym + page number
+\newcommand{\addtomacro}[2]{% % like \addtocounter, but for a macro
+ \setcounter{util}{#1}\addtocounter{util}{#2}\xdef#1{\theutil}}%
+\newcommand{\acromake}[3]{%
+ \ifnum\ACRcnta<1\renewcommand{\ACRcnta}{1}\fi%
+ \expandafter\gdef\csname#1z\endcsname{0}% count occurrences
+ \expandafter\newcommand\csname#1\endcsname{%
+ \ifnum\csname#1z\endcsname=0\label{acro:#1}\fi%
+ \expandafter\addtomacro\expandafter{\csname#1z\endcsname}{1}%
+ #3 (#2)% expansion and acronym printed here
+ \ifnum\csname#1z\endcsname=\ACRcnta%
+ \expandafter\renewcommand\csname#1\endcsname{%
+ \expandafter\addtomacro\expandafter{\csname#1z\endcsname}{1}%
+ \renewcommand{\pv}{ (see Page \pageref{acro:#1})}%
+ \ifnum\csname#1z\endcsname>\ACRcntb%
+ \renewcommand{\pv}{#2}%
+ \else%
+ \ifnum\ACRcntb=0%
+ \renewcommand{\pv}{#2}%
+ \else%
+ \ifnum\thepage=0\pageref{acro:#1}%
+ \renewcommand{\pv}{#2}%
+ \else%
+ \renewcommand{\pv}{#2\ (see Page \pageref{acro:#1})}%
+ \fi%
+ \fi%
+ \fi%
+ \pv\xspace%
+ }%
+ \fi%
+ \xspace}%
+}
+
+ diff --git a/Master/texmf-dist/tex/latex/ltxmisc/advdate.sty b/Master/texmf-dist/tex/latex/ltxmisc/advdate.sty new file mode 100644 index 00000000000..e15add6d3d0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/advdate.sty @@ -0,0 +1,131 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Advance Date Package for LaTeX2e %% +%% (C) Z. Wagner -- Ice Bear Soft, 20 Oct 1996, <wagner@mbox.cesnet.cz> %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This package contains macros which can add specified number of days %% +%% to the current date (as specified in \today) and print it. Some other %% +%% macros are also provided. It is intended for use e.g. in invoices %% +%% payable within 14 days from today etc. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Macros with one default argument [in square brackets] %% +%% \AdvanceDate Default: [1] %% +%% Advances date the specified number of days and sets the result %% +%% to \today %% +%% \DayAfter Default: [1] %% +%% Advances date by call to \AdvanceDate, prints \today and restores %% +%% the oroginal value of \today %% +%% \SaveDate Default: [\s@v@dT@d@y] %% +%% Saves \today into the specified macro %% +%% \SetDate Default: [\s@v@dT@d@y] %% +%% Sets the date stored in \today. The argument must be in form: %% +%% [dd/mm/yyyy] and may be present in a macro because the argument %% +%% is always expanded before use. The value saved by \SaveDate can %% +%% be used here. %% +%% %% +%% Macros with one mandatory argument %% +%% \ThisDay sets \day %% +%% \ThisMonth sets \month %% +%% \ThisYear sets \year %% +%% \AdvMonth advances \month and fixes it %% +%% \AdvYear advances \year %% +%% %% +%% Macros without arguments %% +%% \FixMonth fixes \today so that 0 < \month < 13 %% +%% \FixDate fixes \today so that it is valid %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{advdate}[1996/10/20 Advance Date Package] + +% KH code + +\newcount\r@k \newcount\un@r +\newcount\m@l \m@l31 +\newcount\m@s \m@s30 +\newcount\M@s + +\newcommand\is@LeapYear[1][\year]{\r@k#1\un@r\r@k + \divide\r@k4\multiply\r@k4\advance\r@k-\un@r + \ifnum\r@k=0% + \divide\un@r100\r@k\un@r\multiply\un@r100\advance\un@r-#1% + \ifnum\un@r=0% + \un@r\r@k \divide\un@r4\multiply\un@r4\advance\un@r-\r@k + \un@r\ifnum\un@r=0 29\else 28\fi + \else + \un@r 29% + \fi + \else + \un@r 28% + \fi + \r@k 337\advance\r@k\un@r} + +\newcommand\m@sic{\ifcase \month \or \m@l \or \un@r \or \m@l \or \m@s \or \m@l \or \m@s + \or \m@l \or \m@l \or \m@s \or \m@l \or \m@s \or \m@l \fi} + +\newcommand\FixMonth{% + \L@@p \ifnum\month<1 \advance\year\m@ne \advance\month12 \is@LeapYear \repeat + \L@@p \ifnum\month>12 \advance\year\@ne \advance\month-12 \is@LeapYear \repeat} + +\newcommand\FixDate{% + \FixMonth \is@LeapYear + \l@@p \ifnum\day<1 \Pr@vD@y \repeat + \l@@p \M@s\m@sic \ifnum\day>\M@s \N@xtD@y \repeat +} + +% We need a nested \loop and the user might call the macros from his/her \loop + +\def\L@@p#1\repeat{\def\It@r@te{#1\relax \expandafter\It@r@te\fi}\It@r@te + \let\It@r@te\relax} + +\def\l@@p#1\repeat{\def\it@r@te{#1\relax \expandafter\it@r@te\fi}\it@r@te + \let\it@r@te\relax} + +\def\Pr@vD@y{% + \ifnum\day<-366 + \ifnum\month>2 + \advance\day\r@k \advance\year\m@ne \is@LeapYear + \else + \advance\year\m@ne \is@LeapYear \advance\day\r@k + \fi + \else + \advance\month\m@ne \FixMonth + \advance\day\m@sic + \fi} + +\def\N@xtD@y{% + \ifnum\day>366 + \ifnum\month>2 + \advance\year\@ne \is@LeapYear \advance\day-\r@k + \else + \advance\day-\r@k \advance\year\@ne \is@LeapYear + \fi + \else + \advance\day-\M@s \advance\month\@ne \FixMonth + \fi} + +\newcommand\AdvanceDate[1][\@ne]{\advance\day#1 \FixDate} + +\newcommand\DayAfter[1][\@ne]{{\AdvanceDate[#1]\today}} + +\newcommand\SaveDate[1][\s@v@dT@d@y]{% + \expandafter \expandafter \expandafter \expandafter + \expandafter \expandafter \expandafter \edef + \expandafter \expandafter \expandafter \expandafter + \expandafter \expandafter \expandafter #1\expandafter + \expandafter \expandafter \expandafter + \expandafter \expandafter \expandafter + {\expandafter \expandafter \expandafter \number + \expandafter \expandafter \expandafter \day + \expandafter \expandafter \expandafter /\expandafter \number + \expandafter \month \expandafter /\number \year}} + +\newcommand\SetDate[1][\s@v@dT@d@y]{\edef\d@t@{#1}% + \expandafter\t@d@y\d@t@\t@d@y\FixDate} + +\def\t@d@y#1/#2/#3\t@d@y{\day#1 \month#2 \year#3 \relax} + +\newcommand\ThisDay[1]{\day#1 \relax} +\newcommand\ThisMonth[1]{\month#1 \relax} +\newcommand\ThisYear[1]{\year#1 \relax} +\newcommand\AdvMonth[1]{\advance\month#1 \FixMonth} +\newcommand\AdvYear[1]{\advance\year#1 \relax} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/anonchap.sty b/Master/texmf-dist/tex/latex/ltxmisc/anonchap.sty new file mode 100644 index 00000000000..8b2101e8181 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/anonchap.sty @@ -0,0 +1,76 @@ +% anonchap.sty +% +% Provides commands to make \chapter typeset like \section +% DO NOT USE WITH THE TOCBIBIND PACKAGE (which also supplies these commands) +% +% author: Peter Wilson (CUA) +% (now at peter.r.wilson@boeing.com) +% Copyright 1996 +% Released under the LaTeX Project Public License +% +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{anonchap}[2000/04/01 v1.1 typeset chapter like section] + +\newcommand{\simplechapter}[1][\@empty]{% + \let\@tbiold@makechapterhead\@makechapterhead + \renewcommand{\@makechapterhead}[1]{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright + \normalfont + \interlinepenalty\@M + \Huge\bfseries #1\space\thechapter\simplechapterdelim\space + ##1\par\nobreak + \vskip 40\p@ + }} +} + +\newcommand{\restorechapter}{% + \let\@makechapterhead\@tbiold@makechapterhead +} + +\newcommand{\simplechapterdelim}{} + +\endinput + +% Usage: +% \simplechapter[<name>] and \simplechapterdelim{<delim>} act together +% so that any subsequent \chapter commands, for example \chapter{First} +% ... \chapter{Second}..., +% will be typeset in the style of a \section (or numbered \chapter*) as: +% <name> 1<delim> First +% ... +% <name> 2<delim> Second +% +% A subsequent \restorechapter command will reset the \chapter typesetting +% back to its default style. +% +% Note that the argument to \simplechapter is optional, and that by default +% \simplechapterdelim is defined as \newcommand{\simplechapterdelim}{}. +% +% Extending the above example: +% \simplechapter +% \chapter{First} +% ... +% \renewcommand{\simplechapterdelim}{:} +% \chapter{Second} +% ... +% \restorechapter % restore before issuing a modified \simplechapter +% \simplechapter[Chap] +% \chapter{Third} +% ... +% \restorechapter +% \chapter{Fourth} +% ... +% Will be typeset as: +% 1 First +% ... +% 2: Second +% ... +% Chap 3: Third +% ... +% Chapter 4 +% Fourth +% ... +% + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/beletter.cls b/Master/texmf-dist/tex/latex/ltxmisc/beletter.cls new file mode 100644 index 00000000000..2158efddf95 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/beletter.cls @@ -0,0 +1,58 @@ +%%%%%%%%%% beletter.cls %%%%%%%%%% +% This file is public domain +% This code is unsupported, and comes with no warranty. +% This class was written by James Kilfiger and Frank Lenaerts, to meet +% the specifications for formatting Belgium letters recommended by +% Frank's wife. +% It can be used in place of the standard LaTeX class +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{beletter}[1999/06/05 Belgium Letter Class] +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}} +\ProcessOptions\relax +\LoadClass{letter} +% changed the opening +\renewcommand*{\opening}[1]{% + \thispagestyle{firstpage}% + \ifx\@empty\fromaddress + \else %if there is a from address + \noindent\begin{tabular}[t]{@{}l@{}}% + \fromaddress + \end{tabular}\par% + \fi + \noindent\begin{tabular}[t]{@{}l@{}}% + \toname\\ \toaddress + \end{tabular}\par + {\raggedleft\@date\par}% Put the date on a line of it's own +% \@date\par% + \vspace{2\parskip}% + #1\par\nobreak + \vspace{2\parskip}% +} + +%%% Change these!!, or let babel change them for you. +\renewcommand*{\ccname}{cc} +\renewcommand*{\enclname}{} +\renewcommand*{\pagename}{} +\renewcommand*{\headtoname}{} + +% changed the closing +\renewcommand{\closing}[1]{\par\nobreak\vspace{\parskip}% + \stopbreaks + \vspace{2\parskip}% + \vspace{2\parskip}% + \noindent +% \ifx\@empty\fromaddress\else +% \hspace*{\longindentation}\fi + \parbox{\indentedwidth}{\raggedright + \ignorespaces #1\\[6\medskipamount]% + \ifx\@empty\fromsig + \fromname + \else \fromsig \fi\strut}% + \par} + +\renewcommand*{\cc}[1]{% + \par\noindent + \parbox[t]{\textwidth}{% + \@hangfrom{\normalfont\ccname}% + \ignorespaces #1\strut}\par} +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/bibcheck.sty b/Master/texmf-dist/tex/latex/ltxmisc/bibcheck.sty new file mode 100644 index 00000000000..bc7c2bbdc7c --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/bibcheck.sty @@ -0,0 +1,87 @@ +% +% bibcheck.sty +% +% Copyright (c) 2001, Radhakrishnan CV <cvr@river-valley.com> +% Rajagopal CV <cvr3@river-valley.com> +% http://www.river-valley.com +% +% River Valley Technologies, Cotton Hills +% Trivandrum, India 695034 +% +% Tel: +91 471 233 7501 +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License +% as published by the Free Software Foundation; either version 2 +% of the License, or (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program (gpl.txt); if not, write to the Free +% Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +% MA 02111-1307, USA. +% +% $Id: gpl,v 1.1 2001/02/07 11:30:43 cvr Exp $ +% +\NeedsTeXFormat{LaTeX2e} +\def\Fileversion$#1: #2 ${\gdef\fileversion{#2}} +\def\Filedate$#1: #2 #3 ${\gdef\filedate{#2}} +\Fileversion$Revision: 1.1 $ +\Filedate$Date: 2001/02/07 11:30:43 $ +\ProvidesPackage{bibcheck} + [\filedate\space\fileversion\space check uncited bibitems (CVR)] +\PackageWarningNoLine{bibcheck} + {****************************************\MessageBreak + Package bibcheck v,\fileversion\space loaded\MessageBreak + [check uncited bibitems (CVR)]\MessageBreak + ****************************************} + +\newwrite\uncitedwrite +\immediate\openout\uncitedwrite=\jobname.uncited +\def\definecitelabel#1{\expandafter\gdef\csname CVRBIB#1\endcsname{1}} +\def\@checkbiblabel#1{% + \expandafter\ifx\csname CVRBIB#1\endcsname\relax + \typeout{*******************************************************} + \typeout{This bibitem [\Xbiblabel] with KEY [#1] is NOT CITED} + \typeout{*******************************************************} + \immediate\write\uncitedwrite{Bibitem [\Xbiblabel] with key [#1] not cited} + \immediate\write\uncitedwrite{} + \else \relax +% \typeout{**********************************************************} +% \typeout{This bibitem with LABEL [#1] is cited in the body text} +% \typeout{**********************************************************} + \fi} + +\def\@citex[#1]#2{% + \let\@citea\@empty + \@cite{\@for\@citeb:=#2\do + {\@citea\def\@citea{,\penalty\@m\ }% + \definecitelabel{\@citeb}% + \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% + \G@refundefinedtrue + \@latex@warning + {Citation `\@citeb' on page \thepage \space undefined}}% + {\hbox{\csname b@\@citeb\endcsname}}}}{#1}} + +\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw + {\def\Xbiblabel{#1}\@checkbiblabel{#2}% + \let\protect\noexpand + \immediate + \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} +\def\@bibitem#1{\item\if@filesw + \def\Xbiblabel{\the\value{\@listctr}}% + \@checkbiblabel{#1}% + \immediate\write\@auxout + {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces} + +\endinput + +%% +%% End of package bibcheck.sty +%%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/ltxmisc/block.sty b/Master/texmf-dist/tex/latex/ltxmisc/block.sty new file mode 100644 index 00000000000..ab1b7ecf6fe --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/block.sty @@ -0,0 +1,33 @@ +\NeedsTeXFormat{LaTeX2e}[1996/06/01] \NeedsTeXFormat{LaTeX2e} + +\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress + \thispagestyle{firstpage}% + {%\raggedleft + \@date\par}% + \else % home address + \thispagestyle{empty}% + {%\raggedleft\begin{tabular}{l@{}}\ignorespaces + \fromaddress \\*[2\parskip]% + \@date %\end{tabular} + \par}% + \fi + \vspace{2\parskip}% + {\raggedright \toname \\ \toaddress \par}% + \vspace{2\parskip}% + #1\par\nobreak} +\renewcommand{\closing}[1]{\par\nobreak\vspace{\parskip}% + \stopbreaks + \noindent + \ifx\@empty\fromaddress\else + %\hspace*{\longindentation} + \fi + %\parbox{\indentedwidth} + {\raggedright + \ignorespaces #1\\[6\medskipamount]% + \ifx\@empty\fromsig + \fromname + \else \fromsig \fi\strut}% + \par} +\endinput +%% +%% End of file `block.sty'. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/bold-extra.sty b/Master/texmf-dist/tex/latex/ltxmisc/bold-extra.sty new file mode 100644 index 00000000000..345e75c6209 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/bold-extra.sty @@ -0,0 +1,56 @@ +% bold-extra.sty - a jiffy to provide access (in latex) to (some of) +% the fonts in ctan directory fonts/cm/mf-extra/bold +% +% by robin fairbairns, rf10@cam.ac.uk November 2001 +% +% this package is provided under the provisions of the latex project +% public licence, http://www.latex-project.org/lppl.txt +% +% this packages provides font shapes to support bold small caps and tt +% text. there is a choice of bold tt fonts, which are selected by +% package options cmbtt and cmttb (this reflects the confusingly +% similar font names). the default (based on the author's estimation +% of the fonts' relative merits) is cmttb. +% +% to use these fonts you need their metafont sources available to your +% tex system (as far as i know, there are no type 1 versions of the +% fonts available yet). place them in an appropriate place under +% fonts/source in your tds texmf tree; place this file somewhere like +% tex/latex/misc in your tree. see +% http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages+wherefiles +% for more details. + +\ProvidesPackage{bold-extra}[2001/11/13 v0.1 Use fonts from cm/mf-extra/bold] +\NeedsTeXFormat{LaTeX2e} + +\newif\if@cmttb +\DeclareOption{cmttb}{\@cmttbtrue} +\DeclareOption{cmbtt}{\@cmttbfalse} +\ExecuteOptions{cmttb} +\ProcessOptions + +% declare bold small caps font +\DeclareFontShape{OT1}{cmr}{b}{sc} + { + <5><6><7><8><9><10><12><10.95><14.4><17.28><20.74><24.88>cmbcsc10 + }{} +\DeclareFontShape{OT1}{cmr}{bx}{sc} + {<->ssub*cmr/b/sc}{} + +% declare bold tt font: note, we use cmttb10 by default rather than +% the cmbtt series (which seem over-bold to me) +\if@cmttb +\DeclareFontShape{OT1}{cmtt}{b}{n} + { + <5><6><7><8><9><10><12><10.95><14.4><17.28><20.74><24.88>cmttb10 + }{} +\else +\DeclareFontShape{OT1}{cmtt}{b}{n} + { + <5><6><7><8>cmbtt8% + <9>cmbtt9% + <10><12><10.95><14.4><17.28><20.74><24.88>cmbtt10 + }{} +\fi +\DeclareFontShape{OT1}{cmtt}{bx}{n} + {<->ssub*cmtt/b/n}{} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/boxedminipage.sty b/Master/texmf-dist/tex/latex/ltxmisc/boxedminipage.sty new file mode 100644 index 00000000000..b74368fa7b9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/boxedminipage.sty @@ -0,0 +1,65 @@ +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% author = "Mario Wolczko", +%%% version = "2", +%%% date = "21 May 1992", +%%% time = "20:55:01 BST", +%%% filename = "boxedminipage.sty", +%%% email = "mario@acm.org", +%%% codetable = "ISO/ASCII", +%%% keywords = "LaTeX, minipage, framebox", +%%% supported = "no", +%%% docstring = "LaTeX document-style option which defines +%%% the boxedminipage environment -- just like minipage, but with +%%% a box around it.", +%%% } +%%% ==================================================================== +% +% This file is in the public domain +% +% The thickness of the rules around the box is controlled by +% \fboxrule, and the distance between the rules and the edges of the +% inner box is governed by \fboxsep. +% +% This code is based on Lamport's minipage code. +% +% Fixed, 7 Jun 89 by Jerry Leichter +% Leave \fboxsep worth of separation at top and bottom, not just at +% the sides! +% +\def\boxedminipage{\@ifnextchar [{\@iboxedminipage}{\@iboxedminipage[c]}} + +\def\@iboxedminipage[#1]#2{\leavevmode \@pboxswfalse + \if #1b\vbox + \else \if #1t\vtop + \else \ifmmode \vcenter + \else \@pboxswtrue $\vcenter + \fi + \fi + \fi\bgroup % start of outermost vbox/vtop/vcenter + \hsize #2 + \hrule\@height\fboxrule + \hbox\bgroup % inner hbox + \vrule\@width\fboxrule \hskip\fboxsep \vbox\bgroup % innermost vbox + \vskip\fboxsep + \advance\hsize -2\fboxrule \advance\hsize-2\fboxsep + \textwidth\hsize \columnwidth\hsize + \@parboxrestore + \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ + \let\@footnotetext\@mpfootnotetext + \let\@listdepth\@mplistdepth \@mplistdepth\z@ + \@minipagerestore\@minipagetrue + \everypar{\global\@minipagefalse\everypar{}}} + +\def\endboxedminipage{% + \par\vskip-\lastskip + \ifvoid\@mpfootins\else + \vskip\skip\@mpfootins\footnoterule\unvbox\@mpfootins\fi + \vskip\fboxsep + \egroup % ends the innermost \vbox + \hskip\fboxsep \vrule\@width\fboxrule + \egroup % ends the \hbox + \hrule\@height\fboxrule + \egroup% ends the vbox/vtop/vcenter + \if@pboxsw $\fi} + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/braket.sty b/Master/texmf-dist/tex/latex/ltxmisc/braket.sty new file mode 100644 index 00000000000..5d777b9fba0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/braket.sty @@ -0,0 +1,84 @@ +% braket.sty Macros for Dirac bra-ket <|> notation and sets {|} +% Donald Arseneau asnd@triumf.ca Last modified 05-May-2005. +% This is free, unencumbered, unsupported software. +% +% Commands defined are: +% \bra{ } \ket{ } \braket{ } \set{ } (small versions) +% \Bra{ } \Ket{ } \Braket{ } \Set{ } (expanding versions) +% +% The "small versions" use fixed-size brackets independent of their +% contents, whereas the "expanding versions" make the brackets and +% vertical lines expand to envelop their contents (internally using +% the \left and \right commands). You should use the vertical bar +% character "|" to input any extra vertical lines. In \Braket these +% vertical lines will expand to match the arguments, and in \Set the +% first vertical will expand. E.g., +% +% \Braket{ \phi | \frac{\partial^2}{\partial t^2} | \psi } +% \Set{ x\in\mathbf{R}^2 | 0<{|x|}<5 } +% +% Likewise, you may make an expandable double-bar using either +% the "\|" command or its local alias "||". +% +% NOT defined is "\ketbra" (for projection operators) because I prefer +% \ket{ } \bra{ }. +% +% Because each definition is so small, it makes no sense to have a +% complicated generic version for many bracket styles. Instead, +% you can just copy the definitions and change \langle or \rangle, +% < and > to what you like. +% +\def\bra#1{\mathinner{\langle{#1}|}} +\def\ket#1{\mathinner{|{#1}\rangle}} +\def\braket#1{\mathinner{\langle{#1}\rangle}} +\def\Bra#1{\left<#1\right|} +\def\Ket#1{\left|#1\right>} +{\catcode`\|=\active + \gdef\Braket#1{\begingroup + \ifx\SavedDoubleVert\relax + \let\SavedDoubleVert\|\let\|\BraDoubleVert + \fi + \mathcode`\|32768\let|\BraVert + \left<{#1}\right>\endgroup} +} +\def\BraVert{\@ifnextchar|{\|\@gobble}% turn || into \| + {\egroup\,\mid@vertical\,\bgroup}} +\def\BraDoubleVert{\egroup\,\mid@dblvertical\,\bgroup} +\let\SavedDoubleVert\relax + +% The \mid@vertical is \vrule with ordinary TeX but \middle| in eTeX. +% We always avoid a \mathchoice in making the inner vertical lines. +% Note that \right>, prints the same as \right\rangle but is faster. +% +% \def\ketbra#1#2{\ket{#1}\bra{#2}} +% \def\Ketbra#1#2{\left|{#1}\vphantom{#2}\right>\left<{#2}\vphantom{#1}\right|} + +% \Set{...|...} Only the first | is treated specially. +{\catcode`\|=\active + \gdef\set#1{\mathinner{\lbrace\,{\mathcode`\|32768\let|\midvert #1}\,\rbrace}} + \gdef\Set#1{\left\{ + \ifx\SavedDoubleVert\relax \let\SavedDoubleVert\|\fi + \:{\let\|\SetDoubleVert + \mathcode`\|32768\let|\SetVert + #1}\:\right\}} +} +\def\midvert{\egroup\mid\bgroup} +\def\SetVert{\@ifnextchar|{\|\@gobble}% turn || into \| + {\egroup\;\mid@vertical\;\bgroup}} +\def\SetDoubleVert{\egroup\;\mid@dblvertical\;\bgroup} + +% If the user is using e-TeX with its \middle primitive, use that for +% verticals instead of \vrule. +% +\begingroup + \edef\@tempa{\meaning\middle} + \edef\@tempb{\string\middle} +\expandafter \endgroup \ifx\@tempa\@tempb + \def\mid@vertical{\middle|} + \def\mid@dblvertical{\middle\SavedDoubleVert} +\else + \def\mid@vertical{\mskip1mu\vrule\mskip1mu} + \def\mid@dblvertical{\mskip1mu\vrule\mskip2.5mu\vrule\mskip1mu} +\fi + +% May 2005: Double verticals; tweak spacing. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/breakcites.sty b/Master/texmf-dist/tex/latex/ltxmisc/breakcites.sty new file mode 100644 index 00000000000..f1e8b9bd268 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/breakcites.sty @@ -0,0 +1,17 @@ +% breakcites +% Style file to allow citations to be broken across lines. +% - Don Hosek 3/14/89 (LaTeX209-Version) +% - Leo Broska 02/20/97 (LaTeX-2e-Version) +% +\def\@citex[#1]#2{% + \let\@citea\@empty + \@cite{\@for\@citeb:=#2\do + {\@citea\def\@citea{,\penalty\@m\ }% + \edef\@citeb{\expandafter\@firstofone\@citeb}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% + \G@refundefinedtrue + \@latex@warning + {Citation `\@citeb' on page \thepage \space undefined}}% + {\csname b@\@citeb\endcsname}}}{#1}} + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/captdef.sty b/Master/texmf-dist/tex/latex/ltxmisc/captdef.sty new file mode 100644 index 00000000000..b4dbcb546aa --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/captdef.sty @@ -0,0 +1,32 @@ +% +% captdef.sty: a trivial package to define captions that don't have +% to be in floats. +% +% Author: Robin Fairbairns <rf10@cam.ac.uk> +% Conceived ages ago, but written 1998/12/17 +% +% This program can 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. +% +% Usage: \DeclareCaption{command}{counter} +% +% declare `command' to produce a caption which uses `counter' for its +% numbering. +% +% The package then goes on to use this command to declare the most +% commonly required pair of non-float captions, \figcaption and +% \tabcaption + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{captdef}[1998/12/17 non-floating captions] + +\newcommand{\DeclareCaption}[2]{% + \def#1{\def\@captype{#2}\caption}% +} + +\DeclareCaption{\figcaption}{figure} +\DeclareCaption{\tabcaption}{table} + +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/chbibref.sty b/Master/texmf-dist/tex/latex/ltxmisc/chbibref.sty new file mode 100644 index 00000000000..99bcfc74171 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/chbibref.sty @@ -0,0 +1,36 @@ +% chbibref.sty Change the Bibliography/References heading +% +% author: Peter Wilson (CUA) +% (now at peter.r.wilson@boeing.com) +% Copyright Peter Wilson, 2001 +% Released under the Latex Project Public License +% +% Usage instructions are at the end of this file. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{chbibref}[2001/03/07 v1.0 change Bibliography/References heading] + +\newcommand{\setbibref}[1]{% + \@ifundefined{refname}{}{\renewcommand{\refname}{#1}} + \@ifundefined{bibname}{}{\renewcommand{\bibname}{#1}} +} + +\endinput +% +% In the article class the title text printed by +% \begin{thebibliography} is given by the value of \refname +% (default References), while in the report and chapter +% classes the text is given by the value of \bibname +% (default Bibliography). +% +% The command \setbibref{name} will set the title text for the +% Bibliography or the References to `name' for at least the article, +% report and book standard LaTeX classes, without having to be +% concerned which class is being used. +% +% If you are using the babel package, put \setbibref{...} after +% the \begin{document}. +% +% Peter W. +% 2001/03/07 +% diff --git a/Master/texmf-dist/tex/latex/ltxmisc/chngcntr.sty b/Master/texmf-dist/tex/latex/ltxmisc/chngcntr.sty new file mode 100644 index 00000000000..e1a6de835cf --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/chngcntr.sty @@ -0,0 +1,107 @@ +% chngcntr.sty +% +% Provides commands to change the resetting of counters. +% Instructions for use are at the end of this file. +% +% author: Peter Wilson (CUA) +% (now at peter.r.wilson@boeing.com) +% Released under the Latex Project Public License +% +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{chngcntr}[2001/03/30 v1.0 change counter resetting] +% +% This package uses David Carlisle's \@removefromreset command as +% specified in the remreset package available from CTAN as +% macros/latex/contrib/supported/carlisle/remreset.sty +% It is \provided here as a convenience to the user, and with +% David Carlisle's permission. +% START OF DAVID CARLISLE'S CODE +\providecommand{\@removefromreset}[2]{{% + \expandafter\let\csname c@#1\endcsname\@removefromreset + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\@removefromreset + \else + \noexpand\@elt{##1}% + \fi}% + \expandafter\xdef\csname cl@#2\endcsname{% + \csname cl@#2\endcsname}}} +% END OF DAVID CARLISLE'S CODE + +%%\@ifbothc@t@s{<package>}{<counter>}{<within>}{<code when both are counters>} +\newcommand{\@ifbothc@t@s}[4]{% + \@ifundefined{c@#2}{% counter undefined + \PackageError{#1}{#2 is not a counter}{\@eha}}% + {% else counter is defined + \@ifundefined{c@#3}{% within undefined + \PackageError{#1}{#3 is not a counter}{\@eha}}% + {% else both counter and within are defined + #4}}} + +%%\counterwithout*{<counter>}{<within>} +\newcommand{\counterwithout}{\@ifstar{\c@t@soutstar}{\c@t@sout}} +\newcommand{\c@t@soutstar}[2]{% + \@ifbothc@t@s{chngcntr}{#1}{#2}{\@removefromreset{#1}{#2}}} +\newcommand{\c@t@sout}[2]{% + \@ifbothc@t@s{chngcntr}{#1}{#2}{\@removefromreset{#1}{#2}% + \@namedef{the#1}{\arabic{#1}}}} + + +%%\counterwithin*{<counter>}{<within>} +\newcommand{\counterwithin}{\@ifstar{\c@t@sinstar}{\c@t@sin}} +\newcommand{\c@t@sinstar}[2]{% + \@ifbothc@t@s{chngcntr}{#1}{#2}{\@addtoreset{#1}{#2}}} +\newcommand{\c@t@sin}[2]{% + \@ifbothc@t@s{chngcntr}{#1}{#2}{\@addtoreset{#1}{#2}% + \@namedef{the#1}{\@nameuse{the#2}.\arabic{#1}}}} + + +\endinput + +%%%%%%%%%%%%%%%%%% +% USAGE +%%%%%%%%%%%%%%%%%% +% +% In LaTeX, a new counter called, say `ctr', is created by the command +% \newcounter{ctr}[within]. If the optional within argument is given +% the the counter `ctr' is reset to zero each time the counter `within' +% changes. The command \thectr typesets the value of the counter ctr. +% This is automatically defined by \newcounter and is initialised +% to typeset arabic numerals. +% +%%%%%%%%%%%%%%%%% +% \counterwithin +% \counterwithin* +%%%%%%%%%%%%%%%%% +% It is sometimes desireable to change a counter that has been defined +% by \newcounter{ctr} to act as though it had been defined as +% \newcounter{ctr}[within]. The package provides the command +% \counterwithin{ctr}{within} that accomplishes this. By default, +% it also redefines the \thectr command so that it typesets values +% in the style \thewithin.\arabic{ctr}. The starred version of the +% command suppresses the redefinition of \thectr +% (e.g., \counterwithin*{ctr}{within}). +% +%%%%%%%%%%%%%%%%%% +% \counterwithout +% \counterwithout* +%%%%%%%%%%%%%%%%%% +% Likewise, the command \counterwithout{ctr}{within} changes a +% counter that has been created by \newcounter{ctr}[within] to act +% as though it had been created by \newcounter{ctr}. By default it +% also redefines the \thectr command so that it just typesets an arabic +% numeral. The starred version of the command suppresses the redefinition +% of \thectr. +% +% Any number of \counterwithin{ctr}{...} and \counterwithout{ctr}{...} +% commands can be issued for a given counter, ctr, if you wish to toggle +% between the two styles. The current value of ctr is unaffected by +% \counterwithin and \counterwithout. If you want to change the value +% after one of these commands, use \setcounter{ctr}{...}, and to change +% the typeseting style use \renewcommand{\thectr}{...}. +% +% +% Peter W. +% 2001/03/30 +% + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/chngpage.sty b/Master/texmf-dist/tex/latex/ltxmisc/chngpage.sty new file mode 100644 index 00000000000..7c7245e0b78 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/chngpage.sty @@ -0,0 +1,342 @@ +% chngpage.sty +% +% Provides commands to change the page layout in the middle of a document, +% and to robustly check for typesetting on odd or even pages. +% Instructions for use are at the end of this file. +% +% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com +% (or pandgwilson@earthlink.net) +% Copyright 2000, 2001, 2003 Peter R. Wilson +% +% 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 the 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/06/01 or later. +% +% This work has the LPPL maintenance status "author-maintained". +% +% This work consists of this file. +% +% +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{chngpage}[2003/08/10 v1.2 change page layout] + +%% Note: internal package commands all include the string `cp@' +%% new \if for the strict option +\newif\ifcpstrict + \cpstrictfalse + +%% Declare and process options +\DeclareOption{strict}{\cpstricttrue} +\ProcessOptions\relax + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% new commands for strict checking of odd/even page +%% Works by writing a label and then checking its pageref +%% +% rewritten in v1.2 to handle roman, Roman, etc page numbers +% as well as arabic; also eliminates special code to handle +% hyperref. Based on the code in the memoir class. + +\newif\ifcpoddpage +\newcounter{cp@cnt} +\newcounter{cp@tempcnt} +\newcommand{\cplabelprefix}{^_} + +\gdef\thecp@page{\the\c@page} +\long\def\cp@protected@write#1#2#3{% % modified \protected@write + \begingroup + \let\thecp@page\relax + #2% + \let\protect\@unexpandable@protect + \edef\reserved@a{\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi} + +\DeclareRobustCommand{\checkoddpage}{% + \cpoddpagefalse + \stepcounter{cp@cnt}\cplabel{\cplabelprefix\thecp@cnt}% + \c@cp@tempcnt=\cp@labelref{\cplabelprefix\thecp@cnt}\relax + \ifodd\c@cp@tempcnt\cpoddpagetrue\fi} + +\newcommand{\cplabel}[1]{\@bsphack + \cp@protected@write\@auxout{}% + {\string\newcplabel{#1}{\thecp@page}}% + \@esphack} + +\newcommand{\newcplabel}[2]{{\global\@namedef{p@#1}{#2}}} + +\newcommand{\cp@labelref}[1]{% + \expandafter\ifx\csname p@#1\endcsname\relax + 0% % 0 if there is no label yet in aux file + \else + \csname p@#1\endcsname + \fi} + +%% end newcommands for strict checking of odd/even page +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% copy of some of the code from the ifmtarg package to save requiring ifmtarg +\begingroup +\catcode`\Q=3 +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} +\endgroup + +%% set the page output parameters +%\newcommand{\ch@ngetext}{% +\DeclareRobustCommand{\ch@ngetext}{% + \setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}% + \setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}% + \if@twocolumn% + \advance\columnwidth-\columnsep \divide\columnwidth\tw@% + \@firstcolumntrue% + \fi% + \setlength{\hsize}{\columnwidth}% + \setlength{\linewidth}{\hsize}% +} + +%\newcommand{\changetext}[5]{% +\DeclareRobustCommand{\changetext}[5]{% + \@ifmtarg{#1}{}{\addtolength{\textheight}{#1}}% + \@ifmtarg{#2}{}{\addtolength{\textwidth}{#2}}% + \@ifmtarg{#3}{}{\addtolength{\evensidemargin}{#3}}% + \@ifmtarg{#4}{}{\addtolength{\oddsidemargin}{#4}}% + \@ifmtarg{#5}{}{\addtolength{\columnsep}{#5}}% + \ch@ngetext% +} + +%\newcommand{\changepage}[9]{% +\DeclareRobustCommand{\changepage}[9]{% + \@ifmtarg{#1}{}{\addtolength{\textheight}{#1}}% + \@ifmtarg{#2}{}{\addtolength{\textwidth}{#2}}% + \@ifmtarg{#3}{}{\addtolength{\evensidemargin}{#3}}% + \@ifmtarg{#4}{}{\addtolength{\oddsidemargin}{#4}}% + \@ifmtarg{#5}{}{\addtolength{\columnsep}{#5}}% + \ch@ngetext% + \@ifmtarg{#6}{}{\addtolength{\topmargin}{#6}}% + \@ifmtarg{#7}{}{\addtolength{\headheight}{#7}}% + \@ifmtarg{#8}{}{\addtolength{\headsep}{#8}}% + \@ifmtarg{#9}{}{\addtolength{\footskip}{#9}}% +} + + +\newenvironment{adjustwidth}[3][\@empty]{% + \begin{list}{}{% + \topsep\z@% + \listparindent\parindent% + \parsep\parskip% + \@ifmtarg{#2}{\setlength{\leftmargin}{\z@}}{\setlength{\leftmargin}{#2}}% + \@ifmtarg{#3}{\setlength{\rightmargin}{\z@}}{\setlength{\rightmargin}{#3}}% + \ifx\@empty #1\relax \else + \cpoddpagefalse + \ifcpstrict\checkoddpage\else + \ifodd\c@page\cpoddpagetrue\fi + \fi + \ifcpoddpage\else % even numbered page + \@ifmtarg{#3}{\setlength{\leftmargin}{\z@}}{\setlength{\leftmargin}{#3}}% + \@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}{\setlength{\rightmargin}{#2}}% + \fi + \fi} + \item[]}{\end{list}} + + + +\endinput + +% Usage: +% ------ +% +%%%%%%%%%%%%% +% \changetext +%%%%%%%%%%%%% +% The \changetext command is for changing the size and horizontal position +% of the text block on a page. The command takes 5 arguments, each of which +% is a length or is empty. i.e., +% +% \changetext{textheight}{textwidth}{evensidemargin}{oddsidemargin}{columnsep} +% +% The given lengths are added to the corresponding current lengths and +% the remainder of the current page is typeset using the changed text block +% layout. The new layout remains in effect until another \change... command +% is issued. +% +%%%%%%%%%%%%% +% \changepage +%%%%%%%%%%%%% +% The \changepage command is for changing the general layout of +% a page. The command takes 9 arguments, each of which is a length or is empty. +% The first 5 arguments are the same as for \changetext and have the same effect. +% The last four arguments are: +% +% \changepage{5 args}{topmargin}{headheight}{headsep}{footskip} +% +% These lengths are added to the corresponding current lengths and +% thus modify the vertical positions of the elements of the page. The +% remainder of the current page is typeset using the changed text block +% and page layout. The new layout remains in effect until another +% \change... command is issued. +% +% NOTE 1: Not supplying a value for a length argument is equivalent +% to giving it a zero length value. +% +% NOTE 2: For any given page, everything is constant except for the textwidth +% and columnsep (for example, what is the meaning of two +% topmargins on a single column page?). +% It is therefore best to change anything else at the +% start of a new page. Further, any changes only apply to whole +% paragraphs. If you want an odd shaped paragraph use either +% the hanging package or the TeX \parshape command. +% +% For example, to change from single column pages to double column +% pages where the text block is both shorter and wider, then to revert +% back to the initial layout: +% ... single column normal page +% \newpage % or \clearpage +% \changetext{-5\baselineskip}{10em}{-5em}{-5em}{} +% \twocolumn +% ... two column pages +% \clearpage +% \changetext{5\baselineskip}{-10em}{5em}{5em}{} +% \onecolumn +% ... normal pages +% +% Note the adjustments to the margins which will keep the vertical centerline +% of the textblock at the same position on the page. +% +% As another example, to increase the width of a single paragraph: +% +% \changetext{0pt}{5em}{}{}{}% +% Start of wider paragraph text ... +% ... end of paragraph. +% +% \changetext{0pt}{-5em}{}{}{} +% Start of a normal paragraph ... +% +% Under some circumstances you can include a \change... command as part of +% the argument to \afterpage (from the afterpage package) and it may work. +% Similarly it may work in a heading style used for \thispagestyle to change +% a single page. +% +%%%%%%%%%%%%% +% adjustwidth +%%%%%%%%%%%%% +% Within an adjustwidth environment the left and right margins can be +% adjusted. The environment takes one optional argument and two required +% length arguments: +% +% \begin{adjustwidth}[]{leftmargin}{rightmargin} +% +% A positive length value will increase the relevant margin (shortening +% the text lines) while a negative length value will decrease the margin +% (lengthening text lines). An empty length argument means no change +% to the margin. At the end of the environment the margins revert to +% their original values. +% +% For example, to extend the text into the right margin: +% \begin{adjustwidth}{}{-8em} +% +% Any appearance of the optional argument (even just []) will cause +% the values of the margins to switch between odd and even pages. +% +% If the document is being set twosided it might be advantageous +% to have any wider text extending into the outside margin. This +% could be done via the optional argument, as: +% \begin{adjustwidth}[]{}{-8em} +% +% To have the adjusted text horizontally centered with respect to +% any surrounding text, the margins should be adjusted equally: +% \begin{adjustwidth}{-4em}{-4em} +% +% For interest, \begin{quotation} is pretty much equivalent +% to \begin{adjustwidth}{2.5em}{2.5em} +% +% The environment may also be used inside a float if the contents are +% a bit too wide for the text block, but can still fit within the physical +% page: +% \begin{figure} +% \begin{adjustwidth}{-2em}{-2em} +% \includegraphics{wide} +% \caption{Wide figure} +% \end{adjustwidth} +% \end{figure} +% +% Sometimes, because of the asynchronous nature of the TeX output +% routine, the margin switching may be incorrect (like \marginpar sometimes) +% near the top of a page. This can be corrected by using the package +% option `strict' (i.e., \usepackage[strict]{chngpage}), which causes +% adjustwidth to use the \checkoddpage command (see below). +% +% A disadvantage of the strict option is that the package generates +% a new label for each adjustwidth environment, and TeX may run out +% of space if there are an excessive number of labels in the document. +% +% Whether or not the strict option is used, `strict adjustwidths' +% can be turned on by putting the command \cpstricttrue before +% the environment, and turned of by using \cpstrictfalse. +% +% NOTE: In a twocolumn document, the adjustwidth environment +% treats both columns equally. For example, if the width is meant +% to be wider at the outer margin, then on odd pages the extra width +% will be at the right of any column, and on even pages the extra +% will be at the left of any column. You can get interesting effects +% by careful hand tuning on two column pages. +% +%%%%%%%%%%%%%%% +% \checkoddpage +%%%%%%%%%%%%%%% +% The \checkoddpage command can be used anywhere in the body of +% a document to determine if TeX is typesetting on an odd or +% even numbered page. If on an odd page then \ifcpoddpage is +% set TRUE, otherwise (on an even page) \ifcpoddpage is set +% FALSE. +% +% This works by the \checkoddpage command generating a label and +% then checking the \pageref for the label (actually, a special version +% of \pageref is required and is used internally by \checkoddpage). +% This mechanism requires at least two LaTeX passes to ensure that +% the labels have settled (on the initial pass there will be no labels +% in the *.aux file to be checked). +% +% The label identifier is composed of the command \cplabelprefix +% and an automatically generated number. \cplabelprefix, initially +% defined as `^_', can be changed in the preamble if it will cause +% a clash with any author-defined labels. The default labels will +% be of the form `^_N' where N is a positive integer. +% +% Changes in version 1.2 (2003/08/10) +% ---------------------- +% o Fixed \checkoddpage to handle page numbers other than arabic +% o Eliminated special \checkoddpage code for hyperref +% +% Changes in version 1.1c (2001/02/24) +% ----------------------- +% o Fixed problem when used with the calc package +% (can't do \setcounter{cp@tempcnt}{\cp@pageref{....}} +% o Fixed problem when used with the hyperef package +% (hyperref adds new arguments to \newlabel in the *.aux file) +% +% Changes in version 1.1b (2001/01/31) +% ----------------------- +% o Added strict option for robust adjustwidth; checks odd/even +% pages via labels instead of by the page counter. +% +% Changes in version 1.1a (2001/01/18) +% ----------------------- +% o Added missing {} in last 4 arguments of \changepage +% +% Changes in version 1.1 (2000/07/22) +% ---------------------- +% o Empty arguments made available +% o Added adjustwidth environment +% +% +% Peter W. +% +% diff --git a/Master/texmf-dist/tex/latex/ltxmisc/circle.sty b/Master/texmf-dist/tex/latex/ltxmisc/circle.sty new file mode 100644 index 00000000000..f7428522a12 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/circle.sty @@ -0,0 +1,42 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{circle}[1998/07/15 LaTeX package for circles in math mode] +%\Author{Klaus G. Barthelmann, barthel@informatik.uni-mainz.de} +%\ProvidesCommands{\Circle[1][n]} + +% As the name says, \Circle gives a circle in math mode. Its size lies between +% that of the binary operator \circ and that of the unary operator \bigcirc. +% It can be used as the nextstep operator of temporal logic in conjunction with +% \Box and \Diamond (latexsym) or \square and \lozenge (amssymb). \Circle[f] +% gives a filled circle. +% As you probably know, L. Lamport discouraged the use of the nextstep +% operator for program verification. This could be the reason that he did not +% provide a symbol for it in \LaTeX. +% The circles are taken from the lcircle10 font. We try to choose the +% appropriate size. If you need a high quality output, this solution will not +% suit you. + +\newcommand*\Circle[1][n]{% + \mathchoice{\@Circle{#1}{\tf@size}}{\@Circle{#1}{\tf@size}}% + {\@Circle{#1}{\sf@size}}{\@Circle{#1}{\ssf@size}}% +} + +% Bugs: circles have size n at fontsize 2n-1 and 2n; they do not scale linearly +% depending on the fontsize + +\newcommand*\@Circle[2]{{% + \dimen0=#2pt \advance\dimen0by.5pt \dimen1=1pt \divide\dimen0by\dimen1 + \count255=\dimen0 \ifodd\count255 \advance\count255by1 \fi\divide\count255by2 + \ifnum\count255=0 {}\else\ifnum\count255>15 {}\else + \dimen0=\count255pt + \edef\circfont{tencirc\ifnum\count255>8 w\fi} + \advance\count255by\if #1f111\else 95\fi + \dimen2=.82\dimen0 \advance\dimen2by.4pt + \raisebox{.625\dimen0}[\dimen2]{\makebox[1.2\dimen0]{% + \hspace*{.9\dimen0}% + \csname\circfont\endcsname + \char\count255 % + }}% + \fi\fi +}} + +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/concrete.sty b/Master/texmf-dist/tex/latex/ltxmisc/concrete.sty new file mode 100644 index 00000000000..bd51443806d --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/concrete.sty @@ -0,0 +1,24 @@ +\ProvidesPackage{concrete}[1996/10/08] +\NeedsTeXFormat{LaTeX2e} +% CONCRETE.sty +% Provides fonts for an approximation of the style in _Concrete Mathematics_. +% History..................... +% 96-10-08 Jim Hefferon jhefferon@smcvt.edu +% It is an FAQ on comp.text.tex that people look on CTAN for a style +% with this name. Seems reasonable. They are always advised to +% \usepackage the two packages below. So here is a wrapper style +% to do that. +% Remarks..................... +% 96-10-08 jh +% There are other styles for Concrete Math (concmath and something +% from AMS-LaTeX 1.1 are the ones that I know of), but this one is +% modular in that if the packages it calls are updated then of +% course, this is updated also). In particular, there are no font +% parameters, etc. +% Bugs........................ +% *Unlike the AMS-LaTeX v. 1.1 style file, this makes no attempt to +% provide any grafitti, etc. macros. Just the fonts. (One could +% argue that those are document-style, not font, macros.) +\RequirePackage{beton} % for the text fonts +\RequirePackage{euler} % for the math fonts +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/ltxmisc/dblfloatfix.sty b/Master/texmf-dist/tex/latex/ltxmisc/dblfloatfix.sty new file mode 100644 index 00000000000..1dbb8cb391f --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/dblfloatfix.sty @@ -0,0 +1,249 @@ +%% This is the LaTeX package dblfloatfix which solves two problems: +%% a)~floats in a twocolumn document come out in the right order and +%% b)~allowed float positions are now [tbp]. +%% +%% It 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 +\ProvidesPackage{dblfloatfix}[2003/11/18 v1.0 (MH)] +%% +%% USAGE: +%% +%% This package redefines internals of the LaTeX kernel by merging +%% the code of the packages fixltx2e (the fix2col part) and stfloats. +%% +%% If either of the packages stfloats or fix2col are loaded you will +%% get an error message and your document will probably not be able +%% to compile. So don't load them! +%% +%% When the new output routine for LaTeX3 is done, this package will +%% be obsolete. The sooner the better... +%% +%% If you're using the subfigure package this package will provide a +%% fix for \end@dblfloat by Steven Cochran (the author of subfigure). +%% +%% Morten H\o gholm, <moho01ab@student.cbs.dk> +\RequirePackage{fixltx2e} +%% An error message for those who didn't read the instructions. +\newcommand*{\DBLFIXerrormessage}[1]{% + \PackageError{dblfloatfix}{% + Don't use the #1 package!^^J% + Didn't you read the instructions in dblfloatfix.sty?!^^J% + You're in big trouble now...^^J% + Quit immediately (type `X') and correct the mistake}% + {Type `X' dammit!}% +} +%% A check for those users who don't read manuals. +\AtBeginDocument{% + \@ifpackageloaded{stfloats}{\DBLFIXerrormessage{stfloats}}{}% + \@ifpackageloaded{fix2col}{\DBLFIXerrormessage{fix2col}}{}% +%% Here's a fix by Steven Douglas Cochran (the author of subfigure). +%% It is needed in order to make subfigure work with this package as +%% both packages redefine \end@dblfloat. + \@ifpackageloaded{subfigure}{% + \typeout{Redefining \string\end@dblfloat\ for use with subfigure}% + \def\end@dblfloat{% + \if@twocolumn + \@listsubcaptions{\@captype}% + \@endfloatbox + \ifnum\@floatpenalty <\z@ + \@largefloatcheck + \global\dp\@currbox1sp % + \expandafter\@gobble\subfig@end@float + \fi + \else + \end@float + \fi}% + }{}% +} +%% Here we go... +\def\@dblbotlist{} +\newcount\@dblbotnum +\newcounter{dblbotnumber} +\setcounter{dblbotnumber}{2} +\def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tbp]}} + +\def \@dblfloatplacement {% + \global \@dbltopnum \c@dbltopnumber + \global \@dblbotnum \c@dblbotnumber + \global \@dbltoproom \dbltopfraction\@colht + \@textmin \@colht + \advance \@textmin -\@dbltoproom + \@fpmin \dblfloatpagefraction\textheight + \@fptop \@dblfptop + \@fpsep \@dblfpsep + \@fpbot \@dblfpbot + \def\f@depth{1sp}% +} + +\def\@addtodblcol{% + \begingroup + \@insertfalse + \@setfloattypecounts + \@getfpsbit \tw@ + \ifodd\@tempcnta + \@flsetnum \@dbltopnum + \ifnum \@dbltopnum>\z@ + \@tempswafalse + \ifdim \@dbltoproom>\ht\@currbox + \@tempswatrue + \else + \ifnum \@fpstype<\sixt@@n + \advance \@dbltoproom \@textmin + \ifdim \@dbltoproom>\ht\@currbox + \@tempswatrue + \fi + \advance \@dbltoproom -\@textmin + \fi + \fi + \if@tempswa + \@bitor \@currtype \@deferlist + \@testwrongwidth\@currbox + \if@test + \else + \@bitor \@currtype \@dblbotlist + \if@test + \else + \@tempdima -\ht\@currbox + \advance\@tempdima + -\ifx \@dbltoplist\@empty \dbltextfloatsep + \else \dblfloatsep + \fi + \global \advance \@dbltoproom \@tempdima + \global \advance \@colht \@tempdima + \global \advance \@dbltopnum \m@ne + \@cons \@dbltoplist \@currbox + \@inserttrue + \fi + \fi + \fi + \fi + \fi + \if@insert + \else + \@getfpsbit 4\relax + \ifodd\@tempcnta + \@flsetnum \@dblbotnum + \ifnum \@dblbotnum>\z@ + \@tempswafalse + \ifdim \@dbltoproom>\ht\@currbox + \@tempswatrue + \else + \ifnum \@fpstype<\sixt@@n + \advance \@dbltoproom \@textmin + \ifdim \@dbltoproom>\ht\@currbox + \@tempswatrue + \fi + \advance \@dbltoproom -\@textmin + \fi + \fi + \if@tempswa + \@bitor \@currtype \@deferlist + \if@test + \else + \@tempdima -\ht\@currbox + \advance\@tempdima + -\ifx \@dblbotlist\@empty \dbltextfloatsep + \else \dblfloatsep + \fi + \global \advance \@dbltoproom \@tempdima + \global \advance \@colht \@tempdima + \global \advance \@dblbotnum \m@ne + \@cons \@dblbotlist \@currbox + \@inserttrue + \fi + \fi + \fi + \fi + \fi + \if@insert + \else + \@cons\@deferlist\@currbox + \fi + \endgroup +} + +\def\@combinedblfloats{% + \ifx \@dbltoplist\@empty \else \@cdblflt \fi + \ifx \@dblbotlist\@empty \else \@cdblflb \fi +} + +\def\@cdblflt{% + \setbox\@tempboxa \vbox{}% + \let \@elt \@comdblflelt + \@dbltoplist + \let \@elt \relax + \xdef \@freelist {\@freelist\@dbltoplist}% + \global\let \@dbltoplist \@empty + \setbox\@outputbox \vbox% to\textheight + {%\boxmaxdepth\maxdepth %% probably not needed, CAR + \unvbox\@tempboxa\vskip-\dblfloatsep + \ifnum \@dbltopnum>\m@ne + \dblfigrule + \fi + \vskip \dbltextfloatsep + \unvbox \@outputbox + }% +} + +\def\@cdblflb{% + \setbox\@tempboxa \vbox{}% + \let \@elt \@comdblflelt + \@dblbotlist + \let \@elt \relax + \xdef \@freelist {\@freelist\@dblbotlist}% + \global\let \@dblbotlist \@empty + \setbox\@outputbox \vbox% to\textheight + {%\boxmaxdepth\maxdepth %% probably not needed, CAR + \unvbox\@outputbox + \vskip \dbltextfloatsep + \ifnum \@dblbotnum>\m@ne + \dblfigrule + \fi + \unvbox\@tempboxa + \vskip -\dblfloatsep + }% +} + +\def \@doclearpage {% + \ifvoid\footins + \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa + \setbox\@tempboxa\box\@cclv + \xdef\@deferlist{\@toplist\@botlist\@deferlist}% + \global \let \@toplist \@empty + \global \let \@botlist \@empty + \global \@colroom \@colht + \ifx \@currlist\@empty + \else + \@latexerr{Float(s) lost}\@ehb + \global \let \@currlist \@empty + \fi + \@makefcolumn\@deferlist + \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}% + \if@twocolumn + \if@firstcolumn + \xdef\@deferlist{\@dbltoplist\@dblbotlist\@deferlist}% + \global \let \@dbltoplist \@empty + \global \let \@dblbotlist \@empty + \global \@colht \textheight + \begingroup + \@dblfloatplacement + \@makefcolumn\@deferlist + \@whilesw\if@fcolmade \fi{\@outputpage + \@makefcolumn\@deferlist}% + \endgroup + \else + \vbox{}\clearpage + \fi + \fi + \ifx\@deferlist\@empty \else\clearpage \fi + \else + \setbox\@cclv\vbox{\box\@cclv\vfil}% + \@makecol\@opcol + \clearpage + \fi +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/excludeonly.sty b/Master/texmf-dist/tex/latex/ltxmisc/excludeonly.sty new file mode 100644 index 00000000000..91c07aef022 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/excludeonly.sty @@ -0,0 +1,83 @@ +% excludeonly.sty +% Dan Luecking <luecking@uark.edu> and Donald Arseneau <asnd@triumf.ca> +% +% This software is contributed to the public domain. +% +% Usage: +% ~~~~~~ +% In the document preamble, "\excludeonly{aaa,bbb}" will prevent files +% aaa.tex and bbb.tex from being typeset by \include{aaa} and \include{bbb}. +% If both \includeonly and \excludeonly are used, then only the files +% permitted by both declarations are used: +% \includeonly{aaa,bbb} +% \excludeonly{bbb,ccc} +% results in only aaa being included. +% +% This behavior contradicts the name "exclude only" but the name is +% desirable anyway to show the relationship with \includeonly. +% In case it is actually desireable that \excludeonly lives up +% to its name, and causes *all* parts to be included, except those +% explicitly listed for exclusion, there is an [only] package option +% \usepackage[only]{excludeonly} +% The effect of this is to override any \includeonly commands. +% +% Conflicts: +% ~~~~~~~~~~ +% This package redefines the internal \@include command, so it could +% conflict with other redefinitions. Known conflicts are with document +% classes "paper.cls" and "thesis.cls" by Wenzel Matiaske. +% A different method for implementing \excludeonly would be to +% redefine \@setckpt to compile a file-inclusion list (\@partlist) +% that accounts for exclusions. Surprisingly, several packages +% redefine \@setckpt, so this alternative would have more conflicts. +% +\ProvidesPackage{excludeonly}[2003/03/14 v1.0 % + eponymous command opposite to \string\includeonly] +% +\newif\if@excludesw \@excludeswfalse +\let\ExOn@swaset\relax +% +\DeclareOption{only}{\let\ExOn@swaset\@tempswatrue} +\ProcessOptions +% +\newcommand*{\excludeonly}[1]{% + \@excludeswtrue + \edef\@excllist{\zap@space#1 \@empty}} +\@onlypreamble\excludeonly +% +\def\@include#1 {% + \clearpage + \if@filesw + \immediate\write\@mainaux{\string\@input{#1.aux}}% + \fi + \@tempswatrue + \if@partsw + \@tempswafalse + \edef\reserved@b{#1}% + \@for\reserved@a:=\@partlist\do + {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% + \fi + \if@excludesw + \ExOn@swaset + \edef\reserved@b{#1}% + \@for\reserved@a:=\@excllist\do + {\ifx\reserved@a\reserved@b\@tempswafalse\fi}% + \fi + \if@tempswa + \let\@auxout\@partaux + \if@filesw + \immediate\openout\@partaux #1.aux + \immediate\write\@partaux{\relax}% + \fi + \@input@{#1.tex}% + \clearpage + \@writeckpt{#1}% + \if@filesw + \immediate\closeout\@partaux + \fi + \else + \deadcycles\z@ + \@nameuse{cp@#1}% + \fi + \let\@auxout\@mainaux} +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/fn2end.sty b/Master/texmf-dist/tex/latex/ltxmisc/fn2end.sty new file mode 100644 index 00000000000..1e3378238dc --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/fn2end.sty @@ -0,0 +1,173 @@ +% fn2end.sty Convert footnotes into end notes. +% LaTeXable documentation at end (after \endinput) +% LaTeX 2.09 users, should comment out this line: +\ProvidesPackage{fn2end}[1995/05/31 Convert footnotes into end notes.] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This file may be freely copied, and distributed. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Author: +% Kim C. Border, +% Division of the Humanities and Social Sciences, +% Caltech, Pasadena, CA 91125 USA +% e-mail: kcb@hss.caltech.edu + +% I gratefully acknowledge the help of J. E. Burke +% <jeburke@jhuvms.hcf.jhu.edu> at Johns Hopkins, who fixed +% the handling of long footnotes. +% The main idea is from Knuth's \answer macro in the TeXbook. + +% version 1.1, May 31, 1995 +% Changed \endnoteshere to \theendnotes, since you +% shouldn't use commands that begin with \end +% Also added user renewable parameters + +% Based on my old endnotes.sty, version 3 +% (Sep 4, 1990, rev. Jul 28, 1994), which was never posted. +% It appears to work with both LaTeX2e and LaTeX2.09 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% User redefinable parameters +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newlength{\noteskip} +\setlength{\noteskip}{1em} +\newcommand{\notenumberformat}[1]{$#1$} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Save the original definition of \@footnotetext +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\let\original@footnotetext\@footnotetext + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Define \makeendnotes to open a new file +% for the endnotes and to redefine \@footnotetext +% (\newlinechar courtesy of J E Burke) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\makeendnotes}{\newwrite\n@tefile + \immediate\openout\n@tefile=\jobname.end + \immediate\write\n@tefile{\relax} + \long\gdef\@footnotetext{\immediate\write\n@tefile{} + \begingroup\newlinechar=`\^^M + \catcode`\^^M=12\@setupcopy\@copynote}} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% The verbatim copying definitions +% based on the TeXbook's \answer macro +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\@setupcopy}{\@sanitize} +\newcommand{\@copynote}{} +\long\gdef\@copynote#1{% + \immediate\write\n@tefile{\notenumberformat{\@thefnmark}% + \hskip\noteskip}% + \immediate\write\n@tefile{#1}\endgroup} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Define \theendnotes to retrieve them +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\theendnotes}{\immediate\closeout\n@tefile + \input\jobname.end\relax} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Define \restorefootnotes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\restorefootnotes}{\long\gdef\@footnotetext{\original@footnotetext}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\endinput + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentstyle{article} +\newcommand{\cs}[1]{\mbox{\tt\bs#1}}% for control sequences +\newcommand{\bs}{\char '134 } % A backslash character for \tt font +\newcommand{\file}[1]{\mbox{\tt #1}} + +\title{The {\tt fn2end.sty} style} +\author{KC Border} +\date{May 31, 1995} + +\begin{document} +\maketitle + +The \file{fn2end.sty} package converts footnotes into +end notes, where a lot of publishers want them. It +does so by redefining the action of the \cs{footnote} +command. Instead of putting footnotes at the bottom +of the page, the notes are written to a file with +extension \file{end}, whence they may be retrieved +when desired. To handle footnotes on the title page +flexibly, \cs{footnote} is not redefined until the +\cs{makeendnotes} command is issued. Place the +command \cs{theendnotes} where you want the notes +to appear: after the last footnote, usually right +before the bibliography. The \cs{theendotes} command +merely \cs{inputs} the \file{end} file, it does {\em +not} create a new section or a new page. If you do +create a notes section with the \cs{section} command, +you should follow it with an \cs{indent} command. +Otherwise, the first note will be the only note that +does not start with an indented paragraph. + +There are now user renewable commands. The length +\cs{noteskip} is the space between the note number +and the start of the note text. By default it is 1 +em. Change its value with the \cs{setlength} command. +You can use \cs{renewcommand} to change +\cs{notenumberformat}, which formats the note number. +By default it is defined as +\begin{verbatim} + \newcommand{\notenumberformat}[1]{$#1$} +\end{verbatim} +If you want the end note numbers to appear as +superscripts with periods, you could +\begin{verbatim} + \renewcommand{\notenumberformat}[1]{${}^{#1.}$} +\end{verbatim} + +Successive \cs{makeendnotes} commands overwrite the +notes file. This is a feature, not a bug. For +example: +\begin{verbatim} + \makeendnotes + + \chapter{One} + blah + \section*{Notes}\indent + \theendnotes + + \makeendnotes + + \chapter{Two} + blah + \section*{Notes}\indent + \theendnotes +\end{verbatim} +etc, can be used to put notes at the end of each +chapter. (This is perverse because it makes the +notes nearly impossible to find, but some publishers +like it.) + +Additionally, \cs{restorefootnotes} restores the +normal behavior of footnotes, so that if you really +wanted to, you could have a title page for each +chapter with acknowledgment footnotes on the bottom, +and thereafter have end notes for the rest of the +material in the chapter. + + +{\em Bug}: Since \verb#\# is catcoded to 12 for +verbatim copying, if your footnote's text contains +an unequal number of \verb#\{#'s and \verb#\}#'s, +for instance, if you have a \verb#\left\{# balanced +by a \verb#\right.#, then \TeX\ believes you have +unmatched braces and does not figure out where the +argument of the \cs{footnote} command ends. (Believe +it or not, this happened to me the first time I +tried to use the style.) +{\em Workaround}: Use \verb#\lbrace# and \verb#\rbrace# +in your footnotes instead of \verb#\{# and \verb#\}#. + +\end{document} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/fncylab.sty b/Master/texmf-dist/tex/latex/ltxmisc/fncylab.sty new file mode 100644 index 00000000000..d91fe4c83f3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/fncylab.sty @@ -0,0 +1,104 @@ +% FNCYLAB.STY v1.0 +% Copyright 2000,2003 Robin Fairbairns (robin.fairbairns@cl.cam.ac.uk) +% +% This program can redistributed and/or modified under the terms +% of the LaTeX Project Public License; either version 1.2 of the +% license, or (at your option) any later version. +% +% See http://www.latex-project.org/lppl.txt for the latest version +% of the license. +% +% This package provides support for arbitrary structuring of the way +% label references look. The \labelformat command takes two +% arguments: +% #1 the counter that will define the label (e.g., section, figure, +% enumi, etc.) +% #2 the definition of how the label will be formatted: in this +% argument, #1 (*not* ##1) substitutes the `raw' value of the +% thing which is the source of the label. +% +% The package makes use of a built-in LaTeX facility (which actually +% needs a bit of patching before it's usable); this allows the precise +% layout of the references to labels generated from any LaTeX counter +% to be altered. Note that the way in which the counter itself is +% represented in references depends on \the<counter> -- it's the same +% as the way the counter gets printed. +% +% example +% \labelformat{section}{section #1} +% ... +% \section{The Blah Field}\label{blah} +% ... +% ... As we saw above in~\ref{blah} ... +% +% will typeset as +% ... As we saw above in section 3 ... +% +% For references at the start of a sentence, the package defines a +% command \Ref, which is used as follows: +% ... \Ref{blah} shows us that ... +% +% which will typeset as +% ... Section 3 shows us that ... +% +% A demonstration of \labelformat, using the enumerate package, may be +% found after \endinput + +% this check and redefinition is suggested in the latex source +% (ltxref.dtx) +\CheckCommand*\refstepcounter[1]{\stepcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\endcsname\csname the#1\endcsname}% +} +\renewcommand*\refstepcounter[1]{\stepcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% +} + +\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1} + +\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}% + \expandafter\MakeUppercase\@tempa +} + +\endinput + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% small sample file +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass{article} +% +% a brief demonstration of the use of fncylab +% +\usepackage{fncylab,enumerate} +\begin{document} +% +% outer level lists (such as enumerate) use counter enumi for their +% list tags. +\begin{enumerate}[(i)] +\item first item, defining a non-fancy label \label{first} +% +% that label was defined to look otherwise than it was printed for the +% item: +\item second item (see also item~\ref{first}) +% +% redefine label formats for this list's labels: +\labelformat{enumi}{(#1)} +% +% and label the another item in a different way: +\item third item, defining a fancy label \label{third} +% +% redefine label formats for this list's labels again: +\labelformat{enumi}{item~(#1)} +% +% we now see that the label has for item three has been defined +% differently, and that for item four differently again. note the +% reference starting a new sentence. +\item fourth item, defining a fancy label in a different format (see + also item~\ref{third}). \Ref{fourth} shows how a sentence may start + with reference to a fancy label; note that it's the \emph{label} + that's fancy, so the second change to the label format only affects + the labels defined after it. \label{fourth} +\end{enumerate} +\end{document} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/fnpara.sty b/Master/texmf-dist/tex/latex/ltxmisc/fnpara.sty new file mode 100644 index 00000000000..6ef13df38a1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/fnpara.sty @@ -0,0 +1,203 @@ +% FNPARA.STY +% A LaTeX style to typeset footnotes in run-on paragraphs. +% See end of this file (after \endinput) for comments. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% From latex.ltx : +\long\def\@mpfootnotetext#1{% + \global\setbox\@mpfootins\vbox{% + \unvbox\@mpfootins + \reset@font\footnotesize + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel + {\csname p@mpfootnote\endcsname\@thefnmark}% + \color@begingroup + \setbox0=\hbox{% + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \penalty -10 + \hskip\footglue + }% + }% + \dp0=0pt \ht0=\fudgefactor\wd0 \box0 + \color@endgroup}} +\long\def\@footnotetext#1{\insert\footins{% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \setbox0=\hbox{% + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \penalty -10 + \hskip\footglue + }% + }% + \dp0=0pt \ht0=\fudgefactor\wd0 \box0 + \color@endgroup}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%CCCC --- from TeXbook +\newskip\footglue \footglue=1em plus.3em minus.3em +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Cut down from article.cls : +\long\def\@makefntext#1{% +% \parindent 1em% +% \noindent +% \hb@xt@1.8em{\hss\@makefnmark}#1 + \hb@xt@.5em{\hss\@makefnmark}\hskip.5em#1 +}% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% From latex.ltx: +\def\endminipage{% + \par + \unskip + \ifvoid\@mpfootins\else + \vskip\skip\@mpfootins + \normalcolor + \footnoterule +% \unvbox\@mpfootins + \mpmakefootnoteparagraph + \fi + \global\@minipagefalse %% added 24 May 89 + \color@endgroup + \egroup + \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}} +\def \@makecol {% + \ifvoid\footins + \setbox\@outputbox \box\@cclv + \else + \setbox\@outputbox \vbox {% + \boxmaxdepth \@maxdepth + \unvbox \@cclv + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule +% \unvbox \footins + \makefootnoteparagraph + \color@endgroup + }% + \fi + \xdef\@freelist{\@freelist\@midlist}% + \global \let \@midlist \@empty + \@combinefloats + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht {% + \@texttop + \dimen@ \dp\@outputbox + \unvbox \@outputbox + \vskip -\dimen@ + \@textbottom + }% + \fi + \global \maxdepth \@maxdepth +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% From TeXbook, p.398 ff., AVOIDING the redefinition of \\ in LaTeX!! +{\catcode`p=12 \catcode`t=12 \gdef\@ennumber#1pt{#1}} + +{\footnotesize \newdimen\footnotebaselineskip +%CCCC --definitely needed: + \global + \footnotebaselineskip=\normalbaselineskip} + +\dimen0=\footnotebaselineskip \multiply\dimen0 by 1024 +\divide \dimen0 by \columnwidth \multiply\dimen0 by 64 +\xdef\fudgefactor{\expandafter\@ennumber\the\dimen0 } + +\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes + \setbox0=\hbox{\unhbox0 \removehboxes} +%CCCC ---now we are ready to set the paragraph: + \hsize\columnwidth + \@parboxrestore + \baselineskip=\footnotebaselineskip + \noindent +%CCCC ---this is where the strut is needed: + \rule{\z@}{\footnotesep}% + \unhbox0\par} +% +% +\def\mpmakefootnoteparagraph{\unvbox\@mpfootins \makehboxofhboxes + \setbox0=\hbox{\unhbox0 \removehboxes} +%CCCC ---now we are ready to set the paragraph: + \hsize\columnwidth + \@parboxrestore + \baselineskip=\footnotebaselineskip + \noindent +%CCCC ---this is where the strut is needed: + \rule{\z@}{\footnotesep}% + \unhbox0\par} +\def\makehboxofhboxes{\setbox0=\hbox{} + \loop\setbox2=\lastbox \ifhbox2 \setbox0=\hbox{\box2\unhbox0}\repeat} +\def\removehboxes{\setbox0=\lastbox + \ifhbox0{\removehboxes}\unhbox0 \fi} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput + + FNPARA.STY + A LaTeX style to typeset footnotes in run-on paragraphs. + +History: + +A vain attempt at this LaTeX modification was tried in late +September 1988 by Dominik Wujastyk, and sent to TeXhax and UKTeX +for comment. Chris Rowley came up with a working +version a few days later, but it still needs thorough testing. + +The Style: + +This LaTeX style changes the way LaTeX does footnotes. With this +style invoked (\documentstyle[fnpara]{article}), footnotes will +be typeset in a running paragraph, instead of one above another. +It is suitable for texts such as critical editions, which contain +many short footnotes. + +This is based on the TeX macros described by Knuth in the +TeXbook, Dirty Tricks, pages 398--400. It is not tested beyond +some simple examples. In particular, it has not been tested +properly in connection with even the simplest of environments, nor with +other floats. + +(In fact, ordinary LaTeX footnotes sometimes do not work well +if they need splitting (e.g. producing blank pages, +or appearing in shufled form): but these +problems should not affect this style. +I --CR-- have sent in a Bug Report about some +of these problems.) + +Be aware of Knuth's note on the limitations of this method of +doing the job: the TeX stack is used four times per footnote, +and the stack is limited (TeXbook pp. 300--301). So if you have +very many footnotes (in the hundreds) and encounter + "! TeX capacity exceeded, sorry [... save size ...]" +errors, you may need to break your text into smaller sections. +Fortunately, this is very easy to do with LaTeX. And the +footnote counter can be reset to make the joins seamless. + +Chris Rowley +Office tel: (England) 01 794 0575 +Janet: CA_ROWLEY@UK.AC.OPEN.ACS.VAX + +Dominik Wujastyk +Office tel: (England) 01 387 4477 x 3013 +Janet: Wujastyk@UK.AC.UCL.EUCLID + + +October 3, 1988 +--------------------------- +Modified 11/12/95 +Updated with new copies of relevant definitions from base files, and +added definitions for paragraph footnotes inside minipages + +Bradley Smith +(612) 624-1535 +basmith@prometheus.chem.umn.edu diff --git a/Master/texmf-dist/tex/latex/ltxmisc/framed.sty b/Master/texmf-dist/tex/latex/ltxmisc/framed.sty new file mode 100644 index 00000000000..3f1967b19c9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/framed.sty @@ -0,0 +1,255 @@ +% framed.sty v 0.8a 21-Jul-2003 +% Copyright (C) 1992-2003 by Donald Arseneau +% These macros may be freely transmitted, reproduced, or modified +% provided that this notice is left intact. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Create framed or shaded regions that can break across pages using +% \begin{framed} ... \end{framed} -- ordinary frame box (box at margin) +% \begin{shaded} ... \end{shaded} -- shaded background (into margin) +% ... leftbar ... -- line on left side +% \begin{MakeFramed}{settings} ... \end{MakeFramed} +% -- generic frame (for new environments) +% +% The "framed" environment puts the text into "\fbox" with the +% settings "\fboxrule=\FrameRule" and "\fboxsep=\FrameSep". +% You can change these lengths (using "\setlength") and you +% can even change the definition of "\FrameCommand" to use +% much fancier boxes. +% +% In fact, the "shaded" environment just redefines "\FrameCommand" +% to use "\colorbox{shadecolor}" (and you have to define the +% color "shadecolor": \newcolor{shadecolor}...). +% +% A page break is allowed, and even encouraged, before the framed +% environment. If you want to attach some text (a box title) to the +% frame, then the text should be inserted by \FrameCommand +% +% The contents of the framed regions are restricted: +% Floats, footnotes, marginpars and head-line entries will be lost. +% (Some of these may be handled in a later version.) +% This package will not work with the page breaking of multicol.sty, +% or other systems that perform column-balancing. +% +% The MakeFramed environment does the work. Its "settings" argument +% should contain any adjustments to the text width (applied to \hsize, +% and using the "\width" of the frame itself) as well as a `restore' +% command -- \@parboxrestore or \FrameRestore or something similar. +% +% Expert commands: +% \MakeFramed, \endMakeFramed: the "MakeFramed" environment +% \FrameCommand: command to draw the frame around its argument +% \FrameRestore: restore some text settings, but fewer than \@parboxrestore +% \FrameRule: length register; \fboxrule for default "framed". +% \FrameSep: length register; \fboxsep for default "framed". +% \FrameHeightAdjust: macro; height of frame above baseline at top of page +% +% This is still a `pre-production' version because I can think of many +% features/improvements that should be made. Nevertheless, starting +% with version 0.5 it should be bug-free. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ProvidesPackage{framed}[2003/07/21 v 0.8a: + framed or shaded text with page breaks] + +\newenvironment{framed}% using default \FrameCommand + {\MakeFramed {\advance\hsize-\width \FrameRestore}}% + {\endMakeFramed} + +\newenvironment{shaded}{% + \def\FrameCommand{\colorbox{shadecolor}}% + \MakeFramed {\FrameRestore}}% + {\endMakeFramed} + +\newenvironment{leftbar}{% + \def\FrameCommand{\vrule width 3pt \hspace{10pt}}% + \MakeFramed {\advance\hsize-\width \FrameRestore}}% + {\endMakeFramed} + +\chardef\FrameRestore=\catcode`\| % for debug +\catcode`\|=\catcode`\% % (debug: insert space after backslash) + +\def\MakeFramed#1{\par + % measure added width and height; call result \width and \height + \setbox\z@\vbox{\vskip-1in \hbox{\hskip-1in + \FrameCommand{\hbox{\vrule \@height .7in \@depth.3in \@width 1in}}}% + \vskip\z@skip}% + \def\width{\wd\z@}\def\height{\ht\z@}% + \edef\fb@frw{\the\width}\edef\fb@frh{\the\height}% + % insert pre-penalties and skips + \begingroup + \skip@\lastskip + \if@nobreak\else + \penalty9999 % updates \page parameters + \ifdim\pagefilstretch=\z@ \ifdim\pagefillstretch=\z@ + \edef\@tempa{\the\skip@}% + \ifx\@tempa\zero@glue \penalty-30 + \else \vskip-\skip@ \penalty-30 \vskip\skip@ + \fi\fi\fi + \penalty\z@ + % Give a stretchy breakpoint that will always be taken in preference + % to the \penalty 9999 used to update page parameters. The cube root + % of 10000/100 indicates a multiplier of 0.21545, but the maximum + % calculated badness is really 8192, not 10000, so the multiplier + % is 0.2301. + \advance\skip@ \z@ plus-.5\baselineskip + \advance\skip@ \z@ plus-.231\height + \advance\skip@ \z@ plus-.231\skip@ + \advance\skip@ \z@ plus-.231\topsep + \vskip-\skip@ \penalty 1800 \vskip\skip@ + \fi + \addvspace{\topsep}% + \endgroup + % clear out pending page break + \penalty\@M \vskip 2\baselineskip \vskip\height + \penalty9999 \vskip -2\baselineskip \vskip-\height + \penalty9999 % updates \pagetotal +|\message{After clearout, \pagetotal=\the\pagetotal, \pagegoal=\the\pagegoal. }% + \fb@adjheight + \setbox\@tempboxa\vbox\bgroup + #1% Modifications to \hsize (can use \width and \height) + \textwidth\hsize \columnwidth\hsize +} + +\def\endMakeFramed{\par + \kern\z@ \penalty-100 % put depth into height + \egroup + \begingroup \put@frame \endgroup +} + +% \put@frame takes the contents of \@tempboxa and puts all, or a piece, +% of it on the page with a frame (\FrameCommand). It recurses until +% all of \@tempboxa has been used up. (\@tempboxa must have zero depth.) + +\def\put@frame{\relax + \ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi +| \message{=============== Entering putframe ====================^^J +| \pagegoal=\the\pagegoal, \pagetotal=\the\pagetotal. }% + \ifinner \else + \dimen@\pagegoal \advance\dimen@-\pagetotal % natural space left on page + \ifdim\dimen@<2\baselineskip +| \message{Page has only \the\dimen@\space room left; eject. }% + \eject \fb@adjheight \put@frame + \else % there's appreciable room left on the page +| \message{\string\pagetotal=\the\pagetotal, +| \string\pagegoal=\the\pagegoal, +| \string\pagestretch=\the\pagestretch, +| \string\pageshrink=\the\pageshrink, +| \string\fb@frh=\fb@frh. \space} +| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}% + \begingroup % temporarily set \dimen@ to be... + \advance\dimen@.8\pageshrink % maximum space available on page + \advance\dimen@-\fb@frh\relax % space available for frame's contents + \expandafter\endgroup + % restore \dimen@ to real room left on page + \ifdim\dimen@>\ht\@tempboxa % whole box does fit +| \message{fits in \the\dimen@. }% + \else % box must be split +| \message{must be split to fit in \the\dimen@. }% + \setbox\@tempboxa\vbox{% simulate frame and flexiblity of the page: + \vskip \fb@frh \@plus\pagestretch \@minus.8\pageshrink + \kern137sp\kern-137sp\penalty-30 + \unvbox\@tempboxa}% + \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth \splittopskip\the\splittopskip}% + \boxmaxdepth\z@ \splittopskip\z@ + \setbox\tw@\vsplit\@tempboxa to\dimen@ + \setbox\tw@\vbox{\unvbox\tw@}% natural-sized +| \message{Box of size \the\ht\@tempboxa\space split to \the\dimen@. +| Natural height of split box is \the\ht\tw@. }% + % If the split-to size > (\vsize-\topskip), then set box to full size + \begingroup + \advance\dimen@\topskip + \expandafter\endgroup + \ifdim\dimen@>\pagegoal +| \message{Frame is big -- Use up the full column. }% + \dimen@ii\pagegoal + \advance\dimen@ii -\topskip + \advance\dimen@ii \FrameHeightAdjust\relax + \else % suspect this is wrong: + % If the split-to size > feasible room_on_page, rebox it smaller. + \advance\dimen@.8\pageshrink + \ifdim\ht\tw@>\dimen@ +| \message{Box too tall; rebox it to \the\dimen@. }% + \dimen@ii\dimen@ + \else % use natural size + \dimen@ii\ht\tw@ + \fi + \fi + % Re-box contents to desired size \dimen@ii + \advance\dimen@ii -\fb@frh + \setbox\tw@\vbox to\dimen@ii \bgroup + % remove simulated frame and page flexibility: + \vskip -\fb@frh \@plus-\pagestretch \@minus-.8\pageshrink + \unvbox\tw@ \unpenalty\unpenalty + \ifdim\lastkern=-137sp % whole box went to next page +| \message{box split at beginning! }% + \egroup \fb@resto@set \eject % (\vskip for frame size was discarded) + \fb@adjheight + \else % + \egroup \fb@resto@set + \ifvoid\@tempboxa % it all fit after all +| \message{box split at end! }% + \setbox\@tempboxa\box\tw@ + \else % it really did split +| \message{box split as expected. Its reboxed height is \the\ht\tw@. }% + \ifdim\wd\tw@>\z@ + \centerline{\FrameCommand{\box\tw@}}% ??? \centerline bad idea + \else +| \message{Zero width means likely blank. Don't frame it (guess)}% + \box\tw@ + \fi + \hrule \@height\z@ + \eject + \fb@adjheight + \put@frame + \fi\fi\fi\fi\fi + \ifvoid\@tempboxa\else + \centerline{\FrameCommand{\box\@tempboxa}}% + \nointerlineskip \null %{\showoutput \showlists} + \penalty-30 \vskip\topsep + \fi} + +\def\fb@adjheight{% + \vbox to\FrameHeightAdjust{}% get proper baseline skip from above. + \penalty\@M \nointerlineskip + \vskip-\FrameHeightAdjust + \penalty\@M} % useful for tops of pages + +\edef\zero@glue{\the\z@skip} + +\catcode`\|=\FrameRestore + +% Provide configuration commands: +\providecommand\FrameCommand{\fboxrule=\FrameRule \fboxsep=\FrameSep \fbox} +\@ifundefined{FrameRule}{\newdimen\FrameRule \FrameRule=\fboxrule}{} +\@ifundefined{FrameSep} {\newdimen\FrameSep \FrameSep =3\fboxsep}{} + +% Height of frame above first baseline when frame starts a page: +\providecommand\FrameHeightAdjust{6pt} + +% \FrameRestore has parts of \@parboxrestore. See how it is used in the +% "settings" argument of \MakeFrame. Previous behavior can be restored by +% using \@parboxrestore there, or redefining: +% \makeatletter \renewcommand\FrameRestore{\@parboxrestore} \makeatother +\def\FrameRestore{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse +% \let\par\@@par ?? + \let\-\@dischyph + \let\'\@acci\let\`\@accii\let\=\@acciii +% \parindent\z@ \parskip\z@skip Definitely omit! +% \everypar{}% ?? + \linewidth\hsize +% \@totalleftmargin\z@ +% \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip +% \parfillskip\@flushglue \lineskip\normallineskip +% \baselineskip\normalbaselineskip + \sloppy +% \let\\\@normalcr +} + +% Compatibility with previous versions (temporary!): +\let\fram@d=\MakeFramed \let\endfram@d=\endMakeFramed + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty b/Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty new file mode 100644 index 00000000000..17498f0bd51 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/fwlw.sty @@ -0,0 +1,141 @@ +% F W L W . S T Y ( First Word, Last Word ) +% +% Donald Arseneau (1993, 1995) +% +% Modifications to LaTeX output mechanism to determine the first and +% last words on the current page, plus the first word on the *next* +% page. These can be used in head-lines or foot-lines. The `words' +% you see may not be real words, but any unbreakable object. +% +% Such labelling does not make sense when \chapter generates a page +% break, so the last page before a \chapter (or any \clearpage) gets +% a blank "next word", and the first page of the chapter gets a blank +% "first word". There is a problem when footnotes split: the "next word" +% is blank. +% +% Two pagestyles are defined to print these words: \pagestyle{NextWordFoot} +% which helps you read ahead to the word on the next page; and \pagestyle +% {fwlwhead} which is like the headers in a lexicon. Or you can use the +% words in your own page-style... +% The words are available in the box registers: +% \FirstWordBox - first word on this page +% \NextWordBox - first word on next page +% \LastWordBox - last word on this page +% Use them in your header lines like: \copy\LastWordBox. +% +% Note that `words' may be things like: +% - two~words +% - [ ]Word ( [ ] represents a parindent box) +% - a whole displayed equation +% - the first column of an aligned equation +% - anomalously blank, if there are \writes or split footnotes etc. +% - partial words like par- or -tial. +% +% An entirely different approach is possible using \mark and \obeyspaces, +% and would have different problems. The problems with catcode changes +% may be more or less serious for your particular application. You are +% welcome to write a package using that method. The best solution would +% involve \mark and an input filter program to +% `\w{tag} \w{each} \w{word}, \w{in} \w{some} \w{way}.' + +\mathchardef\LW@pen 12345 +\newbox\FirstWordBox \global\setbox\FirstWordBox\hbox{} +\newbox\NextWordBox \global\setbox\NextWordBox\hbox{} +\newbox\LastWordBox \global\setbox\LastWordBox\hbox{} +\newbox\LW@box \global\setbox\LW@box\hbox{} +\newbox\LW@saved + +\def\ps@fwlwhead{\let\@mkboth\@gobbletwo + \def\@oddhead{\if@fcolmade\else \copy\FirstWordBox\hfil\copy\LastWordBox\fi}% + \let\@evenhead\@oddhead % no word-heads on float pages. + \let\@oddfoot\@empty\let\@evenfoot\@oddfoot + \let\chaptermark\@gobble\let\sectionmark\@gobble\let\subsectionmark\@gobble + } + +\def\ps@NextWordFoot{\let\@mkboth\@gobbletwo + \let\@oddhead\@empty\let\@evenhead\@oddhead + \def\@oddfoot{\hfil\thepage\hfil\llap{\copy\NextWordBox}}\let\@evenfoot\@empty + \let\chaptermark\@gobble\let\sectionmark\@gobble\let\subsectionmark\@gobble + } + +% Shell around old output routine. Gets first word from next page by +% letting TeX continue with \vsize=0 to get a look at the next line. +% Values of \outputpenalty for \specialoutput ( -10001 to -19999 ) are +% simply run through the output routine. +% \supereject and \clearpage give a blank "next word" +% When called after making a stub-page the stub is returned to the vertical +% list, the previous page is restored and shipped out normally, but +% knowing what the next word will be. + +\edef\FWLWnorm@L@output{\the\output} + +\output{\@tempswafalse +\ifnum \outputpenalty>-\@MM \ifnum\outputpenalty<-\@M \@tempswatrue\fi\fi +\if@tempswa % special (float) output +% \message{Float handler: penalty=\the\outputpenalty}% + \FWLWnorm@L@output +\else + \ifvoid\LW@saved % end of real page +% \message{End of real page}% + \global\setbox\LW@saved\copy\@cclv % save page + \setbox\@tempboxa\vbox{\unvbox\@cclv \unskip\unkern\unpenalty + \unskip\unkern\unpenalty \unskip\unkern\unpenalty + \setbox\@tempboxa\lastbox + \LW@getlast@word\@tempboxa\LastWordBox + }\ifnum\outputpenalty>-\@MM % not \supereject + \xdef\LW@vsize{\global\vsize\the\vsize + \global\holdinginserts\the\holdinginserts}% + \global\vsize\z@ \global\holdinginserts\@ne + \else % \supereject, just output, don't look for word on next page +% \message{caused by super-eject.} + \global\setbox\@cclv\box\LW@saved + \global\setbox\NextWordBox\hbox{}% + \FWLWnorm@L@output + \global\setbox\FirstWordBox\box\NextWordBox + \fi + \else % saved page => just did tiny page to get next word +% \message{Just got next line:}{\tracingall\showboxdepth2 \showbox\@cclv}% + \setbox\@tempboxa\vbox{\penalty\LW@pen\unvcopy\@cclv \LW@getall@boxes + \ifvbox\LW@box \penalty\LW@pen\unvbox\LW@box \LW@getall@boxes\fi + \ifvbox\LW@box \global\setbox\NextWordBox\hbox{}\else + \LW@getfirst@word\LW@box\NextWordBox + \fi}% Return tiny page to page list: + \unvbox\@cclv \ifnum\outputpenalty<\@M \penalty\outputpenalty\fi + \LW@vsize\relax + \global\setbox\@cclv\box\LW@saved + \FWLWnorm@L@output + \global\setbox\FirstWordBox\box\NextWordBox +\fi\fi} + +% globally get last "word" from a box (#1) into another box (#2) +\def\LW@getlast@word#1#2{\setbox\@tempboxa\vbox{\hsize\maxdimen \@parboxrestore + \hyphenpenalty\@M \exhyphenpenalty\@M + \rightskip\fill \looseness\@M \linepenalty\z@ + \noindent\unhbox#1\endgraf + \unskip\unkern\unpenalty \global\setbox\LW@box\lastbox + }\LW@repack{#2}} + +% globally get first "word" from a box (#1) into another box (#2) +\def\LW@getfirst@word#1#2{\setbox\@tempboxa\vbox{\@parboxrestore + \parshape\thr@@ \z@\z@ \z@\z@ \z@\maxdimen \parfillskip\fill + \hyphenpenalty\@M \exhyphenpenalty\@M + \hbadness\@MM \overfullrule\z@ \hfuzz\maxdimen + \ifhbox#1\noindent + \vadjust{\penalty\LW@pen}\penalty-\@M\unhbox#1% eliminate previous \leftskip + \else\ifvbox#1\penalty\LW@pen\unvbox#1\fi\fi + \endgraf + \@tempcnta\z@ \LW@getall@boxes}\LW@repack{#2}} + +% Go through a vertical list that starts with special penalty +\def\LW@getall@boxes{\global\setbox\LW@box\lastbox \unskip\unkern \unskip\unkern + \let\@tempa\relax + \ifvoid \LW@box \advance\@tempcnta\@ne \else \@tempcnta\z@ \fi + \ifnum\lastpenalty=\LW@pen \else \unpenalty\fi + \ifnum\lastpenalty=\LW@pen \else \unpenalty\fi + \ifnum\lastpenalty=\LW@pen \else \ifnum\@tempcnta<5 + \let\@tempa\LW@getall@boxes \fi \fi \unpenalty \@tempa} + +% Put contents of \LW@box into hbox #1 +\def\LW@repack#1{\global\setbox#1\hbox{\ifhbox\LW@box + \unhbox\LW@box\unskip\unskip\unpenalty\unskip + \else\ifvbox\LW@box\box\LW@box\fi\fi}} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/hypernat.sty b/Master/texmf-dist/tex/latex/ltxmisc/hypernat.sty new file mode 100644 index 00000000000..d40bcb090a9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/hypernat.sty @@ -0,0 +1,127 @@ +%% hypernat.sty v1.0b (C) 2001 Jens Berger +%% +%% This packages makes the hyperref package and the natbib package +%% with options `numbers' and `sort&compress' work together. This +%% means, that the citations (e.g [3,2,1]) will be compressed to +%% [1-3], where the `1' and the `3' are (color-)linked to the +%% bibliography. +%% +%% The changes I made here are suggested (in August 2000) for the +%% next natbib release. +%% +%% This package will disappear from CTAN, when natbib will do +%% the job by himself. +%% +%% Load this package after natbib and hyperref! +%% +%% Please make sure that you are using at least natbib v7.0! +%% +%% Changes +%% +%% v1.0b 2001/07/09 anchor for all citations in the list added +%% to make backref options working (bug reported by Günter Keusen) +%% v1.0a 2001/01/22 \noexpand for some \hyper@natlinkend added +%% (bug reported by Frank Meißen), hypernat.sty +%% is working now for `dvips --> ps2pdf' or `dvips -> Distiller' +%% +\ProvidesPackage{hypernat}[2001/07/09 v1.0b hyperref and natbib compatibility (jb)] +\AtBeginDocument{\def\NAT@sort{2}} +\def\NAT@citexnum[#1][#2]#3{% + \NAT@sort@cites{#3}% + \let\@citea\@empty + \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty + \@for\@citeb:=\NAT@cite@list\do + {\edef\@citeb{\expandafter\@firstofone\@citeb}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \@ifundefined{b@\@citeb\@extra@b@citeb}{% + {\reset@font\bfseries?} + \NAT@citeundefined\PackageWarning{natbib}% + {Citation `\@citeb' on page \thepage \space undefined}}% + {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm + \NAT@parse{\@citeb}% + \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{% + \let\NAT@name=\NAT@all@names + \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}% + \fi + \ifNAT@full\let\NAT@nm\NAT@all@names\else + \let\NAT@nm\NAT@name\fi + \ifNAT@swa + \ifnum\NAT@ctype>1\relax\@citea + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \ifnum\NAT@ctype=2\relax\NAT@test{\NAT@ctype}% + \else\NAT@alias + \fi\hyper@natlinkend\else + \ifnum\NAT@sort>1 + \begingroup\catcode`\_=8 + \ifcat _\ifnum\z@<0\NAT@num _\else A\fi + \global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi + \ifcat _\ifnum\z@<0\NAT@last@num _\else A\fi + \global\@tempcnta=\NAT@last@num \global\advance\@tempcnta by\@ne + \else \global\@tempcnta\m@ne\fi + \endgroup +% v0.1b anchor added to make backref's working, watch for errors! + \ifnum\NAT@nm=\@tempcnta + \ifHy@backref\hyper@natlinkstart{\@citeb\@extra@b@citeb}\hyper@natlinkend\fi + \ifx\NAT@last@yr\relax +% \edef\NAT@last@yr{\@citea \mbox{\noexpand\citenumfont{\NAT@num}}}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \edef\NAT@last@yr{\@citea \mbox{\noexpand% + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \noexpand\citenumfont{\NAT@num}% + \noexpand\hyper@natlinkend}% + }% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \else +% \edef\NAT@last@yr{--\penalty\@m\mbox{\noexpand\citenumfont{\NAT@num}}}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \edef\NAT@last@yr{--\penalty\@m\mbox{\noexpand% + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \noexpand\citenumfont{\NAT@num}% + \noexpand\hyper@natlinkend}% + }% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \fi + \else +% \NAT@last@yr \@citea \mbox{\citenumfont{\NAT@num}}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \NAT@last@yr \@citea \mbox{% + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \citenumfont{\NAT@num}% + \hyper@natlinkend}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \let\NAT@last@yr\relax + \fi + \else + \@citea \mbox{\hyper@natlinkstart{\@citeb\@extra@b@citeb}% + {\citenumfont{\NAT@num}}\hyper@natlinkend}% + \fi + \fi + \def\@citea{\NAT@sep\penalty\@m\NAT@space}% + \else + \ifcase\NAT@ctype\relax + \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\penalty\@m\NAT@space\else + \@citea \NAT@test{1}\ \NAT@@open + \if*#1*\else#1\ \fi\fi \NAT@mbox{% + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + {\citenumfont{\NAT@num}}\hyper@natlinkend}% + \def\@citea{\NAT@@close\NAT@sep\penalty\@m\ }% + \or\@citea + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \NAT@test{\NAT@ctype}\hyper@natlinkend + \def\@citea{\NAT@sep\penalty\@m\ }% + \or\@citea + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \NAT@test{\NAT@ctype}\hyper@natlinkend + \def\@citea{\NAT@sep\penalty\@m\ }% + \or\@citea + \hyper@natlinkstart{\@citeb\@extra@b@citeb}% + \NAT@alias\hyper@natlinkend + \def\@citea{\NAT@sep\penalty\@m\ }% + \fi + \fi + }}% + \ifnum\NAT@sort>1\relax\NAT@last@yr\fi + \ifNAT@swa\else\ifnum\NAT@ctype=0\if*#2*\else + \NAT@cmt#2\fi \NAT@@close\fi\fi}{#1}{#2}% +} +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/iagproc.cls b/Master/texmf-dist/tex/latex/ltxmisc/iagproc.cls new file mode 100644 index 00000000000..4848959b1d1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/iagproc.cls @@ -0,0 +1,265 @@ +%% +%% This is the file `iagproc.cls' intended for formatting submissions to +%% IAG (International Association of Geodesy) Proceedings. +%% +%% Originally written as 'banff.cls', for the Banff GGG2000 symposium. +%% An adaptation from 'article.cls', (c) The LaTeX3 Project and +%% individual authors: +%% +%% Leslie Lamport +%% Johannes Braams +%% David Carlisle +%% Alan Jeffrey +%% Frank Mittelbach +%% Chris Rowley +%% Rainer Schoepf +%% +%% License +%% +%% 'iagproc.cls' is free software that can be redistributed and/or +%% modified under the terms of the LaTeX Project Public License as +%% specified in the LaTeX Project Public License: +%% +%% http://www.latex-project.org/lppl.html +%% +%% Adapted from 'article.cls' (c) Martin Vermeer 2000 +%% Small adaptations (c) Hussein Abd-Elmotaal 2000 +%% Small adaptations (c) Martin Vermeer 2003 +%% +%% Your class definition should be +%% +%% \documentclass{iagproc} +%% +\NeedsTeXFormat{LaTeX2e} + +\ProvidesClass{iagproc} + [2003/01/22 v0.3 IAG Conference Proceedings] +% Options: +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions\relax +% +\LoadClass[10pt,twocolumn]{article} +%%\RequirePackage{mathptm} +%%\RequirePackage{times} +\RequirePackage{natbib} +%%\RequirePackage{apalike} +% Redefine \maketitle: +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \twocolumn[\@maketitle]% + \global\@topnum\z@ % Prevents figures from going at top of page. + \thispagestyle{empty}% + \@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +% +\def\@maketitle{% + \newpage + \vbox to 4.8cm { + \let \footnote \thanks + {\par\normalfont\huge\bfseries\sffamily% + \raggedright% + \@title\par}% + \vskip 0.6cm + \normalfont\normalsize\@author% + }% +}% +% +\newcommand\keywordsname{Keywords} + +\newcommand*\abstractlabel[1]{\normalfont\bfseries\abstractname.\quad}% +\newcommand*\keywordslabel[1]{\normalfont\bfseries\keywordsname.\quad}% +\renewenvironment{abstract}{% + \list{}{\topsep\z@% + \labelsep\z@% + \labelwidth\z@% + \itemindent\z@% + \rightmargin\z@% + \leftmargin\z@% + \let\makelabel\abstractlabel}% + \item\relax + }% + {\endlist}% +% +\newenvironment{keywords}{% + \list{}{\topsep\z@% + \labelsep\z@% + \labelwidth\z@% + \itemindent\z@% + \rightmargin\z@% + \leftmargin\z@% + \let\makelabel\keywordslabel}% + \item\relax + }% + {\endlist\par\vskip4mm\hrule}% +% +% Redefine \section and \subsection: +%\renewcommand\chapter{\@startsection {chapter}{0}{\z@}% +% {-3.25ex \@plus -0.6ex \@minus -.2ex}% +% {4mm \@plus0.1ex}% +% {\normalfont\raggedright\Large\bfseries\sffamily}} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-4mm \@plus -0.6ex \@minus -.2ex}% + {4mm \@plus0.1ex}% + {\normalfont\raggedright\large\bfseries\sffamily}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-4mm \@plus -0.3ex \@minus -.2ex}% + {4mm \@plus0ex}% + {\normalfont\raggedright\bfseries\sffamily}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-4mm \@plus -0.2ex \@minus -.2ex}% + {4mm \@plus0ex}% + {\normalfont\raggedright\sffamily\bfseries\itshape}} +% Redefine section, subsection numbering: +\renewcommand \thesection {\@arabic\c@section} +\renewcommand\thesubsection{\thesection.\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} + +% +\newcommand{\journal}[1]{\def\@journal{#1\ }} + +\setlength\intextsep{8mm} +\setlength\floatsep{8mm} +\setlength\abovecaptionskip{2mm} +\setlength\belowcaptionskip{2mm} + +% Redefine default font etc.: +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \small + \sbox\@tempboxa{\textbf{#1.} #2}% +%% \ifdim \wd\@tempboxa >\hsize +%% \@hangfrom{\textbf{#1.} }#2\par + \textbf{#1.} #2\par +%% \else +%% \global \@minipagefalse +%% \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% +%% \fi + \vskip\belowcaptionskip +}% +\renewenvironment{table} + {\@float{table}\small} + {\end@float} +\renewenvironment{table*} + {\@dblfloat{table}\small} + {\end@dblfloat} +\newenvironment{acknowledgements}{% + \list{}{\labelsep\z@% + \labelwidth\z@% + \itemindent\z@% + \leftmargin\z@% + \let\makelabel\acknowslabel}% + \item\relax + \small\itshape}% + {\endlist}% + +\def\refname{References} + +\def\@cite#1#2{(#1\if@tempswa , #2\fi)} +\def\@biblabel#1{} + +\def\thebibliography#1{\section*{\refname\@mkboth + {\sl\uppercase{\refname}}{\sl\uppercase{\refname}}}\list + {\relax}{\setlength{\labelsep}{0em} + \setlength{\itemindent}{-4mm} + \setlength{\leftmargin}{4mm}} + \setlength{\parsep}{0pt} + \setlength{\itemsep}{0pt plus 2pt} +% \def\newblock{\hskip .11em plus .33em minus .07em} + \sloppy\clubpenalty4000\widowpenalty4000 + \sfcode`\.=1000\relax}% + +\renewcommand\labelitemi[0]{\(\circ\)} +\renewcommand\labelitemii[0]{\(\triangleright\)} +\renewcommand\labelitemiii[0]{\normalfont\bfseries{--}} +\renewcommand\labelitemiv[0]{\(\cdot\)} +% +\renewcommand{\topfraction}{.9} +\renewcommand{\bottomfraction}{.9} +\renewcommand{\textfraction}{.1} +\pagestyle{plain} +%\input{fleqn.clo} %%% deactived by Hussein +\setlength{\columnsep}{8mm} +\setlength{\textheight}{224mm} +\setlength{\textwidth}{156mm} +% +\setlength\parindent{4mm} +\flushbottom +%\setlength\mathindent{4mm} %%% deactivated Hussein +% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This is a new section added by Hussein +%% to allow the balance of the two columns +%% of the last page of the manuscript +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\@BAlancecol}{\if@twocolumn + \setbox0=\vbox{\unvbox\@outputbox} \@tempdima=\ht0 + \advance\@tempdima by \topskip \advance\@tempdima + by -\baselineskip \divide\@tempdima by 2 + \splittopskip=\topskip + {\vbadness=\@M \loop \global\setbox3=\copy0 + \global\setbox1=\vsplit3 to \@tempdima + \ifdim\ht3>\@tempdima \global\advance\@tempdima by 1pt \repeat} + \setbox\@leftcolumn=\vbox to \@tempdima{\unvbox1\vfil} + \setbox\@outputbox=\vbox to \@tempdima + {\dimen2=\dp3\unvbox3\kern-\dimen2 + \vfil} + \fi} +\newif\if@BAlanceone +\global\@BAlanceonefalse +\newdimen\oldvsize +\newcommand{\@BAdblcol}{\if@firstcolumn + \unvbox\@outputbox \penalty\outputpenalty + \global\oldvsize=\@colht \global\multiply \@colht by 2 + \global\@BAlanceonetrue + \global\@firstcolumnfalse + \else \global\@firstcolumntrue + \if@BAlanceone + \global\@BAlanceonefalse\@BAlancecol + \global\@colht=\oldvsize \else + \PackageWarningNoLine{balance} + {You have called \protect\balance\space + in second column\MessageBreak + Columns might not be balanced}\fi + \setbox\@outputbox\vbox to \@colht{\hbox to\textwidth + {\hbox to\columnwidth {\box\@leftcolumn \hss}\hfil + \vrule width\columnseprule\hfil \hbox to\columnwidth + {\box\@outputbox \hss}}\vfil}\@combinedblfloats + \@outputpage \begingroup \@dblfloatplacement + \@startdblcolumn \@whilesw\if@fcolmade \fi + {\@outputpage\@startdblcolumn}\endgroup + \fi} +\newcommand{\@BAcleardblpage}{\clearpage\if@twoside \ifodd\c@page\else + \hbox{}\newpage\fi\fi} +\newcommand{\balance}{\global\let\@outputdblcol=\@BAdblcol + \global\let\cleardoublepage=\@BAcleardblpage} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This is a new section added by Hussein +%% for float seperation +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\dblfloatsep 10pt plus 2pt minus 4pt \dbltextfloatsep 10pt plus 2pt minus 4pt +\@fptop 0pt plus 1fil \@fpsep 10pt plus 2fil \@fpbot 0pt plus 1fil +\@dblfptop 0pt plus 1fil \@dblfpsep 10pt plus 2fil \@dblfpbot 0pt plus 1fil + +\endinput +%% +%% End of file `iagproc.cls'. + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/import.sty b/Master/texmf-dist/tex/latex/ltxmisc/import.sty new file mode 100644 index 00000000000..48c529a598e --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/import.sty @@ -0,0 +1,100 @@ +% import.sty Ver 3.0 17-Dec-1997 Donald Arseneau (asnd@reg.triumf.ca) +% +% Allow input of a file with its own inputs from another directory. +% +% \import {full_path} {file} \subimport {path_extension} {file} +% Also \includefrom, \subincludefrom, and * variants. +% +% This software is free of any restrictions. +% +% For example, if a remote file "/usr5/friend/work/report.tex" has contents: +% My graph: \includegraphics{picture} +% \input{explanation} +% then you can safely input that file in your own document with the command +% "\import{/usr5/friend/work/}{report}"; the explanation and picture will +% be taken from the remote directory. You can then import documents from +% other friends, even if they use the same file names. +% +% The "\subimport" command allows imported files to import files themselves, +% using their own directory as the root of a "path_extension". Do not use +% both "\import" and "\subimport" in the same file. +% +% For example, if a file is imported (using either command) from directory +% "abc/" and that file contains the command "\subimport{lmn/}{xyz}" then +% file "abc/lmn/xyz.tex" is input, and any "\input" commands in that file +% will read files from directory "abc/lmn/". +% +% Note that the sub-import path is merely appended to the current import +% path. Mistakes from this method must be rectified by "\import@path@fix". +% +% Depending on on how your \TeX\ system is configured, if a file with the +% same name as the import file exists in the current directory or in the +% TEXINPUTS path, that other file will be read in preference to one in the +% import directory. So here is the real behavior of the previous example: +% Given the sequence "\import{abc/}{one}", "\subimport{lmn/uvw/}{two}" (in +% file one), "\input{three}" (in file two), LaTeX first looks for three.tex +% in the TEXINPUTS search path; if not found, it tries "abc/lmn/uvw/three"; +% if that doesn't exist, it tries "abc/three"; if still not found, it tries +% the defined "\input@path", if there is one. +% +% To avoid searching the TEXINPUTS path when importing files, use the `star' +% versions of the commands: "\import*" and "\subimport*". +% +% A hook "\import@path@fix" is provided to reformat the import path +% to fit the syntax of a particular operating system. It *could* be +% defined to convert unix-style path names to the local format, but +% all it does now is remove "][" from VMS sub-import directories. +% +% Presently, the paths are defined ``locally'' so input files must have +% balanced grouping. + +\newcommand{\import}{\global\let\import@path\@empty \@doimport\input} +\newcommand{\subimport}{\@doimport\input} +\newcommand{\includefrom}{\global\let\import@path\@empty \@doimport\include} +\newcommand{\subincludefrom}{\@doimport\include} + +\def\@doimport#1{\@ifstar + {\@sub@import#1\@iffileonpath}{\@sub@import#1\IfFileExists}} + +% #1 = import command, #2 = switch for *, #3 = import path extension +\def\@sub@import#1#2#3{% + \begingroup + \protected@edef\@tempa{\endgroup + \let\noexpand\IfFileExists\noexpand#2 + \noexpand\@import \noexpand#1% param 1 + {\@ifundefined{input@path}{}{\input@path}}% 2 + {\@ifundefined{Ginput@path}{}{\Ginput@path}}% 3 + {\import@path#3}{\import@path}% 4,5 + {\ifx\IfFileExists\im@@IfFileExists \noexpand\im@@IfFileExists + \else \noexpand\IfFileExists \fi}}% 6 + \@tempa} +% +% #1 = import command (\input or \include) +% #2 = previous input path list. #3 = previous graphics input path list. +% #4 = full path added to each. #5 = previous import path. +% #6 = previous \IfFileExists. #7 = file name. +% +\def\@import#1#2#3#4#5#6#7{% + \gdef\import@path{#4}% + \protected@edef\input@path{{\import@path@fix{#4}}#2}% + \protected@edef\Ginput@path{{\import@path@fix{#4}}#3}% + #1{#7}% + \let\IfFileExists#6% restore after \import* + \gdef\import@path{#5}% + \def\input@path{#2}\ifx\input@path\@empty \let\input@path\@undefined \fi + \def\Ginput@path{#3}\ifx\Ginput@path\@empty \let\Ginput@path\@undefined \fi +} + +\let\im@@IfFileExists\IfFileExists +\gdef\import@path{} + +\let\import@path@fix\@firstofone % default + +% Check for vms file names and set \import@path@fix appropriately +\gdef\@gtempa{[]} +\ifx\@gtempa\@currdir % VMS directory syntax + \gdef\import@path@fix#1{\@gobbleVMSbrack#1][>} + \gdef\@gobbleVMSbrack#1][#2{#1\ifx>#2\@empty + \expandafter \strip@prefix \fi % Gobble up to > + \@gobbleVMSbrack #2} +\fi diff --git a/Master/texmf-dist/tex/latex/ltxmisc/kix.sty b/Master/texmf-dist/tex/latex/ltxmisc/kix.sty new file mode 100644 index 00000000000..b78547da6e3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/kix.sty @@ -0,0 +1,115 @@ +% This is kix.sty +% By Sander R.M. Stoks <sanders@sumware.demon.nl> +% (c) 1998 17 SEP 1998 +% Implements KIX codes as used by the Dutch PTT for bulk mail +% addressing. ("Royal Mail 4 State Code") +% "KIX" is a registered trade mark of PTT Post Holdings B.V. +% +% Usage: {\kix 1234AB123}. +% Note: Only caps please. +% +% Example: +% +% Sander Stoks\\ +% Heyendaalseweg 127 E2-08\\ +% 6525 AJ \textsc{Nijmegen}\\[2mm] +% {\kix 6525AJ127XE2X08} +% +\newlength{\kixwidth}% +\newlength{\kixspace}% +\newlength{\kixsyncheight}% +\newlength{\kixheight}% +\newlength{\kixbase}% +\newlength{\kixlheight}% +\setlength{\kixwidth}{0.505mm plus 0.125mm minus 0.125mm}% +\setlength{\kixspace}{0.505mm plus 0.125mm minus 0.105mm}% +\setlength{\kixsyncheight}{1.27mm plus 0.25mm minus 0.25mm}% +\setlength{\kixheight}{3.15mm plus 0.53mm minus 0.53mm}% +\setlength{\kixbase}{\kixsyncheight}\addtolength{\kixbase}{-\kixheight}% +\setlength{\kixlheight}{\kixheight}% +\addtolength{\kixlheight}{\kixheight}% +\addtolength{\kixlheight}{-\kixsyncheight}% +\newcommand{\kixsync}{\rule{\kixwidth}{\kixsyncheight}\kern\kixwidth}% +\newcommand{\kixup}{\rule{\kixwidth}{\kixheight}\kern\kixwidth}% +\newcommand{\kixdown}{\rule[\kixbase]{\kixwidth}{\kixheight}\kern\kixwidth}% +\newcommand{\kixlong}{\rule[\kixbase]{\kixwidth}{\kixlheight}\kern\kixwidth}% +\begingroup + \catcode`\1=\active + \catcode`\2=\active + \catcode`\3=\active + \catcode`\4=\active + \catcode`\5=\active + \catcode`\6=\active + \catcode`\7=\active + \catcode`\8=\active + \catcode`\9=\active + \catcode`\0=\active + \catcode`\A=\active + \catcode`\B=\active + \catcode`\C=\active + \catcode`\D=\active + \catcode`\E=\active + \catcode`\F=\active + \catcode`\G=\active + \catcode`\H=\active + \catcode`\I=\active + \catcode`\J=\active + \catcode`\K=\active + \catcode`\L=\active + \catcode`\M=\active + \catcode`\N=\active + \catcode`\O=\active + \catcode`\P=\active + \catcode`\Q=\active + \catcode`\R=\active + \catcode`\S=\active + \catcode`\T=\active + \catcode`\U=\active + \catcode`\V=\active + \catcode`\W=\active + \catcode`\X=\active + \catcode`\Y=\active + \catcode`\Z=\active + \gdef\kix{% + \def\s{\kixsync}% + \def\u{\kixup}% + \def\d{\kixdown}% + \def\l{\kixlong}% + \catcode`\1=\active \def1{\s\d\u\l}% + \catcode`\2=\active \def2{\s\d\l\u}% + \catcode`\3=\active \def3{\d\s\u\l}% + \catcode`\4=\active \def4{\d\s\l\u}% + \catcode`\5=\active \def5{\d\d\u\u}% + \catcode`\6=\active \def6{\s\u\d\l}% + \catcode`\7=\active \def7{\s\l\s\l}% + \catcode`\8=\active \def8{\s\l\d\u}% + \catcode`\9=\active \def9{\d\u\s\l}% + \catcode`\0=\active \def0{\s\s\l\l}% + \catcode`\A=\active \defA{\d\u\d\u}% + \catcode`\B=\active \defB{\d\l\s\u}% + \catcode`\C=\active \defC{\s\u\l\d}% + \catcode`\D=\active \defD{\s\l\u\d}% + \catcode`\E=\active \defE{\s\l\l\s}% + \catcode`\F=\active \defF{\d\u\u\d}% + \catcode`\G=\active \defG{\d\u\l\s}% + \catcode`\H=\active \defH{\d\l\u\s}% + \catcode`\I=\active \defI{\u\s\d\l}% + \catcode`\J=\active \defJ{\u\d\s\l}% + \catcode`\K=\active \defK{\u\d\d\u}% + \catcode`\L=\active \defL{\l\s\s\l}% + \catcode`\M=\active \defM{\l\s\d\u}% + \catcode`\N=\active \defN{\l\d\s\u}% + \catcode`\O=\active \defO{\u\s\l\d}% + \catcode`\P=\active \defP{\u\d\u\d}% + \catcode`\Q=\active \defQ{\u\d\l\s}% + \catcode`\R=\active \defR{\l\s\u\d}% + \catcode`\S=\active \defS{\l\s\l\s}% + \catcode`\T=\active \defT{\l\d\u\s}% + \catcode`\U=\active \defU{\u\u\d\d}% + \catcode`\V=\active \defV{\u\l\s\d}% + \catcode`\W=\active \defW{\u\l\d\s}% + \catcode`\X=\active \defX{\l\u\s\d}% + \catcode`\Y=\active \defY{\l\u\d\s}% + \catcode`\Z=\active \defZ{\l\l\s\s}% +}% +\endgroup diff --git a/Master/texmf-dist/tex/latex/ltxmisc/linsys.sty b/Master/texmf-dist/tex/latex/ltxmisc/linsys.sty new file mode 100644 index 00000000000..e1e43124d15 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/linsys.sty @@ -0,0 +1,27 @@ +%%%%%%%%%%%%%%%%%%%%%%% +%% Copyleft +%% Walter A. Kehowski +%% Department of Mathematics +%% Glendale Community College +%% walter.kehowski@gcmail.maricopa.edu +%% \begin{linsys}{2} +%% -x & + & 4y & = & 8\\ +%% -3x & - & 2y & = & 6 +%% \end{linsys} +%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{array} % TLC p465 +\RequirePackage{pifont} +\makeatletter +%% math-mode column types ------------------ +\newcolumntype{\@R}{>{$}r<{$}} +\newcolumntype{\@L}{>{$}l<{$}} +\newcolumntype{\@C}{>{$}c<{$}} +\newcounter{@dingctr} +\newcommand{\@wding}{\ding{\value{@dingctr}}\stepcounter{@dingctr}} +\newcommand{\@dinglabel}{\@wding} +\newenvironment{linsys}[1]{% +\setcounter{@dingctr}{192}% +\begin{tabular}{!{\@dinglabel}*{#1}{\@R\@C}\@R}}% +{\end{tabular}\setcounter{@dingctr}{192}} +\makeatother +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/listing.sty b/Master/texmf-dist/tex/latex/ltxmisc/listing.sty new file mode 100644 index 00000000000..3592501e5b7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/listing.sty @@ -0,0 +1,132 @@ +%%---------------------------------------------------------------------- +%% listing.sty +% +% LaTeX package for typesetting listings. +% Documentation at end of file after \endinput. +% +% Requires LaTeX2e (or newer). +% +% +% (C) Copyright 1994, 1996, 1999 by: +% +% Matthew Hebley, Volker Kuhlmann +% University of Canterbury +% EEE Dept +% Christchurch, New Zealand +% E-Mail: v.kuhlmann@elec.canterbury.ac.nz +% (Matthew is no longer available for contact, email or otherwise) +% +% This program can be redistributed and/or modified under the terms +% of the LaTeX Project Public License, distributed from CTAN +% archives as macros/latex/base/lppl.txt; either +% version 1 of the License, or (at your option) any later version. +% +% +% HISTORY: +% +% 1.2 25 May 1999 Re-published under the LPPL. No other change. +% 1.1 07 Feb 96 Added setting of \thelisting with the book and +% report document classes. +% 1.0 19 Aug 94 Created. +% +%%---------------------------------------------------------------------- + +\def\filename{listing} +\def\fileversion{V1.2} +\def\filedate{1999/05/25} + + +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{\filename}[\filedate] +\typeout{Package `\filename', \fileversion, <\filedate>} + + +\newcounter{listing} +\setcounter{listing}{0} + +\newenvironment{listing}{% + \newcommand{\@captype}{listing}% + \@ifundefined{@bigcaptionflag}{}{% + \def\@makecaption##1##2{% + \vskip \abovecaptionskip + \@listingsection*{##1:~##2}% + \vskip \belowcaptionskip + } + } + }% + {} + +\newcommand{\listingname}{Listing} +\newcommand{\listlistingname}{List of Listings} + +\newcommand{\ext@listing}{lol} +\newcommand{\fnum@listing}{\listingname ~\thelisting } +\newcommand{\l@listing}{\@dottedtocline {1}{1.5em}{2.3em}} +\newcommand{\listoflistings}{% + \@listingsection*{\listlistingname + \@mkboth{\uppercase{\listlistingname}}% + {\uppercase{\listlistingname}}}% + \@starttoc {lol}% + } +\@ifundefined{chapter}{% + \newcommand\@listingsection{\section}% + }{% + \newcommand\@listingsection{\chapter}% + \renewcommand\thelisting{\thechapter.\arabic{listing}}% + } + +\DeclareOption{bigcaptions}{% + \def\@bigcaptionflag{} +} + +\ProcessOptions + + +\endinput + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Load with: + + \usepackage{listing} +or + \usepackage[bigcaptions]{listing} + + +Package option: + +bigcaptions If present, captions appear as for sections + (or chapters when using the "book" or "report" + classes). + If not present, captions appear as for captions + in the figure or table environment. + + +Available control sequences: + +\begin{listing} A new environment for listings is provided. + Unlike figure and table, listing is NOT + a floating environment. + +\caption As usual. (only inside listing!) +\label As usual. (only inside listing; after \caption!) +\ref As usual. +\listoflistings As for \listoftables, \listoffigures. +\listingname Produces the "Listing" text for the caption. +\listlistingname Produces the "List of Listings" text. + + +A *.lol file is produced similar to *.lot, *.lof files. + +Does not change \@makecaption (unless option "bigcaptions" is used), +so packages that change the layout of \caption still work. +listing.sty works together with hangcaption.sty. + + ``Documentation is like sex. + If it is good, it is REALLY good, + and if it is bad, it is better than nothing!'' + + [Gabe Helou] + +%% EOF listing.sty +%%---------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/ltxmisc/magaz.sty b/Master/texmf-dist/tex/latex/ltxmisc/magaz.sty new file mode 100644 index 00000000000..cfed39252ab --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/magaz.sty @@ -0,0 +1,123 @@ +% magaz.sty Ver 0.2 04-Sep-2003 "Magazine style" +% Copyright 1999, Donald Arseneau, asnd@triumf.ca, Vancouver, Canada +% This software is free to distribute, unaltered, and to use in any +% application. It may be altered and incorporated in other software freely. +% +% This version is just a single tool from a larger body of tools I might +% try to implement if I ever have the spare time. I'm writing this part +% now [1999] in response to a request on comp.text.tex. +% +% Yes Special formatting for first line of text in a paragraph +% No Special formatting for for first n lines (allow each different) +% No Also for first character (drop caps) (working together) +% No "Continued on"/"continued from" markers +% No wrapfig spanning columns +% No wrapfig placed at fixed location on page +% NO! Piecing together fragments of gallies to fit page +% +% Instructions: +% +% The "\FirstLine" command takes one argument: Some text. +% +% The first line of this text will be formatted according to +% "\FirstLineFont"; but if the text occupies less than a line, all +% that text (and no more) will be affected by "\FirstLineFont". +% The argument should be ordinary text, not lists and displayed +% equations. Such things will give you a `Bad text' error. +% +% This command is intended to be used in a replacement for a normal +% sectioning command in a document class; "\paragraph" would be +% appropriate. In particular, this "\paragraph" (or whatever) should +% insert vertical space and penalties etc., and probably "\noindent" +% at the start of the argument. The document class should also define +% "\FirstLineFont" appropriately as either a switch or a text-command; +% as in "\renewcommand\FirstLineFont{\MakeUppercase}". The defult +% definition is "\providecommand\FirstLineFont{\scshape}". + +\ProvidesPackage{magaz}[2003/09/04 v0.2] + +\newcommand\FirstLine[1]{\begingroup + % typeset text 3 times: 1) using all breaks to count segments; 2) with + % a full first line and \FirstLineFont to get first line and remaining + % segments; 3) Using current font, keeping only `remaining segments' + % on a single line. + \setbox\z@\box\mz@firstbox \setbox\z@\box\mz@remains % void the global boxes + \hbadness\maxdimen \hfuzz\maxdimen + \setbox\@tempboxa\vbox{% 1) use all breaks + \hsize\z@ \leftskip\z@skip \rightskip\z@skip \parfillskip\fill + \parshape\z@ \pretolerance\m@ne \tolerance\@ne + \doublehyphendemerits\z@ \finalhyphendemerits\z@ + #1\global\mathchardef\mz@spf\spacefactor\@@par + \global\mathchardef\mz@numl\prevgraf + }% end vbox "1)" + \setbox\@tempboxa\vbox{% 2) first line, plus other segments + \parshape \tw@ \z@\hsize \z@\maxdimen + \doublehyphendemerits\z@ \finalhyphendemerits\z@ + \pretolerance\m@ne \parfillskip\fill + {\FirstLineFont{#1}\@@par}% + \ifnum\prevgraf>\tw@ % Bad argument: not simple text or too much text + \mz@handlebad{#1}% + \else + \unskip\unkern\unpenalty \unskip\unkern\unpenalty + \ifnum\prevgraf<\tw@ % All text fits on first line + \setbox\z@\lastbox + \global\setbox\mz@firstbox\hbox{\unhbox\z@\unskip}% + \global\setbox\mz@remains\hbox{}% + \else % 2 lines: text fills first line with some left over + \setbox\z@\lastbox + \ifvoid\z@ % could not grab last line + \mz@handlebad{#1}% + \else + \unskip\unkern\unpenalty \unskip\unkern\unpenalty + \global\setbox\mz@firstbox\lastbox % 2a) break up "other segments" + \hsize\z@ \leftskip\z@skip \rightskip\z@skip \parfillskip\fill + \parshape\z@ \pretolerance\m@ne \tolerance\@ne + \noindent\nobreak % \nobreak because leftskip adds breakpoint + \unhbox\z@\unskip\@@par % gives number of "extra segments" + \@tempcnta\mz@numl \advance\@tempcnta-\prevgraf + \advance\@tempcnta\@ne % number of segs in 1st line plus 1 + \edef\@tempa{\the\@tempcnta\space}% 3) Collect "other segments" + \@whilenum \@tempcnta>\@ne\do{% build \parshape lines + \edef\@tempa{\@tempa \z@\z@}% + \advance\@tempcnta\m@ne + }% + \parshape \@tempa \z@\maxdimen + #1\@@par + \unskip\unkern\unpenalty \unskip\unkern\unpenalty + \global\setbox\mz@remains\lastbox + \fi + \fi + \fi + }% end vbox "2)" + \endgroup + \ifvoid\mz@firstbox #1% Error case: just output the text + \else + \noindent + \unhbox\mz@firstbox\unskip\unskip\unpenalty\break + \unhbox\mz@remains\unskip\unskip\unpenalty \spacefactor\mz@spf + \fi +} + +\newbox\mz@firstbox +\newbox\mz@remains + +\providecommand\FirstLineFont{\scshape} + +% In the future, I might allow some non-text material by using \vsplit +% as a fallback method of grabbing lines, and I might allow more or +% unusual text in the `remainders' by skipping the step of setting two +% lines (instead setting one first line plus many tiny lines all together). +% The following macro would then handle those cases as an error recovery +% mechanism. Right now it just gives an error message and dumps out +% the text. + +\def\mz@handlebad{\mz@error} +\def\mz@error#1{% + \PackageError{magaz}{Bad text for \string\FirstLine\space ending\on@line}{}% + \global\setbox\mz@remains\box\mz@firstbox % void first box +} + +\endinput + +Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789 +:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/Master/texmf-dist/tex/latex/ltxmisc/midpage.sty b/Master/texmf-dist/tex/latex/ltxmisc/midpage.sty new file mode 100644 index 00000000000..b39f667a5d6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/midpage.sty @@ -0,0 +1,23 @@ +% midpage.sty +% +% Provides a midpage environment for vertical centering +% +% author: Peter Wilson (CUA) +% (now at peter.r.wilson@boeing.com) +% Copyright 1996 +% Released under the LaTeX Project Public License +% +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{midpage}[2000/02/20 v1.1 vertical centering] +\newenvironment{midpage}{\vspace*{\fill}}{\vspace*{\fill}} + +\endinput + +% Example use: +% \clearpage +% \begin{midpage} +% Vertically Centered Title +% \end{midpage} +% \clearpage +% diff --git a/Master/texmf-dist/tex/latex/ltxmisc/needspace.sty b/Master/texmf-dist/tex/latex/ltxmisc/needspace.sty new file mode 100644 index 00000000000..babec8cec55 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/needspace.sty @@ -0,0 +1,77 @@ +% needspace.sty +% +% Provides commands to reserve space at the bottom of a page. If there +% is not enough space on the current page (column) a new page (column) +% is started. +% +% author: Peter Wilson (CUA) +% (now at peter.r.wilson@boeing.com) +% Copyright 1996 +% Released under the LaTeX Project Public License +% +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{needspace}[2003/02/18 v1.3a reserve vertical space] + +\newcommand{\needspace}[1]{\begingroup\setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@ \penalty -100\vskip\z@\@plus -\dimen@ + \vskip\dimen@ \penalty 9999\vskip -\dimen@\endgroup} + +\newcommand{\Needspace}{\@ifstar{\@sneedsp@}{\@needsp@}} + +\newcommand{\@sneedsp@}[1]{\par \penalty-100\begingroup + \setlength{\dimen@}{#1}% + \dimen@ii\pagegoal \advance\dimen@ii-\pagetotal + \ifdim \dimen@>\dimen@ii + \break + \fi\endgroup} + +\newcommand{\@needsp@}[1]{\par \penalty-100\begingroup + \setlength{\dimen@}{#1}% + \dimen@ii\pagegoal \advance\dimen@ii-\pagetotal + \ifdim \dimen@>\dimen@ii + \ifdim \dimen@ii>\z@ + \vfil + \fi + \break + \fi\endgroup} + +\endinput + +% Example uses: +% +% ... previous text.\par +% \needspace{5\baselineskip} % need next 5 lines on a single page/column +% The next five lines ... +% +% \Needspace*{4\baselineskip} % need 4 lines kept on same page +% The major principles are: +% \begin{itemize} +% \item ... +% +% +% The \needspace macro reserves an APPROXIMATE amount of space (depending +% on what penalties are in effect) but is efficient and normally adequate. +% A short page will be ragged bottom even if \flushbottom is in +% effect. +% +% \Needspace is less efficient but reserves the requested space. It +% should only be used between paragraphs. Short pages produced by +% \Needspace{<length>} will be ragged bottom but short pages produced by +% \Needspace*{<length>} will be flush bottom if \flushbottom is in effect. +% +% Changes v1.3a (2003/02/18) +% o At the suggestion of Donald Arseneau (private emails) changed guts of +% \needspace from +% ... \vskip\z@\@plus\dimen@\pagebreak[3]\vskip\z@\@plus-\dimen@\endgroup} +% +% Changes v1.3 (2003/02/07) +% o Added \Needspace (an extended version of postings by Donald Arseneau +% to comp.text.tex e.g., in November 1993, August 1995, September 1997, ...) +% +% Changes v1.2 (2002/09/11) +% o At the suggestion of Robin Fairbairns, added use of \dimen@ to capture +% the argument so that calc package commands can be used in the argument. +% +% +% diff --git a/Master/texmf-dist/tex/latex/ltxmisc/nolbreaks.sty b/Master/texmf-dist/tex/latex/ltxmisc/nolbreaks.sty new file mode 100644 index 00000000000..70238b56451 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/nolbreaks.sty @@ -0,0 +1,68 @@ +% nolbreaks.sty by Donald Arseneau +% Public domain software -- please improve and submit to CTAN + +\ProvidesPackage{nolbreaks}[2002/09/19 \space v 1.0 \space + - no linebreaks in text] + +% Use \nolbreaks{some text} to prevent linebreaks in "some text". +% This has the advantage over \mbox{} that glue (rubber space) +% remains flexible. It has the disadvantage of not working in +% all cases! Most common cases are handled here (\linebreak is +% disabled, for example) but spaces hidden in macros or { } +% can still create break-points. +% +% Large pieces of text with no breaks can cause problems with +% paragraph justification. Giving the package option [ragged] +% allows a line before the unbreakable text to be cut short. +% +% You should declare \sloppy in your document. + +\let\nb@ragged\relax + +\DeclareOption{ragged}{ + \def\nb@ragged{% + \skip@\lastskip \unskip + \nb@counter \lastpenalty + \hskip \z@ plus 2cm\relax + \penalty\nb@counter + \advance\skip@ \z@ plus -2cm\relax + \hskip\skip@ + }} +\ProcessOptions + +\let\nb@@iwspace=\ % +\let\nb@@hskip=\hskip +\let\nb@@penalty=\penalty +\newcount\nb@counter +\ifx\langwohyphens\undefined + \newlanguage\nb@lang +\else + \let\nb@lang\langwohyphens +\fi + +\DeclareRobustCommand{\nolbreaks}[1]{% + \leavevmode + \begingroup + % Apply flexible lead-in + \nb@ragged + % Prevent hyphenation + \language\nb@lang + % Disable commands that give breakpoints + \let\ \nb@iwspace + \let\hskip\nb@hskip + \let\penalty\nb@penalty + \let\language\nb@counter + % Prevent breaks in math + \relpenalty\@M + \binoppenalty\@M + % Prevent breaks at spaces (only outermost visible spaces) + \@PreserveSpaces \@empty #1 \@PreserveSpaces + \endgroup +} + +\def\@PreserveSpaces#1 {#1\@ifnextchar\@PreserveSpaces{\@gobble}% + {\@firstofone{\nb@@penalty\@M} \@PreserveSpaces\@empty}} + +\def\nb@iwspace{\nb@@penalty\@M \nb@@iwspace} +\def\nb@hskip {\nb@@penalty\@M \nb@@hskip} +\def\nb@penalty{\nb@@penalty\@M \nb@counter} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/optional.sty b/Master/texmf-dist/tex/latex/ltxmisc/optional.sty new file mode 100644 index 00000000000..847589cb61f --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/optional.sty @@ -0,0 +1,158 @@ +% +% O P T I O N A L . S T Y +% ~~~~~~~~~~~~~~~~~~~~~~~ +% ver 2.2b Jan 2005 +% +% Enable multiple versions of a document to be printed from one source file, +% especially if most of the text is shared between versions. +% +% Copyright 1993,1999,2001,2005 by Donald Arseneau (asnd@triumf.ca). +% This software is released under the terms of the LaTeX Project Public +% License (ftp://ctan.tug.org/tex-archive/macros/latex/base/lppl.txt). +% (Essentially: Free to use, copy, distribute (sell) and change, but, if +% changed, that fact must be made apparent to the user.) It has a +% status of "maintained". +% +% +% HOW TO USE +% ~~~~~~~~~~ +% One way to use this package is to declare (for example) +% +% \usepackage[opta]{optional} +% +% at the beginning of your document, and flag optional text throughout +% your document like: +% +% \opt{opta}{Do this if option opta was declared} +% \opt{optb}{Do this if option optb was declared} +% \opt{optx,opty}{Do this if either option optx or opty} +% \opt{}{Never print this text!} +% \opt{opta}{\input{appendices}} +% \optv{xam}{Type: \verb|[root /]$ rm -r *|.} +% +% Note that both the package option and the "\opt" argument can contain +% lists of options although, in practice, one or the other should be a +% single option name. Lists are allowed in both places to allow more +% flexibility in the style of use. (But making the definitions much more +% difficult, Grrr.) +% +% Just as for "\includeonly", you will have to edit the main document +% file to switch option codes (i.e., change the "\usepackage" line). +% There are, however, several ways to use this package without altering +% the main document file: separate files, file-name sensing, interactive +% prompting, and command-line option selection. +% +% Typically, different versions of a document will require different +% document class and package setup, besides the different tags for +% optional.sty. In that case it is best to have a separate main file +% for each version of the document. Each stub file will declare the +% document class and load some packages (including this one) and then +% input the rest of the document from a file common to all versions. +% +% \documentclass[A0]{poster} +% \usepackage[poster]{optional} +% \input{my_paper} +% +% If the different opt-tags match the different stub file names (file +% poster.tex will typeset the "poster" version) then you can specify +% +% \usepackage[\jobname]{optional} +% +% Alternatively, this "\jobname" technique can make use of symbolic links, +% if your computer system supports them, by having a single main input +% file accessed under different names (and different "\jobname"s). +% +% Another scheme is to invoke LaTeX with the command line such as: +% +% latex "\def\UseOption{opta,optb}\input{file}" +% +% (with quoting appropriate to your operating system) then options "opta" +% and "optb" will be used in addition to any options specified with the +% "\usepackage" command. +% +% You can prompt yourself to specify the option(s) with every run +% through LaTeX: +% +% \usepackage{optional} +% \newcommand{\ExplainOptions}{man = users manual, check = checklist, +% ref = reference card, post = poster.} +% \AskOption +% +% The definition of "\ExplainOptions" is optional; it only serves to help +% the person who answers the question. The "\AskOption" is also optional; +% it will be executed automatically whenever optional.sty sees no list of +% options. This method is too tedious to use much. +% +% The normal restrictions forbidding special characters in package options +% and reference tags apply also the the tags used by the "\opt" command. +% +% These are not `comment' macros: The optional text must be well-formed +% with balanced braces, even if not printed. The "\opt" command *IS* +% completely `expandable' which means it is robust and can even be used +% in messages ("\typeout"). +% +% As usual, "\verb" commands and verbatim environments cannot be used +% in the argument to "\opt". For this purpose there is a variant form +% of "\opt" called "\optv" (optional verbatim) which may have a limited +% class of verbatim material in the argument. It can do so by leaving +% the braces around the argument, which may have undesired side effects. +% For an "\optv" argument to be successfully ignored, the verbatim material +% must have balanced braces etc. +% +% The "\opt" command is only intended for small sections of text. If you +% need to optionally include whole sections or chapters, put that material +% in a separate file, and "\opt"-ionally use an "\input" command: +% +% \opt{internal}{\input{prog_listings}} +% +%====================== END INSTRUCTIONS ======================== + +\ProvidesPackage{optional}[2005/01/26 ver 2.2b; \space + Optional inclusion/omission] +% Initialize used-option-list to \@gobble to eat the comma when the first +% entry is `appended'. +\@ifundefined{UseOption}{\let\UseOption\@gobble}{} +\DeclareOption*{\edef\UseOption{\UseOption,\CurrentOption}} +\ProcessOptions +\AtBeginDocument{\Opl@Setup} + +\newcommand*\opt[1]{\if\Opl@notlisted{#1}\expandafter\@gobble + \else \expandafter\@firstofone \fi} + +\newcommand*\optv[1]{\if\Opl@notlisted{#1}\expandafter\@gobble\fi} + +% This initial definition forces immediate setup if \opt used in the preamble +\def\Opl@notlisted{\fi \Opl@Setup \if\Opl@notlisted} + +\newcommand\AskOption{% + \@ifundefined{ExplainOptions}{}{\typeout{\ExplainOptions}}% + \typein[\UseOption]{Specify which optional text to process:}% + } + +\def\Opl@Setup{% + \ifx\UseOption\@gobble\AskOption\fi + \let\Opl@notlisted\@empty % initialize list of checks + \@for\@tempa:=\UseOption\do{% + \ifx\@tempa\@empty\else\expandafter\Opl@oneop\expandafter{\@tempa}\fi}% + \ifx\Opl@notlisted\@empty \PackageWarning{optional}% + {No options were selected, so all optional text will be printed}% + \let\opt\@secondoftwo + \else + \typeout{Using optional text marked with \UseOption. }% + \toks@\expandafter{\Opl@notlisted}% + \edef\@tempa{\def\noexpand\Opl@notlisted####1{,\the\toks@,}}\@tempa + \fi + \let\Opl@Setup\@empty \let\Opl@oneop\undefined + \let\AskOption\undefined \let\ExplainOptions\undefined +} +\begingroup +\catcode`\Z= 3 % special delimiter +\gdef\Opl@oneop#1{% + \@ifundefined{Opl@Match@#1}{% + \toks@\expandafter{\Opl@notlisted}% + \edef\Opl@notlisted{\the\toks@ \csname Opl@Match@#1\endcsname ,####1,#1,Z}% + \@namedef{Opl@Match@#1}##1,#1,##2Z{##2}% + }\relax +} +\endgroup +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty b/Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty new file mode 100644 index 00000000000..ebe2a410369 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/oubraces.sty @@ -0,0 +1,92 @@ +% oubraces.sty: Interleave \overbrace with \underbrace +% Donald Arseneau, 1993 +% +% \overunderbraces{upper_braces}{main_formula}{lower_braces} +% +% Instructions are given below, after \endinput. +% +% First, set catcode of @ in case it isn't a "letter" already +\expandafter\edef\csname REST@catcode\endcsname + {\catcode`\noexpand\@=\the\catcode`\@ + \let \csname SREST@catcode\endcsname \noexpand\UnDefinedButNoAt} +\catcode`\@=11 + +\def\overunderbraces #1#2#3{{% + \baselineskip\z@skip \lineskip4\p@ \lineskiplimit4\p@ + \displaystyle % deliberately generate error if not in math mode! +% first, do the top half of the alignment in a save-box ... + \setbox\z@\vbox{\ialign{&\hfil${}##{}$\hfil\cr + \global\let\br\br@label #1\cr % upper labels + \global\let\br\br@down #1\cr % upper braces + #2\cr % main line of the formula + }}% finished partial alignment and \vbox. + \dimen@-\ht\z@ % Measure height of partial alignment -- +% ... it is the height we want for the whole. +% Now do the whole alignment (notice the repetition from above) + \setbox\z@\vbox{\ialign{&\hfil${}##{}$\hfil\cr + \global\let\br\br@label #1\cr % upper labels + \global\let\br\br@down #1\cr % upper braces + #2\cr % main line of the formula + \global\let\br\br@up #3\cr % lower braces + \global\let\br\br@label #3\cr % lower labels + }}% finished whole alignment and \vbox. + \advance\dimen@\ht\z@ % calc. the necessary lowering + \lower\dimen@\hbox{\box\z@}% shift to get the desired height +}} + +% Three aliases for \br. +% #1=number of spanned columns, #2=label +\def\br@up#1#2{\multispan{#1}\upbracefill} +\def\br@down#1#2{\multispan{#1}\downbracefill} +\def\br@label#1#2{\multispan{#1}\hidewidth $#2$\hidewidth} + +\REST@catcode + +\endinput +% +%----------------------------------------------------------------- +% +% oubraces.sty: Interleave \overbrace with \underbrace +% Donald Arseneau, 1993 +% +% The syntax is: +% +% \overunderbraces{upper_braces}{main_formula}{lower_braces} +% +% Suppose we want the equation: +% x y +% ,-----^-----. ,-----^-----. +% a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2 +% `-----v-----' +% z +% There are seven segments: +% x y +% ,-----^-----. ,-----^-----. +% a + b + c + d + e + f + g + h + i + j + k + l + m = \pi r^2 +% 11111111222222223333344455555666666667777777777... +% `-----v-----' +% z +% Insert & between each segment (where the tips of the braces point) +% to type the main_formula: +% x y +% ,-----^-----. ,-----^-----. +% a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m +% `-----v-----' +% z +% Each brace should be specified by typing +% +% \br{number_of_segments}{label}, +% +% separated by & to indicate which segment to start at; and +% where & & skips a segment that has no brace. For our +% example formula, the upper and lower brace specifiers are: +% +% top row: &\br{2}{x}& &\br{2}{y} +% bot row: & &\br{3}{z} +% +% Now put them all together: +% +% \overunderbraces{&\br{2}{x}& &\br{2}{y}}% +% {a + b +&c + d +&e + f&+&g + h&+ i + j&+ k + l + m}% +% {& &\br{3}{z}} +% = \pi r^2 diff --git a/Master/texmf-dist/tex/latex/ltxmisc/parskip.sty b/Master/texmf-dist/tex/latex/ltxmisc/parskip.sty new file mode 100644 index 00000000000..c5ca5768349 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/parskip.sty @@ -0,0 +1,87 @@ +% parskip.sty; last edited by Robin Fairbairns (rf10@cam.ac.uk), +% derived from: +% +% This is PARSKIP.STY by H.Partl, TU Wien, as of 19 Jan 1989. +% +% Package to be used with any document class at any size. +% It produces the following Paragraph Layout: +% Zero Parindent and non-zero Parskip. The stretchable glue in \parskip +% helps LaTeX in finding the best place for page breaks. +% +% This package is no more than quick fix; the `proper' way to achieve +% effects as far-reaching as this is to create a new class. An +% example class is to be found in the ntgclass set: artikel3.cls + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{parskip}[2001/04/09 non-zero parskip adjustments] + +\parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt +\parindent=\z@ + +% +% from a suggestion by Donald Arseneau on comp.text.tex: + +\DeclareOption{parfill}{\setlength{\parfillskip}{30\p@ \@plus 1fil}} +\ProcessOptions + +% To accompany this, the vertical spacing in the list environments is changed +% to use the same as \parskip in all relevant places (for normalsize only): +% \parsep = \parskip +% \itemsep = \z@ % add nothing to \parskip between items +% \topsep = \z@ % add nothing to \parskip before first item + +\def\@listI{\leftmargin\leftmargini + \topsep\z@ \parsep\parskip \itemsep\z@} +\let\@listi\@listI +\@listi + +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep\z@ \parsep\parskip \itemsep\z@} + +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep\z@ \parsep\parskip \itemsep\z@} + +% and, now... +% \partopsep = \z@ % don't even add anything before first item (beyond +% % \parskip) even if the list is preceded by a blank line +\partopsep=\z@ + +% Note that listiv, listv and listvi don't change vertical parameters. + +% deal with a problem raised on comp.text.tex in april 2001 +% +% don't expand the table of contents any further +% +% first: check that the definition of \@starttoc is unchanged from +% that in latex.ltx +\@ifundefined{CheckCommand}{}{% + \CheckCommand*{\@starttoc}[1]{% + \begingroup + \makeatletter + \@input{\jobname.#1}% + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse + \endgroup}} +% +% now having generated any warning that might help, redefine +\renewcommand*{\@starttoc}[1]{% + \begingroup + \makeatletter + \parskip\z@ + \@input{\jobname.#1}% + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse + \endgroup +} + +\endinput + + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/path.sty b/Master/texmf-dist/tex/latex/ltxmisc/path.sty new file mode 100644 index 00000000000..19b0fe178ac --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/path.sty @@ -0,0 +1,333 @@ +%%% @LaTeX-style-file +%%% { +%%% author = "Philip Taylor", +%%% version = "3.03b", +%%% date = "22 July 1997", +%%% time = "15:59:31 BST", +%%% filename = "path.sty", +%%% address = "The Computer Centre +%%% RHBNC, University of London +%%% Egham Hill +%%% Egham, Surrey TW20 0EX, ENGLAND", +%%% telephone = "Tel: +44 1784 443172", +%%% FAX = "Fax: +44 1784 434348", +%%% email = "P.Taylor@Vms.Rhbnc.Ac.Uk", +%%% codetable = "ISO/ASCII", +%%% keywords = "file name, filename, path name, pathname, +%%% discretionary, discretionaries", +%%% supported = "yes", +%%% docstring = {Computer filenames, host names, and e-mail +%%% addresses tend to be long strings that +%%% cause line breaking problems for TeX. +%%% Sometimes rather long strings are +%%% encountered, such as: +%%% +%%% mighty-mouse-gw.scrc.symbolics.com +%%% +%%% This file defines a macro, \path|...|, +%%% similar to LaTeX's \verb|...| macro, that +%%% sets the text in the typewriter font, +%%% allowing hyphen-less line breaks at +%%% punctuation characters. +%%% +%%% The default set of punctuation characters is +%%% defined as +%%% +%%% \discretionaries |~!@$%^&*()_+`-=#{"}[]:;'<>,.?\/| +%%% +%%% However, you can change it as needed, for +%%% example +%%% +%%% \discretionaries +@%!.+ +%%% +%%% would assign to it the set @ % ! . which +%%% commonly occur in electronic mail addresses. +%%% +%%% The delimiter characters surrounding the +%%% arguments to \discretionaries and \path +%%% will normally be a punctuation character not +%%% found in the argument, and not otherwise +%%% significant to TeX. In particular, backslash +%%% cannot be used as a delimiter. In the rare +%%% event that this is required, set +%%% +%%% \specialpathdelimiterstrue +%%% +%%% This practice is not recommended, because TeX +%%% then runs about four times slower while it is +%%% typesetting \path\...\ requests. +%%% \specialpathdelimitersfalse is the normal +%%% setting. +%%% +%%% This file may be used in Plain TeX or AmSTeX +%%% by +%%% +%%% \input path.sty +%%% +%%% and in LaTeX by +%%% +%%% \usepackage {path} +%%% +%%% The checksum field above, if present, contains +%%% a CRC-16 checksum as the first value, followed +%%% by the equivalent of the standard UNIX wc (word +%%% count) utility output of lines, words, and +%%% characters. This is produced by Robert +%%% Solovay's checksum utility. +%%% } +%%% } +%%% ==================================================================== + +% ====================================================================== +% +% The \path Macro +% +% An early prototype of this code which was developed by Nelson H. F. +% Beebe <beebe@math.utah.edu> used a recursive macro to peel off one +% character at a time, then with a nest of \ifx statements, test for +% each punctuation character, and if one is found, insert discretionary +% linebreaks in the form of \- or \penalty0. While this usually works, +% it is not entirely satisfactory, because the nested \ifx statements +% are ugly, and the recursion can exhaust TeX's macro stack for +% arguments longer than about 30 characters. +% +% A second version by NHFB built upon the ideas used by the LaTeX +% \verb|...| macro; this was mostly successful, but was flawed by its +% inability to handle at least the three characters ^ [ ], by loss of +% use of @ for naming internal private macros, and by its inability to +% allow the set of characters at which breaks are permissible. +% +% The problem was then passed off to Philip Taylor, who wrote this third +% version which fully solves the problem. Phil therefore gets the +% author credit in the file header above. [Gee, thanks ! ** Phil] +% +% Revision history (reverse time order): +% +% 3.03b [22-Jul-1997] +% Summary: No code changes. An out-of-date example removed, the syntax +% for LaTeX2e changed to "\usepackage {path}", and the "checksum" +% comments modified to indicate that the checksum is not necessarily +% present. The initial opening brace re-positioned to align +% with the matching closing brace, and the inner closing brace +% re-positioned to align with the inner opening brace. A check made +% to ensure that no <tab> characters are present. +% +% 3.03a [22-Jul-1997] +% Summary: No code changes from V3.03; e-mail addresses, telephone numbers, +% etc. amended to reflect current situation. Checksum removed. +% +% 3.03 [03-Dec-1991] +% Problem: A \path|...| entry in a LaTeX index is set with an +% preceding blank line. +% Solution: Add \leavevmode before \hbox{}; without it, an extra blank +% line gets typeset before every invocation of \path in a +% LaTeX theindex environment. +% Diagnosis: To avoid hyphenation, the expansion of \path starts with +% an \hbox{} (c.f. the TeXbook, p. 454); LaTeX indices are +% basically set in vertical mode, with each index entry a +% paragraph in its own right; when an \hbox {} is +% encountered in vmode, it is typeset in vmode, and TeX +% continues; the first real character is encountered, and +% TeX enters unrestricted horizontal mode. The \hbox {} and +% the first character are therefore on separate lines, +% separated by \baselineskip. +% +% 3.02 [23-Oct-1991 13:45:12] +% First released version. +% ====================================================================== + +\immediate\write16{This is path.sty, Version 3.03 <03-Dec-1991>} + +%%% We will regrettably need one \count variable with an open name, +%%% in which to save the category code of commercial-at ... + +\newcount \ATcode +\ATcode = \catcode `\@ + +%%% Make commercial-at a letter to provide concealed control sequences + +\catcode `\@ = 11 + +%%% and then declare two \count variables with concealed names + +\newcount \c@tcode +\newcount \c@unter + +%%% and a boolean variable with an open name, to specify the nature of +%%% the delimiters which will be associated with the \path command + +\newif \ifspecialpathdelimiters + +%%% We need to define control sequences which expand to both +%%% active and passive spaces ... + +\begingroup +\catcode `\ = 10 +\gdef \passivesp@ce { } +\catcode `\ = 13\relax% +\gdef\activesp@ce{ }% +\endgroup + +%%% \discretionaries will define a macro \discr@ti@n@ri@s which will +%%% make every character between the first and final <delim> a +%%% discretionary breakpoint. + +\def \discretionaries %%% <delim> <chars> <delim> + % start a group (ended in \discr@ti@naries ), + % make every character (apart from space) active, + % then transfer control to \discr@tionaries ... + {\begingroup + \c@tcodes = 13 + \discr@tionaries + } + +%%% \discr@tionaries will receive as parameter the initial <delim> +%%% which will delimit the set of discretionaries; this <delim> +%%% will be active. + +\def \discr@tionaries #1%%% <delim> + % knowing the initial <delim>, define \discr@ti@naries with a + % delimited parameter structure, the final delimiter being + % the second instance of <delim> + {\def \discr@ti@naries ##1#1%%% <chars> <delim> + % \discr@ti@naries will receive as parameter the set of + % characters which are to be made discretionaries; it ends the + % group and then defines \discr@ti@n@ries, a tail-recursive + % macro, which will quietly process each of the + % discretionaries in turn ... + {\endgroup + \def \discr@ti@n@ries ####1%%% <char> or <delim> + % by checking to see if it has reached the end of the + % list, i.e. comparing its parameter with the known final + % <delim> ... + {\if \noexpand ####1\noexpand #1% + % if they match, there is no more to do ... + \let \n@xt = \relax + \else + % otherwise the character becomes active and is + % defined as a discretionary with the three texts + % <self> <empty> <self>, thus suppressing true + % hyphenation; the macro then prepares to process + % the next character. + \catcode `####1 = 13 + \def ####1{\discretionary + {\char `####1}{}{\char `####1}}% + \let \n@xt = \discr@ti@n@ries + \fi + % here either tail recursion occurs, if there are more + % characters to process, or tail recursion ceases if all + % have been exhausted + \n@xt + }% + % of course, none of this must take place during the \stress + % {call} of \discretionaries; execution is deferred until + % another macro such as \path calls the concealed action + % macro \discr@ti@n@ri@s; we therefore define this macro to + % have the desired effect. + \def \discr@ti@n@ri@s {\discr@ti@n@ries ##1#1}% + }% + % and finally invoke \discr@ti@naries to process the set of + % discretionary characters; it will take everything up to the + % second instance of <delim> as its parameter (and therefore as the + % set of characters to be processed). + \discr@ti@naries + } + +%%% \path, which is the user interface to \p@th, first checks +%%% to see whether \specialpathdelimiters is <true> or <false>; +%%% if <true>, it needs to take special action to ensure that +%%% \stress {all} characters (apart from <space>) are acceptable +%%% as delimiters; this is very time-consuming, and should be +%%% avoided if at all possible. It also defines \endp@th, to +%%% close the appropriate number of groups, and finally transfers +%%% control to \p@th + +\def \path + {\ifspecialpathdelimiters + \begingroup + \c@tcodes = 12 + \def \endp@th {\endgroup \endgroup}% + \else + \let \endp@th = \endgroup + \fi + \p@th + } + +%%% \p@th, which has essentially the same syntax as \discretionaries, +%%% expects to be followed by a <delim>, a <path>, and a second instance +%%% of <delim>; it will typeset <path> in the \tt font with hyphenation +%%% inhibited --- breaks (but not true hyphenation) are allowed at any +%%% or all of the special characters which have +%%% previously been declared as \discretionaries. + +\def \p@th #1%%% <delim> + % it starts by opening a group (ended in \p@@th) ... + % switches to \tt, and inhibits hyphenation; + % allows breaks at \discretionaries; saves the + % catcode of the initial <delim>, because if it has also been + % declared within \discretionaries, the initial and final <delim> + % won't match (which would be a disaster); \c@tcode is overloaded, + % but there is no conflict that I can detect ... + % invokes \discr@ti@n@ri@s to render active the set of special + % characters which have previously been declared as + % \discretionaries; each of these characters will expand to a real + % \discretionary, with replacement texts <self> <null> <self>; and + % re-instates the catcode of the initial <delim>. + {\begingroup + \tt + \c@tcode = \catcode `#1 + \discr@ti@n@ri@s + \catcode `\ = \active + \expandafter \edef \activesp@ce {\passivesp@ce \hbox {}}% + \catcode `#1 = \c@tcode + % it next defines an inner macro \p@@th with delimited parameter + % structure, the final delimiter being the same as the initial + % delimiter which it has itself received as #1. + \def \p@@th ##1#1% <chars> <delim> + % Within \p@@th, + % permissible breakpoints are specified, + % the path is typeset, + % and the group(s) ended. + {\leavevmode \hbox {}##1% + \endp@th + }% + \p@@th + } + +%%% \c@tcodes expects to be followed by the r-h-s of a numeric +%%% assignment optionally including the assignment operator; it saves +%%% the value of the r-h-s in \c@tcode, and invokes \c@tc@des. + +\def \c@tcodes {\afterassignment \c@tc@des \c@tcode} + +%%% \c@tc@des uses the value saved in \c@tcode, and assigns it to the +%%% \catcode of all characters with the single exception of <space>, +%%% which retains its normal catcode of 10; on exit, every single +%%% character apart from <space> will have the catcode which followed +%%% \c@tcodes. The code is optimised to avoid unnecessary usage of +%%% save-stack space. + +\def \c@tc@des + {\c@unter = 0 + \loop + \ifnum \catcode \c@unter = \c@tcode + \else + \catcode \c@unter = \c@tcode + \fi + \ifnum \c@unter < 255 + \advance \c@unter by 1 + \repeat + \catcode `\ = 10 + } + +%%% We restore the original catcode of commercial-at + +\catcode `\@ = \ATcode + +%%% Define a default set of discretionary break characters +%%% to include all punctuation characters except vertical +%%% bar + +\discretionaries |~!@$%^&*()_+`-=#{}[]:";'<>,.?\/| + +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/perpage.sty b/Master/texmf-dist/tex/latex/ltxmisc/perpage.sty new file mode 100644 index 00000000000..a9412b77c17 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/perpage.sty @@ -0,0 +1,33 @@ +% $Id: perpage.sty,v 1.2 2002/12/20 19:25:34 dak Exp $ +% The following package adds the ability to reset counters per page. +% Usage example: +% \MakePerPage[2]{footnote} +% will start footnote numbers with 2 on each page (the optional +% argument defaults to 1). 2 might be a strange number, unless +% you have \renewcommand\thefootnote{\fnsymbol{footnote}} and +% want to start off with a dagger. This may need multiple passes +% to work: LaTeX will complain about changed labels if you need +% another pass. +% Copyright 2002 David Kastrup, <David.Kastrup@t-online.de> +% distributable under the LPPL + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{perpage}[2002/12/20 v1.0 Reset counters per page] +\newcommand*\MakePerPage[2][\@ne]{% + \expandafter\def\csname c@pchk@#2\endcsname{\c@pchk@{#2}{#1}}% + \newcounter{pcabs@#2}% + \@addtoreset{pchk@#2}{#2}} + +\def\new@pagectr#1{\@newl@bel{pchk@#1}} + +\def\c@pchk@#1#2{\z@=\z@ + \begingroup + \expandafter\let\expandafter\next\csname pchk@#1@\arabic{pcabs@#1}\endcsname + \addtocounter{pcabs@#1}\@ne + \expandafter\ifx\csname pchk@#1@\arabic{pcabs@#1}\endcsname\next + \else \setcounter{#1}{#2}\fi + \protected@edef\next{% + \string\new@pagectr{#1}{\arabic{pcabs@#1}}{\noexpand\thepage}}% + \protected@write\@auxout{}{\next}% + \endgroup\global\z@} +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/printlen.sty b/Master/texmf-dist/tex/latex/ltxmisc/printlen.sty new file mode 100644 index 00000000000..067eff68957 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/printlen.sty @@ -0,0 +1,138 @@ +% printlen.sty Print lengths in a variety of units +% +% Author: Peter Wilson (CUA) +% (now at peter.r.wilson@boeing.com) +% Copyright 2001 Peter R. Wilson +% Released under the LaTeX Project Public License +% +% Extensions courtesy of Harald Harders (h.harders@tu-bs.de) +% +% Usage instructions are at the end of this file. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{printlen}[2001/12/09 v1.1 print lengths with units] +% +% \uselengthunit{<unit>} sets \l@nunits to the value of <unit> +% and \l@nunitperpt to the number of <unit> in 1pt. +\newcommand{\uselengthunit}[1]{% + \def\l@nunitperpt{1.0}\def\l@nunits{pt}% + \def\l@nta{#1}\def\l@ntb{pt}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{1.0}\def\l@nunits{pt}% + \else + \def\l@ntb{pc}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.083333}\def\l@nunits{pc}% + \else + \def\l@ntb{in}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.013837}\def\l@nunits{in}% + \else + \def\l@ntb{mm}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.351459}\def\l@nunits{mm}% + \else + \def\l@ntb{cm}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.0351459}\def\l@nunits{cm}% + \else + \def\l@ntb{bp}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.996264}\def\l@nunits{bp}% + \else + \def\l@ntb{dd}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.9345718}\def\l@nunits{dd}% + \else + \def\l@ntb{cc}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{0.0778809}\def\l@nunits{cc}% + \else + \def\l@ntb{PT}% + \ifx \l@nta\l@ntb + \def\l@nunitperpt{1.0}\def\l@nunits{PT}% + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi +} +\uselengthunit{pt} + +% \printlength{<length>} prints the value of <length> in the units set +% by \uselengthunit. +\newcommand{\printlength}[1]{% + \def\l@nta{pt}\ifx\l@nta\l@nunits\the#1\else + \def\l@nta{PT}% + \@tempdimc=\l@nunitperpt #1\relax\strip@pt\@tempdimc + \unitspace\relax\ifmmode + \mathrm{\ifx\l@nta\l@nunits pt\else\l@nunits\fi}% + \else + \ifx\l@nta\l@nunits pt\else\l@nunits\fi + \fi\fi} + +% \rndprintlength{<length>} prints the rounded value of <length> in +% the units set by \uselengthunit. Contributed by Harald Harders. +\def\@round#1.#2\@empty{#1}% +\newcommand{\rndprintlength}[1]{% + \def\l@nta{pt}\ifx\l@nta\l@nunits\the#1\else + \def\l@nta{PT}% + \setlength{\@tempdimc}{\l@nunitperpt #1}% + \addtolength{\@tempdimc}{0.5pt}% + \edef\@@round{\strip@pt\@tempdimc}% + \expandafter\@round\@@round.\@empty + \unitspace\relax\ifmmode + \mathrm{\ifx\l@nta\l@nunits pt\else\l@nunits\fi}% + \else + \ifx\l@nta\l@nunits pt\else\l@nunits\fi + \fi\fi} + +% Small space. Contributed by Harald Harders. +\newcommand{\unitspace}{\,} + +\endinput + +% USAGE: +% +% \printlength{<length>} prints the value of a LaTeX length in the +% units specified by \uselengthunit{<unit>}, where <unit> may be any TeX +% length unit except for scaled point. That is, <unit> may be any of: +% pt, pc, in, mm, cm, bp, dd or cc. When pt is set the printed length +% value will include any stretch or shrink values, otherwise these +% are not printed. The <unit> argument may also be PT, in which case +% length values will be printed in pt units but without any stretch +% or shrink values. An unknown value for <unit> is treated as though it +% had been specified as pt. +% The unit is separated from the number using the command +% \unitspace which is set to \, by default. In math mode the units are +% printed upright. +% \rndprintlength{<length>} prints the rounded value of a LaTeX length. +% Use PT instead of pt for rounded points if there are stretch or +% shrink values. +% +% The initial setting is \uselengthunit{pt} +% +% Example: +% +% The \verb|\textwidth| is \printlength{\textwidth} which is also +% \uselengthunit{in}\printlength{\textwidth} and +% \uselengthunit{mm}\printlength{\textwidth}. +% +% Changes: +% +% Version 1.1 (2001/12/09) +% o Print rounded values +% o Space between value and units +% +% Version 1.0 (2001/11/03) +% o First public release +% +% Peter W. +% Harald Harders +% 2001/12/09 +% + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/proba.sty b/Master/texmf-dist/tex/latex/ltxmisc/proba.sty new file mode 100644 index 00000000000..a282ff50f50 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/proba.sty @@ -0,0 +1,90 @@ +%% +%% This is file `proba.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% proba.dtx +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from proba.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file proba.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +\RequirePackage{amsfonts} +\DeclareRobustCommand{\A}[0]{\mathbb{A}} +\DeclareRobustCommand{\B}[0]{\mathbb{B}} +\DeclareRobustCommand{\C}[0]{\mathbb{C}} +\DeclareRobustCommand{\D}[0]{\mathbb{D}} +\DeclareRobustCommand{\E}[0]{\mathbb{E}} +\DeclareRobustCommand{\F}[0]{\mathbb{F}} +\DeclareRobustCommand{\G}[0]{\mathbb{G}} +\DeclareRobustCommand{\H}[0]{\mathbb{H}} +\DeclareRobustCommand{\I}[0]{\mathbb{I}} +\DeclareRobustCommand{\J}[0]{\mathbb{J}} +\DeclareRobustCommand{\K}[0]{\mathbb{K}} +\DeclareRobustCommand{\L}[0]{\mathbb{L}} +\DeclareRobustCommand{\M}[0]{\mathbb{M}} +\DeclareRobustCommand{\N}[0]{\mathbb{N}} +\DeclareRobustCommand{\O}[0]{\mathbb{O}} +\DeclareRobustCommand{\P}[0]{\mathbb{P}} +\DeclareRobustCommand{\Q}[0]{\mathbb{Q}} +\DeclareRobustCommand{\R}[0]{\mathbb{R}} +\DeclareRobustCommand{\S}[0]{\mathbb{S}} +\DeclareRobustCommand{\T}[0]{\mathbb{T}} +\DeclareRobustCommand{\U}[0]{\mathbb{U}} +\DeclareRobustCommand{\V}[0]{\mathbb{V}} +\DeclareRobustCommand{\W}[0]{\mathbb{W}} +\DeclareRobustCommand{\X}[0]{\mathbb{X}} +\DeclareRobustCommand{\Y}[0]{\mathbb{Y}} +\DeclareRobustCommand{\Z}[0]{\mathbb{Z}} +\DeclareRobustCommand{\calA}[0]{{\mathcal A}} +\DeclareRobustCommand{\calB}[0]{{\mathcal B}} +\DeclareRobustCommand{\calC}[0]{{\mathcal C}} +\DeclareRobustCommand{\calD}[0]{{\mathcal D}} +\DeclareRobustCommand{\calE}[0]{{\mathcal E}} +\DeclareRobustCommand{\calF}[0]{{\mathcal F}} +\DeclareRobustCommand{\calG}[0]{{\mathcal G}} +\DeclareRobustCommand{\calH}[0]{{\mathcal H}} +\DeclareRobustCommand{\calI}[0]{{\mathcal I}} +\DeclareRobustCommand{\calJ}[0]{{\mathcal J}} +\DeclareRobustCommand{\calK}[0]{{\mathcal K}} +\DeclareRobustCommand{\calL}[0]{{\mathcal L}} +\DeclareRobustCommand{\calM}[0]{{\mathcal M}} +\DeclareRobustCommand{\calN}[0]{{\mathcal N}} +\DeclareRobustCommand{\calO}[0]{{\mathcal O}} +\DeclareRobustCommand{\calP}[0]{{\mathcal P}} +\DeclareRobustCommand{\calQ}[0]{{\mathcal Q}} +\DeclareRobustCommand{\calR}[0]{{\mathcal R}} +\DeclareRobustCommand{\calS}[0]{{\mathcal S}} +\DeclareRobustCommand{\calT}[0]{{\mathcal T}} +\DeclareRobustCommand{\calU}[0]{{\mathcal U}} +\DeclareRobustCommand{\calV}[0]{{\mathcal V}} +\DeclareRobustCommand{\calW}[0]{{\mathcal W}} +\DeclareRobustCommand{\calX}[0]{{\mathcal X}} +\DeclareRobustCommand{\calY}[0]{{\mathcal Y}} +\DeclareRobustCommand{\calZ}[0]{{\mathcal Z}} +\DeclareRobustCommand{\prob}[1][P]{\ensuremath {\mathbb{#1}}} +\DeclareRobustCommand{\probX}[2][{\mathbb{P}}]{\ensuremath{ {#1}\left[ {#2} \right]}} +\DeclareRobustCommand{\probCX}[3][{\mathbb{P}}]{\ensuremath{ {#1}\left[ {#2} \big| {#3} \right]}} +\DeclareRobustCommand{\EX}[2][{\mathbb{E}}]{\ensuremath {#1}\left[ {#2} \right]} +\DeclareRobustCommand{\cEX}[3][{\mathbb{E}}]{\ensuremath {#1}\left[ {#2} \big| {#3} \right]} +\DeclareRobustCommand{\Var}[1][]{\ensuremath{\mathrm{Var[#1]}}} +\DeclareRobustCommand{\VarX}[2][]{\ensuremath{\mathrm{Var}_{#1}\left[ {#2} \right]}} +\DeclareRobustCommand{\cVarX}[3][]{\ensuremath \mathrm{Var}_{#1}\left[ {#2} \big| {#3} \right]} +\DeclareRobustCommand{\eqlaw}[0]{\mathop{\stackrel{(d)}{=}}} +\DeclareRobustCommand{\tolaw}[0]{\mathop{\stackrel{(d)}{\longrightarrow}}} +\DeclareRobustCommand{\qvar}[2]{\ensuremath{\left[ {#1},{#2} \right]}} +\DeclareRobustCommand{\cqvar}[2]{\ensuremath{\langle {#1},\,{#2} \rangle}} +\endinput +%% +%% End of file `proba.sty'. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/relsize.sty b/Master/texmf-dist/tex/latex/ltxmisc/relsize.sty new file mode 100644 index 00000000000..febbf0ac7a8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/relsize.sty @@ -0,0 +1,393 @@ +% relsize.sty 3.1 July 4, 2003 +% This software is contributed to the public domain. + +% LaTex2e version by Donald Arseneau <asnd@triumf.ca> and +% Matt Swift <swift@bu.edu>. +% Original LaTex2.09 smaller.sty author: Bernie Cosell <cosell@WILMA.BBN.COM> +% +% Setting the font size relative to the current size +% +% commands are: +% \relsize{n} where n gives the number of steps ("mag-step" = factor of 1.2) +% to change the size by; n = 3 changes from \normalsize to +% \LARGE size. Negative n selects smaller fonts. +% \smaller == \relsize{-1} +% \larger == \relsize{1} +% \textsmaller{text}, \textlarger{text} - versions that take an argument +% +% \relscale{f} is equivalent to \relsize, but instead of scale-steps, +% the parameter is a scale factor, such as .75 +% \textscale{f}{text} +% +% The font-size command nearest the requested size will be used, and if +% the size error is more than \RSpercentTolerance, then the size will +% be adjusted more precisely. (The default empty \RSpercentTolerance +% signals automatic handling, choosing the tolerance based on the +% font declarations.) +% +% \mathsmaller{A}, \mathlarger{B} - math versions +% (The math versions are entirely different from the text versions.) +% +% There are more instructions at the end of this file (after \endinput). + +\ProvidesPackage{relsize}[2003/07/04 ver 3.1] + +% The next two aren't the real initializations! The real ones are done +% in \@tempb below. The user can change them afterwards. + +\def\RSsmallest{999pt} +\def\RSlargest{1pt} + +% First, right now, we assemble a list of the font sizes + +\def\rs@size{\noexpand\rs@size\noexpand} +\def\rs@fontsizes{} +\def\@tempa#1{\ifx\@undefined#1\else + \expandafter\@tempb#1\delimiter{#1}\fi} +\def\@absVal#1{\ifnum#1<\z@-\fi#1} +% parse definition of font-size command (like \large) +% #1 = \@setfontsize #2 = the command (\large) #3 = size #4 = rest +\def\@tempb#1#2#3#4\delimiter#5{% + \@tempdimb\z@ + \ifx\@setfontsize#1\relax\ifx#5#2\@firstofone\relax + \afterassignment\strip@prefix \@tempdimb #3pt>% + \fi\fi + \ifdim\@tempdimb=\z@ + \def\rs@fontsizes{}% + \let\@tempa\@gobble + \else + \edef\rs@fontsizes{\rs@fontsizes\rs@size#2{\the\@tempdimb}}% + \ifdim\@tempdimb<\RSsmallest \edef\RSsmallest{\the\@tempdimb}\fi + \ifdim\@tempdimb>\RSlargest \edef\RSlargest{\the\@tempdimb}\fi + \fi} + +% examine each (expected) pre-defined font size +\@tempa\normalsize +\@tempa\small +\@tempa\footnotesize +\@tempa\large +\@tempa\Large +\@tempa\LARGE +\@tempa\scriptsize +\@tempa\tiny +\@tempa\huge +\@tempa\Huge +\@tempa\HUGE % moresize.sty +\@tempa\ssmall + +\ifx\rs@fontsizes\@empty % ---------------------------------------------- + +\PackageWarning{relsize}{Failed to get list of font sizes.\MessageBreak + Falling back to old definition.} + +\DeclareRobustCommand\relsize[1]{% +\ifmmode \@nomath\relsize\else + \begingroup + \@tempcnta % assign number representing current font size + \ifx\@currsize\normalsize 4\else % funny order is to have most ... + \ifx\@currsize\small 3\else % ...likely sizes checked first + \ifx\@currsize\footnotesize 2\else + \ifx\@currsize\large 5\else + \ifx\@currsize\Large 6\else + \ifx\@currsize\LARGE 7\else + \ifx\@currsize\scriptsize 1\else + \ifx\@currsize\tiny 0\else + \ifx\@currsize\huge 8\else + \ifx\@currsize\Huge 9\else + 4\rs@unknown@warning % unknown state: \normalsize as starting point + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +% Change the number by the given increment: + \advance\@tempcnta#1\relax +% watch out for size underflow: + \ifnum\@tempcnta<\z@ \rs@size@warning{small}{\string\tiny}\@tempcnta\z@ \fi + \expandafter\endgroup + \ifcase\@tempcnta % set new size based on altered number + \tiny \or \scriptsize \or \footnotesize \or \small \or \normalsize \or + \large \or \Large \or \LARGE \or \huge \or \Huge \else + \rs@size@warning{large}{\string\Huge}\Huge +\fi\fi} + +\else % ---------------------------------------------- + +\DeclareRobustCommand\relsize[1]{% +\ifmmode \@nomath\relsize\else + \begingroup + % number of demi-magsteps -> \@tempcnta + \@tempdima#1\p@ \@tempdima2.0002\@tempdima \divide\@tempdima\p@ + \@tempcnta\@tempdima + % \message{^^JChange \the\@tempcnta\space half-magsteps from \f@size. }% + % calculate desired target size -> \@tempdimb + \@tempdimb\f@size\p@ + \ifnum\@tempcnta<\z@ + \def\@tempa{.912871}\@tempcnta=-\@tempcnta + \else + \def\@tempa{1.09545}% + \fi + \@whilenum {\@tempcnta>\z@}\do {% + \advance\@tempcnta\m@ne + \@tempdimb\@tempa\@tempdimb}% + % \message{ target size \the\@tempdimb. }% + \rs@scaleToB +\fi} + +\DeclareRobustCommand\relscale[1]{% +\ifmmode \@nomath\relscale\else + \begingroup + \@tempdimb\f@size\p@ \@tempdimb#1\@tempdimb + \rs@scaleToB +\fi} + +\DeclareRobustCommand\textscale[2]{\leavevmode + \begingroup\relscale{#1}#2\endgroup} + +% Change font size to \@tempdimb. Follows from \relsize or \relscale +\def\rs@scaleToB{% + % perform automatic tolerance adjustment, if requested + \ifx\RSpercentTolerance\@empty \rs@autoTol \fi + % apply limits + \ifdim\@tempdimb<\RSsmallest \@tempdimb=\RSsmallest + \rs@size@warning{small}{\RSsmallest}\fi + \ifdim\@tempdimb>\RSlargest \@tempdimb=\RSlargest + \rs@size@warning{large}{\RSlargest}\fi + % look up that size in list of pre-defined sizes. Puts error of + % closest match in \@tempdima + \let\@tempa\relax \@tempdima\maxdimen + \let\rs@size\rs@lookup \rs@fontsizes + % \message{ Look up best as \expandafter\string\@tempa\space + % (off by \the\@tempdima}% + % See how close match was (abs difference -> \@tempdima) + \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\fi + % ... percentage error in \@tempdima (as a count) + \@tempdima 100\@tempdima \divide\@tempdima\@tempdimb + % if error is beyond tolerance, append \fontsize adjustment + % \message{ or \number\@tempdima \expandafter\@gobble\string\%). }% + \ifnum\@tempdima>\RSpercentTolerance + % \message{ adjust size to \strip@pt\@tempdimb. }% + \@tempdima1.2\@tempdimb % baselineskip + \edef\@tempa{\expandafter\noexpand\@tempa \noexpand\fontsize + {\strip@pt\@tempdimb}{\strip@pt\@tempdima}\noexpand\selectfont}\fi + % Now execute size-change command \@tempa + \expandafter\endgroup\@tempa} + +% For each defined font size, compare its actual size to the desired +% size (\@tempdimb) and the error of the best previous match (\@tempdima). +% Record this command (\@tempa) if it is closer. +\def\rs@lookup#1#2{% #1=command #2=size + \begingroup + \advance\@tempdimb-#2\relax + \ifdim\@absVal\@tempdimb<\@absVal\@tempdima % improvement + \endgroup + \def\@tempa{#1}% + \@tempdima#2\relax \advance\@tempdima-\@tempdimb + \else + \endgroup + \fi} + +\fi % ---------------------------------------------- + + +% Tolerance for size mis-match (%). The empty definition triggers +% automatic selection: 5 for scalable fonts, 30 otherwise. + +\def\RSpercentTolerance{} + +\def\rs@autoTol{% + \expandafter\expandafter\expandafter\rs@autoTOL + \expandafter\meaning + \csname\f@encoding/\f@family/\f@series/\f@shape\endcsname-\delimiter +} +\def\rs@autoTOL#1>#2-#3\delimiter{% + \ifx\delimiter#3\delimiter % no - + \def\RSpercentTolerance{30}% + \else % font size def has -, assume it covers continuum + \def\RSpercentTolerance{5}% + \fi + % \message{ Automatic tolerance is \RSpercentTolerance. }% +} + +% Warning messages + +\newcommand\rs@size@warning[2]{\PackageWarning{relsize}{% + Size requested is too #1.\MessageBreak Using #2 instead}} + +\newcommand\rs@unknown@warning{\PackageWarning{relsize}{Current font size + is unknown! (Why?!?)\MessageBreak Assuming \string\normalsize}} + +% derived commands + +\DeclareRobustCommand\larger[1][\@ne]{\relsize{+#1}} +\DeclareRobustCommand\smaller[1][\@ne]{\relsize{-#1}} +\DeclareRobustCommand\textlarger[2][\@ne]{{\relsize{+#1}#2}} +\DeclareRobustCommand\textsmaller[2][\@ne]{{\relsize{-#1}#2}} + +% math commands (completely different) + +\DeclareRobustCommand\mathsmaller[1]{\bgroup + \let\rs@makechoice\rs@makesmallerchoice + \def\rs@mathatom{#1}% + \futurelet\@tempa\rs@collect@decor +} +\DeclareRobustCommand\mathlarger[1]{\bgroup + \let\rs@makechoice\rs@makelargerchoice + \def\rs@mathatom{#1}% + \futurelet\@tempa\rs@collect@decor +} + +% math so far is in \rs@mathatom; next tok is \@tempa; continuation is \@tempb +% Don't nest \ifs because token may be \if or \fi or \or... +\def\rs@collect@decor{% + \let\@tempb\rs@makechoice + \ifx\@tempa\limits \let\@tempb\rs@collect@one@decor \fi + \ifx\@tempa\displaylimits \let\@tempb\rs@collect@one@decor \fi + \ifx\@tempa\nolimits \let\@tempb\rs@collect@one@decor \fi + \if\noexpand\@tempa^\let\@tempb\rs@collect@two@decor \fi + \if\noexpand\@tempa_\let\@tempb\rs@collect@two@decor \fi + \ifx\@tempa\sp \let\@tempb\rs@collect@two@decor \fi + \ifx\@tempa\sb \let\@tempb\rs@collect@two@decor \fi + \@tempb} +\def\rs@collect@one@decor#1{% + \expandafter\def\expandafter\rs@mathatom\expandafter{\rs@mathatom#1}% + \futurelet\@tempa\rs@collect@decor} +\def\rs@collect@two@decor#1#2{\expandafter + \def\expandafter\rs@mathatom\expandafter{\rs@mathatom#1{\rs@sstyle{#2}}}% + \futurelet\@tempa\rs@collect@decor} +\let\rs@sstyle\@firstofone + +\def\rs@makesmallerchoice{\mathchoice + {\textstyle \let\rs@sstyle\scriptstyle \rs@mathatom}% + {\scriptstyle \let\rs@sstyle\scriptstyle \rs@mathatom}% + {\scriptscriptstyle \let\rs@sstyle\scriptscriptstyle \rs@mathatom}% + {\scriptscriptstyle \let\rs@sstyle\scriptscriptstyle \rs@mathatom}% + \egroup} +\def\rs@makelargerchoice{\mathchoice + {\protected@edef\rs@sstyle##1{% + \protect\set@fontsize {1}{\f@size}{\f@baselineskip}\protect\selectfont + \hbox{$\scriptstyle ##1\m@th$}}% + \mbox{\larger$\displaystyle\rs@mathatom\m@th$}}% + {\displaystyle \let\rs@sstyle\scriptstyle \rs@mathatom}% + {\textstyle \let\rs@sstyle\scriptscriptstyle \rs@mathatom}% + {\scriptstyle \let\rs@sstyle\scriptscriptstyle \rs@mathatom}% + \egroup} + +\endinput +========================================================== + +R E L S I Z E . S T Y ver 3.1 July 4, 2003 + +by Donald Arseneau, asnd@triumf.ca, Vancouver, Canada +origianally based on smaller.sty by Bernie Cosell, cosell@WILMA.BBN.COM, +and combined with the version by Matt Swift, swift@bu.edu. + + +It is frequently the case that something should be typeset somewhat larger +or smaller than the surrounding text, whatever that size happens to be. +Specifying such sizing commands explicitly makes it difficult to modify the +font sizes of a document at a later time, and makes it hard to write macros +that work at arbitrary sizes. Relsize.sty defines several commands for LaTeX +to set font sizes relative to the current size. + +To refresh your memory, the font sizing commands in LaTeX are, in order: +\tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, +\LARGE, \huge, \Huge (package moresize adds \ssmall and \HUGE). The main +new command provided by relsize.sty is \relsize, which takes one (positive +or negative) number as its argument; the number specifies how many "steps" +by which to change the font size, where each step is a scaling factor of +1.2, corresponding to the usual difference between the size commands. For +example, if "{\relsize{-2} smaller}" appears in normal sized text, the word +"smaller" is printed in script size type. If the same command appears in a +\Large section title, then "smaller" is printed in normal size. + +There are also the commands \larger and \smaller, which normally change the +font size by one step in the obvious direction; \larger is an abbreviation +for \relsize{+1}, and \smaller is an abbreviation for \relsize{-1}. For +example, {\large... \larger{WOW!}} prints "WOW" in \Large type. You can +also specify bigger steps as an optional argument for \larger and \smaller: +\larger[3] is equivalent to \relsize{3}; \smaller[2] is \relsize{-2}. +Both \larger and \smaller accept negative arguments, but please don't make +things so obscure! If you want to change size by several steps it is +much better to give an increment than to string several \larger commands +together; i.e., \relsize{3} or \larger[3], but not \larger\larger\larger. + +All of the \relsize, \larger, and \smaller commands are "switches" just +like the regular sizing commands. That is, they change the size for all +following text until the scope is ended by a closing brace. There are +alternate versions called \textlarger and \textsmaller that take some text +as an argument and apply the size change to only that text: +\textlarger{big}. + +Using the number of "magnification steps" to indicate font size can +be confusing to some people, and limiting in certain uses. There are +commands with syntax \textscale{factor}{text} and \relscale{factor} to +select the size based on a scale factor, like {0.75}. + +If the size requested is too small or too large, a warning is given, and +the size will only change as far as appropriate, typically \tiny or \Huge. +These limits are controlled by the commands \RSsmallest and \RSlargest, which +get set automatically when relsize.sty is loaded, but you can redefine them +to other length values: \renewcommand\RSlargest{50pt}. + +Fine point: The combination \relsize{n}\relsize{-n} is not guaranteed to +restore the current font size! That is because the increment "n" may be +enough to overflow the range of sizes. Say you are in \huge text already, +and you do \relsize{4}. There is nothing bigger than \Huge so that is the +size you get. Then an ensuing \relsize{-4} will take four steps smaller +and change the size to \large. You should use grouping to undo relative +size changes because it is unsafe to counteract one change with an "equal" +change in the opposite direction. + +Typically, the font-size commands do not select fonts at regular size +intervals. \relsize (and the others) will select, and execute, the command +for the size closest to the desired size. Then, if the relative difference +from the target size is more than \RSpercentTolerance a further font-size +selection is made. By default, \RSpercentTolerance is an empty macro, which +causes automatic selection: "30" (30%) when the current "fontshape" definition +is composed of only discrete sizes, and "5" when the fontshape definition +covers ranges of sizes. The higher setting for discrete fonts ensures +only the pre-defined sizes get used. (By default LaTeX uses Computer +Modern fonts at discrete sizes; you get full coverage of sizes by using +\usepackage{type1cm}.) For special uses, or when the font shape definitions +are not parsed properly, you can redefine the percent tolerance: +\renewcommand\RSpercentTolerance{10}. + +All of the commands described above are text commands; they cannot be used +in math mode. There are special \mathsmaller and \mathlarger commands +provided, but these do not use the same sizes that the text versions use. +Instead, they step between the usual math "styles" which you can explicitly +set using the commands \displaystyle, \textstyle, \scriptstyle, and +\scriptscriptstyle [see Lamport, LaTeX/Manual (1st ed, p.54); GMS The LaTeX +Companion, p.255]. However, the \mathlarger command will also increase the +size beyond regular \displaystyle by selecting a larger regular font size +(using \larger). (Yes, this is a kludge, and doesn't work very well, but +it can still be useful.) If you want to use this to create big integral +signs, then you must also load the package "exscale" so that math symbols +can change size. The sizes selected are: + +Current style \mathsmaller gives \mathlarger gives +--------------- ---------------------- ------------------------ +\displaystyle \textstyle (almost same) \displaystyle in a \larger font +\textstyle \scriptstyle \displaystyle (almost same) +\scriptstyle \scriptscriptstyle \textstyle +\scriptscriptstyle \scriptscriptstyle (same) \scriptstyle + +For example, try $\frac{\mathlarger{E}}{E}$. Note that, for most symbols, +\displaystyle and \textstyle are the same size, so $N \mathlarger{N}$ +gives two identical N's, but \sum and \int do get bigger in display style: +$\int\mathlarger{\int}$, and fractions are treated differently too: +$\frac{1}{2} \mathlarger{\frac{1}{2}}$. As you might have guessed, +\mathlarger and \mathsmaller should only be used in math mode. + +These commands will attempt to attach superscripts and subscripts to the +symbol as if the symbol were used alone: $\mathlarger{\int}_{0}^{\infty}$ +but math accents and the math spacing behave as if the symbol is enclosed +in braces (which it is). Comparing +\[ +| \times | {\times} | \mathlarger{\times} | \mathbin{\mathlarger{\times}} | +\] +shows that operators must be explicitly declared to use the right operator +type (\mathrel, \mathbin, \mathop) to get the correct spacing. + +Due to their oddities, the math larger/smaller commands should not be +trusted blindly, and they will not be useful in every instance. + + +Donald Arseneau asnd@triumf.ca diff --git a/Master/texmf-dist/tex/latex/ltxmisc/romanneg.sty b/Master/texmf-dist/tex/latex/ltxmisc/romanneg.sty new file mode 100644 index 00000000000..0232bfa438c --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/romanneg.sty @@ -0,0 +1,51 @@ +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% author = "Mario Wolczko", +%%% version = "1.03", +%%% date = "15 June 1992", +%%% time = "18:11:59 BST", +%%% filename = "romanneg.sty", +%%% email = "mario@acm.org", +%%% codetable = "ISO/ASCII", +%%% keywords = "LaTeX, output, pagenumbers", +%%% supported = "no", +%%% docstring = "Causes the page numbers in the DVI file (as +%%% defined by \count0) to be negative when roman pagenumbering is +%%% in effect.", +%%% } +%%% ==================================================================== +% +% This file is in the public domain +% +% This style option should not change the appearance of a document, +% but merely change the page numbers (as defined by \count0) in the +% DVI file to be negative when roman pagenumbering is in use. +% +% +% To do this, the \@steppagecounter macro increments the absolute +% value of \count0 +\def\@steppagecounter{% based on \advancepageno, TeXbook, p.362 + \ifnum\c@page<\z@ \global\advance\c@page\m@ne + \else\global\advance\c@page\@ne \fi} % increase |c@page| + +\let\@oldstepcounter\stepcounter +\def\stepcounter#1{{\def\@tmpa{#1}\def\@tmpb{page}% + \ifx\@tmpa\@tmpb\@steppagecounter\else\@oldstepcounter{#1}\fi}} + +% Modified version of the pagenumbering command that sets \count0 (aka +% \c@page) to -1 rather than 1 if roman numbering is specified. +\def\pagenumbering#1{{% + \def\@tmpa{#1} \def\@tmpb{roman} \def\@tmpc{Roman} + \ifx\@tmpa\@tmpb % roman option; set -ve page number. + \global\c@page \m@ne + \else\ifx\@tmpa\@tmpc + \global\c@page \m@ne + \else + \global\c@page \@ne + \fi\fi + \gdef\thepage{\csname @#1\endcsname \c@page}}} + +% the modified versions of \@roman and \@Roman deal with negatives +\def\@romannumeral#1{\ifnum#1<0 \romannumeral-#1 \else\romannumeral#1 \fi} +\def\@roman#1{\@romannumeral #1} +\def\@Roman#1{\expandafter\uppercase\expandafter{\@romannumeral #1}} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/sansmath.sty b/Master/texmf-dist/tex/latex/ltxmisc/sansmath.sty new file mode 100644 index 00000000000..8fe92456b3a --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/sansmath.sty @@ -0,0 +1,174 @@ +% LaTeX package sansmath: typeset sans-serif math using `text' fonts. +% +\ProvidesPackage{sansmath}[2003/12/14 \space ver 0.5 Donald Arseneau] +% +% Donald Arseneau, asnd@triumf.ca, Vancouver, Canada. +% +% This package is released to the public domain by the original +% author, who does not support it, and requests that it be adopted +% and supported by someone who actually knows something about math +% font issues in LaTeX. +% +% The author was persuaded to use the name `sansmath' in hopes of +% working with various text sans fonts (indicated by \sfdefault) +% but the only good results seen were with Computer Modern and cmss. +% (Helvetica with the `pslatex' package was very poor!) +% +% INSTRUCTIONS +% ~~~~~~~~~~~~ +% Load this package by inserting `\usepackage{sansmath}' in the +% document preamble. This will define a new math version `sans' +% and a command `\sansmath', much like `\boldmath'. Note that +% NO `\unsansmath' is defined, so if math is to be sans-serif for +% just part of a document, one should declare `\sansmath' in a local +% group (perhaps with \begin{sansmath}...\end{sansmath}). +% Within the scope of the \sansmath declaration, math characters +% will be taken from the text sans-serif family as much as possible. +% The actual sans fonts are OT1 encodings of those indicated by the +% meaning of \sfdefault WHEN THE PACKAGE WAS LOADED -- not the +% meaning at each math environment! +% +% Since the (OT1) text fonts do not provide the lower-case greek +% letters, there is a package option [eulergreek] to take the +% lowercase greek from the Euler math fonts. +% Since some (many) sans fonts have no uppercase greek letters either +% (missing characters from the OT1 encoding), there is an option +% [EULERGREEK] to take ALL greek letters from the euler fonts. +% One should also investigate using Euler for ALL MATH in the document, +% using package `euler' instead of this one! +% +% This package achieves math-italic by reloading the slanted version +% of the text sans-serif font, and changing a fontdimen parameter +% (spaceskip). This causes the italic correction to be applied between +% letters (good) but does not break up the `fi' and `fl' ligatures (bad) +% (Why does a sans font have these ligatures anyway?) At this point, +% nothing is done about this bug. + +\DeclareMathAlphabet{\mathsfsl}{OT1}{\sfdefault}{m}{sl} +\DeclareOldFontCommand{\sfsl}{\normalfont\sffamily\slshape}{\mathsfsl} +\DeclareMathAlphabet{\mathsfbf}{OT1}{\sfdefault}{bx}{sl} +\DeclareOldFontCommand{\sfbf}{\normalfont\sffamily\bfseries}{\mathsfbf} + +\DeclareMathVersion{sans} +\SetMathAlphabet{\mathrm} {sans}{OT1}{\sfdefault}{m}{n} +\SetMathAlphabet{\mathsfsl}{sans}{OT1}{\sfdefault}{m}{sl} +\SetSymbolFont {operators}{sans}{OT1}{\sfdefault}{m}{n} + +% The cmm and cmsy are too light for cmss. I tried {b} for the next +% two lines, but it did not work well (unbold +, bold greek, bad \neq) +\SetSymbolFont {letters} {sans}{OML}{cmm} {m}{it} +\SetSymbolFont {symbols} {sans}{OMS}{cmsy}{m}{n} + +\SetMathAlphabet{\mathsfbf}{sans}{OT1}{\sfdefault}{bx}{n} + +\DeclareMathSymbol{0}{\mathord}{operators}{`0} +\DeclareMathSymbol{1}{\mathord}{operators}{`1} +\DeclareMathSymbol{2}{\mathord}{operators}{`2} +\DeclareMathSymbol{3}{\mathord}{operators}{`3} +\DeclareMathSymbol{4}{\mathord}{operators}{`4} +\DeclareMathSymbol{5}{\mathord}{operators}{`5} +\DeclareMathSymbol{6}{\mathord}{operators}{`6} +\DeclareMathSymbol{7}{\mathord}{operators}{`7} +\DeclareMathSymbol{8}{\mathord}{operators}{`8} +\DeclareMathSymbol{9}{\mathord}{operators}{`9} +\DeclareMathSymbol{!}{\mathclose}{operators}{"21} +\DeclareMathSymbol{,}{\mathpunct}{operators}{`\,} +\DeclareMathSymbol{.}{\mathord}{operators}{`\.} +\DeclareMathSymbol{:}{\mathrel}{operators}{`\:} +\DeclareMathSymbol{;}{\mathpunct}{operators}{`\;} +\DeclareMathSymbol{?}{\mathclose}{operators}{`\?} +%\DeclareMathSymbol{+}{\mathbin}{operators}{"2B} +%\DeclareMathSymbol{=}{\mathrel}{operators}{`\=} + + +\let\EulGreek\relax +\let\EuUCGreek\relax +\DeclareOption{EULERGREEK}{ + \ExecuteOptions{eulergreek} + \def\EuUCGreek{% + \@euG\Gamma \@euG\Delta \@euG\Theta \@euG\Lambda \@euG\Xi \@euG\Pi + \@euG\Sigma \@euG\Upsilon \@euG\Phi \@euG\Psi \@euG\Omega +}} +\DeclareOption{eulergreek}{ + \def\EulGreek{% + \ifnum\alpha<\@eugreekOffset + \@eug\alpha \@eug\beta \@eug\gamma \@eug\delta \@eug\epsilon + \@eug\zeta \@eug\eta \@eug\theta \@eug\iota \@eug\kappa \@eug\lambda + \@eug\mu \@eug\nu \@eug\xi \@eug\pi \@eug\rho \@eug\sigma \@eug\tau + \@eug\upsilon \@eug\phi \@eug\chi \@eug\psi \@eug\omega + \@eug\varepsilon \@eug\vartheta \@eug\varpi \@eug\varrho + \@eug\varsigma \@eug\varphi + \EuUCGreek + \fi +}} +\ProcessOptions + +\ifx\EulGreek\relax\else + \DeclareSymbolFont{EulerGreek}{U}{eur}{m}{n} + \SetSymbolFont{EulerGreek}{sans}{U}{eur}{m}{n} + \DeclareSymbolFontAlphabet\matheug{EulerGreek} + + \newcount\@eugreekOffset + \let\@tempa\relax + \DeclareMathSymbol{\@tempa}{\mathord}{EulerGreek}{11} + \@eugreekOffset\@tempa + \advance\@eugreekOffset-\alpha + + \def\@eug#1{\@tempcnta#1\advance\@tempcnta\@eugreekOffset + \mathchardef#1\@tempcnta} + + \ifx\EuUCGreek\relax\else + + \newcount\@euGREEKOffset + \let\@tempa\relax + \DeclareMathSymbol{\@tempa}{\mathord}{EulerGreek}{1} + \@euGREEKOffset\@tempa + \advance\@euGREEKOffset-\Delta + + \def\@euG#1{\@tempcnta#1\advance\@tempcnta\@euGREEKOffset + \mathchardef#1\@tempcnta} + \fi +\fi + +\def\sfMathSwitch{\sfsl + \make@math@version@font \textfont \fam \tf@size + \make@math@version@font \scriptfont \fam \sf@size + \make@math@version@font \scriptscriptfont \fam \ssf@size +} + +\def\make@math@version@font #1#2#3{% + \begingroup + \escapechar\m@ne + \xdef\sansm@name{\expandafter\string\the#1#2+}% + \endgroup + \@ifundefined{\sansm@name}{% + \@load@variant@font \sansm@name{#1#2}{#3\p@}}{}% + #1#2\csname \sansm@name\endcsname +} + +\begingroup +\catcode`\A=12 \catcode`\T=12 +\lowercase{% necessary because \fontname\font produces "at" in catcode 12. +\endgroup +% +\def\@load@variant@font #1#2#3{\expandafter\@do@load@varfont + \csname #1\expandafter\endcsname \fontname#2 AT #3 AT \relax } +% +\def\@do@load@varfont #1#2 AT #3 AT #4\relax{% + \dimen@#3\advance\dimen@ 1sp + \global\font #1=#2 at \dimen@ + \fontdimen\tw@#1=\z@} +} + +\def\sansmath{% + \mathversion{sans}% + \let\mathbf\mathsfbf + \let\sansm@every@math\sfMathSwitch + \EulGreek +} + +\expandafter\def\expandafter\check@mathfonts\expandafter{\check@mathfonts + \sansm@every@math} + +\let\sansm@every@math\relax + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/secdot.sty b/Master/texmf-dist/tex/latex/ltxmisc/secdot.sty new file mode 100644 index 00000000000..a24ad83dcc0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/secdot.sty @@ -0,0 +1,69 @@ +% Define section numbers with dots +% +% Author: Robin Fairbairns (rf10@cl.cam.ac.uk) +% first version, June 2000 +% +% version 2, July 2000, with a contribution from +% Steve Grathwohl of Duke University +% +% This program may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.1 +% 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.1 or later is part of all distributions of LaTeX +% version 1999/06/01 or later. +% +% This program consists of the file secdot.sty +% documentation (such as it is) may be found after \endinput herein + +\NeedsTeXFormat{LaTeX2e}% Seems to work with any version +\ProvidesPackage{secdot}[2000/06/20 v1.0 section numbers with dots] + +% command to declare a particular section level to have a dot after +% its number +\newcommand\sectiondot[1]{% + \expandafter\def\csname @seccntfmt@#1\endcsname##1{% + \csname the##1\endcsname.\quad + } +} + +% do this by default for \section numbering +\sectiondot{section} + +% generalised version: define that #2 comes after section level #1 +\newcommand\sectionpunct[2]{% + \expandafter\def\csname @seccntfmt@#1\endcsname##1{% + \csname the##1\endcsname#2% + }% +} + +% the guts of the package: insert the dots where needed ... +\renewcommand\@seccntformat[1]{\@ifundefined{@seccntfmt@#1}% + {\csname the#1\endcsname\quad}% original default style + {\csname @seccntfmt@#1\endcsname{#1}}% +} +\endinput + +secdot.sty: section numbers with dots +===================================== + +the package as loaded causes section numbers to be output with a dot +after them. + +the command \sectiondot{<level>} will make `level' sections also be +output with a dot after them -- an example of use would be: + \sectiondot{subsection} + +the command \sectionpunct{<level>}{<punctuation>} gives finer +control. examples of use would be + \sectionpunct{section}{. } % \sectiondot places a \quad after the + % dot, which may look excessive + \sectionpunct{section}{\quad} % restores default latex behaviour + +other eccentricities of numbering could be coded by those with +stronger stomachs, by defining the appropriate + + \csname @seccntfmt@<level>\endcsname + +which macro will take one argument, when invoked: the `level' name diff --git a/Master/texmf-dist/tex/latex/ltxmisc/section.sty b/Master/texmf-dist/tex/latex/ltxmisc/section.sty new file mode 100644 index 00000000000..11fdd0e9f79 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/section.sty @@ -0,0 +1,691 @@ +% SECTION.STY +% (c) (1992-1994) Oliver Pretzel (o.pretzel@ic.ac.uk) +% Created 29 Oct 94 version 1.4: 10 Mar 99. +% For use with Latex Standard Styles +% Adds control of section heading style to standard LaTeX. +% For LaTeX2.09 (OFSS and NFSS) and LaTeX2e. +% +% Optional features are set to standard. +% +% DOCUMENTATION at end of file +% +% WARNING: conflicts with REFMAN.STY. +% +% ALL RIGHTS RESERVED +% +% This file may be distributed freely. +% It may be modified for local use (please inform me of such modifications) +% Modified versions may only be distributed if +% 1. The name is changed +% 2. A statement acknowledging the modification heads the file. +% +% DO NOT USE \neq in this file +\chardef\neq\the\catcode`\@ +\makeatletter\@makeother\" +% +\typeout{`section.sty' <1.4>} +%************************* +\ifx\reset@font\undefined\let\reset@font\relax\fi +% +% Options +% +\ifx\secindent\undefined + \newdimen\secindent + \newskip\secpreskp + \newskip\secpstskp + \newdimen\subindent + \newskip\subpreskp + \newskip\subpstskp + \newskip\parpstskp + \newcount\c@hddepth +\fi +%implict multiplication removes stretch +\secindent0pt% no indentation +\secpreskp1.2\baselineskip plus .35\baselineskip minus.07\baselineskip +%\secpreskp3.5ex plus 1 ex minus.2ex +\secpreskp-\secpreskp +\secpstskp.8\baselineskip plus .07\baselineskip +%\secpstskp2.3ex plus .2ex +\subindent0pt +\subpreskp1.13\baselineskip plus .35\baselineskip minus.07\baselineskip +%\subpreskp3.25ex plus 1 ex minus.2ex +\subpreskp-\subpreskp +\subpstskp.53\baselineskip plus.07\baselineskip +%\subpstskp1.5ex plus.2ex +\parpstskp-.8\baselineskip +%\parpstskp-1em +\ifx\chapter\undefined + \def\chsize{\Large}\def\hdsize{\huge}\else + \def\chsize{\huge}\def\hdsize{\Huge} +\fi +\let\ttsize\LARGE +\let\ausize\large +\let\dasize\large +\let\hdpos\raggedright +\c@hddepth\z@ +\let\secsize\Large +\let\subsize\large +\let\fpind\relax +% +\def\nmdot{} +\def\cpdot{:} +\def\hdfnt{\reset@font\bf} +\def\ttfnt{\reset@font\rm} +\def\pgfnt{\reset@font\rm} +\def\mkfnt{\reset@font\sl} +\let\mkcse\uppercase +\def\hddot{} +\def\fefnt{\reset@font\bf} +\def\thfnt{\reset@font\it} +% +\def\fnum@figure{\figurename~\thefigure\cpdot} +\def\fnum@table{\tablename~\thetable\cpdot} +% +% +% theorems +% +\def\@begintheorem#1#2{% + \trivlist \item[\hskip \labelsep{\fefnt #1\ #2\hddot}]\thfnt} +\def\@opargbegintheorem#1#2#3{\trivlist + \item[\hskip \labelsep{\fefnt #1\ #2\ (#3)\hddot}]\thfnt} +% +{\@makeother\~ +\long\gdef\@ifempty#1#2#3{\if~#1~#2\else#3\fi} +} +\long\def\@gobifnul#1#2{\@ifempty{#1}\@empty{#1#2}} +%\@Alph and \@alph \relax added to allow \@ifempty test when counter<=0 +\def\@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\@ctrerr\fi\relax} +\def\@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\@ctrerr\fi\relax} +%LaTeX 209 +\ifx\@ialph\undefined\else\let\@ialph\undefined\let\@Ialph\undefined\fi +% +% Figures and Tables +% +\long\def\@makecaption#1#2{\vskip 10\p@ + \setbox\@tempboxa\hbox{#1\ #2}\ifdim \wd\@tempboxa >\hsize + #1\ #2\par\else\hbox to\hsize{\hfil\box\@tempboxa\hfil}\fi} +% +% Modified LateX Sectioning Commands +% +\ifx\chapter\undefined +% +%Article +% +\def\part{\par\vskip1.4\baselineskip\@tempskipa\z@ + \@tempskipb\baselineskip\@afterindentfalse\secdef\@part\@spart} +\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne\@makesecdot{part}% + \addcontentsline{toc}{part}{\protect\numberline{\thepart\nmdot}{#1}}\else + \addcontentsline{toc}{part}{#1}\fi\@mkboth{}{} + {\parindent\z@\hdpos\interlinepenalty\@M\ifnum\c@secnumdepth>\m@ne + \@ifempty\thepart\@empty{\chsize\hdfnt\partname~\thepart\par\nobreak + \vskip\@tempskipa}\fi}\@spart{#2}} +\def\@spart#1{\@ifempty{#1}\removelastskip{\parindent\z@\hdpos + \interlinepenalty\@M\hdsize\hdfnt#1\par}\nobreak\vskip\@tempskipb + \fpind\@afterheading} +\def\maketitle{\par\begingroup\def\thefootnote{\fnsymbol{footnote}}% + \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}% + \if@twocolumn\twocolumn[\@maketitle]% + \else\newpage\global\@topnum\z@\@maketitle\fi + \thispagestyle{empty}\@thanks\endgroup + \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax + \def\@thanks{}\def\@author{}\def\@title{}\let\thanks\relax} +\def\@maketitle{\null \vskip \tw@ em\begin{center}% + {\ttsize\ttfnt\@title\par}\vskip1.2\baselineskip{\ausize\ttfnt%1.5em + \lineskip.4\baselineskip\begin{tabular}[t]{c}\@author\end{tabular}\par}%.5em + \vskip.8\baselineskip{\dasize\ttfnt\@date}\end{center}% 1em + \par\vskip1.2\baselineskip}% 1.5em +\if@twoside + \def\ps@headings{\let\@mkboth\markboth + \def\@oddfoot{}\def\@evenfoot{} + \def\@evenhead{\pgfnt\thepage\hfil\mkfnt\leftmark}% + \def\@oddhead{\mkfnt\rightmark\hfil\pgfnt\thepage}% + \def\sectionmark##1{\markboth{\mkcse{\ifnum\c@secnumdepth>\z@\@gobifnul + \thesection{\@ifempty{##1}\@empty{\nmdot\quad}}\fi##1}}{}}% + \def\subsectionmark##1{\markright{\ifnum\c@secnumdepth>\@ne\@gobifnul + \thesubsection{\@ifempty{##1}\@empty{\nmdot\quad}}\fi##1}}} +\else + \def\ps@headings{\let\@mkboth\markboth + \def\@oddfoot{}\def\@evenfoot{} + \def\@oddhead{\mkfnt\rightmark\hfil\pgfnt\thepage}% + \def\sectionmark##1{\markright{\mkcse{\ifnum\c@secnumdepth>\z@ + \@gobifnul\thesection{\@ifempty{##1}\@empty{\nmdot\quad}}\fi##1}}}} +\fi +\def\ps@myheadings{\let\@mkboth\@gobbletwo + \def\@oddhead{\mkfnt\rightmark \hfil\pgfnt\thepage}\def\@oddfoot{}% + \def\@evenhead{\pgfnt\thepage\hfil\mkfnt\leftmark}\def\@evenfoot{}% + \def\sectionmark##1{}\def\subsectionmark##1{}} +\def\tableofcontents{\makeheading{\contentsname + \@mkboth{\mkcse{\contentsname}}{\mkcse{\contentsname}}}% + \@starttoc{toc}} +\def\listoffigures{\makeheading{\listfigurename + \@mkboth{\mkcse{\listfigurename}}{\mkcse{\listfigurename}}}% + \@starttoc{lof}} +\def\listoftables{\makeheading{\listtablename\@mkboth + {\mkcse{\listtablename}}{\mkcse{\listtablename}}}% + \@starttoc{lot}} +\def\thebibliography#1{\makeheading{\refname\@mkboth + {\mkcse{\refname}}{\mkcse{\refname}}}\list + {\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth\advance\leftmargin\labelsep + \usecounter{enumiv}\let\p@enumiv\@empty + \def\theenumiv{\arabic{enumiv}}}% + \def\newblock{\hskip .11em plus.33em minus.07em}% + \sloppy\clubpenalty4000\widowpenalty4000\sfcode`\.=\@m\relax} +\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi + \columnseprule \z@\columnsep 35\p@\twocolumn[\makeheading{\indexname}]% + \@mkboth{\mkcse{\indexname}}{\mkcse{\indexname}}% + \thispagestyle{plain}\parindent\z@ + \parskip\z@ plus.3\p@\relax\let\item\@idxitem} +\def\l@part{\@tocheadline{0}{1.8\baselineskip}{3em}{\large\bf}}%2.25em +\def\l@section{\@tocheadline{1}{1em}{1.8em}{\bf}} +\def\makeheading{\section*} +\else +% +%Report/Book +% +\def\part{\cleardoublepage\thispagestyle{plain}% + \if@twocolumn\onecolumn\@tempswatrue\else \@tempswafalse\fi + \@tempskipa20\p@\@tempskipb\fill\hbox{}\vfil\secdef\@part\@spart} +\def\@part[#1]#2{\ifnum\c@secnumdepth>-2\@makesecdot{part}% + \addcontentsline{toc}{part}{\protect\numberline{\thepart\nmdot}#1}\else + \addcontentsline{toc}{part}{#1}\fi\@mkboth{}{}% + {\parindent\z@\hdpos\ifnum\c@secnumdepth>-2\@ifempty\thepart\@empty + {\chsize\hdfnt\partname~\thepart\par\vskip\@tempskipa}\fi + \@spart{#2}}} +\def\@spart#1{\@ifempty{#1}\removelastskip{\hdpos\hdsize\hdfnt#1\par}% + \vskip\@tempskipb\newpage\if@twoside\hbox{}\thispagestyle{empty}\newpage\fi + \if@tempswa\twocolumn\fi} +\let\@endpart\undefined +\def\@makeschapterhead#1#2#3#4{\vskip#2{\parindent\z@\hdpos + \if@nobreak\ifnum\c@secnumdepth>\m@ne\@ifempty\thechapter\@empty + {\chsize\hdfnt\@chapapp~\thechapter \par\nobreak\vskip#3}\fi\fi + \@ifempty{#1}\removelastkip{\hdsize\hdfnt#1\par}\nobreak\vskip#4}} +\def\@makechapterhead#1{\hbox{}\@makeschapterhead{#1}{50\p@}{20\p@}{40\p@}} +\def\@chapter[#1]#2{\ifnum\c@secnumdepth>\m@ne\@makesecdot{chapter}% +\typeout{\@chapapp\space\thechapter}\fi\@contmark{chapter}\z@{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}\@nobreaktrue + \if@twocolumn\@topnewpage[\@makechapterhead{#2}]\else\@makechapterhead{#2}\fi + \fpind\@afterheading} +\def\@schapter#1{\@nobreakfalse\if@twocolumn + \@topnewpage[\@makechapterhead{#1}]\else + \@makechapterhead{#1}\fi\fpind\@afterheading} +\if@twoside + \def\ps@headings{\let\@mkboth\markboth\def\@oddfoot{}\def\@evenfoot{}% + \def\@evenhead{\pgfnt\thepage\hfil\mkfnt\leftmark}% + \def\@oddhead{\hbox{}\mkfnt\rightmark\hfil\pgfnt\thepage}% + \def\chaptermark##1{\markboth{\mkcse{\ifnum + \c@secnumdepth>\m@ne\expandafter\@gobifnul\@chapapp\ \@gobifnul + \thechapter{\@ifempty{##1}\@empty{\nmdot\quad}}\fi##1}}{}}% + \def\sectionmark##1{\markright{\mkcse{\ifnum \c@secnumdepth >\z@\@gobifnul + \thesection{\@ifempty{##1}\@empty{\nmdot\quad}}\fi ##1}}}} +\else + \def\ps@headings{\let\@mkboth\markboth + \def\@oddfoot{}\def\@evenfoot{}% + \def\@oddhead{\mkfnt \rightmark \hfil\pgfnt\thepage}% + \def\chaptermark##1{\markright {\mkcse{\ifnum + \c@secnumdepth>\m@ne \expandafter\@gobifnul\@chapapp\ \@gobifnul + \thechapter{\@ifempty{##1}\@empty{\nmdot\quad}}\fi##1}}}} +\fi +\def\ps@myheadings{\let\@mkboth\@gobbletwo + \def\@oddhead{\mkfnt\rightmark \hfil\pgfnt\thepage}% + \def\@oddfoot{}\def\@evenhead{\pgfnt \thepage\hfil\mkfnt + \leftmark}\def\@evenfoot{}% + \def\chaptermark##1{}\def\sectionmark##1{}% + \def\subsectionmark##1{}} +\def\maketitle{\begin{titlepage}% + \let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}% + \null \vfil \vskip 5\baselineskip \begin{center}% 60pt + {\ttsize\ttfnt\@title\par}\vskip2.45\baselineskip {\ausize\ttfnt\lineskip + .62\baselineskip%3em .75em + \begin{tabular}[t]{c}\@author \end{tabular}\par}% + \vskip 1.25\baselineskip {\dasize \ttfnt \@date \par} \end{center} \par%1.5em + \@thanks \vfil \null \end{titlepage}% + \setcounter{footnote}{0} \let\thanks\relax + \def\@thanks{}\def\@author{}\def\@title{}\let\maketitle\relax}% +\def\tableofcontents{\@restonecolfalse + \if@twocolumn\@restonecoltrue\onecolumn\fi\makeheading{\contentsname + \@mkboth{\mkcse{\contentsname}}{\mkcse{\contentsname}}}% + \@starttoc{toc}\if@restonecol\twocolumn\fi} +\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi + \makeheading{\listfigurename\@mkboth{\mkcse{\listfigurename}}% + {\mkcse{\listfigurename}}}\@starttoc{lof}\if@restonecol\twocolumn\fi} +\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi + \makeheading{\listtablename\@mkboth{\mkcse{\listtablename}}% + {\mkcse{\listtablename}}}\@starttoc{lot}\if@restonecol\twocolumn\fi} +\def\thebibliography#1{\makeheading{\bibname\@mkboth + {\mkcse{\bibname}}{\mkcse{\bibname}}}\list + {\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth\advance\leftmargin\labelsep + \usecounter{enumiv}\let\p@enumiv\@empty + \def\theenumiv{\arabic{enumiv}}}% + \def\newblock{\hskip .11em plus.33em minus.07em}% + \sloppy\clubpenalty4000\widowpenalty4000\sfcode`\.=\@m} +\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi + \columnseprule\z@\columnsep 35\p@\twocolumn\makeheading{\indexname + \@mkboth{\mkcse{\indexname}}{\mkcse{\indexname}}}% + \thispagestyle{plain}\parindent\z@ + \parskip\z@ plus .3\p@\relax\let\item\@idxitem} +\def\l@part{\@tocheadline{\z@}{1.8\baselineskip}{3em}{\large\bf}}%2.25em +\def\l@chapter{\@tocheadline{\@ne}{1em}{1.8em}{\bf}} +\def\makeheading{\chapter*} +\fi +% +%Article, Book, Report +% +\def\section{\@startsection +{section}{\@ne}{\secindent}{\secpreskp}{\secpstskp}{\secsize\hdfnt}} +\def\subsection{\@startsection +{subsection}{\tw@}{\subindent}{\subpreskp}{\subpstskp}{\subsize\hdfnt}} +\def\subsubsection{\@startsection +{subsubsection}{3}{\subindent}{\subpreskp}{\subpstskp}{\normalsize\hdfnt}} +\def\paragraph{\@startsection{paragraph}{4}{\subindent}% +{\subpreskp}{\parpstskp}{\normalsize\hdfnt}} +\def\subparagraph{\@startsection{subparagraph}% +{5}{\parindent}{\subpreskp}{\parpstskp}{\normalsize\hdfnt}} +% +% section layout +% +\def\@makesecdot#1{\expandafter\let\expandafter\@secdot\csname the#1\endcsname + \ifx\@secdot\@empty\else\refstepcounter{#1}\toks@\expandafter{% + \csname p@#1\endcsname}\edef\@secdot{% + \the\toks@\expandafter\@gobifnul\csname the#1\endcsname\nmdot}\fi} + %not \@secdot +\def\@makesvsec#1{\ifind #1<\z@\def\@svsec{\llap{\@secdot}\hskip-#1}\else + \def\@svsec{\@gobifnul\@secdot\quad}\fi} +\def\@contmark#1#2#3{\csname #1mark\endcsname{#3}\addcontentsline + {toc}{#1}{\ifnum #2>\c@secnumdepth\else\protect\numberline{\@secdot}\fi#3}} +\def\@startsection#1#2#3#4#5#6{\if@noskipsec\leavevmode\fi + \par\@tempskipa #4\@afterindenttrue + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\@afterindentfalse\fi + \fpind\if@nobreak\everypar{}\else + \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi\@ifstar + {\@ssect{#3}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#5}{#6}}}} +\def\@sect#1#2#3#4#5[#6]#7{\@tempskipa #4\let\@svsec\@empty + \ifnum#2>\c@secnumdepth\else\@makesecdot{#1}\@makesvsec{#3}\fi + \ifdim\@tempskipa>\z@ + \begingroup#5\@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty + \@M\ifnum#2>\c@hddepth\else\hdpos\fi#7\par}\endgroup + \@contmark{#1}{#2}{#6}\else + \def\@svsechd{\@contmark{#1}{#2}{#6}#5\hskip#3\@svsec + \@gobifnul{#7}\hddot}\fi\@xsect{#4}} +\def\@ssect#1#2#3#4{\@tempskipa #2\relax\ifdim \@tempskipa>\z@ + \begingroup #3\@hangfrom{\ifind #1< \z@\else \hskip #1\fi}{\interlinepenalty + \@M\ifnum#2>\c@hddepth\else\hdpos\fi#4\par}\endgroup\else + \def\@svsechd{#3\ifind #1<\z@\else + \hskip #1\fi\@gobifnul{#4}\hddot}\fi\@xsect{#2}} +\let\ifind\ifdim +% +% contents lines +% +\def\@tocheadline#1#2#3#4#5#6{\ifnum#1>\c@tocdepth\else + \addpenalty\@secpenalty\vskip#2 plus\p@\begingroup + \interlinepenalty\@M\rightskip\@tocrmarg\parfillskip-\@tocrmarg + \secindent#3\noindent\leavevmode\hangindent\secindent + \reset@font\rm#4#5\@tocpagenum{#6}\par\endgroup + \penalty\@highpenalty\fi} +\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else + \vskip \z@ plus.2\p@\begingroup\leftskip#2\interlinepenalty\@M + \rightskip\@tocrmarg\parfillskip-\@tocrmarg\secindent#3% + \noindent\leavevmode\hangindent\secindent\reset@font\rm#4\nobreak\leaders + \hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill \nobreak + \hbox to\@pnumwidth{\hfil\reset@font\rm #5}\par\endgroup\fi} +\def\@tocpagenum#1{\nobreak\hfill\nobreak\hbox to\@pnumwidth{\hss#1}} +\def\numberline#1{\hbox to \secindent{#1\hfil} } +% +% REDEFINITIONS here: +% +% This line must be last line of code +\catcode`\@\neq\let\neq\ne\endinput + +******************* + DOCUMENTATION +******************* +Leslie Lamport in writing LaTeX assumed that authors would write +complete .sty (.clo) files to implement the design decisions for their +publications. However, the overwhelming majority of LaTeX publications use the +standard styles supplied by Lamport. These implement a particular set of +typographic conventions, which while consistent are not of universal validity, +for instance many publishers and authors would like a full stop: +`4. Introduction' +rather than +`4 Introduction'. + +This file modifies the standard classes so that other conventions can be +more easily implemented. Careful use of the file will allow a greater +variation in the appearance of LaTeX documents. + +0. Changes to section implementation. +The file redefines the way LaTeX deals with negative indents for section +headings, placing the number in the margin and the heading itself flush +with the margin. With negative indents it sets starred section headings +flush (as it does when \thesection is empty. +Standard LaTeX indenting can be produced by typing +>> \let\ifind\iffalse +This file's version can be reestablished by typing +>> \let\ifind\ifdim + +The file also changes the way LaTeX reacts to empty numbers when sections have +non-negative indents, placing the heading where the number would go, rather +than further indented (as in standard LaTeX). +This effect can be removed by redefining an internal macro \@makesvsec (see +below). + +The indents, pre- and postskips for section headings are placed in registers +so that they are constant throughout a document and (just as the heading sizes) +do not react to surrounding size changes. You can change this back to ordinary +LaTeX behaviour by \def ing them as macros rather than setting the register +values (in that case you should probably use \smaller\larger from +SMALLER.STY for the \...size commands). + +WARNING LaTeX typesets headings that run on by manipulating \everypar. If you +make local changes to the heading style of such a section inside braces or a +group you must ensure that a non-empty paragraph occurs before the closing +brace. Otherwise some strange effects may occur, because the \everypar tokens +will be evaluated outside the group (this is a feature of LaTeX, not of +SECTION.STY). If your group ends with an empty section of this type just +follow it with \leavevmode or an explicit space: \ . + +A detailed description of the format of LaTeX sectioning commands is given +below (in paragraph 9). This is partially taken from the file LATEX.TEX. +We first list the macros for local control which you can use without knowing +this structure. + +The file sets vertical distances that LaTeX expressed in terms of `em's and +`ex's in equivalent `\baselineskip's, as `em' is a measure of the horizontal +size of a font and `ex' is not a true measure of the full height of a line. +Earlier vesions used `ex's. + +The original values are placed as comments. + +1. Sizing commands for Parts, Chapters and Titles etc +These are set to \large or whatever + +>> \chsize: Chapter, Part Heading (\LARGE\large) +>> \hdsize: Chapter, Part Title Text (\Huge\huge\LARGE) +>> \ttsize: Title of Document (\Huge\huge\LARGE) +>> \ausize: Author (\LARGE\Large) +>> \dasize: Date. (\Large\large) +>> \secsize: Section (\Large\large) +>> \subsize: Subsection (\large\normalsize) + subsubsection and below use \normalsize + +2. Layout commands for headings. +>> \hdpos: Positioning of heading (\raggedright) (\centering \raggedleft) + (see section 9); +>> counter hddpth (default 0) + Maximum section level for \hdpos (chapters and parts ALWAYS use hdpos). + To centre section headings and above: + \let\hdpos\centering\setcounter{hddepth}{1} +>> \fpind: Indenting of first paragraph after \Part \Chapter + and also to override setting via preskip for sections. + \let to \@afterindenttrue to indent, \@afterindentfalse for flush, + \relax: flush after \Part \Chapter, negative preskips; indented otherwise + (LaTeX default behaviour). + +3. Fonts +>> \ttfnt: font for title entries. +>> \hdfnt: font for all other headings (Part, Chapter..subparagraph). +>> \fefnt: font for theorem headings and description labels (fe=feature). +>> \thfnt: font for theorem statements. +>> \pgfnt: font for page numbers. +>> \mkfnt: font for page headings (mk=mark). +>> \mkcse: case for page headings. + These can also be used to add other initial commands such as spaces or + symbols. + +4. Optional punctuation (standard|my preference) + These marks are transferred via auxiliary files for tables of contents etc. + They should be \def'd if their current value is to be transferred, and \let + if the value in force when the file auxiliary is read should be used. + +>> \hddot ({}|.) (after inline headings, theorems etc) +>> \cpdot (:|.) (in figure/table captions - also apears in list of figures. +>> \nmdot ({}|.) (after section numbers etc) + +If these are \let to a single letter they are not expanded in the + .toc.. files. So to remove \cpdot from list of figures: + \let\cpdot\relax\listoffigures\let\cpdot: + +5. Spacing parameters. + The macros for chapters and parts have been altered so that all the + vertical spacing commands are in a single macro in each case. + +>> \part inserts initial vertical space directly (preceded by \hbox{} if it + is to be immovable) and passes the space between Part n and title + in \@tempskipa and the space below the heading in \@tempskipb. +>> Both \chapter and \chapter* call \@makechapterhead{chaptertitle}. + This passes {chaptertitle} on to \@makeschapterhead together with the + vertical spacing. Default setting is + \def\@makechapterhead#1{\hbox{}\@makeschapterhead{#1}{50\p@}{20\p@}{40\p@}} + \hbox{} makes first skip immovable, + the first length is space above the heading, + The second is the space between Chapter nn and the chapter title + The third is the space below the heading. + For both Part and Chapter the middle space is removed if either the + section name or title are missing. + If both are missing, the first space is also removed + +>> For sections and below the spaces are kept in registers: + \secpreskp and \secpsrskp \secindent used for \section + \subpreskp and \subpstskp \subindent used for \subsection/\subsubsection + \paragraph uses \subindent \subpreskp \parpstskp + \subparagraph uses \parindent \subpreskp \parpstskp + +>> \secindent \subindent Heading indentation +>> \secpreskp \subpreskp Space before +>> \secpstskp \subpstskp \parpstskp Space after. + +6. Internal modifications + + Sections with negative indents have heading flush with margin. + + If \thesection is \empty + \let\thesection\empty or \def\thesection{} + then section does not step the section counter. + If the section produces empty output for a value then + the section will start flush at the margin or \secindent if it is positive + and there will be no \nmdot. + It will produce (flush) page headings and a table of contents entry. + Similarly if \thechapter or \thepart are defined to be empty they will + suppress the heading line `Chapter..' and not step the counter. + To restore standard LaTeX behaviour temporarily define \thesection to be + \empty + \def\thesection{\empty} + In that case you can adjust post number spacing in the heading. + \section[Heading]{\hskip-1em Heading} + You can also redefine \@makesecdot see paragraph 7. + +WARNING \letting \thesection etc to an unexpandable token (like \relax) will +cause strange effects under LaTeX because its value will not be expanded. + + \maketitle suppresses page headings (\thispagestyle{empty}) and only resets + \@title etc locally. So place in a group if you want to preserve these for + later reference (eg. in headers). + +7. New internal macros + Place any modifications in the section REDEFINITIONS of the main code + +> \@secdot contains section number and \nmdot if the number is non-empty. +> \@makesecdot{NAME} defines \@secdot. + To make LaTeX step the section counter independently of the definition + of \thesection and always print \nmdot: + \def\@makesecdot#1{\refstepcounter{#1}% + \edef\@secdot{\csname the#1\endcsname}} + If you want \nmdot suppressed when \thesection produces no output: + \def\@makesecdot#1{\refstepcounter{#1}% + \edef\@secdot{\expandafter\@gobifnul\csname the#1\endcsname\nmdot}} +> \@makesvsec{INDENT} defines the \@svsec macro used by LaTeX to typeset the + section number.. Its parameter is the indent so that it can react + differently to negative indents. (it does NOT make the indent). + To obtain standard LaTeX behaviour: + \def\@makesvsec#1{\def\@svsec{\@secdot\quad}} + To make positioning commands apply to the heading ignoring the number: + \def\@makesvsec#1{\def\@svsec{\llap{@secdot\quad}}} + Do NOT forget the #1. +> \@contmark{NAME}{LEVEL}{HEADING} makes contents line and sectionmark. + + Contents headlines are defined by +> \@tocheadline + This allows these lines to be adjusted similarly to the \@dottedtocline + commands for other contents lines. The format of these is defined below (in + paragraph 11). +>@tocpagenum#1 sets #1 flush right in \@tocheadline. + Redefine (\let\@tocpagenum\@gobble) to remove page numbers. + \def\l@part{\@tocheadline{0}{2.25em}{3em}{\let\@tocpagenum\@gobble + \centering\large\bf}} + Centres parts lines of contents but leaves chapters unchanged + \def\l@part{\@tocheadline{0}{2.25em}{3em}{\let\@tocpagenum\@gobble + \centering\def\numberline##1{\hskip-\secindent + \hbox to\secindent{##1\hfil}}\large\bf}} + Same but centring ignores part number. + \def\l@part{\@tocheadline{0}{2.25em}{3em}{\let\@tocpagenum\@gobble + \centering\def\numberline##1{\hfilneg + \hbox to\z@{##1\hss}\hfil}\large\bf}} + Centres heading with number flush left + Contents lines use \secindent as a temporary register + +>\makeheading (set to \section*, \chapter*) + Makes headings for contents, index etc. + To put Contents itself in the contents list, redefine (locally): + \let\thesection\empty\let\makeheading\section + +8. Additional macros +> \@ifempty{test}{yes}{no} like \@ifundefined but tests for empty + (fails iff test starts with ~ of catcode 12 (other) ). +> \@gobifnul{a}{b} = \@ifempty{a}{}{ab}. + +9. Description of sectioning values + + \@startsection {NAME}{LEVEL}{INDENT}{PRESKIP}{POSTSKIP}{STYLE} + optional * [ALTHEADING]{HEADING} + Generic command to start a section. + + NAME : e.g., 'subsection' must be the name of a section counter + LEVEL : a number, denoting depth of section -- section=1; + number increases down the hierarchy. + INDENT : Indentation of heading from left margin + PRESKIP : Absolute value = skip to leave above the heading. + If negative, then paragraph indent of text following + heading is suppressed. + POSTSKIP : if positive, then skip to leave below heading, else + negative of skip to leave to right of run-on heading. + ALTHEADING : for page headings and contents. + STYLE : commands to set style + If '*' missing, then increments the counter. If it is present, then + there should be no [ALTHEADING] argument. + Uses the counter 'secnumdepth' whose value is the highest section + level that is to be numbered and entered into \@dottedtocline. + +10. Treatment of Section Entries + + NAME (fixed) Determines the counter to use. + + LEVEL (fixed) If level is greater than \counter{secnumdepth} (default 2) no + indexentry or number + + INDENTS: \secindent (sections), \subindent (subsections,...,paragraphs). + Subparagraphs have \parindent fixed. These are dimensions. + + Recommended: +-\parindent or 0pt + + If indent is negative then SECTION.STY causes the section number to be set + flush right that distance from margin. Heading or text follows at the margin + itself. + + Unnumbered headings are set at the margin if indent is negative. If the + indent is non-negative they are set flush left with the number position. + + PRESKIPS \secpreskp (sections), \subpreskp(subsections..subparagraphs) + POSTSKIPS \secpstskp (sections),\subpstskp(subsections,subsubsections) + \parpstskp (paragraphs,subparagraphs) + + Recommended: leave PRESKIPS' abs values unchanged, They are set -ve to + have flush first paragraphs. Use \secpreskp-\secpreskp to indent them. + Recommended: set POSTSKIPS to -1em or -\parindent to make sections run on. + + By assigning these values to registers SECTION.STY makes them independent of + the surrounding font and size. Set the registers if you want this, redefine + them as macros if you want them to be font and size dependent. + + STYLE \secsize \subsize \hdfnt size and fonts. + \secsize for sections, + \subsize for subsections. + Subsubsections and below have \normalsize (fixed). + \hdfnt is universal for all headings. + +11. Contents entries. + + \@tocheadline{LEVEL}{PRESKIP}{INDENT}{STYLE}{ENTRY}{PAGENUM} + \@dottedtocline{LEVEL}{MARGIN}{INDENT}{ENTRY}{PAGENUM} + + LEVEL : determines if entry made. + PRESKIP : vertical gap above. + INDENT : This must leave enough room for the chapter or section number + : It is added to the margin for the next level. + MARGIN : Left margin inherited from level above (zero for headlines). + STYLE : Font sizing and setting. + + LaTeX assumes that the ENTRY for sections be defined by a macro \l@section. + These are defined in the standard document styles but can be changed. + All entries of the \l@section commands are fixed. SECTION.STY does not + change the commands using \@dottedtocline in the style file. Those that do + not do so (\l@part, \l@chapter) are modified to use \@tocheadline. + + INDENT for sections in {article} and chapters in {report} is rather tight at + 1.5em. If you increase it should also increase the MARGINS for lower + sections. + +12. The following internal LaTeX macros are redefined: + + \part\@part\@spart\@endpart + \@chapter\@schapter (also \fi moved) + \@makechapterhead functions of these have been significantly + \@makeschapterhead changed. + + \ps@headings\ps@myheadings + \section\subsection + \subsubsection\paragraph + \subparagraph + \thebibliography + \theindex + \@begintheorem + \@oparbegintheorem + \@makecaption optional style features added + \@startsection \fpind and does not pass #4 to \@sect,\@ssect + \@sect,\@ssect ignored parameter removed + \llap \@secdot used to adjust spacing + if \p@section defined used for number style. + calls \@makesecdot + \@sect only: \@makesvsec and + \@contmark, which is moved in + \@svsechd so that \unskip in \@xsect works). + \maketitle\@maketitle suppress page number, reset \@title.. locally + \numberline adds space after number, so overfull box if + too close to heading. + +CHANGES + Ver 1.3 (3.Apr 98) + If \secindent < 0, then \section* produces a flush heading, not outdented. + \hdpos takes level as parameter and is used for all sections, not just + \part and \chapter. + `ex' measurements replaced by \baselineskip equivalents. + Ver 1.31 + Bugfix: \relax added to \@alph, \@Alph to enable use with \@ifempty test. + Ver 1.32 + Bugfixes: \hdpos added to \@ssect, unused macro \secpos removed, + \nobreak added after \thechapter in \makechapterhead + Ver 1.4 + \hdpos made simple macro again. Counter \hddepth determines when it + should be used. Functions of \@makechapterhead, \@smakechapterhead + changed to make editing vertical spacing of chapters easier. + \part\@part\@spart rewritten so that all spacing info in \part. + \part calls \@spart which finishes off the heading. + Memory use < 200 words. +End of SECTION.STY
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/ltxmisc/selectp.sty b/Master/texmf-dist/tex/latex/ltxmisc/selectp.sty new file mode 100644 index 00000000000..1c4e609ff2c --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/selectp.sty @@ -0,0 +1,232 @@ +% +% S E L E C T P . S T Y - Select pages for output +% +% Version 0.9 (test), Sept 25, 1992 (So much for keeping versions current!) +% +% By Donald Arseneau, asnd@reg.triumf.ca, based on macros in +% TUGBoat, 8:2 (1987), p. 217 written by Don Knuth, and with +% suggestions from Hossein Saiedian. +% +% This style allows selection of individual pages to be output by LaTeX +% or plain TeX by specifying, for example, +% +% \outputonly{1,3, 7-12 16 17} +% +% The list of numbers should be in the order that TeX generates the pages. +% The numbers should be separated by commas or spaces, and may include +% ranges (7-12). +% +% More complete instructions follow \endinput + + +% First, set catcode of @ in case it isn't a "letter" already +\expandafter\edef\csname SP@catcode\endcsname + {\catcode`\noexpand\@=\the\catcode`\@ + \let \csname SP@catcode\endcsname \noexpand\UnDefinedButNoAt} +\catcode`\@=11 + +% Allow plain TeX to use this style: + +\ifx\c@page\Und@Fynd + \let\c@page \pageno + \def\@empty{}% note: \ifx ignores the \global nature of macros for comparison + \let\nofiles\relax + \let\typeout\message +\fi + +% Read list of selected pages + +\def\outputonly{\begingroup \catcode`\,13 \SP@outonly} + +\begingroup \catcode`\,13 +\gdef\SP@outonly#1{\edef,{\string,}\typeout{Only pages #1 will be output.}% + \def,{ }\xdef\SP@geS{\SP@geS\space #1}% make commas be spaces + \endgroup + \nofiles % prevent writing partial .aux files + \let\shipout\SP@shipout% replace shipout command + \ifnum\SP@nextpage=-\maxdimen % if first \outputonly command... + \SP@getnextpage \fi % get first page number from list +}\endgroup + +\gdef\SP@geS{} + +% replace \shipout command with filter to select pages for output + +\let\plain@shipout=\shipout + +\newcount\SP@nextpage \global\SP@nextpage=-\maxdimen % flag as undefined +\newcount\SP@expectpage \global\SP@expectpage=-\maxdimen + +\def\SP@getnextpage{\ifx\SP@geS\@empty \global\SP@nextpage\maxdimen + \else % If more page numbers on list + \afterassignment\SP@updPS \global\SP@nextpage\SP@geS\relax + \fi} + +\def\SP@updPS#1\relax{\gdef\SP@geS{#1}} + +\def\SP@shipout{\relax %\showthe\c@page% + \ifnum\SP@expectpage=-\maxdimen \global\SP@expectpage\c@page + \else \global\advance\SP@expectpage\@ne + \fi + \ifnum\SP@expectpage=\c@page\else % page number has jumped, + \ifnum\SP@nextpage<\z@ % if in middle of a range -- + \ifnum \AbsVal\c@page >\AbsVal\SP@expectpage\else % and jumping backward -- + \SP@getnextpage % read next number for sure + \fi\fi + \SP@catchup % Resynchronize + \fi \global\SP@expectpage\c@page + \ifnum\SP@nextpage<\z@ % either a `negative' page, or end of range + \ifnum\c@page<\z@ % preamble pages in plain only match singly + \ifnum\c@page=\SP@nextpage\SP@getnextpage \let\SP@dopage\plain@shipout\fi + \else % look for range match + \ifnum\c@page>-\SP@nextpage \else \let\SP@dopage\plain@shipout \fi + \ifnum\c@page<-\SP@nextpage \else \SP@getnextpage \fi + \fi + \else % look for single match + \ifnum\c@page=\SP@nextpage \SP@getnextpage \let\SP@dopage\plain@shipout \fi + \fi \SP@dopage} + +\newbox\SP@garbage +\def\SP@dopage{\deadcycles\z@ \setbox\SP@garbage=} + +% read list of desired pages to get resynchronized with actual page numbers. +% \SP@catchup is called whenever the page number has a discontinuity. +% +\def\SP@catchup{% + \ifnum \AbsVal\c@page >\AbsVal\SP@nextpage + \ifx\SP@geS\@empty \def\SP@catchup{\global\SP@nextpage\maxdimen}\fi + \SP@getnextpage + \expandafter \SP@catchup + \fi} + +% take absolute value of TeX number or dimension +\def\AbsVal#1{\ifnum#1<\z@-\fi#1} + +\SP@catcode % restore @ catcode + +\endinput +% +% SELECTP.STY -- Select pages for output +% +% INSTRUCTIONS +% +% This style file defines the command \outputonly which selects specific +% pages for output, much as \includeonly selects certain files for input. +% To use selectp.sty in LaTeX, specify "selectp" as one of the document +% style options and give the command \outputonly{_list_of_page_numbers_} +% before \begin{document}. Only pages given in the list will be output +% to the DVI file. For example +% +% \documentstyle[12pt,selectp,subeqn]{article} +% \outputonly{1,3, 7-12 16 17} +% +% which will allow only pages 1,3,7,8,9,10,11,12,16,17 to be output. +% For plain TeX, use \input{selectp.sty}. +% +% The number list should consist of numbers and number ranges (7-12, e.g.) +% separated by commas or spaces. The order is not random but MUST BE THE +% ORDER THAT THE PAGES ARE PRODUCED; normally this means the numbers must +% always increase. If an invalid page number appears on the list, no pages +% will be output until the list is re-synchronized or the document ends. +% +% Any time the document's page number does not increment normally, +% selectp.sty tries to re-synchronize the page number with the \outputonly +% list of numbers. This is necessary when \includeonly is used. +% +% Pages that are labeled with roman numerals or letters should still be +% listed with a normal arabic number; page xi should be referred to as 6. +% +% In LaTeX, unfortunately, pages i and 1 are both number 1, so it is +% tricky to skip over all the roman-numbered pages and then print +% page 1. If there are 3 roman-numbered pages, +% 1-3 will print pages i,ii,iii; not pages 1,2,3 +% 1-3,1-5 will print pages i,ii,iii,1,2,3,4,5 +% 1-3,8-12 will print pages i,ii,iii,8,9,10,11,19 +% 1,1-5 will print i,1,2,3,4,5 +% 1-6 prints pages i,ii,iii only, not pages 4,5,6 !!! +% 0,2-6 prints pages 2,3,4,5,6, since there is no page 0 and the +% outputonly page list is resynchronized when the actual page +% number goes back to 1) +% +% The last example is illuminating. LaTeX looks for page 0, but can't find +% it. It skips pages until the page number goes from 3(iii) to 1, at which +% point it resynchronizes by reading "2" from the list, waiting for page 2 +% to be produced, and then writing page 2. Selectp then reads "-6", and +% CONTINUES outputting pages until it has done page 6. As long as the +% numbers of the intervening pages are less than 6 (the end of the range), +% those pages will be printed. +% +% If there are no roman numeral pages, the number list is simple, because +% the numbers must increase monotonically. +% +% LaTeX will not write auxilliary files while selecting output pages, so +% the cross references and citations must be correct on the run BEFORE +% using \outputonly. Unfortunately, this means you must produce the +% full-size DVI file at least once. +% +% If multuple \outputonly commands are given, the lists are concatenated. +% +% In plain TeX, specify roman numeral pages as negative numbers, but do not +% use ranges until getting to the ordinary (arabic) page numbers (e.g., +% \outputonly{-1,-2,-3,-4, 1-8}). In plain TeX specifying page 1 will NOT +% print page i. +% +% If a page number in the list is not found, generally no more pages will be +% printed. For example, suppose a document has 50 pages, the list 3 5 910 13 +% (which perhaps should read "9 10") causes LaTeX to process silently +% through the whole document looking for page 910. Only pages 3 and 5 will +% be printed. +% +% EXCEPT if the number terminating a RANGE is not found {3 5-910 13}, +% LaTeX continues outputting pages until the end. +% +% EXCEPT if the actual page number changes discontinuously, then the number +% list MAY be scanned for the next number greater than the new page number. +% (Jumps are usually due to the numbering being changed from roman to arabic +% with the page reset to 1, or because an included file was skipped due to +% an \includeonly command.) The list is scanned if the page number jumps +% backward, or if it jumps forward PAST the current target page. ("Target +% page" = the end of the current range or the next number to be printed out, +% as appropriate.) +% +% Numbers must be integers: 4.3 is illegal, even if some other style file +% is generating page numbers in that format. +% +% Of course non-numbers are illegal. Some plausible mistakes: +% page, xvii, IV, 12--16, 49ff, 49-, 5_7. +% 5_7 could be a typo for the range 5-7. +% To specify page 49 and all following ("49ff" or "49-"), use a range +% ending with a non-existent page: 49-99999. +% The typo 12--16 prints pages 12 and 16, not the range 12 through 16 as +% intended. +% +% EXAMPLES OF USE +% +% Suppose a document has pages i,ii,iii,iv,v,vi,1,2,3,...,33, but pages +% 22...28 are absent due to \includeonly; here are some examples of valid +% uses of \outputonly. +% +% \outputonly{15-20} -- prints only the 6 pages 15...20 +% \outputonly{1-3} -- prints pages i,ii,iii (in LaTeX) +% -- plain TeX prints pages 1,2,3 +% \outputonly{1,1,2} -- prints pages i,1,2 +% \outputonly{0,1,2} -- prints pages 1,2 +% \outputonly{1,3-6} -- prints pages i,iii,iv,v,vi +% \outputonly{4,3-6} -- prints pages iv,3,4,5,6 +% \outputonly{5,2} -- prints pages v,2 +% \outputonly{5-2} -- prints only page v only! +% \outputonly{5-7} -- prints pages v,vi only! +% \outputonly{1-33} -- prints pages i,ii,iii,iv,v,vi only! +% \outputonly{29-99} -- prints pages 29,30,31,32,33 +% \outputonly{19-99} -- prints pages 19,20,21,29,30,31,32,33 +% \outputonly{24-32} -- prints pages 29,30,31,32 +% \outputonly{15-25,32} -- prints pages 15,16,17,18,19,20,21,32 +% \outputonly{0,4,23-27,31-99} -- prints pages 4,31,32,33 +% +% Version 0.9 (test), Sept 25, 1992: +% +% Send problem reports to asnd@triumfcl.bitnet or asnd@Reg.triumf.ca +% +% test integrity: +% brackets: round, square, curly, angle: () [] {} <> +% backslash, slash, vertical, hat, tilde: \ / | ^ ~ diff --git a/Master/texmf-dist/tex/latex/ltxmisc/sepnum.sty b/Master/texmf-dist/tex/latex/ltxmisc/sepnum.sty new file mode 100644 index 00000000000..5d81c61680e --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/sepnum.sty @@ -0,0 +1,218 @@ +%% This is file `sepnum.sty' -- separated numbers +%% +%% (C) 1995, 1996, 2001 Bernd Raichle +%% Raichle@Informatik.Uni-Stuttgart.de +%% +%% This package provides a means of formatting numbers +%% with (a) a decimal separator different of the default (`.') +%% and (b) a separator (default `,') every three digits. +%% +%% First version of this package was posted to the newsgroup +%% `de.comp.tex' November 6th, 1995 (as `printnum.sty'). +%% +%% +%% -- LICENSING CONDITION -- +%% +%% This program may be redistributed and/or modified under the terms +%% of the LaTeX Project Public License, either version 1.0 of this +%% license, or (at your option) any later version. +%% The latest version of this license is in +%% CTAN:macros/latex/base/lppl.txt. +%% +%% +%% -- USAGE -- +%% +%% The macro +%% +%% \sepnum{<c>}{<sbc>}{<sac>}{<number>} +%% +%% produces the <number> with the decimal point replaced by <c> +%% and the separator <sbc> every three digits in the integer part, +%% the separator <sac> every three digits in the fractional part +%% of <number>. \sepnum is _fully expandable_ and _not_ fragile, +%% unless one of <c>, <sbc>, or <sac> is. +%% +%% Example: +%% - a non realistic example to show the capabilities of \sepnum +%% \sepnum{,}{*}{-}{1234.5678} => 1*234,567-8 +%% - to print a number inserting small spaces each three digits +%% \sepnum{.}{\,}{\,}{1234.5678} => 1\,234.567\,8 +%% +%% +%% Additionally this package provides +%% +%% \sepnumform{<c>}{<sbc>}{<sac>}{<LaTeX-counter>} +%% +%% to use \sepnum with a LaTeX counter. +%% +%% Example (with a decimal comma in the print form \the<counter>): +%% \newcounter{money} +%% \renewcommand{\themoney}{\sepnumform{,}{.}{}{money}} +%% +%% \setcounter{money}{-1000} +%% You have \themoney{} left. +%% +%% +%% (For compatibility with `printnum.sty', the macros +%% \printnum{<number>} and \printnumKomma/\printnumTrenner +%% still exist.) +%% +%% +%% -- SEE ALSO -- +%% +%% * Package ``comma.sty'' by David Carlisle which provides +%% similar features for integers only, i.e. it misses support +%% for the decimal point/comma in fixed point numbers. +%% * Package ``numprint.sty'' by Harald Harders supporting +%% formatting of numbers given as 1234e5 in addition. +%% +%% +\begingroup \expandafter\expandafter\expandafter\endgroup +\expandafter\ifx \csname ProvidesPackage\endcsname\relax \else + \ProvidesPackage{sepnum}% + [1996/09/05 v2.0 Insert a separator every three digits (br)] +\fi + + +% +% auxiliary macros for loops: +% +\newcommand{\sepnumReturnFi}{} +\newcommand{\sepnumReturnElseFi}{} +\newcommand{\sepnumReturnOrFi}{} + +\def\sepnumReturnFi#1\fi{\fi #1} +\def\sepnumReturnElseFi#1\else#2\fi{\fi #1} +\def\sepnumReturnOrFi#1\or#2\fi{\fi #1} + +% +% \sepnum@DoNothing #1 +% don't change #1 (removes braces around argument token list!) +% +\newcommand{\sepnum@DoNothing}[1]{#1} + +% +% \sepnum@ReverseNumber #1 #2 +% reverses all tokens in #2 and calls #1{#2} afterwards +% +\newcommand{\sepnum@ReverseNumber}[2]{% + \sepnum@DoReverseNumber{#1}{}#2\relax} +\newcommand{\sepnum@DoReverseNumber}[3]{% + \ifx\relax#3\sepnumReturnElseFi{#1{#2}}% + \else\sepnumReturnFi{\sepnum@DoReverseNumber{#1}{#3#2}}% + \fi} + +% +% \sepnum@ThreeDigits #1 #2 #3 +% reverses #3, inserts #1 every three tokens/digits +% (you have to reverse #3 again using \sepnum@ReverseNumber!), +% calls #2{#3} afterwards +% +\newcommand{\sepnum@ThreeDigits}[3]{% + \sepnum@DoThreeDigits{#1}{#2}{}0#3\relax} +\newcommand{\sepnum@DoThreeDigits}[5]{% + \ifx\relax#5\sepnumReturnElseFi{#2{#3}}% + \else\sepnumReturnFi{% + \ifcase#4\noexpand\sepnum@DoNothing{}% 0 + \sepnumReturnOrFi{\sepnum@DoThreeDigits{#1}{#2}{#5#3}1}% + \or % 1 + \sepnumReturnOrFi{\sepnum@DoThreeDigits{#1}{#2}{#5#3}2}% + \or % 2 + \sepnumReturnElseFi{\sepnum@DoThreeDigits{#1}{#2}{#5#3}3}% + \else % 3 ==> insert #1 + \sepnumReturnFi{\sepnum@DoThreeDigits{#1}{#2}{#5#1#3}1}% + \fi}% + \fi} + +% +% \sepnum@BeforeComma #1 #2 +% \sepnum@AfterComma #1 #2 +% call \sepnum@ReverseNumber and \sepnum@DoThreeDigits +% to correctly group the number #2 every three digits +% either with or without reversing first or afterwards. +% +\newcommand{\sepnum@BeforeComma}[2]{% + \sepnum@ReverseNumber{\sepnum@ThreeDigits{#1}\sepnum@DoNothing}{#2}} +\newcommand{\sepnum@AfterComma}[2]{% + \sepnum@ThreeDigits{#1}{\sepnum@ReverseNumber\sepnum@DoNothing}{#2}} + +% +%%%%%%%%%% USER MACRO %%%%%%%%%% +% +% \sepnum #1 #2 #3 #4 +% +% #1 decimal comma +% #2 separator for three digits groups before comma +% #3 separator for three digits groups after comma +% #4 number +% +\newcommand{\sepnum}[4]{% + \sepnum@Sign{#1}{#2}{#3}#4.\relax} +% +% look first for sign `+' or `-', divide given number in +% digits before and after `.', insert #1 as decimal comma +% (in \sepnum@SepComma) +% +\newcommand{\sepnum@Sign}[4]{% + \ifx\relax#4% + 0% + \else \sepnumReturnFi{% + \ifx -#4% + \sepnumReturnElseFi{-\sepnum@SepComma{#1}{#2}{#3}}% + \else \sepnumReturnFi{% + \ifx +#4% + \sepnumReturnElseFi{+\sepnum@SepComma{#1}{#2}{#3}}% + \else + \sepnumReturnFi{\sepnum@SepComma{#1}{#2}{#3}#4}% + \fi}% + \fi}% + \fi} + +\newcommand{\sepnum@SepComma}{} +\def\sepnum@SepComma#1#2#3#4.#5\relax{% + \ifx$#4$0% no digits before `.' => add 0 for "0.xxx" + \else \sepnumReturnFi{\sepnum@BeforeComma{#2}{#4}}\fi + \ifx$#5$% no digits after `.' + \else \sepnumReturnFi{#1\sepnum@DoSepComma{#3}#5\relax}\fi} + +% remove `.' inserted in \sepnum +\def\sepnum@DoSepComma#1#2.#3\relax{% + \sepnum@AfterComma{#1}{#2}} + + +% +%%%%%%%%%% USER MACRO %%%%%%%%%% +% +% \sepnumform #1 #2 #3 #4 +% +% like \sepnum but #4 is the name of a LaTeX counter +% +\newcommand{\sepnumform}[4]{% + \expandafter\sepnum@doform + \expandafter{\number\value{#4}}{#1}{#2}{#3}} +\newcommand{\sepnum@doform}[4]{% + \sepnum{#2}{#3}{#4}{#1}} + + +% +%%%%%%%%%% USER MACRO %%%%%%%%%% +% +% For compatibility with `printnum.sty': +% +% \printnum #1 +% +\newcommand{\printnum}[1]{% + \sepnum{\printnumKomma}{\printnumTrenner}{\printnumTrenner}{#1}} +% +% Macros to specify comma and separator (default to get +% european style numbers, e.g. "123.456,78" for "123456.78"): +% +% \printnumKomma => , +% \printnumTrenner => . +% +\newcommand{\printnumKomma}{,} +\newcommand{\printnumTrenner}{.} + +\endinput +%% +%% End of file `sepnum.sty'. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/shadow.sty b/Master/texmf-dist/tex/latex/ltxmisc/shadow.sty new file mode 100644 index 00000000000..c07d11b9155 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/shadow.sty @@ -0,0 +1,90 @@ +%% +%% This is file `shadow.sty', +%% +%% Copyright 1994, 2003 Mauro Orlandini +%% +%% It 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. +%% +%%% ====================================================================== +%%% @LaTeX-style{ +%%% filename = "shadow.sty", +%%% version = "1.3", +%%% date = "19 February 2003", +%%% author = "Mauro Orlandini", +%%% address = "TeSRE Institute/CNR +%%% Area della Ricerca di Bologna +%%% Via Gobetti 101 +%%% 40129 Bologna, Italy", +%%% e-mail = "orlandini@bo.iasf.cnr.it", +%%% telephone = "+39 51 639-8667", +%%% FAX = "+39 51 639-8723", +%%% supported = "yes", +%%% abstract = "The command \shabox has the same meaning of the +%%% LaTeX command \fbox except for the fact that a +%%% "shadow" is added to the bottom and the right side +%%% of the box. It computes the right dimension of the +%%% box, even if the text spans over more than one +%%% line; in this case a warning messagge is given.", +%%% codetable = "ISO/ASCII", +%%% docstring = "There are three parameters governing: +%%% 1. the width of the lines delimiting the box: +%%% \sboxrule +%%% 2. the separation between the edge of the box and +%%% its contents: \sboxsep +%%% 3. the dimension of the shadow: \sdim +%%% Sintax: \shabox{<text>} +%%% where <text> is the text to be put in the +%%% framed box. It can be an entire paragraph. +%%% Adapted from the file dropshadow.tex by +%%% drstrip@cd.sandia.gov. +%%% V1.1 Works in a double column environment. +%%% V1.2 When there is an online shadow box, it +%%% will be centered on the line (in V1.1 the +%%% box was aligned with the baseline). +%%% (Courtesy by Mike Piff)" +%%% V1.3 Added a number of missing % signs +%%% no other cleanup done (FMi) +%%% +%%% } +%%% ====================================================================== +% +% +\ProvidesPackage{shadow}[2003/02/19 v1.3 shadow boxes (M.O.)] + +\newdimen\txtwdth \newdimen\sht \newdimen\shw \newbox\shbox +\newdimen\sboxsep \newdimen\sboxrule \newdimen\sdim +\sboxsep = 10pt +\sdim = 4pt +\sboxrule = .4pt +\def\shabox#1{\setbox\@tempboxa\hbox{#1}% +\shw\wd\@tempboxa +\if@twocolumn\txtwdth\columnwidth\else\txtwdth\textwidth\fi +\ifdim\shw<\txtwdth + \leavevmode\setbox\@tempboxa\hbox{#1}% +\else + \typeout{Shadow Warning: Box dimension greater than textwidth.}% + \setbox\@tempboxa\vbox{\hsize\txtwdth\advance\hsize-2\sboxsep + \advance\hsize-2\sboxrule \advance\hsize-2\sdim \advance\hsize-15pt#1}% +\fi + \setbox\shbox\hbox{\@tempdima\sboxrule + \advance\@tempdima \sboxsep \advance\@tempdima \dp\@tempboxa + \hbox{\lower \@tempdima\hbox + {\vbox{\hrule \@height \sboxrule + \hbox{\vrule \@width \sboxrule \hskip\sboxsep + \vbox{\vskip\sboxsep \box\@tempboxa\vskip\sboxsep}\hskip + \sboxsep\vrule \@width \sboxrule}% + \hrule \@height \sboxrule}}}}% +\sht\ht\shbox \advance\sht-\sdim +\leavevmode\vbox{\baselineskip0pt\lineskip0pt\vtop{%% V1.2 + %% Added \vtop + %% From M.Piff + \hbox{\copy\shbox\vrule width\sdim height\sht}% + \hbox{\kern\sdim\vrule height\sdim width \wd\shbox}}}} + +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/showtags.sty b/Master/texmf-dist/tex/latex/ltxmisc/showtags.sty new file mode 100644 index 00000000000..9d69fde72a7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/showtags.sty @@ -0,0 +1,97 @@ +% -*-latex-*- +%%% /u/sy/beebe/tex/bib/showtags.sty, Mon Sep 12 09:25:01 1994 +%%% Edit by Nelson H. F. Beebe <beebe@plot79.math.utah.edu> +%%% +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% author = "Nelson H. F. Beebe", +%%% version = "1.04", +%%% date = "06 September 1995", +%%% time = "16:46:14 MDT", +%%% filename = "showtags.sty", +%%% address = "Center for Scientific Computing +%%% Department of Mathematics +%%% University of Utah +%%% Salt Lake City, UT 84112 +%%% USA", +%%% telephone = "+1 801 581 5254", +%%% FAX = "+1 801 581 4148", +%%% checksum = "49064 97 441 4220", +%%% email = "beebe@math.utah.edu (Internet)", +%%% codetable = "ISO/ASCII", +%%% keywords = "bibliography, citation label, citation tag", +%%% supported = "yes", +%%% docstring = "This style file causes the bibliography +%%% citation tags to be displayed in boldface +%%% text in a right-adjusted framed box over +%%% each entry in a bibliography. This serves +%%% as a handy reference when the tags are +%%% needed for a \cite{} macro. +%%% +%%% For flexibility, the user may redefine +%%% \thecitetag to change the format. E.g. +%%% +%%% \renewcommand{\thecitetag}[1]{\fbox{\small\tt #1}} +%%% +%%% would typeset the tag in small typewriter +%%% text in a box. +%%% +%%% The checksum field above contains a CRC-16 +%%% checksum as the first value, followed by the +%%% equivalent of the standard UNIX wc (word +%%% count) utility output of lines, words, and +%%% characters. This is produced by Robert +%%% Solovay's checksum utility." +%%% } +%%% ==================================================================== +% +%%% Revision history: +%%% +%%% 1.04 [06-Sep-1995] update for LaTeX 2e support +%%% 1.03 [12-Sep-1994] update file header, and add \strut to label box +%%% 1.02 [10-Sep-1991] update file header, trim trailing space +%%% 1.01 [11-Jul-1990] almost original version +\ifx \DeclareRobustCommand \undefined% then assume LaTeX 2.09 +% \@bibitem and \@lbibitem definitions extracted from latex.tex +% labelled ``LATEX VERSION 2.09 <24 May 1989>''. We add only the +% \@showtag invocations. +% + \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout + {\string\bibcite{#1}{\the\c@enumi}}\fi\ignorespaces + \@showtag{#1}} +% + \def\@lbibitem[#1]#2{\item[\@biblabel{#1}]\if@filesw + { \def\protect##1{\string ##1\space}\immediate + \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces + \@showtag{#2}} +\else % must be LaTeX 2e +% From latex.ltx <1994/12/18>: + \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout + {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces + \@showtag{#1}} +% + \def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw + {\let\protect\noexpand + \immediate + \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces + \@showtag{#2}} +\fi +% +% Here are the macros that actually set the tag. By default, we put it +% in boldface type in a framed box that is right-adjusted in exactly the +% width of the current line (and we handle both the one- and two-column +% cases), and we ensure that a page break does not occur between the +% tag-in-the-box and its bibliographic entry. For flexibility, the user +% may redefine \thecitetag to change the format. +% +\newcommand{\thecitetag}[1]{\fbox{\bf #1}} +% +\def\@showtag#1{ + \@tempdima=\textwidth + \if@twocolumn + \advance\@tempdima by -\columnsep + \divide\@tempdima by 2 + \fi + \hbox to \@tempdima{\hfill\thecitetag{\strut#1}}\nobreak} +% +\endinput diff --git a/Master/texmf-dist/tex/latex/ltxmisc/sphack.sty b/Master/texmf-dist/tex/latex/ltxmisc/sphack.sty new file mode 100644 index 00000000000..e0bc115d34d --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/sphack.sty @@ -0,0 +1,113 @@ +% SPHACK.STY +% Oliver Pretzel (o.pretzel@ic.ac.uk) +% Created 22 May 1998, Version 1.0 22May 1998 +% Modified space hacks for LateX (209 and 2e) +% (to prevent \label, \index and similar commands +% affecting spacing in vertical mode). +% +% +% DOCUMENTATION at end of file +% +% ALL RIGHTS RESERVED +% +% This file may be distributed freely. +% It may be modified for local use (please inform me of such modifications) +% Modified versions may only be distributed if +% 1. The name is changed +% 2. A statement acknowledging the modification heads the file. +% +% DO NOT USE \neq in this file +\chardef\neq\the\catcode`\@ +\makeatletter\@makeother\" +% + +\typeout{`sphack.sty <1.0>} +%************************* + +\ifx\@savdim\undefined\let\@savdim\@savsk\newskip\@savsk\fi +\def\@bsphack{\relax\ifmmode\else\@savsk\lastskip\@savsf\ifhmode\spacefactor + \else\lastpenalty\@savdim\prevdepth\removelastskip\fi\fi} +\def\@esphack{\relax\ifmmode\else\ifvmode\penalty\if@nobreak\@M\else + \if@inlabel\@M\else\if@noskipsec\@M\else\@savsf\fi\fi\fi + \prevdepth\@savdim\vskip\@savsk\else + \spacefactor\@savsf\ifdim\@savsk>\z@\ignorespaces\fi\fi\fi} +\ifx\LateXe\undefined +\def\@Esphack{\@esphack\ifhmode\ifdim\@savsk>\z@ + \global\@ignoretrue\ignorespaces\fi\fi} +\else +\def\@Esphack{\@esphack\ifhmode\ifdim\@savsk>\z@ + \@ignoretrue\ignorespaces\fi\fi} +\fi + +% This line must be last line of code +\catcode`\@\neq\let\neq\ne\endinput + +******************* + DOCUMENTATION +******************* +Standard LaTeX uses the macros \@bsphack, \@esphack, and \@Esphack, for +inserts into the text that should be invisible. So, for instance a space +before and after a \label command should not result in two spaces in the +output. + +LaTeX deals with this as follows + in maths mode do nothing, + in horizontal mode restore the space factor, + if the last thing on the list was a space + add \ignorespaces (and (\global)\ignoretrue at the end of an environment), + in vertical mode do nothing. + +Doing nothing in maths mode is (nearly) harmless because maths mode does its +own spacing (and anyway hidden commands will usually appear only at the start +or end of maths). + +Doing nothing in vertical mode is not harmless. Many invisible commands such +as \index may insert delayed write commands into TeX's output (so that page +numbers are correctly calculated). These commands can cause vertical space to +accumulate, and may cause a page break; \index is a particular problem in +LaTeX209 since it inserts a delayed write if an index is actually being built +(\makeindex in preamble) but does nothing otherwise. That can change the page +breaks in a document. + +It is not possible to solve this problem completely in LaTeX because TeX does +not remove things from the main vertical list once they have been +contributed. So LaTeX2e makes \index insert something into the vertical +list whether the index is being written or not. That has the virtue of +consistancy, but is far from ideal. For instance, an \index immediately after +an \item can cause the page to break between the item label and content. + +The code above remedies this fault and other common anomalies so that commands +are nearly always invisible in vertical mode as well. It works as follows: + +Rename LaTeX's dimension \@savsk to \@savdim set a new skip \@savsk + (because we need a true skip and a dimension in vertical mode) + +\@bsphack (at start of invisible command) +in hmode (non-math) + store spacefactor in \@savsf + store lastskip in \@savsk (used to test whether space already present) +in vmode + store lastpenalty in \@savsf + store lastskip in \@savsk (used for movement) + store previous depth in \@savdim + skip back \lastskip + +\@esphack (at end of invisible command) +in hmode (non-math) + set spacefactor = \@savsf + if \@savsk > \z@ \ignorespaces +in vmode + if in a label, or just after section heading, or if \@nobreak + insert infinite penalty, (to prevent a page break) + else insert penalty \@savsf + endif + set previous depth = \@savdim + skip \@savsk + +Just as in standard LateX, \@Esphack is \@esphack + (\global)\@ignoretrue. + +It is not necessary to change any of the label or index macros to fit with +this code. + +End of sphack.sty +******************* diff --git a/Master/texmf-dist/tex/latex/ltxmisc/statex.sty b/Master/texmf-dist/tex/latex/ltxmisc/statex.sty new file mode 100644 index 00000000000..f0be39a5145 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/statex.sty @@ -0,0 +1,425 @@ +%% +%% This is file `statex.sty'. +%% +%% Copyright (C) 2002-2004 by Rodney A Sparapani <rsparapa@mcw.edu> +%% +%% This file 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. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{statex}[2004/04/03 v1.5 a statistics style for latex] +\RequirePackage{ifthen} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} +\RequirePackage[dvipsnames, usenames]{color} + +%begin: borrowed from upgreek; thanks to Walter Schmidt <was@VR-Web.de> +%use Adobe Symbol for upright pi (constant) + \DeclareSymbolFont{ugrf@m}{U}{psy}{m}{n} + \DeclareMathSymbol{\cpi}{\mathord}{ugrf@m}{`p} +%to use Euler Roman comment previous lines and uncomment rest of block +% \DeclareFontFamily{U}{eur}{\skewchar\font'177} +% \DeclareFontShape{U}{eur}{m}{n}{% +% <-6> eurm5 <6-8> eurm7 <8-> eurm10}{} +% \DeclareFontShape{U}{eur}{b}{n}{% +% <-6> eurb5 <6-8> eurb7 <8-> eurb10}{} +% \DeclareSymbolFont{ugrf@m}{U}{eur}{m}{n} +% \SetSymbolFont{ugrf@m}{bold}{U}{eur}{b}{n} +% \DeclareMathSymbol{\cpi}{\mathord}{ugrf@m}{"19} +%end + +%new commands +\DeclareMathAlphabet{\sfsl}{OT1}{cmss}{m}{sl} +%the next command seems to have no effect when used in conjunction with bm!?! +\SetMathAlphabet{\sfsl}{bold}{OT1}{cmss}{bx}{sl} +\DeclareMathOperator{\logit}{logit} +\DeclareMathOperator{\diag}{diag} +\DeclareMathOperator{\erf}{erf} +\newcommand*{\chisq}{\relax\ifmmode\chi^2\else$\chi^2$\fi} +%\newcommand*{\e}[1]{\mathrm{e}\ifthenelse{\equal{#1}{}}{}{^{#1}}} +\newcommand*{\e}[1]{\mathrm{e}^{#1}} +\newcommand*{\E}[2][]{\text{E}\ifthenelse{\equal{#1}{}}{}{_{#1}} \lb #2 \rb} +\newcommand*{\ha}{{\frac{\alpha}{2}}} +\newcommand*{\I}[2][]{\text{I}\ifthenelse{\equal{#1}{}}{}{_{#1}} \lb #2 \rb} +\newcommand*{\If}{\;\text{if}\;\;} +\newcommand*{\iid}{\;\text{iid}\;} +\newcommand*{\ij}{{i,j}} +\newcommand*{\im}{\mathrm{i}} +\newcommand*{\lb}{\left[} +\newcommand*{\lp}{\left(} +\newcommand*{\lr}[1][]{\left[ #1 \right]} +\newcommand*{\ol}{\overline} +\newcommand*{\ow}{\;\text{otherwise}\;\;} +\newcommand*{\rb}{\right]} +\newcommand*{\rp}{\right)} +\newcommand*{\sd}{\sigma} +\newcommand*{\ul}{\underline} +\newcommand*{\V}[2][]{\text{V}\ifthenelse{\equal{#1}{}}{}{_{#1}} \lb #2 \rb} +\newcommand*{\where}{\;\text{where}\;\;} +\newcommand*{\xy}{{xy}} +\newcommand*{\XY}{{XY}} +%\newcommand*{\n}[1][]{_{n #1}} +\def\bp(#1){\left(#1\right)} +\newcommand*{\bb}[1][]{\left[ #1 \right]} + +%re-definitions +%\def~{\relax\ifmmode\sim\else\nobreakspace{}\fi} +\renewcommand*{~}{\relax\ifmmode\sim\else\nobreakspace{}\fi} + +%\let\STATEXi=\i +%\renewcommand*{\i}[1][]{\ifthenelse{\equal{#1}{}}{\STATEXi}{_{i #1}}} + +\let\STATEXGamma=\Gamma +\renewcommand*{\Gamma}[1][]{\STATEXGamma\ifthenelse{\equal{#1}{}}{}{\lp #1 \rp}} + +\let\STATEXand=\and +\renewcommand*{\and}{\relax\ifmmode\expandafter\;\;\text{and}\;\;\else\expandafter\STATEXand\fi} + +\let\STATEXH=\H +\renewcommand*{\H}{\relax\ifmmode\expandafter\text{H}\else\expandafter\STATEXH\fi} + +\let\STATEXP=\P +\renewcommand*{\P}[2][]{\ifthenelse{\equal{#2}{}}{\STATEXP}% +{\ifthenelse{\equal{#1}{}}{\text{P} \lb #2 \rb}{\text{P}_{#1} \lb #2 \rb}}} + +\renewcommand*{\|}{\relax\ifmmode\expandafter\mid\else\expandafter$\mid$\fi} + +%%Discrete distributions +%declarations +\newcommand*{\B}[1]{\mathrm{B}\lp #1 \rp} +\newcommand*{\BB}[1]{\mathrm{Beta\!-\!Bin}\lp #1 \rp} +\newcommand*{\Bin}[1]{\mathrm{Bin}\lp #1 \rp} +\newcommand*{\Dir}[1]{\mathrm{Dirichlet}\lp #1 \rp} +\newcommand*{\HG}[1]{\mathrm{Hypergeometric}\lp #1 \rp} +\newcommand*{\M}[1]{\mathrm{Multinomial}\lp #1 \rp} +\newcommand*{\NB}[1]{\mathrm{Neg\!-\!Bin}\lp #1 \rp} +\newcommand*{\Poi}[1]{\mathrm{Poisson}\lp #1 \rp} +\let\Poisson=\Poi +%probability mass functions +\newcommand*{\pBB}[4][x]{\frac{\Gamma[#2+1]\Gamma[#3+#1]\Gamma[#2+#4-#1]\Gamma[#3+#4]}% +{\Gamma[#1+1]\Gamma[#2-#1+1]\Gamma[#2+#3+#4]\Gamma[#3]\Gamma[#4]}% +\I[#1]{\{0, 1,\., #2\}}, \where #3>0,\; #4>0 \and n=1, 2,\.} +%\newcommand{\pBB}[4][x]{\frac{\Gamma[#2+1]}{\Gamma[#1+1]\Gamma[#2-#1+1]}% +%\frac{\Gamma[#3+#1]\Gamma[#2+#4-#1]}{\Gamma[#2+#3+#4]}% +%\frac{\Gamma[#3+#4]}{\Gamma[#3]\Gamma[#4]}\I[#1]{\{0, 1,\., #2\}},% +%\where #3>0,\; #4>0 \and n=1, 2,\.} +\newcommand*{\pBin}[3][x]{\binom{#2}{#1}#3^#1 \lp 1-#3 \rp^{#2-#1}% +\I[#1]{\{0,1,\.,#2\}}, \where p \in \lp0, 1\rp \and n=1, 2,\.} +\newcommand*{\pPoi}[2][x]{\frac{1}{#1!}#2^{#1}\e{-#2}\I[#1]{\{0, 1,\.\}}, \where #2>0} + +%%Continuous distributions +%declarations +\newcommand*{\Cau}[1]{\mathrm{Cauchy}\lp #1 \rp} +\let\Cauchy=\Cau +\newcommand*{\Chi}[1]{\mathrm{\chi^2}\lp #1 \rp} +\let\Chisq=\Chi +\newcommand*{\Bet}[1]{\mathrm{Beta}\lp #1 \rp} +\let\Beta=\Bet +\newcommand*{\Exp}[1]{\mathrm{Exp}\lp #1 \rp} +\newcommand*{\F}[1]{\mathrm{F}\lp #1 \rp} +\newcommand*{\Gam}[1]{\mathrm{Gamma}\lp #1 \rp} +\newcommand*{\IC}[1]{\mathrm{\chi^{-2}}\lp #1 \rp} +\newcommand*{\IG}[1]{\mathrm{Gamma^{-1}}\lp #1 \rp} +\newcommand*{\IW}[1]{\mathrm{Wishart^{-1}}\lp #1 \rp} +\newcommand*{\Log}[1]{\mathrm{Logistic}\lp #1 \rp} +\newcommand*{\LogN}[1]{\mathrm{Log\!-\!N}\lp #1 \rp} +\newcommand*{\N}[2][]{\mathrm{N}\ifthenelse{\equal{#1}{}}{}{_{#1}}\lp #2 \rp} +\newcommand*{\Par}[1]{\mathrm{Pareto}\lp #1 \rp} +\let\Pareto=\Par +\newcommand*{\Tsq}[1]{\mathrm{T^2}\lp #1 \rp} +\newcommand*{\U}[1]{\mathrm{U}\lp #1 \rp} +\newcommand*{\W}[1]{\mathrm{Wishart}\lp #1 \rp} + +\let\STATEXt=\t +\renewcommand*{\t}[1]{\relax\ifmmode\expandafter\mathrm{t}\lp #1 \rp% +\else\expandafter\STATEXt{#1}\fi} +%probability density functions +\newcommand*{\pBet}[3][x]{\frac{\Gamma[#2+#3]}{\Gamma[#2]\Gamma[#3]}% +#1^{#2-1}\lp1-#1\rp^{#3-1}\I[#1]\lb0,1\rb, \where #2>0 \and #3>0} +\newcommand*{\pCau}[3][x]{\ifthenelse{\equal{#2, #3}{0, 1}}{\frac{1}{\cpi\lp1+#1\rp^2}}% +{\frac{1}{#3\cpi\left\{1+\lb\lp x-#2\rp/#3\rb^2\right\}}, \where #3>0}} +\newcommand*{\pChi}[2][x]{\frac{2^{-#2/2}}{\Gamma[#2/2]}#1^{#2/2-1}\e{-#1/2}% +\I[#1]\lp0,\infty\rp, \where #2>0} +\newcommand*{\pExp}[2][x]{\frac{1}{#2}\e{-#1/#2}\I[#1]\lp0,\infty\rp,% +\where #2>0} +\newcommand*{\pGam}[3][x]{\frac{#3^{#2}}{\Gamma[#2]}#1^{#2-1}\e{-#3#1}% +\I[#1]\lp0,\infty\rp, \where #2>0 \and #3>0} +\newcommand*{\pN}[3][x]{\ifthenelse{\equal{#2, #3}{0, 1}}% +{\frac{1}{\sqrt{2\cpi}}\e{-#1^2/2}}% +{\frac{1}{\sqrt{2\cpi#3}}\e{-\lp#1-#2\rp^2/2#3}}} +\newcommand*{\pPar}[3][x]{\frac{#3}{#2\lp1+#1/#2\rp^{#3+1}}\I[#1]\lp0,\infty\rp,% +\where #2>0 \and #3>0} +\newcommand*{\pU}[3][x]{\ifthenelse{\equal{#2, #3}{0, 1}}{\I[#1]\lb0, 1\rb}% +{\frac{1}{#3-#2}\I[#1]\lb#2,#3\rb, \where #2<#3}} + +%re-define other accents +\let\STATEXequal=\= +\renewcommand*{\=}{\relax\ifmmode\expandafter\bar\else\expandafter\STATEXequal\fi} +\let\STATEXhat=\^ +\renewcommand*{\^}{\relax\ifmmode\expandafter\widehat\else\expandafter\STATEXhat\fi} +\let\STATEXtilde=\~ +\renewcommand*{\~}{\relax\ifmmode\expandafter\widetilde\else\expandafter\STATEXtilde\fi} +\let\STATEXsinglequote=\' +\renewcommand*{\'}[1]{\relax\ifmmode\expandafter{\lp{#1}\rp}\else\expandafter\STATEXsinglequote{#1}\fi} +\let\STATEXb=\b +\renewcommand*{\b}{\relax\ifmmode\expandafter\bar\else\expandafter\STATEXb\fi} +\let\STATEXc=\c +\renewcommand*{\c}[1]{\relax\ifmmode\expandafter\mathrm{#1}\else\expandafter\STATEXc{#1}\fi} +\let\STATEXd=\d +\renewcommand*{\d}[1]{\relax\ifmmode\expandafter\,\mathrm{d}#1\else\expandafter\STATEXd{#1}\fi} +\let\STATEXdot=\. +\renewcommand*{\.}{\relax\ifmmode\expandafter\dots\else\expandafter\STATEXdot\fi} + +%commands to create documentation for TI-83 calculators +\newcommand*{\Alpha}[1][]{{\fcolorbox{black}{ForestGreen}{\color{white}\textsf{ALPHA}}}\textbf{\color{ForestGreen}\textsf{#1}}} +\newcommand*{\Alock}{\Snd[A-LOCK]} +\newcommand*{\Blackbox}{\relax\ifmmode\expandafter\blacksquare\else\expandafter$\blacksquare$\fi} +\newcommand*{\Distr}{\Snd[DISTR]} +\newcommand*{\Down}{\framebox{\footnotesize$^\Downarrow$}} +\newcommand*{\EE}{\Snd[EE]} +\newcommand*{\Enter}{\framebox{\textsf{ENTER}}} +\newcommand*{\Graph}{\framebox{\textsf{GRAPH}}} +\newcommand*{\List}[1]{\textbf{\color{Dandelion}\textsf{$\text{L}_#1$}}} +\newcommand*{\Left}{\framebox{$^\Leftarrow$}} +\newcommand*{\Math}{\framebox{\textsf{MATH}}} +\newcommand*{\Matrx}{\Snd[MATRX]} +\newcommand*{\Prgm}{\framebox{\textsf{PRGM}}} +\newcommand*{\Quit}{\Snd[QUIT]} +\newcommand*{\Rect}{\rule{4pt}{6pt}} +\newcommand*{\Right}{\framebox{$^\Rightarrow$}} +\newcommand*{\Snd}[1][]{{\fcolorbox{black}{Dandelion}{\color{white}\textsf{2nd}}}\textbf{\color{Dandelion}\textsf{#1}}} +\newcommand*{\Solve}{\Alpha[SOLVE]} +\newcommand*{\Stat}{\framebox{\textsf{STAT}}} +\newcommand*{\Statplot}{\Snd[STAT PLOT]} +\newcommand*{\Sto}{\framebox{\textsf{STO}$\Rightarrow$}} +\newcommand*{\Signm}{\framebox{\textsf{(-)}}} +\newcommand*{\Up}{\framebox{\footnotesize$^\Uparrow$}} +\newcommand*{\Window}{\framebox{\textsf{WINDOW}}} + +\let\STATEXBox=\Box +\renewcommand*{\Box}{\relax\ifmmode\expandafter\STATEXBox\else\expandafter$\STATEXBox$\fi} + +\let\STATEXto=\to +\renewcommand*{\to}{\relax\ifmmode\expandafter\STATEXto\else\expandafter$\STATEXto$\fi} + +\endinput + +\documentclass{report} +\usepackage{statex} +\usepackage{shortvrb} +\MakeShortVerb{!} +% Examples +\begin{document} +Many accents have been re-defined + +$$ c \c{c} \pi \cpi$$ %upright constants like the speed of light and 3.14159... + +$$\int \e{\im x} \d{x}$$ %\d{x}; also note new commands \e and \im + +$$\^{\beta_1}=b_1$$ + +$$\=x=\frac{1}{n}\sum x_i$$ %also, \b{x}, but see \ol{x} below + +$$\b{x} = \frac{1}{n} \lp x_1 +\.+ x_n \rp$$ + +Sometimes overline is better: $$\b{x}\ vs.\ \ol{x}$$ + +And, underlines are nice too: $$\ul{x}$$ + +A few other nice-to-haves: + +$$\binom{n}{x}$$ %provided by amsmath package + +$$\e$$ + +$\H_0: \mu_\ij=0$ vs. $\H_1: \mu_\ij \neq 0$ %\ijk too + +$$\logit \lb p \rb = \log \lb \frac{p}{1-p} \rb$$ + +Common distributions along with other features follows: + +Normal Distribution + +$$Z ~ \N{0, 1}, \where \E{Z}=0 \and \V{Z}=1$$ + +$$\P{|Z|>z_\ha}=\alpha$$ + +$$\pN[z]{0}{1}$$ + +or, in general + +$$\pN[z]{\mu}{\sd^2}$$ + +Sometimes, we subscript the following operations: + +$$\E[z]{Z}=0, \V[z]{Z}=1, \and \P[z]{|Z|>z_\ha}=\alpha$$ + +Multivariate Normal Distribution + +$$\bm{X} ~ \N[p]{\bm{\mu}, \sfsl{\Sigma}}$$ %\bm provided by the bm package + +Chi-square Distribution + +$$Z_i \iid \N{0, 1}, \where i=1 ,\., n$$ + +$$\chisq = \sum_i Z_i^2 ~ \Chi{n}$$ + +$$\pChi[z]{n}$$ + +t Distribution + +$$\frac{\b{Z}}{\sqrt{\frac{\chisq}{n}}} ~ \t{n}$$ + +F Distribution + +$$X_i, Y_i \iid \N{0, 1}, \where i=1 ,\., n, \V{X_i, Y_{\~i}}=\sd_\xy=0, + \and \~i=1 ,\., n$$ %\XY too + +$$\chisq_x = \sum_i X_i^2 ~ \Chi{n}$$ + +$$\chisq_y = \sum_i Y_i^2 ~ \Chi{n}$$ + +$$\frac{\chisq_x}{\chisq_y} ~ \F{n, n}$$ + +Beta Distribution + +$$B=\frac{F}{1+F} ~ \Bet{\frac{n}{2}, \frac{n}{2}}$$ + +$$\pBet{\alpha}{\beta}$$ + +Gamma Distribution + +$$G ~ \Gam{\alpha, \beta}$$ + +$$\pGam{\alpha}{\beta}$$ + +Cauchy Distribution + +$$C ~ \Cau{\theta, \nu}$$ + +$$\pCau{\theta}{\nu}$$ + +Uniform Distribution + +$$X ~ \U{0, 1}$$ + +$$\pU{0}{1}$$ + +or, in general + +$$\pU{a}{b}$$ + +Exponential Distribution + +$$X ~ \Exp{\lambda}$$ + +$$\pExp{\lambda}$$ + +Hotelling's $T^2$ Distribution + +$$X ~ \Tsq{\nu_1, \nu_2}$$ + +Inverse Chi-square Distribution + +$$X ~ \IC{\nu}$$ + +Inverse Gamma Distribution + +$$X ~ \IG{\alpha, \beta}$$ + +Pareto Distribution + +$$X ~ \Par{\alpha, \beta}$$ + +$$\pPar{\alpha}{\beta}$$ + +Wishart Distribution + +$$\sfsl{X} ~ \W{\nu, \sfsl{S}}$$ + +Inverse Wishart Distribution + +$$\sfsl{X} ~ \IW{\nu, \sfsl{S^{-1}}}$$ + +Binomial Distribution + +$$X ~ \Bin{n, p}$$ + +$$\pBin{n}{p}$$ + +Bernoulli Distribution + +$$X ~ \B{p}$$ + +Beta-Binomial Distribution + +$$X ~ \BB{p}$$ + +$$\pBB{n}{\alpha}{\beta}$$ + +Negative-Binomial Distribution + +$$X ~ \NB{n, p}$$ + +Hypergeometric Distribution + +$$X ~ \HG{n, M, N}$$ + +Poisson Distribution + +$$X ~ \Poi{\mu}$$ + +$$\pPoi{\mu}$$ + +Dirichlet Distribution + +$$\bm{X} ~ \Dir{\alpha_1 \. \alpha_k}$$ + +Multinomial Distribution + +$$\bm{X} ~ \M{n, \alpha_1 \. \alpha_k}$$ + +\pagebreak + +To compute critical values for the Normal distribution, create the +NCRIT program for your TI-83 (or equivalent) calculator. At each step, the +calculator display is shown, followed by what you should do (\Rect\ is the +cursor):\\ +\Rect\\ +\Prgm\to!NEW!\to!1:Create New!\\ +!Name=!\Rect\\ +NCRIT\Enter\\ +!:!\Rect\\ +\Prgm\to!I/O!\to!2:Prompt!\\ +!:Prompt! \Rect\\ +\Alpha[A],\Alpha[T]\Enter\\ +!:!\Rect\\ +\Distr\to!DISTR!\to!3:invNorm(!\\ +!:invNorm(!\Rect\\ +1-(\Alpha[A]$\div$\Alpha[T]))\Sto\Alpha[C]\Enter\\ +!:!\Rect\\ +\Prgm\to!I/O!\to!3:Disp!\\ +!:Disp! \Rect\\ +\Alpha[C]\Enter\\ +!:!\Rect\\ +\Quit\\ + +Suppose !A! is $\alpha$ and !T! is the number of tails. To run the program:\\ +\Rect\\ +\Prgm\to!EXEC!\to!NCRIT!\\ +!prgmNCRIT!\Rect\\ +\Enter\\ +!A=?!\Rect\\ +0.05\Enter\\ +!T=?!\Rect\\ +2\Enter\\ +!1.959963986! +\end{document} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/subfigmat.sty b/Master/texmf-dist/tex/latex/ltxmisc/subfigmat.sty new file mode 100644 index 00000000000..7f873d0f5a5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/subfigmat.sty @@ -0,0 +1,166 @@ +% subfigmat.sty - version 1.0 <27 feb 1999> +% +% defines an array/matrix-type environment for subfigures and +% subtables of the form, +% +% \begin{subfigmatrix}{NC} +% \subfigure[]{..} +% ... +% \end{subfigmatrix} +% +% where NC is the number of subfigures per row (i.e., the +% number of columns). the subfigures are ordered from +% left-to-right, then top-to-bottom. + +% the environment is used within a float environment such as +% figure or table. each subfigure should have a variable width +% tied to the local \linewidth value so each can be shrunk or +% expanded to accomate the requested layout. +% +% The environment does not require ``square'' matrices since it +% only works on a row-by-row basis; thus you could have a 2 x 4, +% a 1 x 3, or a 4 x 2 if you so choose. if you neglect to give +% it a full row, such as the case of a 3 x 3 matrix with only +% 8 elements, it simply fills the rows from left to right until +% it runs out of elements. +% +% for further information, see the example and other notes after +% the \endinput in this file. +% +\ProvidesPackage{subfigmat}[1999/02/27 v1.0 Subfigure Matrix Package] +\RequirePackage{subfigure}[1995/03/06] +% +% define and initialize the internal variables: +\newlength{\sfm@width}% Subfigure width +\newlength{\sfmcolsep}% Subfigure column separation +\setlength{\sfmcolsep}{2\tabcolsep}% Use twice tabular column separation +\newcounter{sfm@count}% Item count +% +% the environment: +\newenvironment{subfigmatrix}[1]{% + \begingroup% + \centering% + \vspace*{-\subfigtopskip}% remove the vertical spacing inserted + % by the subfigure package (version 2.0) + % + % Save the "real" subfigure macro and start the item counter off + % at -1 to detect the first item. + % Set the \sfm@width to the single element size. + % + \let\sfm@subfigure\subfigure% + \setcounter{sfm@count}{-1}% + \setlength{\sfm@width}{\linewidth}% + \addtolength{\sfm@width}{\sfmcolsep}% + \addtolength{\sfm@width}{-#1\sfmcolsep}% + \divide\sfm@width by#1 + \@ifundefined{Gin@scalex}% + \relax % we are not running graphicx! + {\setkeys{Gin}{width=\sfm@width,keepaspectratio}}% + % + % Redefine the \subfigure and \subtable macros locally to this + % environment so that we can wrap them with minipages. + % + \def\subfigure{% + \ifnum \value{sfm@count} = -1 + % very first item + \setcounter{sfm@count}{1}% + \else% Not very first item + \addtocounter{sfm@count}{1}% + \ifnum \value{sfm@count} = 1 + % Beginning of next column, finish the last column. + \\% + \else% + % middle or last item + \hfill% + \ifnum #1 = \value{sfm@count}% + % Reset the counter of at the end of the row. + \setcounter{sfm@count}{0}% + \fi% + \fi% + \fi% + \sfm@subfigure}% + \let\subtable\subfigure% + }{% + \\% + \endgroup}% +% +\endinput + +further example: + + if you wanted to create a figure with four subfigures in a tiled + or matrix format of 2 x 2, the following would suffice, + + \begin{figure} + \begin{subfigmatrix}{2} + \subfigure[]{...} + \subfigure[]{...} + \subfigure[]{...} + \subfigure[]{...} + \end{subfigmatrix} + \caption{Example.} + \label{f:eg} + \end{figure} + + the result would look similar to the following, + + [subfig] [subfig] + (a) (b) + + [subfig] [subfig] + (c) (d) + + Figure 1: Example. + +notes: + + comments, bugs, fixes can be sent to w.l.kleb@larc.nasa.gov. + what becomes of them is another story. ;) + + each subfigure is placed within a minipage of the proper width + to fit NC subfigures within the current float's \linewidth, + accounting for 2\tabcolsep's worth of space between each + adjacent subfigure. + + \linewidth is a fairly general length. it is equal to + \textwidth for single-column formats, \columnwidth for multiple- + column documents (and also single-column documents), or + according to a \parbox or minipage environment. + + if you are using the graphicx package, the subfigure widths are + automatically set to the local \linewidth. + + the separation between figures can be changed via the + \sfmcolsep variable, e.g., + + \setlength{\sfmcolsep}{\hspace{0.2in}} + + to set a ``hard'' inter-column spacing as opposed to the + default behavior of tying the inter-column spacing to the + documents tabular column spacing (\tabcolsep}. + +to do: + + transposed ordering: from top-to-bottom, then left-to-right. + +history: + + 25 Feb 1999 Bil Kleb <w.l.kleb@larc.nasa.gov> [v1.0] + Edited for Arseneau-style release to ctan. + Changed \sfm@colsep to a more user-tunable \sfmcolsep. + + 27 Feb 1997 Bil Kleb <w.l.kleb@larc.nasa.gov> + Minor changes. + + 27 Feb 1997 Steven Douglas Cochran <sdc+@cs.cmu.edu> + Created. + + 24 Feb 1997 Bil Kleb <w.l.kleb@larc.nasa.gov> + Posted question to news:comp.text.tex. + +distribution: + + this program can 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. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/tabls.sty b/Master/texmf-dist/tex/latex/ltxmisc/tabls.sty new file mode 100644 index 00000000000..ffd56251d9b --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/tabls.sty @@ -0,0 +1,237 @@ +% +% T A B L S . S T Y (ver 3.5) +% +% Copyright (c) 1989-1996 by Donald Arseneau +% from +% LaTeX, Copyright (c) 1985... by Leslie Lamport +% +% Modify LaTeX's array and tabular environments to keep text from touching +% other text or hlines above or below. See instructions after \endinput. +% +%---------------------------------------------------------------------- + +% create registers and default settings: + +\newdimen\tablinesep \tablinesep= 1pt \let\tablineskip=\tablinesep +\newdimen\arraylinesep \arraylinesep= 1pt \let\arraylineskip=\arraylinesep +\newdimen\extrarulesep \extrarulesep= 3pt + +\newdimen\@arstdepth \newdimen\@arstheight \newdimen\@skip@bove + +\let\@tarlinesep\z@ % so outermost arrays will not act nested + +% Change the initializations to create a smaller strut and include +% my macros in the initialization for the preamble. + +\def\@array[#1]#2{% remember global variables to allow recursion: + \edef\@unrecurse{\global\@skip@bove\the\@skip@bove + \global\@arstheight\the\@arstheight\global\@arstdepth\the\@arstdepth}% +% Make the strut on the first line be shorter by the linesep outside + \let\@otarlinesep\@tarlinesep \global\@skip@bove-\@otarlinesep +% This setup works for both tabular and array because of this test: + \ifx\@classz\@arrayclassz \let\@tarlinesep\arraylinesep + \else \let\@tarlinesep\tablinesep \fi + \divide\@tarlinesep\tw@ % half sep is applied to height & depth + \let\@seesize\relax \let\@rememsize\relax \@mkpream{#2}% + \@tempdima\arraystretch\ht\strutbox \@tempdimb\arraystretch\dp\strutbox + \ifdim\@tarlinesep>\z@ % (need \protect for \multicolumn) + \def\@rememsize{\protect\@r@m@msize}\let\@seesize\@s@@size + \advance\@tempdima-\@tarlinesep \advance\@tempdimb-\@tarlinesep + \fi \setbox\@arstrutbox\hbox{% set up smaller strut + \vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}% + \let\protect\noexpand + \edef\@preamble{\ialign \noexpand\@halignto \bgroup + \unhcopy\@arstrutbox \@preamble \tabskip\z@skip &\@sharp \cr}% +% I have added an extra column (&\@sharp) to take the smart strut. + \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox + \if#1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi + \bgroup \let\par\@empty + \global\@arstheight\ht\@arstrutbox \global\@arstdepth\dp\@arstrutbox + \advance\extrarulesep.5\arrayrulewidth + \let\@sharp##\let\protect\relax \lineskip\z@skip \baselineskip\z@skip + \@preamble} + +% Change the meaning of \\ to do the final strut calculation and +% put in the smart strut + +\def\@xtabularcr{\@ifnextchar[{\@argtabularcr}{\@argtabularcr[\z@]}} + +\def\@xarraycr{\aftergroup\@argarraycr\@xtabularcr} + +\def\@argarraycr{${}}% put this "aftergroup" so we can combine macro streams + +% Sense a following \end, and adjust spacing accordingly; +% Sense a rule below, as signalled by "\noalign" after expansion + +\def\@argtabularcr[#1]{\ifnum\z@=`{\fi}&\omit % end group, new column + {\ifnum\z@=`}\fi + \global\advance\@arstheight\@skip@bove % use \@skip@bove so it is available + \global\@skip@bove#1\relax % actually, the skip below + \@ifnextchar\end{\global\advance\@arstdepth-\@otarlinesep\@mystrutcr}% + {\expandafter\expandafter\expandafter\@xargarraycr}} + +\def\@xargarraycr{\@ifnextchar\noalign + {\global\advance\@arstdepth\extrarulesep \@mystrutcr}% + {\@mystrutcr}} + +\def\@mystrutcr{% \@skip@bove is really the parameter for skip below here + \ifdim\@skip@bove>\z@ \advance\@arstdepth\@skip@bove \global\@skip@bove\z@\fi + \advance\@arstheight\@tarlinesep \advance\@arstdepth\@tarlinesep + \vrule \@height\@arstheight \@depth\@arstdepth \@width\z@ + \global\@arstheight\ht\@arstrutbox \global\@arstdepth\dp\@arstrutbox + \ifnum\z@=`{\fi}\cr + \ifdim\@skip@bove<\z@ \noalign{\vskip\@skip@bove \global\@skip@bove\z@}\fi} + +% Simulate \crcr at the end of the table, assuming that we are not in +% vmode once a line of entries has started. This fails to put in a smart +% strut if the table ends without \\ while in vmode in a column entry. +% Use \@unrecurse to simulate grouping of global parameters. +% For nested tables and arrays, the final strut is reduced by the linesep +% that will be added at the outer level. + +\def\endtabular{\endarray $\egroup} + +\expandafter\let\csname endtabular*\endcsname=\endtabular + +\def\endarray{\ifvmode\csname crcr\endcsname % just do \crcr if \\ given + \else \\[\z@ \global\advance\@arstdepth-\@otarlinesep]% + \fi\egroup\@unrecurse\egroup} + +% Put \@seesize...\@rememsize in all preamble templates + +\def\@tabclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or + \or \or \@addamp \or + \@acolampacol \or \@firstampfalse \@acol \fi +\edef\@preamble{\@preamble{% + \ifcase + \@chnum \hfil\@seesize\ignorespaces\@sharp\unskip\@rememsize \hfil + \or \@seesize\ignorespaces\@sharp\unskip\@rememsize \hfil + \or \hfil\hskip\z@skip\@seesize\ignorespaces\@sharp\unskip\@rememsize + \fi}}} + +\def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or + \or \or \@addamp \or + \@acolampacol \or \@firstampfalse \@acol \fi +\edef\@preamble{\@preamble + \ifcase \@chnum + \hfil\@seesize $\relax\@sharp$\@rememsize \hfil + \or \@seesize $\relax\@sharp$\@rememsize \hfil + \or \hfil\@seesize $\relax\@sharp$\@rememsize \fi}} + +\def\@classv{\@addtopreamble{\@seesize\@startpbox{\@nextchar}% + \ignorespaces\@sharp\@endpbox\@rememsize}} + +% my macros to keep track of the size of entries. + +\def\@s@@size{\setbox\z@\hbox\bgroup\bgroup} + +\def\@r@m@msize{\egroup\egroup % end the \hbox + \ifdim\ht\z@>\@arstheight \global\@arstheight\ht\z@ \fi + \ifdim\dp\z@>\@arstdepth \global\@arstdepth \dp\z@ \fi + \unhbox\z@} + +% Redefine \hline to remove notches and to give extrarulesep and +% optional [] skip + +\def\hline{\noalign{\ifnum\z@=`}\fi\kern-.5\arrayrulewidth + \hrule \@height \arrayrulewidth \kern-.5\arrayrulewidth + \global\@skip@bove\extrarulesep + \@ifnextchar[\@yhline{\expandafter\expandafter\expandafter\@zhline}} + +\def\@xhline{\ifx\@tempa\noalign \vskip\doublerulesep \fi % may be the opt. + \ifnum`{=\z@\fi}} + +\def\@yhline[#1]{\doublerulesep#1\global\advance\@skip@bove#1\relax + \expandafter\expandafter\expandafter\@zhline} + +\def\@zhline{\futurelet\@tempa\@xhline}% + +% make \cline give the \extrarulesep below + +\let\TB@cline\cline + +\def\cline#1{\noalign{\kern-.5\arrayrulewidth}% + \TB@cline{#1}% + \noalign{\global\@skip@bove\extrarulesep \kern.5\arrayrulewidth}}% + +\endinput +% ----------------------------------------------------------------- +% +% Modify LaTeX's array and tabular environments to keep text from touching +% other text or hlines above or below. There are three new parameters: +% +% \tablinesep (or \tablelineskip): minimum space between text on successive +% lines in a tabular environment. Negative distances are +% treated as zero. The default value is 1pt. 0pt turns off +% checking for touching text. Text given in an @{ } +% specification is never checked for overlap. +% +% \arraylinesep (or \arraylineskip): like \tablinesep, but for arrays. +% +% \extrarulesep : extra space to add above and below each \hline and \cline. +% There will be at least \extrarulesep + 0.5\tablinesep +% between an \hline and a line of text. Negative values can +% be used, but only until some text touches the line. +% The default value is 3pt. +% +% To ensure interline separations in tables but not arrays, declare +% \setlength\arraylinesep{0pt} +% The appearance of normal LaTeX tables can be had with +% \setlength\tablinesep{0pt} +% \setlength\arraylinesep{0pt} +% \setlength\extrarulesep{0pt} +% but it would be better to not use tabls in this situation. +% +% \hline[dimen]: +% +% \hline has been changed to take an optional length argument just like \\ +% giving the space to insert below. This space is in addition to the +% \extrarulesep and linesep. A negative value will reduce the space until +% the hline touches some text below, and then will have no further effect. +% E.g., \hline[-9in] draws a horizontal line while suppressing the extrarulesep +% beneath. Also, the new \hline FIXES THE NOTCHES that used to appear at the +% junction between horizontal and vertical lines. +% +% How it works: +% There are no struts in the preamble entries (lie), rather, there are +% tests to measure the maximum height and depth of all entries on a line. +% The maximum values start at the size of LaTeX's \@arstrut minus the +% appropriate linesep. At the \\, a strut is inserted (in its own +% column) which is that maximum size plus the linesep plus any additional +% space for separation from \hline s. +% +% The Downside: +% Building a table will be slower than before because the entries have to +% be boxed twice (by \@seesize and by \halign itself) instead of just once. +% \setlength\tablinesep{0pt} will recover most of this speed, with +% \extrarulesep still partially in effect--extra space will still be added +% around hlines, but it may be taken up by very tall or very deep table +% entries; thus text may still touch the lines. Because of the speed penalty, +% if your computer is slow, it is probably best to omit the TABLS option +% until producing a final copy. +% +% (2.2) \endtabular* is defined (it was left out before. oops!) +% change some \z@ to \z@skip. Thanks to Michael Downes. +% Create alias \tablinesep = \tablelineskip for consistency with +% \tabcolsep nomenclature. \def\\{\crcr} used in ver 2.1 didn't work right, +% so use \csname crcr\endcsname. +% +% (3.0) Arrays are included! The very top and bottom struts of nested +% arrays are reduced by the lesser of the inner and outer lineseps so space +% doesn't accumulate with each level of nesting. +% +% (3.1 & 3.2 & 3.3) Minor changes to match LaTeX updates. +% +% (3.4) More extensive changes, prompted by LaTeX updates. You can now hide +% \hline in another macro, and it is still recognized. [Similar commands that +% add \extrarulesep must begin with \noalign.] \hline[3pt]\hline is now +% reasonable. (Also try \hline[0pt]\hline!) +% +% (3.5) Fix several (non-crashing) bugs introduced in 3.4 +% +% Send problem reports to asnd@Reg.TRIUMF.CA +% +% Test integrity of file: +% brackets: round, square, curly, angle: () [] {} <> +% backslash, slash, vertical, at, dollar, and: \ / | @ $ & +% hat, grave, acute (apostrophe), quote, tilde: ^ ` ' " ~ diff --git a/Master/texmf-dist/tex/latex/ltxmisc/threeparttable.sty b/Master/texmf-dist/tex/latex/ltxmisc/threeparttable.sty new file mode 100644 index 00000000000..bc9f5943d8c --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/threeparttable.sty @@ -0,0 +1,381 @@ +% threeparttable.sty (or 3parttable) (or 3parttab on DOS) +% by Donald Arseneau Updated on June 13, 2003. +% Three part tables: title, tabular environment, notes +% +% This file may be distributed, modified, and used in other works with just +% one restriction: modified versions must clearly indicate the modification +% (a name change, or a displayed message, or ?). +% +% This package facilitates tables with titles (captions) and notes. The +% title and notes are given a width equal to the body of the table (a +% tabular environment). By itself, a threeparttable does not float, but +% you can put it in a {table} or a {table*} or some other environment. +% (This causes extra typing, but gives more flexibility.) +% +% Inside a threeparttable there should be a caption, followed by a tabular +% environment (tabular, tabular* or tabularx), possibly followed by a series +% of itemized "tablenotes". The caption can also go after the tabular. +% +% \begin{table} +% \begin{threeparttable}[b] +% \caption{...} +% \begin{tabular}...% or {tabular*} +% ...42\tnote{1}&.... +% ... +% \end{tabular} +% \begin{tablenotes} +% \item [1] the first note +% ... +% \end{tablenotes} +% \end{threeparttable} +% \end{table} +% +% The {threeparttable} environment takes an optional vertical-placement +% parameter, [t], [b], or [c]; the default is [t]. +% +% At present, there is nothing automatic about the notes; you must specify the +% identifier in the body of the table ("\tnote{a}") and in the notes below +% ("\item[a]..."). I chose this method because automatic numbering with +% \footnote would be very hard to use, particularly because many tables make +% repeated reference to a single note. If someone has a convenient, elegant, +% automatic system, I'll listen! \tnote commands can be given in the caption +% too, and they will *NOT* appear in the list of tables. +% +% There are several commands which should be redefined for customizing the +% behavior of threeparttable, especially the table notes. Some options +% are provided for common variations of the table notes. +% +% Options: +% [para] Notes come one-after-another without line breaks +% [flushleft] No hanging indentation on notes +% [online] \item tag is printed normal size, not superscript +% [normal] restores default formatting +% +% These options can be given to the \usepackage command or to each individual +% {tablenotes} environment. The [normal] option is intended to reverse the +% whole-document options for a particular table; e.g. +% +% \usepackage[para]{threeparttable} +% ... much document ... +% \begin{tablenotes}[normal,flushleft] +% +% These few options are unlikely to give you a desired specified format, +% so you should expect to redefine one or more of the configuration +% commands. Note that mixing options with redefinitions is unlikely +% to work smoothly. Please submit your redefinitions to be used as +% options in future versions! +% +% Configuration commands: +% \TPTminimum: command telling minimum caption width. Default "4em"; +% change with \def or \renewcommnd. +% \TPTrlap: A command with one argument, to make notes go out of +% the column, into the column separation (for right-aligning) +% \TPTtagStyle: Command with one argument to set appearance of the tag +% (number) in \tnote{tag}. It defaults to nil. It could be \textit. +% \tnote: Yes, you can redefine the \tnote command. +% \TPTnoteLabel: Command with one argument to format the item label in +% the tablenotes list (\makelabel); default uses \tnote. +% \TPTnoteSettings: A command to issue all the list-environment setup +% commands for the tablenotes. +% \tablenotes or \TPTdoTablenotes: Yes, you can redefine the whole +% tablenotes environment. (\tablenotes processes optional +% parameters, then invokes \TPTdoTablenotes; the [para] option +% replaces \TPTdoTablenotes.) +% +% For figures, there is an equivalent "measuredfigure" environment. It +% is fairly fragile though, and should be used only for a single graphic +% above a single caption. +% +% Note that the \caption formatting is *not* adjusted by threeparttable. +% You should use one of the caption-control packages to get captions +% that work well as table titles. In truth, threeparttable sets +% \abovecaptionskip to zero for captions above the table, but more +% complete changes are called for. + +\ProvidesPackage{threeparttable}[2003/06/13 \space v 3.0] + +\edef\TPTminimum % make a scratch macro for restoring catcodes + {\catcode\string `\string @=\the\catcode\string`\@ + \catcode\string `\string :=\the\catcode\string`\: + \catcode\string `\string *=\the\catcode\string`\*} +\catcode`\@=11 +\catcode`\:=12 +\catcode`\*=11 + +\@ifundefined{@tempboxb}{\@nameuse{newbox}\@tempboxb}{} + +\newenvironment{threeparttable}[1][t]{% + \relax \ifvmode \noindent \fi + \TPT@common{threeparttable}{#1}% + \@ifundefined{@captype}{\def\@captype{table}}{}% + \let\TPT@LA@label\label + \let\TPT@LA@caption\@caption \let\@caption\TPT@caption + \let\TPT@begintabhook\TPT@begintabbox + \let\TPT@tabarghook\TPT@tabargset + \TPT@hookin{tabular}% + \TPT@hookarg{tabular*}% + \TPT@hookarg{tabularx}% + \let\TPToverlap\relax}% +{\TPT@close} + + +\newenvironment{measuredfigure}[1][t]{% + \relax \ifvmode \noindent \fi + \TPT@common{measuredfigure}{#1}% + \let\TPT@figfix\TPT@close % Provide closure if no caption + \@ifundefined{@captype}{\def\@captype{figure}}{}% + \let\TPT@LA@caption\@caption \let\@caption\TPT@gr@caption + \setbox\@tempboxb\hbox\bgroup + \aftergroup\TPT@measurement + \color@begingroup\spacefactor994\ignorespaces} +{\TPT@close \TPT@figfix} + +\def\TPT@close{\ifhmode \unskip \fi \color@endgroup \egroup} +\def\TPT@figfix{} + +% Caption for figures: +\def\TPT@gr@caption#1[#2]#3{\relax + \ifnum\spacefactor=994\relax % Caption listed first; hold on to it + \abovecaptionskip\z@skip + \let\TPT@hsize\@empty % double sure + \else % Have something to measure, and caption below + \TPT@close % close hbox. Measurement happens here automatically + \fi + \TPT@caption{#1}[{#2}]{#3}% +} + +% "begin" code common for tables and figures +\def\TPT@common#1#2{% + \ifx\TPT@LA@caption\relax\else + \PackageError{threeparttable}% + {Illegal nested #1 environments}% + {Maybe you have a missing \string\end{#1}?^^J% + This cannot work, so type \string"x\string" and fix the problem now.}% + \fi + \let\TPT@docapt\@undefined + \if b#2\relax\vbox\bgroup\else + \if c#2\relax$\vcenter\bgroup\aftergroup$\else + \vtop\bgroup \fi\fi + \parindent\z@ + \color@begingroup + \def\TPT@sethsize{\TPT@hsize\par}% + \topsep\z@ + \@enumdepth\z@ + \global\let\TPT@hsize\@empty +} + +% "hookin" hooks into tabular to set the alignment in a box +% and measure the box. +% For tabular* and tabularx, we can simply use the supplied "width" +% argument (using \TPT@hookarg), but for ordinary tabular environments +% we need to measure the typeset tabular body, using hooks in both the +% begin and the end code (using \TPT@hookin). The hook-in is defined +% generically so it is easy to add new supported environments. +% +% I will add \TPT@begintabhook and \TPT@endtabhook to \tabular and +% \endtabular. These will do the measurement at the outer level, +% but will be no-ops inside. + +\def\TPT@unhook{% + \let\TPT@begintabhook\bgroup + \let\TPT@tabarghook\@gobble +} + +\let\TPT@endtabhook\egroup + +% This is simple -- Hook into tabular types that are given explicit width +\def\TPT@hookarg#1{% #1 = width + \expandafter\let\csname TPTsav@#1\expandafter\endcsname\csname #1\endcsname + \expandafter\edef\csname #1\endcsname##1{\noexpand\TPT@tabarghook{##1}% + \expandafter\noexpand\csname TPTsav@#1\endcsname{\hsize}}% +} + +\def\TPT@tabargset#1{% Alias \TPT@tabarghook + \TPT@unhook + \setlength\hsize{#1}% + \xdef\TPT@hsize{\hsize\the\hsize \parindent 1em \noexpand\@parboxrestore}% + \TPT@hsize + \ifx\TPT@docapt\@undefined\else \TPT@docapt \vskip.2\baselineskip \fi + \par \aftergroup\TPT@sethsize +} + +% Harder -- Hook into tabular/endtabular to measure the width +\def\TPT@hookin#1{% + \expandafter\let\csname TPTsav@#1\expandafter\endcsname\csname #1\endcsname + \expandafter\let\csname TPTsav@end#1\expandafter\endcsname\csname end#1\endcsname + \expandafter\edef\csname #1\endcsname{\noexpand\TPT@begintabhook + \expandafter\noexpand\csname TPTsav@#1\endcsname}% + \expandafter\edef\csname end#1\endcsname{% + \expandafter\noexpand\csname TPTsav@end#1\endcsname \TPT@endtabhook}% +} + +\def\TPT@begintabbox{% alias \TPT@begintabhook + \begingroup + \TPT@unhook + \setbox\@tempboxb\hbox\bgroup \aftergroup\TPT@endtabbox + \let\TPToverlap\TPTrlap % Just \rlap now, but could be smarter +} + +\def\TPT@endtabbox{% Inserted after ending \@tempboxb + \TPT@measurement + \endgroup + \TPT@hsize \aftergroup\TPT@sethsize + \@ignoretrue +} + +\def\TPT@measurement{% + \ifdim\wd\@tempboxb<\TPTminimum + \hsize \TPTminimum + \else + \hsize\wd\@tempboxb + \fi + \xdef\TPT@hsize{\hsize\the\hsize \noexpand\@parboxrestore}\TPT@hsize + \ifx\TPT@docapt\@undefined\else + \TPT@docapt \vskip.2\baselineskip + \fi \par \box\@tempboxb + \ifvmode \prevdepth\z@ \fi +} + +\gdef\TPT@hsize{} +\def\TPT@sethsize{}% Used with \aftergroup, so do this to cover for when a + % \TPT@sethsize escapes from threeparttable. + +% Collecting caption for tables: +\def\TPT@caption#1[#2]#3{\gdef\TPT@docapt + {\par\global\let\TPT@docapt\@undefined \TPT@LA@caption{#1}[{#2}]% + {\strut\ignorespaces#3\ifhmode\unskip\@finalstrut\strutbox\fi}}% + \ifx\TPT@hsize\@empty \let\label\TPT@gatherlabel \abovecaptionskip\z@skip + \else \TPT@docapt \fi \ignorespaces} + +\let\TPT@LA@caption\relax + +% Must also collect any \label that appears after a collected \caption +\def\TPT@gatherlabel#1{% + \ifx\TPT@docapt\@undefined \TPT@LA@label{#1}\else + \g@addto@macro\TPT@docapt{\label{#1}}\fi +} + +\def\tablenotes{\TPT@defaults + \@ifnextchar[\TPT@setuptnotes\TPTdoTablenotes} % ] +\let\endtablenotes\endlist +\def\TPT@setuptnotes [#1]{% process formatting options + \@for\@tempa:=#1\do{\@nameuse{TPT@opt@\romannumeral-`a\@tempa}}% + \TPTdoTablenotes +} + +\def\TPTdoTablenotes{% + \par \prevdepth\z@ \TPT@hsize + \list{}{\topsep\z@skip \partopsep\z@skip + \itemsep\z@ \parsep\z@ \itemindent\z@ + \TPTnoteSettings + \let\makelabel\TPTnoteLabel +}} + + + +% \TPToverlap is a hook, to be used in \tnote, for making the note tag +% hang over the right-edge of the column. It takes different meanings +% at different places, and it should disappear, like this, outside of +% a threeparttable environment. +% +\def\TPToverlap#1{} % notes in caption will disappear in list of tables! + +% \TPTrlap is the meaning of \TPToverlap within the tabular environment. +% I could do some fancy definition so that it only acts at the right-edge +% of a column, but it is left simple for compatibility and sanity. +\let\TPTrlap\rlap + +\def\tnote#1{\protect\TPToverlap{\textsuperscript{\TPTtagStyle{#1}}}}% + +\def\TPTtagStyle#1{#1} + +\def\TPTnoteSettings{% + \setlength\leftmargin{1.5em}% + \setlength\labelwidth{.5em}% + \setlength\labelsep{.2em}% + \rightskip\tabcolsep \leftskip\tabcolsep +} +\def\TPTnoteLabel#1{\tnote{#1}\hfil} + +% Package and tablenotes options + +\def\TPT@opt@normal{\gdef\TPT@defaults{}} +\TPT@opt@normal +\DeclareOption{normal}{} + +\def\TPT@opt@online{% + \def\TPTnoteSettings{\leftmargin1.5em \labelwidth1em \labelsep.5em\relax}% + \def\TPTnoteLabel##1{\TPTtagStyle{##1}\hfil}% +} +\DeclareOption{online}{\g@addto@macro\TPT@defaults{\TPT@opt@online}} + +\def\TPT@opt@flushleft{% + \def\TPTnoteSettings{\labelsep.2em \leftmargin\z@ \labelwidth\z@}% + \def\TPTnoteLabel##1{\hspace\labelsep\tnote{##1}\hfil}% + \rightskip\z@skip \leftskip\z@skip +} +\DeclareOption{flushleft}{\g@addto@macro\TPT@defaults{\TPT@opt@flushleft}} + +\def\TPT@opt@para{\let\TPTdoTablenotes\TPT@doparanotes} +\def\TPT@doparanotes{\par + \prevdepth\z@ \TPT@hsize + \TPTnoteSettings + \parindent\z@ \pretolerance 8 + \linepenalty 200 + \renewcommand\item[1][]{\relax\ifhmode \begingroup + \unskip + \advance\hsize 10em % \hsize is scratch register, based on real hsize + \penalty -45 \hskip\z@\@plus\hsize \penalty-19 + \hskip .15\hsize \penalty 9999 \hskip-.15\hsize + \hskip .01\hsize\@plus-\hsize\@minus.01\hsize + \hskip 1em\@plus .3em + \endgroup\fi + \tnote{##1}\,\ignorespaces}% + \let\TPToverlap\relax + \def\endtablenotes{\par}% +} +\DeclareOption{para}{\g@addto@macro\TPT@defaults{\TPT@opt@para}} + +\ProcessOptions + + +\TPTminimum % restore catcode of @, : and * to starting value + +\def\TPTminimum{4em} + +\endinput + +Example: + +Here is some paragraph before the table. Note that this table does not +float because it is not in a {table} or {table*} environment. + +\begin{center} +\begin{threeparttable} +\caption{The Skewing Angles ($\beta$) for $\fam0 Mu(H)+X_2$ and + $\fam0 Mu(H)+HX$~\tnote{a}} +\begin{tabular}{rlcc} +\hline +& & $\fam0 H(Mu)+F_2$ & $\fam0 H(Mu)+Cl_2$ \\ +\hline +&$\beta$(H) & $80.9^\circ\tnote{b}$ & $83.2^\circ$ \\ +&$\beta$(Mu) & $86.7^\circ$ & $87.7^\circ$ \\ +\hline +\end{tabular} +\begin{tablenotes} +\item[a] for the abstraction reaction, $\fam0 Mu+HX \rightarrow MuH+X$. +\item[b] 1 degree${} = \pi/180$ radians. +\end{tablenotes} +\end{threeparttable} + +\end{center} + +Notes: + +May 15, 2001: changed hook-in to use \setbox in a wrapper macro (or +explicit width of tabular*). I don't remember why I used \everyhbox +and \lastbox before. Something may break now. At least it works with +tabularx. + +June 13, 2003: Re-wrote a lot, particularly the hook mechanism. Use macros +and package/environment options for formatting control. Add measuredfigure. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/thrmappendix.sty b/Master/texmf-dist/tex/latex/ltxmisc/thrmappendix.sty new file mode 100644 index 00000000000..97044a6e2e9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/thrmappendix.sty @@ -0,0 +1,217 @@ + \long\def\comment#1{} + \comment{ +This is my implementation of theorems, lemmas, &c. The main goal is +to let you reprint theorems in the appendix with their proofs, so the +text isn't cluttered with long proofs, but the reader doesn't have to +keep flipping back to the text to find out what you're talking about in +the appendix. + +It also has the side benefits that the syntax here involves less typing +and fewer redundancies than the default, so I use it even for things +that won't ever be proven. Compare the standard: + + \begin{definition} \label{xdef} + Let $x$ be a number. + \end{definition} + +versus the alternative here: + + \stmt{defn}{xdef}{ + Let $x$ be a number. + } + + + __________________________________________ + +Here is a quick summary of the macros defined in this file: +\stmt{statement_type}{label}{This is what I want to say} + The definition of a theorem, assumption, &c. +\stmtproof{label}{This is the proof.} + Where you should write your proof, for use with: +\rptstmtwithproof{label} + This states the theorem and proof together. +\rptstmt{label} + This restates just the theorem. +\refstmt{label} + Prints, e.g., `Theorem 7'---like \ref{label} but you don't have + to remember if it's a theorem, corollary, or lemma. +\comment{blather} + Delineates comments without all those darn percent signs. + + __________________________________________ +Here is a sample document using most all of the above. You can cut and +paste it to another file and compile it to see what it does. + +\documentclass{article} +\usepackage{thrmappendix} +\begin{document} + +\section{A theorem} + +\stmt{thrm}{sample}{Socrates is mortal.} + +\refstmt{sample} can either be proven using data (the fact that +Socrates is dead), or by the proof which is provided in the appendix. + + + +\section{Appendix} +In this appendix, the reader will find proofs of theorems not given in the text. + +\stmtproof{sample}{Socrates is a man. All men are mortal.} + +\rptstmtwithproof{sample} + +\comment{Notice that you can put the \stmtproof{sample}{...} anywhere +you want, including right after your statement, just before using +\rptstmtwithproof, or a separate file (then use \input{proofs.tex}). That +way, neither your finished paper nor your source will be cluttered with +proofs.} +\end{document} + __________________________________________ + + + +Here are the definitions of the types of theorems you can use +with these commands, and the proof markers: + } + +\long\def\theproofmarkersforthrmappendix{ + +%Format: +%\newtype{nickname}{numbered like}{title} + +%inputs +\newtype{ass}{ass}{Assumption} +\newtype{defnition}{ass}{Definition} +\newtype{defn}{ass}{Definition} + +%outputs +\newtype{statement}{statement}{Proposition} +\newtype{prop}{statement}{Proposition} +\newtype{thrm}{statement}{Theorem} +\newtype{corr}{statement}{Corollary} +\newtype{lma}{statement}{Lemma} +\newtype{guess}{statement}{Conjecture} + + +\def\pf{{\bf Proof: }} +\def\endpf{\hfill $\diamondsuit$} +} + + \comment{ +These are my preferred environments (and numbering scheme); +add your own or modify to suit. The format here is: +\newtype{nickname}{numbered like}{title} + +E.g., the second line lets me put + \stmt{thrm}{mortalityresult}{Socrates is mortal.} +in the tex file, since it defined the nickname `thrm'. If the statement +counter is up to #7, then the output will be: + Theorem 7: Socrates is mortal. +since thrms use the statement counter and print `Theorem'. To refer to +this theorem in the text, you have two choices: + \refstmt{mortalityresult} ===> Theorem 7 + Theorem \ref{mortalityresult} ===> Theorem 7 +The first form is nice because after you prove your result, you can +change it from a theorem to a conjecture without hunting through the +text to fix every reference. + +You can see that all of the results use the `statement' counter and +all of the inputs use the `ass' counter. Proposition 1 may be followed +by Theorem 2, followed by Corollary 3. This is my preferred numbering +scheme, suggested by Paolo Ghirardato. After all, the intent of numbering +these things is not to keep score as to how many theorems you've got, +but to make it easy for the reader to find what you're referring to; +a consistent numbering system facilitates this (especially in a long proof +appendix). + +[On the other hand, a referee of one of my papers complained that +17 theorems and 18 corollaries was too many, and I could cut that in +half. Of course, there were only 18 results total, and s/he was only +glancing at the two results on the last page.] + +To use independent numbering for each type, simply change the second field +in the definitions above to match the first field in each case. E.g.: + \newthrm{thrm}{thrm}{Theorem} +will allow you to count theorems separately from other results. + + +The \rptstmtwithproof macro here will include a marker at the beginning +and end of the proof, so you don't have to include them yourself. +The macros \pf and \endpf are defined above and can be redefined to +suit. Popular endproof markers include: + + \def\endpf{$blackbox$} + \def\endpf{$blacklozenge$} + \def\endpf{{\sc QED}} + + + --Ben Klemens, 2 Jan 2003 + b@avocado.caltech.edu + + + +PS: thrmappendix.sty (c)2003, Ben Klemens +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + __________________________________________} + +\usepackage{ifthen} +\def\newtype#1#2#3{ +\ifthenelse{\equal{#1}{#2}}{ +\long\expandafter\gdef\csname #1txt\endcsname{#3} +\long\expandafter\gdef\csname #1ctr\endcsname{#2} +\newtheorem{#1}{\csname #1txt\endcsname} +}{ +\long\expandafter\gdef\csname #1txt\endcsname{#3} +\long\expandafter\gdef\csname #1ctr\endcsname{#2} +\newtheorem{#1}[\csname #1ctr\endcsname]{\csname #1txt\endcsname} +}} + +\theproofmarkersforthrmappendix %from the user-readable section above. + +\def\cs#1{\csname #1\endcsname} +\newcounter{dummycounter} + +\long\def\defstmt#1#2#3{ +} + +\long\def\stmt#1#2#3{ + \long\expandafter\gdef\csname #2\endcsname{#3} + \expandafter\gdef\csname #2type\endcsname{#1} + \begin{#1} \label{#2} + {#3} + \end{#1} +\immediate\write\@mainaux{\string +\newlabel{#2type}{{\cs{#1txt}}} + } +} + +\long\def\stmtproof#1#2{ +\long\expandafter\gdef\csname #1proof\endcsname{#2} +} + +\long\def\rptstmt#1{ + \def\ctr{\cs{\cs{#1type}ctr}} +% \setcounter{paragraph}{\value{\ctr}} + \setcounter{dummycounter}{\value{\ctr}} +\batchmode + \setcounter{\ctr}{\ref{#1}} +\errorstopmode + \addtocounter{\ctr}{-1} + \begin{\cs{#1type}} + \cs{#1} + \end{\cs{#1type}} + \setcounter{\ctr}{\value{dummycounter}} +} + +\long\def\rptstmtwithproof#1{ + \rptstmt{#1} + + \pf \cs{#1proof} \endpf +} + +\def\refstmt#1{\ref{#1type} \ref{#1}} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/titleref.sty b/Master/texmf-dist/tex/latex/ltxmisc/titleref.sty new file mode 100644 index 00000000000..33b09411d21 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/titleref.sty @@ -0,0 +1,152 @@ +% TITLEREF.STY ver 3.1 2001-04-05 Donald Arseneau <asnd@triumf.ca> +% This is free unsupported software, released to the public domain. +% +% This package provides a "\titleref" command to cross-reference the titles +% of sections. The "\label" command is changed to remember the title for +% such a reference. Use "\titleref" just like "\ref" and "\pageref". +% +% Titles for numbered sectioning units and for floats with captions are +% the same as the respective TOC, LOF, or LOT entry (even when no TOC is +% printed). When a short title is provided ("\section[short]{long}") +% it will be used for the "\titleref". This is especially useful for +% figure captions. Unnumbered sections take their title reference from +% the printed title. Beware! This turns the title into a moving argument +% when it normally is not, and will cause weird errors if there are +% `fragile' commands present. +% +% Enumerated lists do not have titles and simply inherit the title of +% their section. +% +% The format of the title reference is controlled by the command +% "\theTitleReference", which can be redefined with "\renewcommand". +% It takes two parameters: the number and the title. The number is +% just the regular "\ref" and it is WRONG in unnumbered sections. +% Beware! The default definition is the unadorned title. You could +% do, for example, "\renewcommand{\theTitleReference}[2]{#1\ \emph{#2}}". +% +% The title of the current section is also available without "\label": +% Use the command "\currenttitle" to generate a "\titleref" to the current +% section. If you have redefined "\theTitleReference" to print the number +% with the title, be aware that the two may not correspond: In a numbered +% list the number will show the current item but the title will show the +% current section, but in an unnumbered section the number will show +% some previous section number. +% +% Options: [usetoc] and [nostar] +% +% In the default operation, the titles are recorded by a command inserted +% into the various sectioning commands ("\@sect", "\@ssect", "\@chapter", +% "\@schapter", "\@part", "\@spart", and "\@caption"). If this creates +% conflicts with some other package, you can use an entirely different +% method by specifying "\usepackage[usetoc]{titleref}". As the name +% implies, this option records the titles from the table-of-contents +% entry without redefining the sectioning commands. (This is the method +% used in older versions.) +% +% Since there are no TOC entries for the `star' versions of sectioning +% commands, they are still redefined. The additional option "[nostar]" +% ("\usepackage[usetoc,nostar]{titlerrf}") prevents the redefinitions, +% but then "\section*" will not generate a title reference. If you try +% to refer to the title of an unnumbered section while "[nostar]" is in +% effect, you will get the title of the previous section. +% +% Under the "[usetoc]" option, the current title will always be overridden +% by an "\addcontentsline" command before the "\label", even for starred +% section commands under the "[nostar]" option. +% +% The big problem with the "[usetoc]" method is that "\titleref" will +% not refer to a "\label" which was given in the title or caption itself; +% the label must be placed after the sectioning command or the caption. +% If you make a title-reference to a label given in a title, you will get +% a warning message. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{titleref}[2001/04/05 v3.1 \space + Cross-references with titles.] + +\newcommand{\theTitleReference}[2]{#2} +% +\let\TR@old@label\label +% +% This redefinition of \label is intended to work with other redirections +% of \label, if they record extra information in a similar way. +\def\label#1{\@bsphack\begingroup + \protected@edef\@currentlabel{\protect\TR@TitleReference + {\@currentlabel}{\TR@currentTitle}}% + \TR@old@label{#1}% + \endgroup \@esphack}% +% +\def\TR@gettitle#1{\begingroup \let\protect\@unexpandable@protect + \let\label\TR@nestwarn \let\index\@gobble \let\glossary\@gobble + \let\markboth\@gobbletwo \let\@mkboth\@gobbletwo \let\markright\@gobble + \edef\@tempa{\noexpand\def\noexpand\TR@currentTitle{#1}}% + \expandafter\endgroup\@tempa} +% +\let\TR@nestwarn\@gobble +% +\let\TR@TitleReference\@firstoftwo +% +% Allow aux file to be used after titleref is removed: +\AtBeginDocument{\immediate\write\@mainaux{\string\let + \string\TR@TitleReference\string\@firstoftwo}} +% +\DeclareRobustCommand{\titleref}[1]{\begingroup \let\numberline\@gobble + \let\TR@TitleReference\TR@theTR % interrupt recursion of \ref + \ref{#1}\endgroup} +% +\DeclareRobustCommand{\currenttitle}{\begingroup \let\numberline\@gobble + \theTitleReference\@currentlabel\TR@currentTitle\endgroup} +% +% +\def\TR@theTR{0} +\DeclareOption{usetoc}{\edef\TR@theTR{1\TR@theTR}}% +\DeclareOption{nostar}{\edef\TR@theTR{\TR@theTR 1}}% +\ProcessOptions\relax +% +% Put hooks in "star" commands if not [usetoc,nostar] +\ifnum\TR@theTR<100 +% +\AtBeginDocument{\let\TR@old@ssect\@ssect + \def\@ssect#1#2#3#4#5{\TR@gettitle{#5}\TR@old@ssect{#1}{#2}{#3}{#4}{#5}}% + \@ifundefined{@schapter}{}{\let\TR@old@schapter\@schapter + \def\@schapter#1{\TR@gettitle{#1}\TR@old@schapter{#1}}} + \@ifundefined{@spart}{}{\let\TR@old@spart\@spart + \def\@spart#1{\TR@gettitle{#1}\TR@old@spart{#1}}} +} +% +\fi +% +% Put hooks in other commands if not [usetoc] +\ifnum\TR@theTR<9 +% +\AtBeginDocument{% + \let\TR@old@sect\@sect \def\@sect#1#2#3#4#5#6[#7]{\TR@gettitle{#7}% + \TR@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]}% + \@ifundefined{@chapter}{}{\AtBeginDocument{\let\TR@old@chapter\@chapter + \def\@chapter[#1]{\TR@gettitle{#1}\TR@old@chapter[{#1}]}}} + \@ifundefined{@part}{}{\AtBeginDocument{\let\TR@old@part\@part + \def\@part[#1]{\TR@gettitle{#1}\TR@old@part[{#1}]}}}% + \let\TR@old@caption\@caption \long\def\@caption#1[#2]#3{\TR@gettitle{#2}% + \TR@old@caption{#1}[{#2}]{#3}} +} +% +\else % [usetoc], hook into \addcontentsline and prohibit labels in titles +% +\DeclareRobustCommand\TR@nestwarn[1]{\PackageWarning{titleref}% + {Label \string"#1\string" was put in a title,\MessageBreak + so the \noexpand\titleref is incorrect}} +% +\let\TR@old@addcontentsline\addcontentsline +% +\def\addcontentsline#1#2#3{% + \TR@old@addcontentsline{#1}{#2}{#3}% + \TR@gettitle{\relax#3}} +% +\fi +% +\let\TR@currentTitle\@empty +% +% proper definition: +\def\TR@theTR{\let\TR@TitleReference\@firstoftwo \theTitleReference} +% +\endinput % the end diff --git a/Master/texmf-dist/tex/latex/ltxmisc/topcapt.sty b/Master/texmf-dist/tex/latex/ltxmisc/topcapt.sty new file mode 100644 index 00000000000..c5b7d8ddcb0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/topcapt.sty @@ -0,0 +1,61 @@ +\@ifundefined{ProvidesPackage}{\def\ProvidesPackage#1[#2]{}}{} +\ProvidesPackage{topcapt}[2004/12/11 v1.2 Caption at top of float] + +% Copyright 1994, 1998, 1999, 2004 Robin Fairbairns +% +% This program can 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. +% +% This is a jiffy LaTeX package that enables coherent setting +% of the caption _above_ a figure or table +% +% Author: Robin Fairbairns 1994/11/18 +% Bugfix from Bernd Schandl incorporated 1998/12/31 +% First stab at hyperref interworking 2004/12/11 +% Copyright statement incorporated 1999/03/03 +% +% Works under 2e or 2.09 +% +% Usage: \usepackage{...,topcapt,...} (2e) +% \documentstyle[...,topcapt,...]{whateverclass} (2.09) +% +% defines a \topcaption command that sets a caption as if above the +% table (i.e., with the abovecaptionskip and the belowcaptionskip +% exchanged) + +\@ifundefined{abovecaptionskip}{% in 2.09 + \newlength\abovecaptionskip + \newlength\belowcaptionskip + \setlength\abovecaptionskip{10pt} + \setlength\belowcaptionskip{0pt} + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} + }{% in 2e; everything's already set up as above +} + +% \topcaption simply advances the caption count, sorts out the +% arguments and passes on to \@topcaption +\newcommand\topcaption{% + \@ifundefined{H@refstepcounter}% + {\refstepcounter}{\H@refstepcounter}\@captype + \@dblarg{\@topcaption\@captype}% +} + +% \@topcaption swaps above and below caption skips and the relays its +% arguments to \@caption +\def\@topcaption#1[#2]#3{\@tempskipa\abovecaptionskip + \abovecaptionskip\belowcaptionskip + \belowcaptionskip\@tempskipa + \@caption{#1}[{#2}]{#3}% + \@tempskipa\abovecaptionskip + \abovecaptionskip\belowcaptionskip + \belowcaptionskip\@tempskipa} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/truncate.sty b/Master/texmf-dist/tex/latex/ltxmisc/truncate.sty new file mode 100644 index 00000000000..a4f0ed840cb --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/truncate.sty @@ -0,0 +1,158 @@ +% truncate.sty ver 3.6 20-Aug-2001 Donald Arseneau +% This LaTeX program is released to the public domain. +% +% Truncate text to a specified width: \truncate [marker]{width}{text} +% +% If the text is too wide to fit in the specified width, then it is +% truncated, and a continuation marker is shown at the end. The default +% marker, used when the optional "[marker]" parameter is omitted, is +% "\,\dots". You can change this default by redefining "\TruncateMarker" +% ("\renewcommand{\TruncateMarker}{}"). +% +% Normally, the text (whether truncated or not) is printed flush-left +% in a box with exactly the width specified. The package option "[fit]" +% ("\usepackage[fit]{truncate}") causes the output text to have its +% natural width, up to a maximum of the specified width. +% +% The text will not normally be truncated in the middle of a word, +% nor at a space specified by the tie "~". For example: +% +% "\truncate{122pt}{This text has been~truncated}" +% gives +% "This text has... " +% +% You can give one of the package options "[hyphenate]", "[breakwords]", +% or "[breakall]" to allow breaking in the middle of words. The first +% two only truncate at hyphenation points; with the difference being that +% "breakwords" suppresses the hyphen character. On the other hand, +% "breakall" allows truncation at any character. For example: +% +% "\truncate{122pt}{This text has been~truncated}" +% gives +% "This text has been trun-..." (hyphenate) +% "This text has been trun... " (breakwords) +% "This text has been trunc..." (breakall) +% +% (All of these options work through TeX's hyphenation mechanism.) +% +\ProvidesPackage{truncate}[2001/08/20 \space ver 3.6] +% +% [breakwords] allows hyphenation but with invisible hyphen characters +\DeclareOption{breakwords}{% + \let\@Trunc@DoSelect\relax + \expandafter\chardef\csname \string\@TruncHyph T1\endcsname 23 + \expandafter\chardef\csname \string\@TruncHyph OT1\endcsname 223 + \expandafter\chardef\csname \string\@TruncHyph LY1\endcsname 0 + \def\@Trunc@Post{\hyphenpenalty\tw@ \exhyphenpenalty\tw@ + \doublehyphendemerits\z@ \finalhyphendemerits\z@ + \the\@Trunc@RestHyph % set invisible hyphenchars for all fonts used + }} +% +% [breakall] is like breakwords, but all characters are treated like +% the letter "c"; the default language 0 patterns allow hyphenation +% c-c-c-c-c-c-c-c-c. This means we don't need special patterns! +\DeclareOption{breakall}{\ExecuteOptions{breakwords}% + \expandafter\def\expandafter\@Trunc@Post\expandafter{\@Trunc@Post + \@tempcnta\z@ \chardef\c`\c % in knuth patterns, c allows hyphens + \loop \lccode\@tempcnta\c \advance\@tempcnta\@ne + \ifnum\@tempcnta<\@cclvi \repeat}% + \def\@Trunc@Pre{% force US english + \lefthyphenmin\@ne \righthyphenmin\@ne + \doublehyphendemerits\language + \language\z@ % default English language + \let\language\doublehyphendemerits + \uchyph\@ne + }} +% +% [hyphenate] ordinary hyphenation for breakpoints +\DeclareOption{hyphenate}{% takes precedence over breakwords + \def\@Trunc@Post{\hyphenpenalty\sixt@@n}\let\@Trunc@Pre\relax} +% +% [fit] use true size of truncated text, not requested size. +\DeclareOption{fit}{\def\@Trunc@Rebox{% + \setbox\z@\hbox{\unhbox\z@\unskip\unskip\@tempa}% + \ifdim\wd\z@>\hsize \hbox to\hsize{\unhbox\z@}\else \box\z@ \fi}} +% +% Defaults: +\let\@Trunc@Pre\@empty +\def\@Trunc@Post{\hyphenpenalty\@M} +\def\@Trunc@Rebox{\hbox to\hsize{\unhbox\z@\unskip\unskip\@tempa\hfil}} +\let\@Trunc@DoSelect\@empty + +\ProcessOptions\relax + +\providecommand{\TruncateMarker}{\,\dots} + +\newcommand{\truncate}[3][\TruncateMarker]{% #1=marker #2=width #3=text + \parbox[b]{#2}{\tolerance9999 \emergencystretch .216\hsize + \vbadness\maxdimen \vfuzz\vsize % no overfull warnings + \hbadness\maxdimen \hfuzz\vsize + % set up hyphenchar switching for all fonts used. + \edef\@tempb{\the\@Trunc@RestHyph}% save whole stack + \global\@Trunc@RestHyph{}% + \ifx\@Trunc@DoSelect\relax + \let\@Trunc@DoSelect\selectfont + \def\selectfont{\@Trunc@DoSelect\@Trunc@SaveHChar}% + \fi + \@Trunc@SaveHChar % do it for current font + \setbox\z@\vbox\bgroup + % First set text in a hbox to see if it fits. + \setbox\z@\@@line{\ignorespaces #3\unskip\hfil}% + \ifnum\badness>\@M % text does not fit + \settowidth\rightskip{#1}% + \advance\rightskip \z@\@plus\p@ + \parfillskip-\@ne\rightskip \@plus\@ne fil + \parshape \tw@ \z@\hsize \z@\maxdimen \linepenalty60 + \tracinglostchars\z@ + %% \let\par\relax -- don't do this because \vskip causes infinite loop + \@Trunc@Pre % must set language before paragraph + \noindent \vadjust{\penalty-\@MM}% for splitting off first line + \nobreak\hskip\z@skip % allow first word hyphenation + \ignorespaces #3% the text + \pretolerance\hyphenpenalty \@Trunc@Post % set up `hyphenation' + \@@par + \ifnum\prevgraf>\@ne + \egroup \def\@tempa{#1}% use truncation marker + \else + \egroup \let\@tempa\@empty% no linebreak, so all text fits; no marker + \fi + \else + \box\z@ \egroup \let\@tempa\@empty + \fi + \setbox\@tempboxa\vsplit\z@ to\z@ \unvbox\@tempboxa + \unskip\unpenalty\unpenalty + \setbox\z@\lastbox + \nointerlineskip + \hfuzz\p@ + \@Trunc@Rebox + \let\@Trunc@HC\@firstofone \the\@Trunc@RestHyph % restore hyphenchars + \global\@Trunc@RestHyph\expandafter{\@tempb}% restore the stack itself + }} +% (Note that the text may be proessed twice. I could avoid that +% if there are problems with global counters etc.) + +% we save (implicit global) hyphenchar settings for each font on a +% manual stack -- the token register \@Trunc@RestHyph -- before changing +% them. We execute \@Trunc@RestHyph to set them to the invisible +% characters and then again to restore them. (I can't imagine this +% will ever be required.) +\newtoks\@Trunc@RestHyph +\global\@Trunc@RestHyph{} +% +\def\@Trunc@SaveHChar{\begingroup + \edef\@tempa{% + \hyphenchar\the\font=\noexpand\@Trunc@HC{\the\hyphenchar\font}\relax + \the\@Trunc@RestHyph}% + \global\@Trunc@RestHyph\expandafter{\@tempa}% +% \hyphenchar\font\z@ + \endgroup} +% +% select an invisible character for hyphenation. Use \textcompwordmark, if +% any; use selected numbers for certain encodings (OT1 uses a *missing* +% character); use a space otherwise. +\def\@Trunc@HC#1{% + \@ifundefined{\f@encoding\string\textcompwordmark}{% + \@ifundefined{\string\@TruncHyph\f@encoding}% + {32}% If no appropriate character, guess space character may be blank + {\csname \string\@TruncHyph\f@encoding\endcsname}% + }{\csname\f@encoding\string\textcompwordmark\endcsname}}% diff --git a/Master/texmf-dist/tex/latex/ltxmisc/ulem.sty b/Master/texmf-dist/tex/latex/ltxmisc/ulem.sty new file mode 100644 index 00000000000..eba281a4f45 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/ulem.sty @@ -0,0 +1,475 @@ +% +% U L E M . S T Y [2000-05-26] +% +% A style file to provide various types of underlining that can stretch +% between words and be broken across lines. Use with LaTeX or plain TeX. +% In LaTeX this style replaces italics with underlining in \em-phasized text. +% It is most suitable for simple text such as {\em ibid.} or {\em \LaTeX: +% A Document Preparation System\/} that may need to be underlined in a +% manuscript submitted for publication. This is ONLY to be used when emphasis +% is delimited by braces. A declaration \normalem (or the \usepackage +% option "normalem") restores the normal \em behavior. +% +% Full instructions appear after \endinput. In summary: +% \uline{important} underlined text +% \uuline{urgent} double-underlined text +% \uwave{boat} wavy underline +% \sout{wrong} line drawn through word +% \xout{removed} marked over with //////. +% {\em phasized\/} | In LaTeX, by default, these are underlined; use +% \emph{asized} | \normalem or [normalem] to restore italics +% \useunder{\uwave}{\bfseries}{\textbf} +% use wavy underline in place of bold face +% +% Copyright (c) 1989-2000 by Donald Arseneau +% +% These definitions may be freely transmitted, reproduced, or modified +% provided that this notice is left intact. + +% Defend against multiple loading. +\expandafter \ifx \csname UL@box\endcsname \relax \else + \typeout{ulem.sty refuses to load twice. }\endinput \fi + +% Set catcode of @ in case it isn't a "letter" already +\chardef\ULthickness\catcode\string`\@ % hold catcode temporarily +\catcode\string`\@=11 + +\def\uline{\relax \ifmmode\expandafter\underline + \else \bgroup\expandafter\ULset\fi} + +\newbox\UL@box +\newbox\UL@hyphenbox +\newskip\UL@skip +\newtoks\UL@hook + +\newcount\UL@pe +\let\LA@space\ \let\LA@hskip\hskip + +\def\UL@end *{\relax\relax}% something harmless unlikely to be found elsewhere + +% For regular underlines, set the depth based on the font, or retain +% preset value. +\def\ULset{\ifdim\ULdepth=\maxdimen + \setbox\UL@box\hbox{(j}\ULdepth\dp\UL@box\advance\ULdepth.4\p@\fi + \def\UL@leadtype{\leaders \hrule \@height\dimen@ \@depth\ULdepth}% + \ifmmode \ULdepth-4\p@ \fi + \dimen@-\ULdepth \advance\dimen@\ULthickness \ULon} + +% \ULon simply calls \UL@on (possibly \UL@on=\UL@onin) for text mode, but +% \UL@onmath if it is math mode. +\def\ULon{\ifmmode \expandafter\UL@onmath\else \expandafter\UL@on\fi} + +% \UL@on sets the engine of underline running, and tells it +% where to stop. +\def\UL@on#1{\leavevmode\UL@ender \let\UL@on\UL@onin + \everymath{\UL@hrest}\everyvbox{\UL@hrest}\let\hskip\UL@hskip + \let\\\UL@cr \let\-\UL@dischyp \let\newline\UL@newline \let\ \UL@space + \def\hfil{\hskip\z@ plus1fil\relax}\def\hfill{\hskip\z@ plus1fill\relax}% + \def\hss{\hskip\z@ plus1filminus1fil\relax}\let\penalty\UL@penalty + \the\UL@hook + \UL@word\@empty#1\xdef\UL@spfactor{\the\spacefactor} \UL@end * } + +% This is what \ULon does when it appears nested in an inner place. +\def\UL@onin#1{\leavevmode\UL@ender % when nested, do multiple underlining + \dimen@\ULthickness \advance\ULdepth\thr@@\dimen@ \advance\dimen@-\ULdepth + \setbox\UL@box\hbox{{#1}}\let\UL@start\relax\UL@putbox\egroup} +% \UL@putbox is disabled in inner mode, so re-enable it by changing \UL@start +% \UL@hrest is implicit due to \everyhbox + +% This is what \ULon does in math mode. +\def\UL@onmath#1{\UL@ender\mathord{\UL@hrest\mathop{\kern\z@#1}\limits\sb + {\UL@leadtype\LA@hskip\p@ plus1fill}}\egroup} + +\def\UL@unegroup{} +\gdef\UL@ender{} +% end-brace matching hack for when command is used as a font declaration: +\def\UL@swender{\ifnum`{=\z@\fi\aftergroup}\gdef\UL@ender{}} + +% must expand to nothing outside the ifs for syntactical spaces to work. +% the \expandafters get rid of the \@empty inserted at the beg. of word +\def\UL@word#1 {\expandafter\UL@start#1 % + \expandafter\ifx\expandafter\UL@end#1\egroup\egroup + \unskip \unskip \unskip % remove extra leader at end + \spacefactor\UL@spfactor \let\UL@word\egroup + \else % not finished + \ifmmode\else \ifdim\lastskip=\z@\else % allow syntactical spaces + \global\UL@skip\lastskip \unskip + \UL@stop \UL@leaders + \fi\fi + \fi \UL@word\@empty}% \@empty preserves braces in param + +\def\UL@start{\setbox\UL@box\hbox\bgroup\everyhbox{\UL@hrest}% +% the following are to cope with stops (\ ,\- etc) within extra braces + \let\UL@start\@empty \def\UL@unegroup{\bgroup\bgroup}\let\UL@leadtype\@empty + \bgroup \kern-3sp\kern3sp % kerns so I can test for beginning of list + \if@ignore \global\@ignorefalse \ignorespaces \fi} + +\def\UL@stop{\global\UL@pe\lastpenalty \unpenalty % penalty in \UL@pe + \ifnum\lastkern=\thr@@ \egroup\egroup % Nothing in hbox...but make sure: + \ifdim\wd\UL@box=\z@ \else \UL@putbox \fi % something in box so print it + \else \egroup\egroup \UL@putbox % something in box so print it + \fi \ifnum\UL@pe=\z@ \else \LA@penalty\UL@pe \fi % use penalty from inside box + \UL@unegroup} +% notice that a box with only a penalty in it is discarded, but the penalty +% is still used! This is so a series of discardable glues and penalties +% behaves properly. + +\def\UL@putbox{\ifx\UL@start\@empty \else % not inner + \vrule\@width\z@ \LA@penalty\@M + {\UL@skip\wd\UL@box \UL@leaders \kern-\UL@skip}% + \box\UL@box \fi} + +% With interword leaders, give some overlap to avoid gaps caused by +% round-off errors in the printing program. Needs \unskip \unskip \unskip +% above. This version overlaps 1/300 inch, which looks good at high +% resolution, and will still work down to ~150 dpi. Change the value +% of \UL@pixel if necessary. + +\newdimen\UL@pixel \UL@pixel=1in \divide\UL@pixel 300 + +\def\UL@leaders{{\LA@hskip-\UL@pixel \advance\UL@skip\tw@\UL@pixel + \UL@leadtype\LA@hskip\UL@skip \LA@hskip-\UL@pixel}} + +% restore some things for inside math or \mbox +\def\UL@hrest{\let\ \LA@space \let\-\@empty \let\penalty\LA@penalty} + +\def\UL@space{\LA@space \global\UL@skip\lastskip \unskip \UL@reskip}% \ + +% Hyphenation is done by explicit \discretionary. The overlapping melds +% with the running overlap because it *is* part of the running overlap: +% The word fragment is extended by the width of the hyphenation which is +% then overlapped by leaders. The discretionary may occupy this space +% if a break occurs; otherwise the next syllable gets doubly-overlapped +% (in registration) for a distance of the hyphen's width. +\def\UL@dischyp{\global\setbox\UL@hyphenbox\hbox + {\ifnum \hyphenchar\font<\z@ \string-\else \char\hyphenchar\font \fi}% + \kern\wd\UL@hyphenbox \LA@penalty\@M \UL@stop \kern-\wd\UL@hyphenbox + \discretionary{\box\UL@hyphenbox}{}{}\UL@start} + +\let\LA@penalty\penalty +\def\UL@penalty{\relax\ifhmode \afterassignment\UL@@penalty\count@ + \else\LA@penalty\fi} +\def\UL@@penalty{\LA@penalty \ifnum\count@=\z@ + \@ne \else \count@ \fi % zero penalty => no penalty, so use 1 instead. + \UL@stop \UL@start} + +% The test \ifx\ \LA@space \else means we are neither in math mode nor an +% \mbox, so it is safe to stop the current \UL@box. \ , \- , and \penalty +% (= \linebreak or \nolinebreak) are common enough that they are restored +% directly (by \UL@hrest); \\, \newline, \hskip (= \hspace) are rare enough +% that the test is incorporated in their UL versions. This adds processing +% when they're used, but saves processing in \UL@hrest called by \everymath +% \everyvbox and \everyhbox. + +\def\UL@hskip{\ifx\ \LA@space \LA@hskip \else + \afterassignment\UL@reskip \global\UL@skip \fi} + +\def\UL@reskip{\UL@stop \UL@leaders \UL@start} + +% Redefine \\ and \newline so the vertical space from \\[ ] is not lost +% and so the \hfil is not underlined! \\ and \newline do nothing if inside +% inner braces. + +\def\UL@cr{\unskip \ifx\ \LA@space \let\UL@vad\@gobble + \else \UL@stop \unskip\unskip\unskip \let\UL@vad\vadjust \fi + \@ifstar{\UL@vad{\LA@penalty\@M}\UL@cra}\UL@cra} +\def\UL@cra{\@ifnextchar[\UL@crb\UL@newline} +\def\UL@crb[#1]{\UL@vad{\vskip#1}\UL@newline} + +\def\UL@newline{\ifx\UL@start\@empty % (\UL@cr may have \UL@stop-ed already) + \unskip \ifx\ \LA@space \else \UL@stop \unskip\unskip\unskip \fi\fi + \LA@hskip \z@\@plus.0001fil\LA@penalty -\@M \UL@start} + +% That concludes the basic underlining. To put various other objects +% (characters) under (or over) text we need to define \markoverwith +% to set the overlay material in a box, and use leaders of that box for +% overlaying the text. Here, the meaning of \UL@pixel is changed so +% that `pixel' size = box size. +% +\newbox\ULC@box + +\def\markoverwith#1{\setbox\ULC@box\hbox{{#1}}\UL@pixel.5\wd\ULC@box + \ifmmode \setbox\ULC@box\hbox{\raise1.4ex\box\ULC@box}% + \dp\ULC@box-1.4ex\ht\ULC@box\z@ \def\UL@leadtype{\cleaders\copy\ULC@box}% + \else + \def\UL@leadtype{\leaders\copy\ULC@box}% + \fi} + +% Now define various special underlines. All the definitions go like +% \def \command {\bgroup \markoverwith{something} \ULon} + +% For drawing a wavey underline instead of a straight one the command +% is \uwave (under-wave) which uses the wiggle from 6-pt lasy font: + +\def\uwave{\bgroup \markoverwith{\lower3.5\p@\hbox{\sixly + \kern-.21\p@ \char58 \kern-.21\p@}}\ULon} +\font\sixly=lasy6 % does not re-load if already loaded, so no memory problem. + +% To draw a double underline under text, use \uuline{text} + +\def\uuline{\bgroup \markoverwith{\hbox + {\kern-.03em\vtop{\kern.2ex\hrule width.2em\kern1.1\p@ + \hrule}\kern-.03em}}\ULon} + +% To draw a line through text instead of under it (strike out) do +% `under'-line with negative depth. Note that this one uses a real +% line, not characters, so there is no \markoverwith. + +\def\sout{\bgroup \ULdepth=-.5ex \ULset} + +% To mark //// over text instead of underlining (x-out) +% +\def\xout{\bgroup \markoverwith{\kern-.1em{/}\kern-.1em}\ULon} + +% \useunder {underline_command}{font_declaration}{font_command} +% e.g.: \useunder{\uuline}{\bfseries}{\textbf} +% \useunder{\uwave}{\bf}{} +\def\useunder#1#2#3{\relax + \ifx\relax#2\relax\else % declaration command given + \def#2{\def\@tempa{#1}\global\let\UL@ender\UL@swender + \expandafter\@tempa\expandafter{\ifnum\z@=\string`}\fi}% + \MakeRobust{#2}\fi + \ifx\relax#3\relax\else % argumentative command + \def#3{#1}\MakeRobust{#3}\fi} + +\expandafter\ifx \csname @ifundefined\endcsname \relax + +% Allow plain TeX to use this style: + \def\@height{height} + \def\@depth{depth} + \def\@width{width} + \def\@empty{} + \def\@gobble#1{} + \def\MakeRobust#1{} +% Do non-outer \newif with no visible \if's or \fi's when skipping + \csname newif\expandafter\endcsname \csname if@ignore\endcsname + +\else + + \def\MakeRobust#1{\expandafter\let + \csname \expandafter\@gobble\string#1 \endcsname= #1% + \edef#1{\noexpand\protect \expandafter\noexpand + \csname\expandafter\@gobble\string#1 \endcsname} + } + \MakeRobust\uline + \MakeRobust\uuline + \MakeRobust\uwave + \MakeRobust\sout + \MakeRobust\xout + + \let\LA@em\em \let\LA@emph\emph + \expandafter\let\expandafter\LA@Pem \csname em \endcsname + \expandafter\let\expandafter\LA@Pemph \csname emph \endcsname + \def\ULforem{\useunder{\uline}{\em}{\emph}} + \def\normalem{\let\em\LA@em \let\emph\LA@emph + \expandafter\let\csname em \endcsname\LA@Pem + \expandafter\let\csname emph \endcsname\LA@Pemph} + \ULforem % default is to use underlining for \em, + +\fi + +% Process LaTeX \package options; plain TeX skips this section + +\expandafter\ifx\csname ProvidesPackage\endcsname \relax \else + \ProvidesPackage{ulem}[2000/05/26] + \DeclareOption{normalem}{\normalem} + \DeclareOption{ULforem}{\ULforem} + \DeclareOption{normalbf}{} + \DeclareOption{UWforbf}{\useunder{\uwave}{\bf}{\textbf}} + \ProcessOptions + \let\UL@marginpar\marginpar + \newcommand\UL@marpar[2][\gDefault@pt]{\gdef\gDefault@pt{#2}% + \ifx\ \LA@space \@latexerr{Marginpar lost}% + \else \UL@stop \UL@marginpar[#1]{#2}\UL@start \fi} + \addto@hook\UL@hook{\let\marginpar\UL@marpar} +\fi + +\catcode`@=\ULthickness % Scratch meaning: restore catcode of @ + +\def\ULthickness{.4pt}% can change this with \renewcommand +\newdimen\ULdepth \ULdepth=\maxdimen +% "maxdimen" depth causes the depth to be set according to the font. You +% can change \ULdepth for a permanent setting or a special effect (\sout). + +\endinput + +ULEM is a package for LaTeX or plain TeX which provides various types of +underlining that can stretch between words and be broken across lines. +In LaTeX this style replaces italics with underlining in emphasized text +given by \em or \emph -- but only if the text is delimited by braces. A +declaration \normalem (or the \usepackage option [normalem]) restores the +normal \em behavior. For underlining in plain TeX, \input ulem.sty, and +use the \uline command. + +Unlike regular underlining, ulem allows line breaks, and even primitive +hyphenation, within the underlined text; but it is far from perfect. It is +most suitable for simple text like {\em \LaTeX: A document preparation +system\/} that may need to be underlined in a manuscript submitted for +publication. Again, ulem will only replace \em and \emph when the text is +delimited by explicit braces. + +The thickness of the underline rule is given by \ULthickness; use +\renewcommand or \def (not \setlength) to change it. The depth of the +underline is controlled by the length \ULdepth. The default value is a +special flag which lets the current font control the depth. You can set +a particular value to \ULdepth (using \setlength) to force a particular +depth, either locally for a special purpose, or for the document as a +whole. See the definition of \sout. + +Every word is typeset in an underlined box, so automatic hyphenation is +normally disabled, but explicit discretionary hyphens (\-) will still be +obeyed. Several text-formatting commands are specially supported within +the underlining: \-, \ , ~, \\, \newline, \linebreak, \nolinebreak, +\penalty, \hskip, \hspace, \hfil, \hfill, \hss. Displayed math and \par +are deliberately not supported to aid in the detection of runaway arguments +(missing braces). The special commands do have a problem: they end a +group so any local assignments are lost. + +The underlines continue between words, and stretch just like ordinary +spaces do. Since spaces delimit words, there may be some difficulty +with syntactical spaces (e.g. "2.3 pt"). Some effort is made to handle +such cases, but sometimes (such as \let\x= y) the space is interpreted +incorrectly. You can usually solve the problem by enclosing the offending +command in braces or in a macro (\newcommand\xeqy{\let\x= y}), but... + +One important incompatibility with braces and macro replacement: +ALL THE TEXT IN BRACES OR COMING FROM A MACRO IS TYPESET IN A BOX. +That is, braces will suppress stretching and linebreaks in the text they +enclose. Moreover, the specially-taken-care-of commands \-, \\, \newline +and \linebreak are usually ignored if they appear inside extra braces. +They operate only when the braces delimit a command parameter without +introducing a level of grouping. (Even though braces delimiting command +parameters do not normally imply grouping, many commands will add their +own grouping.) Thus, you should try to limit inner braces to short bits of +text or for delimiting parameters to commands. For emergency repairs, see +the "Marat/Sade" example below. Syntactical spaces inside braces never +cause a problem, nor do spaces in math mode. + +Text produced by expansion of a command (macro) is boxed too, but \\, \ +and \- still work properly in the expansion text: + \newcommand\iff{if and only if} {\em \iff} +does not allow any stretching or linebreaking between words, but + \newcommand\iff{if\ and\ only\ if} {\em \iff} +allows stretching and linebreaking. There is a problem though: the +\ between words closes a group and any local assignments will be lost, +in particular, font changes and color changes. + +This loss of local assignments will break some other standard commands, +(e.g., \cite) which produce multiple `words' using local assignments. +The way to protect such commands is to bury them in an \mbox: + {\em every\-one agrees~\mbox{\cite{you,me}}.} + +Nested \em commands produce multiple underlining, but heed the warnings +about braces above. To get italics without underlining, use \it. Nesting +of other types of underline is also possible, but the `underlines' may +overlap. + +HERE IS A SIMPLE EXAMPLE. + +\noindent 'Twas {\em brillig\/} and the {\em slithy~toves\/} +did {\em gyre\/} and {\em gim\-ble\/} in the {\em wabe,\\[2pt] } +All {\em mim\-sey\/} were the {\em boro\-goves\/} and +the {\em mome raths outgrabe}. + +HERE IS A DIFFICULT EXAMPLE. + +\usepackage{ulem} +\setlength\textwidth{3.3in} +\begin{document} +% \large +No, I did {\em not} act in the movie {\em \emph{The} % <<<<<<< Nested +\emph{Persecu}\-\emph{tion} \emph{and} \emph{Assassination} \emph{of} +\emph{Jean-Paul} \emph{Marat}, as per\-formed by the Inmates +of the Asylum of Charenton under the Direc\-tion of the +Marquis de~Sade!} But I {\em did} see it. +\end{document} + +In the nested emphasis, \emph had to be given for each word separately +so the spaces between could stretch and break into lines. Even the +discretionary hyphen (\-) in `Persecution' had to be outside the braces, +but the hyphen in `Direction' was just fine because it was not in nested +braces. The same applies to other special commands like \ and ~. Also, +the spaces are printed with only a single underline because they are +outside the nested \emph commands. This example really illustrates that +ulem does not handle nested emphasis very well! Nevertheless, it is fine +for simple things. + +Underlining can also be done according to \uline{this text}. To use this +type of underlining, but have \em still produce italics, put the command +\normalem in the preamble of the document or load ulem with +\usepackage[normalem]{ulem}. + +Some variations on underlining are provided, including a wavey underline +(\uwave{under-wave}), double underlines (\uuline{two lines under this}), +a line through text rather than under it (\sout{strike out}), and text +crossed-out with /////// (\xout{cross out, X out}). You can define your +own styles following the examples provided. The definition should be +something like: + +\newcommand\command{\bgroup \markoverwith{something}\ULon} + +The "something" can be as simple as a single character, or as complex as +you can keep track of. + +The various underlining commands are essentially textual, and will not +work quite the same in math mode. But since some font commands, like \bf, +serve both for text and math, math mode is handled (in an approximate way). +The performance in math mode is somewhat different from in text: there will +be no line breaks or stretching in the underlined text, and the vertical +positioning may not be right. The results should be best for \uline, +\uwave, \uuline, and any other truly UNDER-line you define. + +Any type of underlining can be substituted for any font-selection command +by issuing a proper \useunder declaration: + +\useunder{\underlinecommand}{\fontdeclaration}{\fontcommand} + +e.g., \useunder{\uuline}{\bfseries}{\textbf} gives a double underline +instead of bold face in LaTeX. The commands \normalem and \ULforem switch +underlining for \em off and on, respectively, and so do the \usepackage +options [normalem] and [ULforem]. There is also the \usepackage style +option [UWforbf] to replace boldface with a wavey underline. + +UWforbf does handle \bf in math mode, but it doesn't work in section titles, +unfortunately, because the titles are not delimited by explicit braces when +printed by the \section command. For the present version, the \bfseries +command still produces bold face, but \bf makes an under-wave. To get under- +waved section titles you can do + +\renewcommand\@seccntformat[1]{\uwave{\csname the#1\endcsname}\hskip 1em} + +and later specify \section[...]{\uwave{...}}. + +In plain TeX there is no \textbf so you should use \useunder{\UWave}{\bf}{}. +You can even skip a step and define the underline or overprint with \useunder: +\useunder{\bgroup\markoverwith{!}\ULon}{\sf}{} + +Some commands, such as \\ and \hskip are given special treatment, but +others (like \marginpar) are not. Support for others can be added by +assigning special meanings in the token register \UL@hook. (In LaTeX do +\addto@hook\UL@hook{\let\command\ULversion}.) The UL versions of commands +should be modelled on \UL@hskip or \UL@cr, and should include the test +"\ifx\ \LA@space". For example, support for "\marginpar" is added through +the hook mechanism. + +All the underlining commands are robust in LaTeX. + +% Previous bug-finders: Esther Hu (\hfill in plain); Lones Smith (\tt\-); +% Steve Anderson (\ooalign accents); Thanassi Protopapas ( { in tables). +% The bug finders' fee is now $0.00; it will double for each new bug found. +% Version 1994: +% Many changes! Notably: LaTeX2e options and \emph. Nesting works (somewhat). +% Behavior with inner braces is more consistent (not stripped). \useunder. +% Better underwave (using lasy6). Special underlines are not commented out. +% patch 1995: fix \UL@swender to work in {tabular}; make hyphenation join +% well; crude math support; eliminate \@clb +% patch 1996: use "\csname ProvidesPackage\endcsname", tidying. +% 1997: fix \\ when LaTeX changed; remove extra overlap in putbox. +% 2000: hook (and marginpar) +% +% Send problem reports to asnd@reg.triumf.ca +% +% test integrity: +% brackets: round, square, curly, angle: () [] {} <> +% backslash, slash, vertical, at, dollar, and: \ / | @ $ & +% hat, grave, acute (apostrophe), quote, tilde, under: ^ ` ' " ~ _ diff --git a/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty b/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty new file mode 100644 index 00000000000..a274b39e521 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty @@ -0,0 +1,232 @@ +% underscore.sty 12-Oct-2001 Donald Arseneau asnd@triumf.ca +% Make the "_" character print as "\textunderscore" in text. +% Copyright 1998,2001 Donald Arseneau; Distribute freely if unchanged. +% Instructions follow after the definitions. + +\ProvidesPackage{underscore}[2001/10/12] + +\begingroup + \catcode`\_=\active + \gdef_{% \relax % No relax gives a small vulnerability in alignments + \ifx\if@safe@actives\iftrue % must be outermost test! + \string_% + \else + \ifx\protect\@typeset@protect + \ifmmode \sb \else \BreakableUnderscore \fi + \else + \ifx\protect\@unexpandable@protect \noexpand_% + \else \protect_% + \fi\fi + \fi} +\endgroup + +% At begin: set catcode; fix \long \ttdefault so I can use it in comparisons; +\AtBeginDocument{% + {\immediate\write\@auxout{\catcode\number\string`\_ \string\active}}% + \catcode\string`\_\string=\active + \edef\ttdefault{\ttdefault}% +} + +\newcommand{\BreakableUnderscore}{\leavevmode\nobreak\hskip\z@skip + \ifx\f@family\ttdefault \string_\else \textunderscore\fi + \usc@dischyph\nobreak\hskip\z@skip} + +\DeclareRobustCommand{\_}{% + \ifmmode \nfss@text{\textunderscore}\else \BreakableUnderscore \fi} + +\let\usc@dischyph\@dischyph +\DeclareOption{nohyphen}{\def\usc@dischyph{\discretionary{}{}{}}} +\DeclareOption{strings}{\catcode`\_=\active} + +\ProcessOptions +\ifnum\catcode`\_=\active\else \endinput \fi + +%%%%%%%% Redefine commands that use character strings %%%%%%%% + +\@ifundefined{UnderscoreCommands}{\let\UnderscoreCommands\@empty}{} +\expandafter\def\expandafter\UnderscoreCommands\expandafter{% + \UnderscoreCommands + \do\include \do\includeonly + \do\@input \do\@iinput \do\InputIfFileExists + \do\ref \do\pageref \do\newlabel + \do\bibitem \do\@bibitem \do\cite \do\nocite \do\bibcite +} + +% Macro to redefine a macro to pre-process its string argument +% with \protect -> \string. +\def\do#1{% Avoid double processing if user includes command twice! + \@ifundefined{US\string_\expandafter\@gobble\string#1}{% + \edef\@tempb{\meaning#1}% Check if macro is just a protection shell... + \def\@tempc{\protect}% + \edef\@tempc{\meaning\@tempc\string#1\space\space}% + \ifx\@tempb\@tempc % just a shell: hook into the protected inner command + \expandafter\do + \csname \expandafter\@gobble\string#1 \expandafter\endcsname + \else % Check if macro takes an optional argument + \def\@tempc{\@ifnextchar[}% + \edef\@tempa{\def\noexpand\@tempa####1\meaning\@tempc}% + \@tempa##2##3\@tempa{##2\relax}% + \edef\@tempb{\meaning#1\meaning\@tempc}% + \edef\@tempc{\noexpand\@tempd \csname + US\string_\expandafter\@gobble\string#1\endcsname}% + \if \expandafter\@tempa\@tempb \relax 12\@tempa % then no optional arg + \@tempc #1\US@prot + \else % There is optional arg + \@tempc #1\US@protopt + \fi + \fi + }{}} + +\def\@tempd#1#2#3{\let#1#2\def#2{#3#1}} + +\def\US@prot#1#2{\let\@@protect\protect \let\protect\string + \edef\US@temp##1{##1{#2}}\restore@protect\US@temp#1} +\def\US@protopt#1{\@ifnextchar[{\US@protarg#1}{\US@prot#1}} +\def\US@protarg #1[#2]{\US@prot{{#1[#2]}}} + +\UnderscoreCommands +\let\do\relax \let\@tempd\relax % un-do + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\endinput + +underscore.sty 12-Oct-2001 Donald Arseneau + +Features: +~~~~~~~~~ +\_ prints an underscore so that the hyphenation of constituent words +is not affected and hyphenation is permitted after the underscore. +For example, "compound\_fracture" hyphenates as com- pound_- frac- ture. +If you prefer the underscore to break without a hyphen (but still with +the same rules for explicit hyphen-breaks) then use the [nohyphen] +package option. + +A simple _ acts just like \_ in text mode, but makes a subscript in +math mode: activation_energy $E_a$ + +Both forms use an underscore character if the font encoding contains +one (e.g., "\usepackage[T1]{fontenc}" or typewriter fonts in any encoding), +but they use a rule if the there is no proper character. + +Deficiencies: +~~~~~~~~~~~~~ +The skips and penalties ruin any kerning with the underscore character +(when a character is used). However, there doesn't seem to be much, if +any, such kerning in the ec fonts, and there is never any kerning with +a rule. + +You must avoid "_" in file names and in cite or ref tags, or you must use +the babel package, with its active-character controls, or you must give +the [strings] option, which attempts to redefine several commands (and +may not work perfectly). Even without the [strings] option or babel, you +can use occasional underscores like: "\include{file\string_name}". + +Option: [strings] +~~~~~~~~~~~~~~~~~ +The default operation is quite simple and needs no customization; but +you must avoid using "_" in any place where LaTeX uses an argument as +a string of characters for some control function or as a name. These +include the tags for \cite and \ref, file names for \input, \include, +and \includegraphics, environment names, counter names, and placement +parameters (like "[t]"). The problem with these contexts is that they +are `moving arguments' but LaTeX does not `switch on' the \protect +mechanism for them. + +If you need to use the underscore character in these places, the package +option [strings] is provided to redefine commands taking a string argument +so that the argument is protected (with \protect -> \string). The list +of commands is given in "\UnderscoreCommands", with "\do" before each, +covering \cite, \ref, \input, and their variants. Not included are many +commands regarding font names, everything with counter names, environment +names, page styles, and versions of \ref and \cite defined by external +packages (e.g. \vref and \citeyear). + +You can add to the list of supported commands by defining \UnderscoreCommands +before loading this package; e.g. + + \usepackage{chicago} + \newcommand{\UnderscoreCommands}{% (\cite already done) + \do\citeNP \do\citeA \do\citeANP \do\citeN \do\shortcite + \do\shortciteNP \do\shortciteA \do\shortciteANP \do\shortciteN + \do\citeyear \do\citeyearNP + } + \usepackage[strings]{underscore} + +Not all commands can be supported this way! Only commands that take a +string argument *first* can be protected. One optional argument before +the string argument is also permitted, as exemplified by \cite: both +\cite{tags} and \cite[text]{tags} are allowed. A command like +\@addtoreset which takes two counter names as arguments could not +be protected by adding it to \UnderscoreCommands. + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! When you use the [strings] option, you must load this package !! +!! last (or nearly last). !! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +There are two reasons: 1) The redefinitions done for protection must come +after other packages define their customized versions of those commands. +2) The [strings] option requires the _ character to be activated immediately +in order for the cite and ref tags to be read properly from the .aux file +as plain strings, and this catcode setting might disrupt other packages. + +The babel package implements a protection mechanism for many commands, +and will be a complete fix for most documents without the [strings] option. +Many add-on packages are compatible with babel, so they will get the +strings protection also. However, there are several commands that are +not covered by babel, but can easily be supported by the [strings] and +\UnderscoreCommands mechanism. Beware that using both [strings] and babel +may lead to conflicts, but does appear to work (load babel last). + +Implementation Notes: +~~~~~~~~~~~~~~~~~~~~~ +The first setting of "_" to be an active character is performed in a local +group so as to not interfere with other packages. The catcode setting +is repeated with \AtBeginDocument so the definition is in effect for the +text. However, the catcode setting is repeated immediately when the +[strings] option is detected. + +The definition of the active "_" is essentially: + \ifmmode \sb \else \BreakableUnderscore \fi +where "\sb" retains the normal subscript meaning of "_" and where +"\BreakableUnderscore" is essentially "\_". The rest of the definition +handles the "\protect"ion without causing \relax to be inserted before +the character. + +\BreakableUnderscore uses "\nobreak\hskip\z@skip" to separate the +underscore from surrounding words, thus allowing TeX to hyphenate them, +but preventing free breaks around the underscore. Next, it checks the +current font family, and uses the underscore character from tt fonts or +otherwise \textunderscore (which is a character or rule depending on +the font encoding). After the underscore, it inserts a discretionary +hyphenation point as "\usc@dischyph", which is usually just "\-" +except that it still works in the tabbing environment, although it +will give "\discretionary{}{}{}" under the [nohyphen] option. After +that, another piece of non-breaking interword glue is inserted. +Ordinarily, the comparison "\ifx\f@family\ttdefault" will always fail +because \ttdefault is `long' where \f@family is not (boooo hisss), but +\ttdefault is redefined to be non-long by "\AtBeginDocument". + +The "\_" command is then defined to use "\BreakableUnderscore". + +If the [strings] option is not given, then that is all! + +Under the [strings] option, the list of special commands is processed to: +- retain the original command as \US_command (\US_ref) +- redefine the command as \US@prot\US_command for ordinary commands + (\ref -> \US@prot\US_ref) or as \US@protopt\US_command when an optional + argument is possible (\bibitem -> \US@protopt\US_bibitem). +- self-protecting commands (\cite) retain their self-protection. +Diagnosing the state of the pre-existing command is done by painful +contortions involving \meaning. + +\US@prot and \US@protopt read the argument, process it with \protect +enabled, then invoke the saved \US_command. + +Modifications: +~~~~~~~~~~~~~~ +12-Oct-2001 Babel (safe@actives) compatibility and [nohyphen] option. + +Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789 +:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/Master/texmf-dist/tex/latex/ltxmisc/url.sty b/Master/texmf-dist/tex/latex/ltxmisc/url.sty new file mode 100644 index 00000000000..f321d51f567 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/url.sty @@ -0,0 +1,473 @@ +% url.sty ver 3.2 27-Jun-2005 Donald Arseneau asnd@triumf.ca +% Copyright 1996-2005 Donald Arseneau, Vancouver, Canada. +% This program can be used, distributed, and modified under the terms +% of the LaTeX Project Public License. +% +% A form of \verb that allows linebreaks at certain characters or +% combinations of characters, accepts reconfiguration, and can usually +% be used in the argument to another command. It is intended for email +% addresses, hypertext links, directories/paths, etc., which normally +% have no spaces. The font may be selected using the \urlstyle command, +% and new url-like commands can be defined using \urldef. +% +% Usage: Conditions: +% \url{ } If the argument contains any "%" or "^^", or ends with +% "\", it can't be used in the argument to another command. +% The argument must not contain unbalanced braces. +% \url| | ...where "|" is any character not used in the argument and not +% "{" or a space. The same restrictions as above except that the +% argument may contain unbalanced braces. +% \urldef\xyz\url{ } +% \xyz a defined-url: "\xyz" can be used anywhere, no matter what +% characters it contains. +% \DeclareUrlCommand\abc{settings}: makes \abc{ } like \url{ } +% +% See further instructions after "\endinput" +% + +% default style assignments +\def\UrlBreaks{\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]% + \do\)\do\,\do\?\do\'\do+\do\=\do\#}% +\def\UrlBigBreaks{\do\:\do@url@hyp}% +\def\UrlNoBreaks{\do\(\do\[\do\{\do\<}% +% any ordinary characters that aren't usually: +\def\UrlOrds{\do\*\do\-\do\~\do\'\do\"\do\-}% +\def\UrlSpecials{\do\ {\Url@space}\do\%{\Url@percent}\do\^^M{\Url@space}% + \Url@force@Tilde}% package option may force faked text-ascii-tilde + +\@namedef{Url@OT1encSpecials}{% + \do\Œ{\mathchar"3E }\do\œ{\mathchar"1B }\do\ß{\mathchar"19 }% + \do\~{\lower.45ex\hbox{\m@th$\mathchar126$}}% For tt style + % lots more to add, but I should later link into inputenc + \Url@OTnonTT % more for any but typewriter + } + +\def\Url@OTnonTT{\do\<{\langle}\do\>{\mathbin{\rangle}}\do + \_{\_\penalty\@m}\do\|{\mid}\do\{{\lbrace}\do\}{\mathbin{\rbrace}}\do + \\{\mathbin{\backslash}}\UrlTildeSpecial} + +\@namedef{Url@T1encSpecials}{\do\µ{\mu}\do\¿{\mathchar190 }% + \do\Œ{\mathchar190 }\do\œ{\mathchar247 }\do\ß{\mathchar255 }% + \do\ÿ{\mathchar184 }} + +\@namedef{Url@LY1encSpecials}{\do\~{\mathchar158 }} + +\def\UrlTildeSpecial{\do\~{\raise.45ex\hbox{\m@th$\scriptstyle\sim$}}} +\let\Url@force@Tilde\relax + +\def\url@ttstyle{% + \@ifundefined{selectfont}{\def\UrlFont{\tt}}{\def\UrlFont{\ttfamily}}} + +\def\url@rmstyle{% + \@ifundefined{selectfont}{\def\UrlFont{\rm}}{\def\UrlFont{\rmfamily}}} + +\def\url@sfstyle{% + \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\sffamily}}} + +\def\url@samestyle{\def\UrlFont{}} + +\@ifundefined{strip@prefix}{\def\strip@prefix#1>{}}{} +\@ifundefined{verbatim@nolig@list}{\def\verbatim@nolig@list{\do\`}}{} + +% \Url sets up the reading the argument verbatim if possible +\def\Url{% + \Url@movingtest + \ifmmode\@nomatherr$\fi %$ + \let\do\@makeother \dospecials % verbatim catcodes + \catcode`{\@ne \catcode`}\tw@ % with exceptions + \catcode`\ =10 % allow "\url {x}" + \catcode`\#=6 % always # -> ##, so I can later convert ## -> # + \@ifnextchar\bgroup{\obeyspaces\obeylines\Url@z}\Url@y} + +% \Url@y read arguments delimited like |...|, passing to \Url@z +\def\Url@y#1{\catcode`{11 \catcode`}11\obeyspaces\obeylines + \def\@tempa##1#1{\Url@z{##1}}\@tempa} + +% \Url@z read arguments delimited like {...}, verbatimizes with \meaning, +% performs character translations, then invokes the formatter. +\def\Url@z#1{\toks@{#1}\edef\Url@String{\the\toks@}% + \edef\Url@String{\expandafter\strip@prefix\meaning\Url@String}% +%\if\urldebug \message{------------------------------------------------------}% +%\message{ \Url@String}\fi +% \meaning introduces spurious spaces in the text, so it would be nice +% to preserve the real spaces before \meaning, but that doesn't work -- +% we can only do replacement on streams of non-syntactic characters. + \Url@ObeySp % may be no-op; otherwise put ordinary (12) space characters +%\if\urldebug \message{ \Url@String}\fi +% we left the catcode of # with its normal value (6) so \meaning +% doubles it to ##. Now we convert back to single #. This allows +% \url{#} to appear in the arguments of other commands, where we can't +% make # be an ordinary character. We make the single # active rather +% than `other' to support hyperref.sty. + \Url@acthash +%\if\urldebug \message{ \Url@String}\fi +% Also make % active to support hyperref. + \Url@actpercent +% now do any hyper referencing due to hyperref (or perform a url-def) + \Url@HyperHook +% Now do the formatting in a group (can also have \Url@HyperHook take +% this as an argument. + {\Url@FormatString}% + \endgroup} + +\let\Url@ObeySp\@empty +\let\UrlRight\@empty +\let\UrlLeft\@empty +\let\Url@HyperHook\@empty + +% This is the normal way to format the strings, using math mode. +\def\Url@FormatString{% + \UrlFont \Url@MathSetup + $\fam\z@ \textfont\z@\font + \expandafter\UrlLeft\Url@String\UrlRight + \m@th$% +% \if\urldebug \showlists \fi +}% + +\def\Url@MathSetup{% + \medmuskip\Urlmuskip \thickmuskip\medmuskip \thinmuskip0mu% + \relpenalty\UrlBigBreakPenalty \binoppenalty\UrlBreakPenalty + \expandafter\let\expandafter\UrlEncSpecials\csname Url@\f@encoding encSpecials\endcsname + % Insert test for unknown encodings here \ifx\UrlEncSpecials\relax + \ifdim\fontdimen\thr@@\font=\z@ \let\Url@OTnonTT\relax \fi + \@tempcnta\z@ % \fam\multiply\@tempcnta\@cclvi + \let\do\set@mathcode \UrlOrds % ordinary characters that were special + \advance\@tempcnta 8192 \UrlBreaks % bin + \advance\@tempcnta 4096 \UrlBigBreaks % rel + \advance\@tempcnta 4096 \UrlNoBreaks % open + \let\do\set@mathact \UrlSpecials \UrlEncSpecials % active + \let\do\set@mathnolig \verbatim@nolig@list % prevent ligatures +} + +\def\set@mathcode#1{\count@`#1\advance\count@\@tempcnta +%\message{Set mathcode of \string #1 (\number`#1) = \number`#1 + \number\@tempcnta. }% +\mathcode`#1\count@} +\def\set@mathact#1#2{\mathcode`#1=32768 \begingroup + \lccode`\~`#1\lowercase{\endgroup\def~}{#2}} +\def\set@mathnolig#1{\ifnum\mathcode`#1<32768 + \begingroup\lccode`\~`#1\lowercase{\endgroup + \edef~}{\mathchar\number\mathcode`#1_{\/}}% + \mathcode`#1=32768 \fi} + +\def\Url@movingtest{\begingroup + \ifx\let\HyPsd@LetCommand % we are already in a pdf string! + \expandafter\Url@unmove \fi % give the argument and hope for the best + \let\Url@moving\relax\relax\relax + \ifx\Url@moving\relax\else \expandafter\Url@unmove \fi + \endgroup} +\long\def\Url@unmove#1\Url@y{\endgroup \ifx\protect\relax\else\protect\Url\fi} +\edef\Url@moving{\csname Url Error\endcsname} +\expandafter\edef\Url@moving + {\csname url used in a moving argument.\endcsname} +\expandafter\expandafter\expandafter \let \Url@moving\@undefined + +\def\urldef#1#2{\begingroup \setbox\z@\hbox\bgroup + \def\Url@HyperHook##1\endgroup{\Url@def{#1}{#2}}% + % Because hyperref breaks \urldef and does not define its own (Grrrr!)... + \def\url@##1{\egroup\endgroup\DeclareRobustCommand#1{#2{##1}}}% + #2} +\def\Url@def#1#2{% + \toks0\expandafter{\Url@String}% + \protected@edef\Url@String{\Url@String}% + \toks1\expandafter{\Url@String}% + \edef\Url@String{\endgroup\egroup\endgroup\def + \expandafter\noexpand\csname\expandafter\@gobble\string#1 \endcsname + {\noexpand\Url@eitherdef{\the\toks1}{\noexpand#2{\the\toks0}}}}% + \Url@String + \edef#1{\noexpand\protect + \expandafter\noexpand\csname\expandafter\@gobble\string#1 \endcsname}% + } +\def\Url@eitherdef{\ifx\let\HyPsd@LetCommand % we are already in a pdf string! + \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} + +\def\urlstyle#1{\expandafter\protect\csname url@#1style\endcsname} + +\def\DeclareUrlCommand#1#2{\def#1{\begingroup #2\Url}} + +% Sample (and default) configuration: +% +\DeclareUrlCommand\url{} +\urlstyle{tt} +% +\newmuskip\Urlmuskip \Urlmuskip=0mu +\mathchardef\UrlBreakPenalty=\binoppenalty +\mathchardef\UrlBigBreakPenalty=\relpenalty +% +% picTeX defines \path, so declare it optionally: +\@ifundefined{path}{\DeclareUrlCommand\path{\urlstyle{tt}}}{} +% +% too many styles define \email like \address, so I will not define it. +% \DeclareUrlCommand\email{\urlstyle{rm}} + +% Process LaTeX \package options +% +\let\Url@sppen\@M +\def\Url@space{\penalty\Url@sppen} +\def\do@url@hyp{}% by default, no breaks after hyphens + +\@ifundefined{ProvidesPackage}{ +}{\ProvidesPackage + {url}[2005/06/27 \space ver 3.2 \space Verb mode for urls, etc.] +\DeclareOption{hyphens}{\def\do@url@hyp{\do\-}}% allow breaks after hyphens +\DeclareOption{obeyspaces}{\let\Url@ObeySp\relax}% a flag for later +\DeclareOption{spaces}{\def\Url@sppen{\UrlBreakPenalty}} +\DeclareOption{LY1}{} +\DeclareOption{T1}{} +\DeclareOption{allowmove}{\let\Url@moving\@empty} +\ProcessOptions\relax +\ifx\Url@ObeySp\relax % [obeyspaces] was declared + \begingroup \lccode`+=32 \lowercase + {\endgroup \def\Url@ObeySp{\Url@Edit\Url@String{ }{+}}} + \def\Url@space{\penalty\Url@sppen\ } +\fi +} +\ifx\f@encoding\undefined \def\f@encoding{OT1}\fi + +\begingroup +% \Url@acthash: convert `other' (doubled) ## to active # +% \Url@actpercent: convert `other' % to active % + \lccode`+=`\# \lccode`\~=`\# + \lowercase {\long\gdef\Url@acthash{\Url@Edit\Url@String{++}{~}% + \ifnum\mathcode`\#<32768 \def~{\#}\fi}}% + \lccode`+=`\% \lccode`\~=`\% + \lowercase {\long\gdef\Url@actpercent{\Url@Edit\Url@String{+}{~}% + \ifnum\mathcode`\%<32768 \def~{\%}\fi}}% + \catcode13=12 % + \gdef\Url@percent{\@ifnextchar^^M{\@gobble}{\mathbin{\mathchar`\%}}}% +\endgroup% + +% Edit macro #1 changing all appearances of pattern #2 to replacement #3. +% The replacement is recursive, so don't put the search pattern into the +% replacement text! + +{ \catcode`Q=3 + +\gdef\Url@Edit#1#2#3{% + \begingroup % \tracingall + \def\DOE@a{\endgroup\def#1}% Just so I can \expandafter it safely. + \def\DOE@b##1#2##2Q##3{\@ifblank{##2}% if finished, + {\DOE@c ##1Q}% then remove \@empty's and redefine macro + {\DOE@b##1##3##2Q{##3}}% else, re-iterate + }% the leading \@empty preserves braces, as does the trailing pattern: + \expandafter\DOE@b\expandafter\@empty #1\@empty#2Q{#3}} +\gdef\DOE@c#1\@empty Q{\expandafter\DOE@a\expandafter{#1}} +% +% \@ifblank (LaTeX syntax) --- checks if parameter is blank (Spaces +% count as blank) use \@ifblank{#1}{true case}{false case} etc +\long\gdef\@ifblank#1{\@Ifbl@nk#1QQ\@secondoftwo\@firstoftwo!}% +\long\gdef\@Ifbl@nk#1#2Q#3#4#5!{#4} + +} % restore Q catcode + + +%\ifx\urldebug\@undefined \def\urldebug{01}\fi + +\endinput +% +% url.sty ver 3.2 27-Jun-2005 Donald Arseneau asnd@triumf.ca +% +% This package defines "\url", a form of "\verb" that allows linebreaks, +% and can often be used in the argument to another command. It can be +% configured to print in different formats, and is particularly useful for +% hypertext links, email addresses, directories/paths, etc. The font may +% be selected using the "\urlstyle" command and pre-defined text can be +% stored with the "\urldef" command. New url-like commands can be defined, +% and a "\path" command is provided this way. +% +% Usage: Conditions: +% \url{ } If the argument contains any "%", "#", or "^^", or ends with +% "\", it can't be used in the argument to another command. +% The argument must not contain unbalanced braces. +% \url| | ...where "|" is any character not used in the argument and not +% "{" or a space. The same restrictions as above except that the +% argument may contain unbalanced braces. +% \xyz for "\xyz" a defined-url; this can be used anywhere, no matter +% what characters it contains. +% +% The "\url" command is fragile, and its argument is likely to be very +% fragile, but a defined-url is robust. +% +% Package Option: obeyspaces +% Ordinarily, all spaces are ignored in the url-text. The "[obeyspaces]" +% option allows spaces, but may introduce spurious spaces when a url +% containing "\" characters is given in the argument to another command. +% So if you need to obey spaces you can say "\usepackage[obeyspaces]{url}", +% and if you need both spaces and backslashes, use a `defined-url' for +% anything with "\". +% +% Package Option: hyphens +% Ordinarily, breaks are not allowed after "-" characters because this +% leads to confusion. (Is the "-" part of the address or just a hyphen?) +% The package option "[hyphens]" allows breaks after explicit hyphen +% characters. The "\url" command will *never ever* hyphenate words. +% +% Package Option: spaces +% Likewise, breaks are not usually allowed after spaces under the +% "[obeyspaces]" option, but giving the options "[obeyspaces,spaces]" +% will allow breaks at those spaces. (Note that it seems logical to +% allow the sole option "[spaces]" to let input spaces indicate break +% points, but not to display them in the output. This would be easy to +% implement, but is left out to avoid(?) confusion.) +% +% Defining a defined-url: +% Take for example the email address "myself%node@gateway.net" which could +% not be given (using "\url" or "\verb") in a caption or parbox due to the +% percent sign. This address can be predefined with +% \urldef{\myself}\url{myself%node@gateway.net} or +% \urldef{\myself}\url|myself%node@gateway.net| +% and then you may use "\myself" instead of "\url{myself%node@gateway.net}" +% in an argument, and even in a moving argument like a caption because a +% defined-url is robust. +% +% Style: +% You can switch the style of printing using "\urlstyle{tt}", where "tt" +% can be any defined style. The pre-defined styles are "tt", "rm", "sf", +% and "same" which all allow the same linebreaks but different fonts -- +% the first three select a specific font and the "same" style uses the +% current text font. You can define your own styles with different fonts +% and/or line-breaking by following the explanations below. The "\url" +% command follows whatever the currently-set style dictates. +% +% Alternate commands: +% It may be desireable to have different things treated differently, each +% in a predefined style; e.g., if you want directory paths to always be +% in typewriter and email addresses to be roman, then you would define new +% url-like commands as follows: +% +% \DeclareUrlCommand\email{\urlstyle{rm}} +% \DeclareUrlCommand\directory{\urlstyle{tt}} +% +% In fact, the "\directory" example is exactly the "\path" definition which +% is pre-defined in the package. If you look above, you will see that "\url" +% is defined with +% \DeclareUrlCommand\url{} +% I.e., using whatever "\urlstyle" and other settings are already in effect. +% +% You can make a defined-url for these other styles, using the usual +% "\urldef" command as in this example: +% +% \urldef{\myself}{\email}{myself%node.domain@gateway.net} +% +% which makes "\myself" act like "\email{myself%node.domain@gateway.net}", +% if the "\email" command is defined as above. The "\myself" command +% would then be robust. +% +% Defining styles: +% Before describing how to customize the printing style, it is best to +% mention something about the unusual implementation of "\url". Although +% the material is textual in nature, and the font specification required +% is a text-font command, the text is actually typeset in *math* mode. +% This allows the context-sensitive linebreaking, but also accounts for +% the default behavior of ignoring spaces. Now on to defining styles. +% +% To change the font or the list of characters that allow linebreaks, you +% could redefine the commands "\UrlFont", "\UrlBreaks", "\UrlSpecials" etc. +% directly in the document, but it is better to define a new `url-style' +% (following the example of "\url@ttstyle" and "\url@rmstyle") which defines +% all of "\UrlBigbreaks", "\UrlNoBreaks", "\UrlBreaks", "\UrlSpecials", and +% "\UrlFont". +% +% Changing font: +% The "\UrlFont" command selects the font. The definition of "\UrlFont" +% done by the pre-defined styles varies to cope with a variety of LaTeX +% font selection schemes, but it could be as simple as "\def\UrlFont{\tt}". +% Depending on the font selected, some characters may need to be defined +% in the "\UrlSpecials" list because many fonts don't contain all the +% standard input characters. +% +% Changing linebreaks: +% The list of characters that allow line-breaks is given by "\UrlBreaks" +% and "\UrlBigBreaks", which have the format "\do\c" for character "c". +% The differences are that `BigBreaks' usually have a lower penalty and have +% different breakpoints when in sequence (as in "http://"): `BigBreaks' +% are treated as mathrels while `Breaks' are mathbins (see The TeXbook, +% p.170). In particular, a series of `BigBreak' characters will break at +% the end and only at the end; a series of `Break' characters will break +% after the first and after every following *pair*; there will be no +% break after a `Break' character if a `BigBreak' follows. In the case +% of "http://" it doesn't matter whether ":" is a `Break' or `BigBreak' -- +% the breaks are the same in either case; but for DECnet nodes with "::" +% it is important to prevent breaks *between* the colons, and that is why +% colons are `BigBreaks'. +% +% It is possible for characters to prevent breaks after the next following +% character (I use this for parentheses). Specify these in "\UrlNoBreaks". +% +% You can do arbitrarily complex things with characters by making them +% active in math mode (mathcode hex-8000) and specifying the definition(s) +% in "\UrlSpecials". This is used in the rm and sf styles for OT1 font +% encoding to handle several characters that are not present in those +% computer-modern style fonts. See the definition of "\Url@do", which +% is used by both "\url@rmstyle" and "\url@sfstyle"; it handles missing +% characters via "\UrlSpecials". The nominal format for setting each +% special character "c" is: "\do\c{<definition>}", but you can include +% other definitions too. +% +% If all this sounds confusing ... well, it is! But I hope you won't need +% to redefine breakpoints -- the default assignments seem to work well for +% a wide variety of applications. If you do need to make changes, you can +% test for breakpoints using regular math mode and the characters "+=(a". +% +% You can allow some spacing around the breakable characters by assigning +% \Urlmuskip = 0mu plus 1mu +% You can change the penalties used for BigBreaks and Breaks by assigning +% \mathchardef\UrlBreakPenalty=100 \mathchardef\UrlBigBreakPenalty=100 +% The default penalties are "\binoppenalty" and "\relpenalty". These have +% such odd non-LaTeX syntax because I don't expect people to need to +% change them often. +% +% Yet more flexibility: +% You can also customize the verbatim text by defining "\UrlRight" and/or +% "\UrlLeft", e.g., for ISO formatting of urls surrounded by "< >", define +% +% \DeclareUrlCommand\url{\def\UrlLeft{<url:\ }\def\UrlRight{>}% +% \urlstyle{tt}} +% +% The meanings of "\UrlLeft" and "\UrlRight" are *not* reproduced verbatim. +% This lets you use formatting commands there, but you must be careful not +% to use TeX's special characters ("\^_%~#$&{}" etc.) improperly. +% You can also define "\UrlLeft" to reprocess the verbatim text, but the +% format of the definition is special: +% +% \def\UrlLeft#1\UrlRight{ ... do things with #1 ... } +% +% Yes, that is "#1" followed by "\UrlRight" then the definition. For +% example, to put a hyperTeX hypertext link in the DVI file: +% +% \def\UrlLeft#1\UrlRight{\special{html:<a href="#1">}#1\special{html:</a>}} +% +% Using this technique, url.sty can provide a convenient interface for +% performing various operations on verbatim text. You don't even need +% to print out the argument! For greatest efficiency in such obscure +% applications, you can define a null url-style where all the lists like +% "\UrlBreaks" are empty. +% +% Revision History: +% ver 1.1 6-Feb-1996: +% Fix hyphens that wouldn't break and ligatures that weren't suppressed. +% ver 1.2 19-Oct-1996: +% Package option for T1 encoding; Hooks: "\UrlLeft" and "\UrlRight". +% ver 1.3 21-Jul-1997: +% Prohibit spaces as delimiter characters; change ascii tilde in OT1. +% ver 1.4 02-Mar-1999: +% LaTeX license; moving-argument-error +% ver 1.5 28-Mar-1999: +% possibility of spacing around break characters; re-settable penalties +% ver 1.6 20-Jun-2002: +% un-double #, fix obeyed-spaces, ignore trailing %, hook for hyperref +% (\Url@HyperHook), no macros in pre-processed url string (in \Url@String), +% limit catcode change of ~. +% ver 3.0 June 2003/Nov 2003: +% \DeclareUrlCommand; make font encoding automatic (only a few inputenc characters +% are supported yet - needs refactoring); reverse penalties. +% ver 3.1 Mar 2004: +% Remove spurious spaces in \url@XXstyle commands. +% ver 3.2 June 2005: +% Fix cmsy-symbols in tt bug (from 3.0); LY1 encoding bug; Enable plain +% with miniltx (again); Define the \urldef for hyperref; Lower "sim" tilde +% a little; fix \lowercase error in \UrlSpecials handling. +% The End + +Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789 +:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/varwidth.sty b/Master/texmf-dist/tex/latex/ltxmisc/varwidth.sty new file mode 100644 index 00000000000..32c1a8fb639 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/varwidth.sty @@ -0,0 +1,302 @@ +% varwidth.sty v 0.9a Mar 2003 Donald Arseneau asnd@triumf.ca +% +% Copyright 2003 by Donald Arseneau (asnd@triumf.ca). +% This software is released under the terms of the LaTeX Project Public +% License (ftp://ctan.tug.org/tex-archive/macros/latex/base/lppl.txt). +% (Essentially: Free to use, copy, distribute (sell) and change, but, if +% changed, the name must be changed.) +% +% The varwidth environment is based on minipage, and takes the same +% parameters, but the specified width is just a maximum value -- the +% environment will be typeset with a narrower "natural" width if +% possible. +% +% In a varwidth environment, paragraph line-breaks are chosen +% according to the specified width, but each line is reset to +% match a narrower natural width, if there is one. +% +% The \narrowragged command works like \raggedright, but produces +% generally narrower lines in paragraphs, but more text in the last +% line (the lines have more-equal lengths). +% +% This version works fine, but there are still many questions about +% how it would work best. Should there be a version that avoids the +% usual minipage formatting style? +% +% Numbered equations are not handled well, especially with leqno. +% AMSmath environments have not been tried, and undoubtedly fail. +% +% To do: Extend v-list wrappers to handle all e-TeX primitives. +% (pdfTeX too?) +% Capture marks and floats, propagating them out of the box +% Support numbered equations, including ams math. +% + +\ProvidesPackage{varwidth}[2003/03/10 ver 0.9a; \space + Variable-width minipages] + +\newcommand\narrowragged{\rightskip \z@ plus .25\hsize + \@rightskip\rightskip \parfillskip\z@ plus .15\hsize + \sloppy } + +\newbox\@vwid@box + +% The varwidth environment is based on minipage, and takes the same +% parameters, but the specified width is only a limit -- a narrower +% natural width may be used. \varwidth uses \minipage. + +\def\varwidth{\let\@minipagerestore\@vwid@setup \minipage} + +% Many things may appear on vertical lists that can't be re-processed, +% so they have to be modified. + +\def\@vwid@setup{% + % several things can't appear in vertical mode, so they may get + % a \vbox wrapped around them. + \let\@bsphack\@vwid@bsphack % \label and others + \let\mark\@gobble % Marks disappear in minipages anyway + \let\@special\@vwid@special % \color and others + \let\addtocontents\@vwid@addtocontents % \addcontentsline + % Shifted boxes (\parshape,\hangindent) will have their shifts + % indicated in a separate box. + \let\@hangfrom\@vwid@hangfrom % hanging indents + \let\list\@vwid@list + \let\endtrivlist\@vwid@endtrivlist + \postdisplaypenalty\@vwid@posteqp + \predisplaypenalty\@vwid@preeqp + \def\@eqnnum{\aftergroup\@vwid@afterva\@@vwid@eqnnum}% + \global\@vwid@roff\z@ \global\@vwid@loff\z@ + % Begin an inner minipage-like vertical box (in \@tempboxa) + \let\@minipagerestore\@@vwid@minipagerestore \@minipagerestore + \setbox\@tempboxa\vbox\bgroup\begingroup + % Flag the top of the list + \penalty\@vwid@toppen +} + +\let\@@vwid@minipagerestore\@minipagerestore + +% At end of varwidth environment. +\def\endvarwidth{\par\@@par + % Handle minipage-style notes. + \ifvoid\@mpfootins\else + \vskip\skip\@mpfootins + \normalcolor + \@vwid@wrap\footnoterule + \unvbox\@mpfootins + \fi + \unskip + \endgroup\egroup % got my \@tempboxa +% {\showoutput\showbox\@tempboxa}% + % in a discarded box, sift through list measuring max width. + \begingroup\setbox\z@\vbox\bgroup +%\message{-------------------------------------------------------------}% +%\message{First pass; hsize=\the\hsize... }%{\tracingall\showlists}%% + \unvcopy\@tempboxa + \@tempdima-\maxdimen + \let\@vwid@resetb\@vwid@measure + \let\@vwid@append\relax + \sift@deathcycles\z@ + \@vwid@sift + \xdef\@vwid@{\the\@tempdima}% + \egroup\endgroup + % Done measuring. Now empty \@tempboxa onto current vertical list + % which is the contents of a minipage environment +%\message{Got natural width \@vwid@. }% + \unvbox\@tempboxa + % If the natural width is narrower, then go back through the list + % reboxing and moving everything into \@vwid@box; then spill \@vwid@box + \ifdim\@vwid@<\hsize + \hsize\@vwid@ + \setbox\@vwid@box\vbox{}% + \sift@deathcycles\z@ +%\message{----------------------------------------------------------------}% +%\message{Second pass; hsize=\the\hsize... }%{\tracingall\showlists}% + \@vwid@sift + \unvbox\@vwid@box + \fi + % end the minipage environment + \endminipage} + +% +% Here are definitions for sifting through the vertical list, either +% measuring things or reboxing them. +% +% Penalties used as signals to the vertical-list processor: + +\mathchardef\@vwid@posteqp 17321 % Penalty below equations +\mathchardef\@vwid@preeqp 17322 % Penalty above equations +\mathchardef\@vwid@postnump 17323 % Penalty below numbered equations +\mathchardef\@vwid@toppen 17324 % Penalty marking top of vertical list +\mathchardef\@vwid@offsets 17325 % Penalty below special h-offsets box +\mathchardef\@vwid@postw 17326 % Penalty below a \vbox-wrapped object + +\newcount\sift@deathcycles + +\def\@vwid@sift{% + \skip@\lastskip\unskip + \dimen@\lastkern\unkern + \count@\lastpenalty\unpenalty + \setbox\z@\lastbox +%{\showoutput\showbox\z@}% + \ifvoid\z@ \advance\sift@deathcycles\@ne \else \sift@deathcycles\z@ \fi + \ifnum\sift@deathcycles>33 + \let\@vwid@sift\relax + \PackageWarning{varwidth}{Failed to reprocess entire contents}% + \fi +%\message{\the\sift@deathcycles: skip \the\skip@; kern \the\dimen@; penalty \the\count@. }% +%\ifhbox\z@\setbox99\hbox to0pt{\unhcopy\z@}\fi % = message + \ifnum\count@=\@vwid@preeqp \@vwid@eqmodefalse\fi +%\ifnum\count@=\@vwid@preeqp \message{End equation mode. }\fi + \ifnum\count@=\@vwid@posteqp \@vwid@eqmodetrue\fi +%\ifnum\count@=\@vwid@posteqp\message{Begin equation mode. }\fi +%\if@vwid@eqmode {\showoutput\showbox\z@}\fi + \ifnum\count@=\@vwid@toppen % finished + \let\@vwid@sift\relax + \else\ifnum\count@=\@vwid@offsets + \@vwid@setoffsets + \else + \ifnum\count@=\@vwid@postw + \else + \@vwid@resetb % reset box \z@ or measure it + \fi + \@vwid@append + \fi\fi + \@vwid@sift} + +\def\@vwid@setoffsets{% + \setbox\z@=\hbox{\unhbox\z@ + \global\@vwid@roff\lastkern\unkern + \global\@vwid@loff\lastkern\unkern}% +%\message{Set offsets to \the\@vwid@loff, \the\@vwid@roff. }% +} + +\def\@vwid@append{% Append contents of box \z@ and glue to \@vwid@box + \setbox\@vwid@box\vbox{% + \unvbox\z@ + \ifdim\dimen@=\z@\else \kern\dimen@ \fi + \vskip\skip@ + \unvbox\@vwid@box + }%{\tracingall\showbox\@vwid@box}% +} + +% reset box \z@ to \hsize, applying shifts, and wrap in vbox +% Don't worry about numbered equations because we won't get +% here if there are any. +\def\@vwid@resetb{% + \setbox\z@\vbox\bgroup + \ifvoid\z@ + \else + \ifvbox\z@ + \box\z@ + \else % \hbox + \@tempdima\hsize + \advance\@tempdima-\@vwid@roff + \advance\@tempdima-\@vwid@loff + \advance\@tempdima-\p@ + \ifdim\wd\z@>\@tempdima % full-width line; rebox it +%\message{An ordinary line or alignment. }% + \hbox to\hsize + {\kern\@vwid@loff \unhbox\z@ \kern\@vwid@roff}% + \else % an equation or direct \hbox + \if@vwid@eqmode % re-center unnumbered equations +%\message{A centered equation hsize=\the\hsize. }% + \hbox to\hsize + {\hskip\@vwid@loff\@plus1fil + \unhbox\z@ \hskip\@vwid@roff\@plus1fil}% + \else % plain narrow \hbox; leave it as-is + \box\z@ + \fi\fi\fi\fi + \egroup} + +\def\@vwid@measure{% + \ifvoid\z@ + \else + % numbered equations not part of alignments can't be reset, + % so force retention of full width. + \ifnum\count@=\@vwid@postnump \ifdim\wd\z@<\linewidth + \ifdim\@tempdima<\linewidth \@tempdima\linewidth \fi + \fi\fi + \ifhbox\z@ + \setbox\z@=\hbox + {\kern\@vwid@loff \unhbox\z@ \kern\@vwid@roff}% + \fi + \ifdim\wd\z@>\@tempdima \@tempdima\wd\z@ \fi + \fi} + +\newdimen\@vwid@loff +\newdimen\@vwid@roff + +\let\@@bsphack\@bsphack +\let\@@esphack\@esphack +\let\@@esphack\@Esphack + +\def\@vwid@bsphack{\@@bsphack + \ifx\@vwid@wrap\@firstofone + \bgroup + \else + \ifvmode + \setbox\@vwid@box \vbox\bgroup \vbox\bgroup + \let\@vwid@wrap\@firstofone + \def\@esphack{\@vwid@esphack\@@esphack}% + \def\@Esphack{\@vwid@esphack\@@Esphack}% + \fi + \fi} + +\def\@vwid@esphack{\egroup + \ifx\@vwid@wrap\@firstofone\else + \egroup % end outer box + \unvbox\@vwid@box % put inner box on list without lineskip + \penalty\@vwid@postw + \fi} + +% \vbox Wrapper for misc vlist items +\long\def\@vwid@wrap{\relax + \ifvmode\expandafter\@vwid@dowrap \else \expandafter\@firstofone \fi} +\long\def\@vwid@dowrap#1{% + \setbox\@vwid@box \vbox{\vbox{\let\@vwid@wrap\@firstofone + #1}\penalty\@vwid@postw + }\unvbox\@vwid@box } + +\let\@@vwid@special\special +\let\@@vwid@addtocontents\addtocontents +\let\@@vwid@list\list +\let\@@vwid@endtrivlist\endtrivlist +\let\@@vwid@eqnnum\@eqnnum + +\long\def\@vwid@special#1{\@vwid@wrap{\@@vwid@special{#1}}} +\long\def\@vwid@addtocontents#1#2{\@vwid@wrap{\@@vwid@addtocontents{#1}{#2}}} + +\long\def\@vwid@hangfrom#1{\par + \setbox\@tempboxa\hbox{{#1}}% + \setbox\@vwid@box \vbox{\hbox{\kern\z@ \kern\z@ + }\penalty\@vwid@offsets}\unvbox\@vwid@box + \def\par{\relax\ifhmode\unskip\fi + \vadjust{\hbox{\kern\hangindent\kern\z@}\penalty\@vwid@offsets}% + \@restorepar\par}% + \hangindent \wd\@tempboxa\noindent\box\@tempboxa} + +\def\@vwid@list{\@vwid@setlist\@@vwid@list} +\def\@vwid@endtrivlist{\@vwid@setlist\@@vwid@endtrivlist} + +\def\@vwid@setlist{\relax\ifhmode \unskip\expandafter\vadjust\fi + {\setbox\@vwid@box \vbox{\hbox{% + \advance\hsize-\linewidth \advance\hsize-\@totalleftmargin + \kern\@totalleftmargin \kern\hsize}% + \penalty\@vwid@offsets}% + \unvbox\@vwid@box}} + +\newif\if@vwid@eqmode + +\def\@vwid@afterva{\vadjust{\penalty\@vwid@postnump}} + +% Should I do this? ... + +\@ifundefined{newcolumntype}{}{% + \@ifundefined{NC@rewrite@V}{ + \newcolumntype{V}[1]{% + >{\begin{varwidth}[t]{#1}\narrowragged\let\\\tabularnewline}% + l% + <{\@finalstrut\@arstrutbox\end{varwidth}}} + }{} +} + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/verbasef.sty b/Master/texmf-dist/tex/latex/ltxmisc/verbasef.sty new file mode 100644 index 00000000000..9daf21e999a --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/verbasef.sty @@ -0,0 +1,339 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% verbasef.sty +% +% This stands for VERBatim Automatic Splitting of External Files. +% +% Copyright (c) 1994 by Paul A. Thompson, All Rights Reserved. +% Copy freely as per the GNU Copyleft. +% +% Requires: +% The New Font Selection Scheme (NFSS) as implemented in LaTeX2e +% VERBATIM.STY ::: Rainer Schoepf +% VRBEXIN.STY ::: You +% However, it is based on vrbinput.sty, a style by +% Bernd Raichle which must be revised as discussed below +% in the section labeled IMPORTANT +% HERE.STY ::: David Carlisle +% +% verbasef allows you to input (subsections of a) file, print them in +% verbatim mode, while automatically breaking up the inputted lines into +% pieces of a given length, which are output as figures. These figures are +% posted using the [H] specification, which forces LaTeX to place the figure +% at the spot of invocation, rather than floating the figures to the top of +% the next page. +% +% Options for the verbasef specification include: +% o numbering of input lines +% o differential number of lines for the first page +% o specification of the font for the verbatim output +% o specification of the font for the optional line numbering +% o specification of line numbers as labels +% To use the labelling feature, non-standard approaches must be used. +% A line number will be inserted into the main .aux file with label foo, +% if the specification +% +% Vzzlabel|foo| +% +% is inserted AFTER the line which is to be indicated. Thus, if we have +% a file with the following +% +% a line +% b line +% Vzzlabel|fooa| +% c line +% Vzzlabel|foob| +% d line +% Vzzlabel|fooc| +% e line +% f line +% Vzzlabel|food| +% +% these lines will be found in the .aux file. +% \newlabel{fooa}{{2}{1}} +% \newlabel{foob}{{3}{1}} +% \newlabel{fooc}{{4}{1}} +% \newlabel{food}{{6}{1}} +% +% They can be used as any other label, for instance +% +% Using the labeling feature, pay attention to Line \ref{food} (found on +% Page \pageref{food}) to understand this radically new method. +% +% Any lines with the Vzzlabel specification will be ignored in the +% line counts. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% USING THE styLE +% +% verbasef is an adaptation of VRBSUBFILE, from Norman Walsh. +% I fully acknowledge Mr./Dr. Walsh as the imprimature of the code ensconced +% herein, but have included other features as indicated above. +% +% Comments and suggestions always welcome. +% Paul A. Thompson +% Department of Psychiatry, Data Analysis and Statistics Section +% Case Western Reserve University +% Cleveland, OH 44106 +% +% AudioNet: (216) 844-8946 +% InterNet: pat@po.cwru.edu +% +% User interface: +% VautoSubF[#1]#2#3#4#5#6 +% Input lines #2 to #3 of file #4. If present, #1 indicates which lines +% should be numbered. For example, if #1 is 5, lines 5, 10, 15, etc. +% will be numbered. By default, lines are not numbered at all. +% #5 is figure caption, and #6 is figure label. +% +% VautoSfFont[#1]#2 +% Use font #2 for verbatim input lines and, if present, use font #1 for +% line numbers. By default, #2 is \tt and #1 is \rm\tiny. +% +% VautoPl#1 +% Placement of the figure (either H or some other placement character) +% By default, placement is H (immediate here, here.sty) +% (This currently does not function. All placement is done using the +% H specification.) +% +% VautoLines[#1]{#2} +% #2 is number of lines per page. If #1 is included, it is the number of +% lines for the first page. If not, #1=#2 +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT +% IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT +% IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% In order to use the verbasef.sty file, VRBINPUT.STY must be MODIFIED +% and given a NEW NAME. Here are instructions for modification: +% +% You must do EITHER 1-4 below OR 5 below to get verbasef to run properly. +% +% 1. Obtain vrbinput.sty from the standard distribution channels. The file +% should have the following characteristics: +% +% \fileversion{v1.0b} +% \filedate{91/06/30} +% \docdate{91/08/05} +% +% 2. Copy vrbinput.sty to a file vrbexin.sty. THIS MUST BE DONE PRIOR TO +% EDITING ANY FILE. +% +% 3. Edit the file vrbexin.sty. Please don't edit the file vrbinput.sty. +% Change Line 90 from +% \verbatim@startline +% to +% \verbatim@start +% as shown in the fragment of code from Lines 89-92 below. +% +% \def\verbatim@readfile#1{% +% \verbatim@start +% \openin\verbatim@in@stream #1\relax +% \ifeof\verbatim@in@stream +% +% +% 4. VERY IMPORTANT. CHANGE ALL OCCURRANCES of vrbinput, in titles, typeout +% sections and credits to vrbexin. Remove all references to the original +% author, Bernd Raichle, as he is not the author of the style file vrbexin. +% You may substitute my name for Mr. Raichle if you wish. +% +% 5. Obtain vrbexin.sty directly from the same subdirectory that verbasef was +% found in. +% +% 6. Place this .sty file in a place searched by TeX, on the TEXINPUT path. +% +% After I can figure out the docstrip utility, I will do this stuff myself. +% +% Note: As is standard practice in the TeX community, any modifications in +% .sty files must be given new names. Thus, it is certainly vitally important +% that the modifications in vrbinput.sty be done in the file named +% vrbexin.sty, not in the original which I did not write. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT +% IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT +% IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}% +\RequirePackage{vrbexin}% +\RequirePackage{verbatim}% +\RequirePackage{here}% +\def\fileversion{v1.1}% +\def\filedate{95/01/20}% +\typeout{Style-Option: `verbasef' \fileversion \space <\filedate> (ndw)}% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +\newcounter{g@nu} +\newcommand{\incr@macv}[2]{ +\setcounter{g@nu}{#1}\addtocounter{g@nu}{#2}% +\global\edef#1{\theg@nu}% +} +\gdef\Vauto@LinePage{0}% % lines/page counter +\gdef\Vauto@NP{0}% % Number of pages +\gdef\Vauto@Fignum{0}% % Figure number - retain over figures +\gdef\Vauto@Pagea{0}% % # lines page 1 +\gdef\Vauto@LineNo{0}% % current line number +\gdef\Vauto@LineMod{0}% % modulo to print on +\gdef\Vauto@LineLoop{0}% % loop count in line number (1..Mod) +\gdef\Vauto@LineStart{0}% % first line to print +\gdef\Vauto@LineCount{0}% % number of lines to print +\gdef\Vauto@NotLabel{0}% % Printable - not a label +\gdef\Vauto@PFlag{0}% % print this line? +% +%%%% Default table placement, and macros to change table placement +\def\Vauto@Plx{H}\def\Vauto@Pl#1{\def\Vauto@Plx{#1}}\def\VautoPl{\Vauto@Pl}% +%%%% Default verbatim font and verbatim line number font +\def\Vauto@sfFont{\tt}\def\Vauto@sfLNF{\rm\tiny}% +% +%%%% Macros to change fonts +\def\Vauto@sbf[#1]#2{\def\Vauto@sfFont{#2}\def\Vauto@sfLNF{#1}}% +\def\Vauto@svf#1{\def\Vauto@sfFont{#1}}% +\def\VautoSfFont{% + \@ifnextchar[{\Vauto@sbf}{\Vauto@svf}%] % This is for bracket match +}% % ] has no effect on code +%%%% Macros to set number of lines per figure +\def\Vauto@LPP{46}\def\Vauto@LPPa{46}% +\def\Vauto@TwoLPP[#1]#2{\def\Vauto@LPP{#2}\def\Vauto@LPPa{#1}}% +\def\Vauto@OneLPP#1{\def\Vauto@LPP{#1}\def\Vauto@LPPa{#1}}% +\def\VautoLines{% + \@ifnextchar[{\Vauto@TwoLPP}{\Vauto@OneLPP}%] % Bracket match +}% +\def\VautoSubFF{\@ifnextchar[{\Vauto@sbf}{\Vauto@svf}%] +}% +\def\xxparse Vzzlabel|#1|{% +\immediate\write\@mainaux{\string\newlabel{#1}{{\Vauto@LineNo}{\thepage}}}% +}% +\def\ifsubstr#1#2#3#4%% #1=string #2=substring, #3=yes, #4=no +{% + \def\tempa##1#2##2\over_##3\end{% + \ifx##3% % can't parse + \gdef\Vauto@NotLabel{1}% + \else% can parse + \gdef\Vauto@NotLabel{0}% + \xxparse #1% + \fi% +}% +\tempa#1\over_\over#2\over___\end% +}% +% +%%Macro which sets beginfigure and endfigure constructions +% +\def\Vauto@etab#1#2#3{% {caption}{label}{prtype}% + \ifnum#3<3% 1 or 2 qualifies here + \begingroup \normalsize\rm\selectfont% + \ifnum\Vauto@NP=1 \caption{#1}\label{#2}% + \global\edef\Vauto@Fignum{\thefigure}% + \else \vspace{2em}% + \centerline{Figure \Vauto@Fignum: #1 (cont.)}% + \fi% + \endgroup% + \end{figure}% + \def\Vauto@PrCnt{\Vauto@LPP}% + \ifnum#3=2 \setcounter{figure}{\Vauto@Fignum}\fi% + \fi% + \ifnum#3>1% 2 or 3 qualifies here + \begin{figure}[H]% +% \begin{figure}[\theVauto@Plx]% + \incr@macv{\Vauto@NP}{1}% + \gdef\Vauto@LinePage{0}% + \gdef\Vauto@PFlag{1}% + \fi% + \catcode`\^^M9% +}% +% +%%%% Internal macro that does the work... +\def\Vauto@sf#1#2#3{\begingroup% + \def\verbatim@start{\Vauto@etab{#2}{#3}{3}}% + \def\verbatim@finish{\Vauto@etab{#2}{#3}{1}}% + \def\verbatim@font{\Vauto@sfFont\selectfont}% + \gdef\Vauto@LineNo{0}% + \gdef\Vauto@LineLoop{0}% + \parskip=0pt% + \def\verbatim@processline{% + \edef\subz{\noexpand\ifsubstr{\the\verbatim@line}{Vzzlabel}{1}{0}}\subz% + \ifnum\Vauto@NotLabel=1% + \incr@macv{\Vauto@LineNo}{1}% + \incr@macv{\Vauto@LineLoop}{1}% + \gdef\Vauto@PFlag{1}% + \ifnum\Vauto@LineStart>0% we haven't reached the first line yet... + \gdef\Vauto@PFlag{0}% + \incr@macv{\Vauto@LineStart}{-1}% + \else% + \ifnum\Vauto@LineCount=0% we're out of the "printable" region + \gdef\Vauto@PFlag{0}% + \else% + \incr@macv{\Vauto@LineCount}{-1}% decrease the line count + \fi% + \fi% + % debugging... + %\typeout{Start: \theVauto@LineStart, Count: \theVauto@LineCount, + % Print: \theVauto@PrintFlag, Loop: \theVauto@LineLoop, + % Mod: \theVauto@LineMod}% + \ifnum\Vauto@PFlag=1% + \leavevmode% + \ifnum\Vauto@LineLoop=\Vauto@LineMod% + \llap{{\Vauto@sfLNF\selectfont \Vauto@LineNo}% + \ \hskip\@totalleftmargin}% + \gdef\Vauto@LineLoop{0}% + \else% + \llap{\phantom{\Vauto@sfLNF\selectfont 0}\ % + \hskip\@totalleftmargin}% + \fi% + \the\verbatim@line\par% + \incr@macv{\Vauto@LinePage}{1}% + \else% + \ifnum\Vauto@LineLoop=\Vauto@LineMod% + \gdef\Vauto@LineLoop{0}% + \fi% + \fi% + \ifnum\Vauto@LinePage=\Vauto@PrCnt \Vauto@etab{#2}{#3}{2}\fi% + \fi% End of the loop printing non-labels + }% + \verbatiminput{#1} \endgroup}% +% +\def\Vauto@sfP#1#2#3#4#5{% +\begingroup% + \gdef\Vauto@PrCnt{\Vauto@LPPa}% + \gdef\Vauto@NP{0}% % Number of pages + \gdef\Vauto@LineMod{-1}% + \gdef\Vauto@LineStart{#1}% + \gdef\Vauto@LineCount{#2}% + \incr@macv{\Vauto@LineCount}{-\Vauto@LineStart}% + \incr@macv{\Vauto@LineCount}{1}% + \incr@macv{\Vauto@LineStart}{-1}% + \Vauto@sf{#3}{#4}{#5}% + \catcode`\^^M`\^^M% +\endgroup% +}% +\def\Vauto@sfN[#1]#2#3#4#5#6{% +\begingroup% + \gdef\Vauto@PrCnt{\Vauto@LPPa}% + \gdef\Vauto@NP{0}% % Number of pages + \gdef\Vauto@LineMod{#1}% + \gdef\Vauto@LineStart{#2}% + \gdef\Vauto@LineCount{#3}% + \incr@macv{\Vauto@LineCount}{-\Vauto@LineStart}% + \incr@macv{\Vauto@LineCount}{1}% + \incr@macv{\Vauto@LineStart}{-1}% + \Vauto@sf{#4}{#5}{#6}% + \catcode`\^^M`\^^M% +\endgroup% +}% +\def\VautoSubF{% + \@ifnextchar[{\Vauto@sfN}{\Vauto@sfP}%] +}% +\endinput% +%%%% EOF diff --git a/Master/texmf-dist/tex/latex/ltxmisc/verbdef.sty b/Master/texmf-dist/tex/latex/ltxmisc/verbdef.sty new file mode 100644 index 00000000000..68421134766 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/verbdef.sty @@ -0,0 +1,68 @@ +% verbdef.sty v0.2 -- Robin Fairbairns 2000/10/06 +\ProvidesPackage{verbdef}[2000/10/06 v0.2 define verbatim csnames] + +% This package provides a single command \verbdef +% +% Usage: \verbdef\test|verbatim text| +% \verbdef*\testar{with visible spaces} +% +% \test (or \testar) above will be defined as robust commands that +% expand to typeset their `verbatim text' argument in the usual +% verbatim font (using the visible space symbol in the * case) +% +% The verbatim text argument may be delimited in the same was as the +% argument of a \verb command (see definition of \test above) or using +% braces (see definition of \testar command above) +% +% Note: if the command you're defining with \verbdef is to be used in +% a \section-type command, or a \caption, it's going to appear in the +% table of contents, or list of whatevers; in this case you must +% define the command *before* the \tableofcontents command (or +% whatever). I recommend defining the commands in the preamble of +% your document. + +% This program may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.1 +% 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.1 or later is part of all distributions of LaTeX +% version 1999/06/01 or later. +% +% This program consists of the file verbdef.sty + +\newif\ifverbdef@nostar +\def\verbdef{\verbdef@nostarfalse + \@ifstar\@sverbdef\@verbdef} +\def\@verbdef{\verbdef@nostartrue\@sverbdef} + +% set up robustness of the command to be defined, set conditions for +% reading verbatim text +\def\@sverbdef#1{\edef\verbdef@tempa{\expandafter\@gobble\string#1}% + \edef#1{\noexpand\protect + \expandafter\noexpand\csname\verbdef@tempa\space\endcsname}% + \begingroup + \verb@eol@error + \let\do\@makeother \dospecials + \toks@{\verbatim@font\@noligs}% + \ifverbdef@nostar + \@vobeyspaces + \toks@\expandafter{\the\toks@\frenchspacing}% + \fi + \@verb@def} + +% +\def\@verb@def#1{% + \ifnum`#1=`\{\relax + \catcode`\}\active + \lccode`\~`\}% + \else + \catcode`#1\active + \lccode`\~`#1% + \fi + \lowercase{% + \def\@tempa##1~{% + \expandafter\xdef\csname\verbdef@tempa\space\endcsname{% + {\the\toks@##1}}}}% + \afterassignment\endgroup + \@tempa} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/version.sty b/Master/texmf-dist/tex/latex/ltxmisc/version.sty new file mode 100644 index 00000000000..9e8a305a84f --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/version.sty @@ -0,0 +1,56 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Version control macros. These let you define environments whose contents +% will be optionally added to or deleted from the text when you run LaTeX. +% Usage: place either of the following near the start of your file: +% \includeversion{NAME} +% \excludeversion{NAME} +% Here, "NAME" is any name you choose. The first one indicates that text +% between \begin{NAME} and \end{NAME} will be processed in the normal way. +% The second indicates that text between \begin{NAME} and \end{NAME} will +% be totally deleted. +% You can define environments for as many versions as you want. +% A ``comment'' environment has already been pre-defined for you with +% \excludeversion{comment}; you can override this using \includeversion. +% +% Example: +% \includeversion{abridged}\excludeversion{unabridged} +% Text for the +% \begin{abridged} +% short +% \end{abridged} +% \begin{unabridged} +% long and really longwinded, opaque and boring +% \end{unabridged} +% version of the paper. Punctuation works correctly\begin{unabridged} +% because sphack is used\end{unabridged}. +% \begin{comment} This is deleted by default. \end{comment} +% +% Stephen Bellantoni 1990, loosely based on "annotation.sty" by Tom Hofmann. +% +% Additional Notes: This package still works in LaTeX2e. Large +% tracts of excluded text will likely cause a "TeX capacity exceeded" +% error though. See also comment.sty, verbatim.sty, optional.sty. +% -- Donald Arseneau April, 2000 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begingroup +\catcode`@=11\relax% +\catcode`{=12\relax\catcode`}=12\relax% +\catcode`(=1\relax \catcode`)=2\relax% +\gdef\includeversion#1(% + \expandafter\gdef\csname #1\endcsname% + ()% + \expandafter\gdef\csname end#1\endcsname% + ()% +)% +\gdef\excludeversion#1(% + \expandafter\gdef\csname #1\endcsname% + (\@bsphack\catcode`{=12\relax\catcode`}=12\relax\csname #1@NOTE\endcsname)% + \long\expandafter\gdef\csname #1@NOTE\endcsname ##1\end{#1}% + (\csname #1END@NOTE\endcsname)% + \expandafter\gdef\csname #1END@NOTE\endcsname% + (\@esphack\end(#1))% +)% +\endgroup +\excludeversion{comment} + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/vertbars.sty b/Master/texmf-dist/tex/latex/ltxmisc/vertbars.sty new file mode 100644 index 00000000000..9a26bc72c2a --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/vertbars.sty @@ -0,0 +1,89 @@ +% vertbars.sty The VERTical BARS package +% An extension to the lineno package +% to put vertical rules at left (right) +% of lines instead of numbers +% The package requires the lineno package +% author: Peter Wilson, CUA (now at peter.r.wilson@boeing.com) +% Copyright Peter R Wilson 2000 +% released under the LaTeX Project Public License +% +% Instructions are at the end of this file, after \endinput + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{vertbars}[2000/07/25 v1.0 vertical bars] + +\newcommand{\LNenv}{runninglinenumbers} +\DeclareOption{switch}{% + \renewcommand{\LNenv}{runningpagewiselinenumbers} + \PassOptionsToPackage{\CurrentOption}{lineno} +} + +\DeclareOption{switch*}{% + \renewcommand{\LNenv}{runningpagewiselinenumbers} + \PassOptionsToPackage{\CurrentOption}{lineno} +} + +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}} +\ProcessOptions\relax +\RequirePackage{lineno} + +%%% code to add stuff at start and end of a pre-existing zero argument macro +\newcommand{\addtodef}[3]{\begingroup + \@temptokena{#2}% + \toks@\expandafter{#1#3}% + \edef\x{\endgroup + \def\noexpand#1{\the\@temptokena \the\toks@}}% + \x +} + +\newlength{\pwvbbl} +\setlength{\pwvbbl}{\baselineskip} % it's useful to preserve \baselineskip +\newlength{\barwidth} % width of bars +\setlength{\barwidth}{0.4pt} +\newlength{\barspace} % horizontal space between bars +\setlength{\barspace}{0.5\linenumbersep} + +\newcommand{\addtomakeLNL}{{\rule[-0.25\pwvbbl]{\barwidth}{1.1\pwvbbl}\hskip\barspace\relax}} +\newcommand{\pwvbLNL}{} +\newenvironment{vertbar}{\begin{\LNenv}% + \addtodef{\pwvbLNL}{}{\addtomakeLNL}% + \let\LineNumber\pwvbLNL% + }{\end{\LNenv}} + +\endinput + +% Instructions: +% +% Read the documentation for the lineno package. +% +% The vertbars package takes the same options as the lineno package. +% In particular, the switch and switch* options control which side +% of the page any bars will be printed. The package automatically +% calls the lineno package, so you just need: +% \usepackage[...]{vertbars} +% +% The package provides one environment, namely the vertbar environment. +% The vertbar environment is equivalent to the linenumbers environment +% except that a vertical bar replaces the line number. Text paragraphs +% within a vertbar environment will be marked with a vertical bar in +% the margin. Nested environments generate multiple marginal bars. +% +% The width of the bars is controlled by the value of \barwidth, which +% is initialised to 0.4pt, and can be changed via \setlength. +% +% The horizontal seperation between adjacent bars is controlled by +% the value of \barspace, which is initialised to 0.5\linenumbersep, and can +% be changed via \setlength. (\linenumbersep is a command from the +% lineno package that controls the spacing between line numbers and the +% text body). +% +% NOTE: Bars can only be applied to complete paragraphs. For bars +% between arbitrary points, use the changebar package. Any limitations +% of the lineno package apply equally to the vertbars package. +% +% Peter W. +% + + + + diff --git a/Master/texmf-dist/tex/latex/ltxmisc/vrbexin.sty b/Master/texmf-dist/tex/latex/ltxmisc/vrbexin.sty new file mode 100644 index 00000000000..f9a15fdc5ad --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/vrbexin.sty @@ -0,0 +1,80 @@ +%% +%% This is file `vrbexin.sty', modified from vrbinput.sty +%% +%% The original source files were: +%% +%% vrbinput.doc +%% +%% Copyright (C) 1994 by Paul Thompson +%% +%% IMPORTANT NOTICE: +%% +%% You are not allowed to change this file. You may however copy this file +%% to a different name and then change this copy. +%% +%% You are NOT ALLOWED to take money for the distribution or use of this +%% file (or a changed version) except for some nominal charge for copying etc. +%% +%% +\def\fileversion{v1.0b} +\def\filedate{94/06/30} +\def\docdate{94/06/30} +%% \CheckSum{82} +%% \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 \~} +%% +%% Style-option `vrbexin' to use with LaTeX-2e +%% and style-option `verbatim' (by Rainer Sch\"opf) +%% Copyright (C) 1994 by Paul Thompson, all rights reserved. +\@ifundefined{verbatim@readfile}{}{\endinput} +\typeout{Style-Option: `vrbexin' \fileversion \space <\filedate> (br)} +\typeout{English Documentation \@spaces\@spaces\space\space <\docdate> (br)} +\@ifundefined{verbatim@@@}{\input{verbatim.sty}}{} +\newread\verbatim@in@stream +\ifnum\verbatim@in@stream=\@ne + \csname newread\endcsname\verbatim@in@stream +\fi +\def\verbatim@readfile#1{% + \verbatim@start + \openin\verbatim@in@stream #1\relax + \ifeof\verbatim@in@stream + \typeout{No file #1.}% + \else + \expandafter\endlinechar\expandafter\m@ne + \expandafter\verbatim@read@file + \expandafter\endlinechar\the\endlinechar\relax + \closein\verbatim@in@stream + \fi + \verbatim@finish +} +\def\verbatim@read@file{% + \read\verbatim@in@stream to\next + \ifeof\verbatim@in@stream + \else + \expandafter\verbatim@addtoline\expandafter{\next}% + \verbatim@processline + \verbatim@startline + \expandafter\verbatim@read@file + \fi +} +\def\verbatiminput{\begingroup + \@ifstar{\verbatim@input\relax}% + {\verbatim@input{\frenchspacing\@vobeyspaces}}} +\def\verbatim@input#1#2{\@verbatim #1\relax + \verbatim@readfile{#2}\item[]\endtrivlist\endgroup\@doendpe} +\endinput +%% +%% End of file `vrbexin.sty'. diff --git a/Master/texmf-dist/tex/latex/ltxmisc/vruler.sty b/Master/texmf-dist/tex/latex/ltxmisc/vruler.sty new file mode 100644 index 00000000000..ec38f478f12 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/vruler.sty @@ -0,0 +1,396 @@ +% VERTICAL RULERS 2.3 Oct 1996 for Latex 2.09 or 2e, plain TeX, amsTeX +% by Zhuhan JIANG, University of New England, Australia NSW 2351. +% Email: zhuhan@neumann.une.edu.au +% +% PURPOSE: Make a vertical ruler, numbering consecutively so that +% any part of an article can be pinpointed immediately. +% Move vruler freely up and down, left and right. +% +% There are no packages to my knowledge that number lines +% one by one without missing certain lines, particularly +% when there are many maths equations in the text. So vruler +% is a good alternative for people writing text of versatile +% format or lots of maths formulas. +% COMMANDS: +% \setvruler[<SCALE>][<INITIAL_COUNT>][<STEP>][<DIGITS>][<MODE>]% +% [<ODD_HSHIFT]>][<EVEN_HSHIFT>][<VSHIFT>][<HEIGHT>] +% <general LaTeX material-01> +% \unsetvruler % optional +% <general LaTeX material-02> +% +% <SCALE> distance between two consecutive vruler markings +% <INITIAL_COUNT> first marking reading +% <STEP> is the line count increment +% <DIGITS> number of digits required for ruler markings +% <MODE> =0 if each page has same vruler marking, =1 if otherwise +% <ODD_HSHIFT> horizontal shift for odd pages +% from the default value for the vruler +% <EVEN_HSHIFT> horizontal shift for even pages +% from the default value for the vruler +% <VSHIFT> vertical shift from default value for vruler +% <HEIGHT> height of vertical ruler +% +% \vrulercount - next mark reading on the vertical ruler +% +% \setdefault{cmdname}{n}{default_1}{..}{default_n} (re)set macro +% \cmdname[#1][..][#n] to take default_1 to default_n respectively, +% so that \cmdname[][xy] is same as \cmdname[default_1][xy][default..]. +% You don't need to use \setdefault unless you would like to change +% the default setting for macros in vruler.sty or elsewhere. +% +% DEFAULTS: +% The parameters of \setvruler admit defaults. +% Hence e.g. \setvruler alone is same as +% \setvruler[10pt][1][1][4][1][0pt][0pt][0pt][\textheight] +% and e.g. \setvruler[][20] is same as \setvruler[10pt][20] +% +% NOTES: +% 1. If you are using multicol.sty, then you might want to move +% the vruler into the center to separate the columns. +% +% 2. If you use \topskip other than the default value, then +% you will have to alter <VSHIFT> and <HEIGHT> parameters +% in \setvruler accordingly (which is simple). +% +% 3. It is best to choose baselineskip as <SCALE> so that line +% synchronisation is often optimal. Use e.g. 5+ to denote +% the line immediately after marking number 5 if necessary. +% +% 4. In twosided book style in LaTeX2e, the initial numbering +% of title page via \begin{titlepage} is actually onepage +% away. To overcome this, either do not include title page in +% the vruler environment, or set initial number #2 +% to a number (a page ahead) so that the resulting +% initial number is what one needs. +% +% 5. Version 1.0 of VRULER.STY for LaTeX is released in +% July 1993. +% +% EXAMPLE: see end of this file. +% You may run the example by simply removing the line +% containing \endinput +% +%BEGINMACROS +% +\ifx\VrulerDefined\undefined\let\next\relax\else +\message{NOT reloaded}\let\next\endinput\fi\next +\xdef\VrulerDefined{}% avoid TeX output routine manipulated twice. +% +\message{2.3 <24/10/96>}% +% +{\catcode`\@=11\relax \def\temp@macro{\space\space\space\space}% +\wlog{\temp@macro VRULER version 2.3 Octorber 1996 By Z Jiang}% +\wlog{\temp@macro University of New England, Australia}% +\wlog{\temp@macro Email: zhuhan@neumann.une.edu.au}}% +\xdef\EntryVruler{\the\catcode`\@}\catcode`\@=11\relax % SAVE @'s STATUS +\let\temp@@@macro=\wlog\def\wlog#1{}% +% +\newdimen\temp@dim \newdimen\b@xheight\newdimen\lineh@ight +\newbox\outputb@x\newbox\bufferbox\newbox\tempb@x +\newcount\refn@\newcount\tot@l\newcount\rulercount +\let\@outputpage@backup\@outputpage \let\plainoutput@backup\plainoutput +% +% NUMBER with left flushed zeros \fillzeros[<WIDTH>]<NUMBER> +\newcount\temp@@ \newcount\temp@ +\def\fillzeros[#1]#2{\temp@@=#2\relax\ifnum\temp@@<0\temp@@=-\temp@@\fi +\temp@=1 % +\loop\ifnum\temp@@<10 \else \divide\temp@@ by 10 \advance\temp@ by 1 \fi + \ifnum\temp@@=10\relax\temp@@=11\relax\fi \ifnum\temp@@>10 \repeat +\ifnum#2<0\advance\temp@1\relax-\fi +\loop\ifnum\temp@<#1\relax0\advance\temp@1\relax\fi \ifnum\temp@<#1 \repeat +\temp@@=#2\relax\ifnum\temp@@<0\temp@@=-\temp@@\fi \relax\the\temp@@}% +% +% PLAIN TEX adjustment +\ifx\textheight\undefined + \newdimen \textheight \newdimen \textwidth \textheight=\vsize \textwidth=\hsize + \font\tiny=cmr5 \let\c@page\pageno \def\oddsidemargin{0pt}% + \let\evensidemargin\oddsidemargin \def\headsep{2\topskip}% +\fi +% +% \makevruler[<SCALE>][<INITIAL_COUNT>][<STEP>][<DIGITS>][<HEIGHT>] +\def\makevruler[#1][#2][#3][#4][#5]{\begingroup\offinterlineskip +\textheight=#5\vbadness=10000\vfuzz=120ex\overfullrule=0pt% +\global\setbox\bufferbox=\vbox to \textheight{% +{\parskip=0pt\hfuzz=150em\b@xheight=\textheight +\lineh@ight=#1\global\rulercount=#2% +\tot@l\b@xheight\divide\tot@l\lineh@ight\advance\tot@l2% +\refn@1\vskip-\lineh@ight\vskip1ex% +\loop\setbox\tempb@x=\hbox to0cm{{\tiny\hfil\fillzeros[#4]\rulercount}}% +\ht\tempb@x\lineh@ight\dp\tempb@x0pt\box\tempb@x\break +\advance\refn@1\global\advance\rulercount#3\relax +\ifnum\refn@<\tot@l\repeat}}\endgroup}% +% +% MAKE VRULER into \box\outputb@x +\def\SET[#1][#2][#3][#4][#5][#6][#7][#8][#9]{% +\ifRuler@Started\else\global\rulercount=#2\fi \global\Ruler@Startedtrue +\begingroup\hbadness=10000\hfuzz=150em +\ifnum#5=0\makevruler[#1][#2][#3][#4][#9]\else +\makevruler[#1][\rulercount][#3][#4][#9]\fi\endgroup +\begingroup\vfuzz=120ex\vbadness=10000% +\global\setbox\outputb@x=\vbox{\b@xheight=\ht\bufferbox +\hbox{\hskip-50pt % default initial adjustment + \advance\b@xheight#8\lower\b@xheight% + \hbox{\ifodd\c@page\hskip#6\else\hskip#7\fi \copy\bufferbox}\nobreak + \hskip50pt \nobreak \ifodd\c@page \hskip-#6 \else\hskip-#7 \fi \nobreak + \lower\ht\tempb@x\hbox{\box\tempb@x}}}\endgroup }% +% +\newtoks\toksone\newtoks\tokstwo\newtoks\toksthree +\newtoks\toksfour\newtoks\toksfive \newif\ifRuler@Started \Ruler@Startedfalse +\def\set@vruler[#1][#2][#3][#4][#5][#6][#7][#8][#9]{% +\ifx\pageno\undefined % this is considered as LaTeX + % we assume all LaTeX versions have \@outputpage in the form of + % \@outputpage= ...\vbox{ ... \vbox{...}...}... , where 2nd \vbox + % contains the true content. + \toksfive=\expandafter{\@outputpage\s@ftymark}%temp toks + \long\def\parse@macro ##1\vbox##2##3\s@ftymark{% + \def\part@@one{##1}\def\part@@two{##2}\def\part@@three{##3}}% + \expandafter\parse@macro\the\toksfive + \let\part@one\part@@one \let\part@five\part@@three + \toksfive=\expandafter{\part@@two\s@ftymark}% + \expandafter\parse@macro\the\toksfive + \let\part@two\part@@one \let\part@three\part@@two \let\part@four\part@@three + \toksone=\expandafter{\part@one}\tokstwo=\expandafter{\part@two}% + \toksthree=\expandafter{\part@three}\toksfour=\expandafter{\part@four}% + \toksfive=\expandafter{\part@five}% +% +\edef\@outputpage{\the\toksone \noexpand\vbox{\the\tokstwo \noexpand\vbox{% + \noexpand\SET[\noexpand#1][\noexpand#2][\noexpand#3][\noexpand#4][\noexpand#5][\noexpand#6][\noexpand#7][\noexpand#8][\noexpand#9]% + \noexpand\temp@dim=\noexpand\textheight + \noexpand\advance\noexpand\temp@dim by \noexpand\headsep + \noexpand\hbox{% box things together + \noexpand\rlap{\noexpand\raise\temp@dim\box\outputb@x}% + \noexpand\setbox\noexpand\tempb@x=\noexpand\vbox{\the\toksthree}% + \noexpand\box\noexpand\tempb@x}\the\toksfour}}\the\toksfive}% +% +\else % now for plain TeX +\def\plainoutput{\textheight=\vsize \SET[#1][#2][#3][#4][#5][#6][#7][#8][#9]% + \setbox\tempb@x\vbox{\makeheadline\pagebody\makefootline}%from plain.tex + \shipout \vbox {\hbox{\hskip 15pt + \rlap{\temp@dim=\textheight\advance\temp@dim by \headsep + \raise\temp@dim\box\outputb@x }\hskip-15pt \box\tempb@x }}% + \advancepageno \ifnum\outputpenalty>-\@MM \else\dosupereject\fi }% +\fi}% +% +\def\unsetvruler{\Ruler@Startedfalse \let\@outputpage\@outputpage@backup + \let\plainoutput\plainoutput@backup}% +% +\ifx\new@measures\undefined\let\setvruler\set@vruler\fi +% +% LEAVE MACROS +\let\wlog\temp@@@macro\let\temp@@@macro\undefined@ +\catcode`\@=\EntryVruler\relax +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% if you delete everything below, the macros are still valid, +% except that you have to specify all the macro parameters for +% \setvruler explicitly and completely +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +\xdef\EntryVruler{\the\catcode`\@}\catcode`\@=11\relax +% +% NEW MEASURES etc (parameter defaulting mechanism given by macros below) +\def\new@measures{% + \def\temp@@macro##1##2##3{\expandafter\ifx\csname ##3temp##2##1\endcsname + \relax\edef\next{\noexpand\csname new##1\noexpand\endcsname + \csname ##3temp##2##1\endcsname}% + \else\let\next\relax\fi\next}% + \def\temp@macro##1{% + \temp@@macro{##1}{@}{}\temp@@macro{##1}{@@}{}\temp@@macro{##1}{@@@}{}}% + \temp@macro{count}\temp@macro{toks}\temp@macro{box}\temp@macro{read}% + \temp@@macro{if}{@}{if}\temp@@macro{if}{@@}{if}\temp@@macro{if}{@@@}{if}% + \def\temp@@macro##1{\expandafter\ifx\csname temp##1dim\endcsname + \relax\edef\next{\noexpand\csname newdimen\noexpand\endcsname + \csname temp##1dim\endcsname}% + \else\let\next\relax\fi\next}% + \temp@@macro{@}\temp@@macro{@@}\temp@@macro{@@@}% +}% +\let\temp@@@macro=\wlog\def\wlog#1{}\new@measures +% +%%% GENERAL STACK +\def\make@STKcount{\csname newcount\endcsname + \STKcount\global\STKcount=0\relax}% +\ifx\STKcount\undefined@ + \def\next{\make@STKcount}\else\def\next{}\fi +\next % ensures stack pointer not flushed if this piece of code + % is loaded again +% +\long\def\push#1{\global\advance\STKcount1\relax +\expandafter\gdef\csname STK\the\STKcount\string~\endcsname{#1}}% +% +\def\popnil{\expandafter\let\expandafter\temp@macro + \csname STK\the\STKcount\string~\endcsname + \ifnum\STKcount>0\global\expandafter\let + \csname STK\the\STKcount\string~\endcsname=\undefined@ + \global\advance\STKcount-1% + \else + \def\temp@macro{}\global\STKcount=0% + \fi\relax % \temp@macro for pop +}% +% +\def\pop{\popnil\temp@macro}% +% +%% GET PARAMETERS +\long\def\get@nepara[#1][#2]{{\def\next@{#2}% +\ifx\next@\empty\push{#1}\else\push{#2}\fi}\ag@in}% +% +\long\def\get@para\left@#1\right@{% +\def\check@{% + \ifx[\next@ \def\full@####1{\get@nepara[#1]####1}% + \else \def\full@{\get@nepara[#1][#1]}\fi + \full@}% +\futurelet\next@\check@}% +% +\long\def\do@nepara\left@#1\right@#2\p@r@end{% +\gdef\p@r@data{#2}\global\advance\p@r@count1\get@para\left@#1\right@}% +% +\def\ag@in{\ifx\p@r@data\empty \def\next@{\relax +\getp@r@s\run@CMD}\else +\def\next@{\expandafter\do@nepara\p@r@data\p@r@end}\fi +\next@}% +% +\def\run@CMD{\csname STK\the\STKcount\string~\endcsname}% +% +\def\num@to@word#1{\ifcase #1 \or + \def\temp@macro{one}\or \def\temp@macro{two}\or + \def\temp@macro{three}\or \def\temp@macro{four}\or + \def\temp@macro{five}\or \def\temp@macro{six}\or + \def\temp@macro{seven}\or \def\temp@macro{eight}\or + \def\temp@macro{nine}\else \def\temp@macro{}\fi +\temp@toks=\expandafter{\temp@macro}}% +% +\temp@@count=1 % make nine newtoks, if they don't already exist +\loop \num@to@word{\temp@@count}% + \expandafter\ifx\csname p@r@\the\temp@toks\endcsname\relax + \temp@@toks={newtoks}\expandafter\csname\expandafter\the + \expandafter\temp@@toks\expandafter\endcsname + \csname p@r@\the\temp@toks\endcsname\fi + \advance\temp@@count by 1 \ifnum\temp@@count<10 \repeat +% +\ifx\p@r@count\undefined \newcount\p@r@count\fi +\long\def\st@ckparas#1\p@r@end{% +\global\p@r@count=0\gdef\p@r@data{#1}\ag@in}% +% +% PARAMETER ASSIGNMENT % use \temp@count +\def\getp@r@s{\temp@count=\p@r@count +{\loop + \ifnum\temp@count>0 % + \expandafter\let\expandafter + \temp@macro\csname STK\the\STKcount\string~\endcsname + \ifcase\temp@count + \or \global\p@r@one=\expandafter{\temp@macro}% + \or \global\p@r@two=\expandafter{\temp@macro}% + \or \global\p@r@three=\expandafter{\temp@macro}% + \or \global\p@r@four=\expandafter{\temp@macro}% + \or \global\p@r@five=\expandafter{\temp@macro}% + \or \global\p@r@six=\expandafter{\temp@macro}% + \or \global\p@r@seven=\expandafter{\temp@macro}% + \or \global\p@r@eight=\expandafter{\temp@macro}% + \or \global\p@r@nine=\expandafter{\temp@macro}% + \else \errmessage{Parameter capacity exceeded.}% + % this should never happen: TeX's max para no. is 9 + \fi + \global\expandafter\let + \csname STK\the\STKcount\string~\endcsname=\undefined@% + \global\advance\STKcount-1% + \global\advance\temp@count-1\relax + \fi + \ifnum\temp@count>0 % +\repeat}}% +% +\def\clrp@r@s{%GLOBALLY clear +\global\p@r@one={}\global\p@r@two={}\global\p@r@three={}% +\global\p@r@four={}\global\p@r@five={}\global\p@r@six={}% +\global\p@r@seven={}\global\p@r@eight={}\global\p@r@nine={}}% +% +\def\read@paras#1{\temp@@@count=1 %use \temp@@@count and \temp@@count + \loop \num@to@word{\the\temp@@@count}\csname p@r@\the\temp@toks\endcsname={}% + \advance\temp@@@count by 1 \ifnum\temp@@@count<10 \repeat + \temp@@@count=1 \temp@@count=#1 % + \def\read@one@para##1{\num@to@word{\temp@@@count}% + \def\temp@macro{\left@ ##1\right@}% + \temp@@@toks=\expandafter{\temp@macro}% + \csname p@r@\the\temp@toks\endcsname\expandafter{\temp@macro}% + \advance\temp@@@count by 1 \read@continue}% + \def\read@continue{\num@to@word{\temp@@@count}% which uses \temp@macro + \ifnum\temp@@@count>\temp@@count \let\next@@\make@default + \edef\temp@@macro{\the\p@r@one\the\p@r@two\the\p@r@three\the\p@r@four + \the\p@r@five\the\p@r@six\the\p@r@seven\the\p@r@eight\the\p@r@nine}% + \else \let\next@@\read@one@para + \fi \next@@}\read@continue}% +% +\def\make@@default#1#2{\temp@count=#2\relax \temp@@count=1 %used \temp@@macro + \loop \num@to@word{\temp@@count}% + \ifnum\temp@@count>\temp@count \csname p@r@\the\temp@toks\endcsname={}% + \else \csname p@r@\the\temp@toks\endcsname + =\expandafter{\expandafter[\expandafter + \the\csname p@r@\the\temp@toks\endcsname]}\fi + \advance\temp@@count by 1 % + \ifnum\temp@@count<10 \repeat + \edef\temp@macro{\the\p@r@one\the\p@r@two\the\p@r@three\the\p@r@four + \the\p@r@five\the\p@r@six\the\p@r@seven\the\p@r@eight\the\p@r@nine}% + \temp@toks=\expandafter{\temp@macro}% + \temp@@toks=\expandafter{\temp@@macro}% + \expandafter\let\expandafter\temp@macro\csname #1\endcsname + \expandafter\ifx\csname #1@ raw\endcsname\relax + \expandafter\let\csname #1@ raw\endcsname\temp@macro\fi + \expandafter\edef\csname#1\endcsname{% + \noexpand\push{\noexpand\edef\noexpand\next@@{% + \noexpand\noexpand \noexpand \csname \noexpand#1@ raw\noexpand\endcsname + \the\temp@toks}% + \noexpand\popnil\noexpand\clrp@r@s\noexpand\next@@}\noexpand\st@ckparas + \the\temp@@toks \noexpand\p@r@end}}% +% +% \setdefalut{cmdname}{n}{default1}{..}{default_n} +% then \cmdname[#1][..][#n] can be defaulted. +\def\setdefault#1#2{\def\make@default{\make@@default{#1}{#2}}\read@paras{#2}} +% +% best strategy (e.g) to define \foo[#1][#2]{#3} so as to default #1 and #2 +% while making #3 compulsory in brace bracket. +% 1. define \foo@[#1][#2]#3 as normal (what you wish) +% 2. define \foo[#1][#2]#{\foo@[#1][#2]} to make {#3} mandatory +% 3. use \setdefault{foo}{2}{one}{two} to default #1=one and #2 to two +% +% DEFAULT MECHANISM END: this piece of code can be included in any +% package and can be reloaded any times without overruning the resources. +% +%%%%%%% make defaults %%%%%%%%%%% +\setdefault{setvruler}{9}{12pt}{1}{1}{4}{1}{0pt}{0pt}{0pt}{\textheight}% +% +\let\wlog\temp@@@macro\let\temp@@@macro\undefined@ +\catcode`\@=\EntryVruler\relax +\endinput +% +%ENDMACROS +% +% Application example +\documentstyle[vruler,twoside]{article} + \setlength{\textwidth}{2.5in} + \setlength{\oddsidemargin}{3cm} + \setlength{\evensidemargin}{6cm} + \overfullrule=0pt \parindent=0pt +\begin{document} +\advance\textwidth 3cm %2cm is better for plain TeX +\setvruler [][][][][][\textwidth] + This is a simple example, in which we have + placed vertical rulers on the left for + odd numbered pages and on the right for + even numbered pages. \newpage + + This is the second page and is thus an even + numbered page. Please see that the vertical + ruler is now on the right, and is approximately + of the same distance from the text margin as + the vertical ruler on the first page from + the left margin there. \newpage +\unsetvruler + The following pages, in fact only this page, will + not be appended with the vertical rulers.\newpage +\setvruler[][\rulercount] + This page will be added with the vertical ruler again. + Here the numbering marking of the vertical ruler picks + up where it was left. Nevertheless, we may start with + any new number. \newpage + + This is another page. Please see that both this and + the previous pages have vruler on the left side. +\end{document} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/ziffer.sty b/Master/texmf-dist/tex/latex/ltxmisc/ziffer.sty new file mode 100644 index 00000000000..714ad04de76 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltxmisc/ziffer.sty @@ -0,0 +1,105 @@ + +% ziffer.sty v2.1 +% +% Author: +% +% M. V\"ath vaeth@mathematik.uni-wuerzburg.de +% +% +% This package provides the macros +% \ZifferAn (equivalent with \ZifferPunktAn \ZifferStrichAn ) +% \ZifferAus (equivalent with \ZifferPunktAus\ZifferStrichAus) +% \ZifferPunktAn +% \ZifferPunktAus +% \ZifferStrichAn +% \ZifferStrichAus +% +% If \ZifferAn was used, then in numbers in math-mode the following happens: +% `.' is used as a `one-thousand separator' as common in Germany +% `,' is used as a decimal separator as common in Germany +% `--' generates a -- with better spacing (e.g. in 1.000,-- ) +% +% You may still use the symbols `.' `,' and `-' in other context in math mode. +% +% The first two conversions are switched on by default, the last conversion has +% to be switched on explicitly (this has been changed in v2.1): +% You may switch on/off the conversions with +% \ZifferPunktAn/\ZifferPunktAus (for the first two conversions) respectively +% \ZifferStrichAn/\ZifferStrichAus (for the last conversion). +% +% The reason why the last conversion is not on by default (and why it might be +% necessary to [temporarily] switch off a conversion) is that certain packages +% (in particular, newer versions of amsmath) cause problems with it. +% +% There were some discussions which should be the correct output of the +% above conversions (in particular, of `--'). +% If you do not like my choice: You may customize (i.e. redefine) the macros +% \ZifferLeer and \ZifferStrich +% after loading the package to produce the `one-thousand separator' +% respectively the `--'. +% +% All above command-names are in German, because I had expected that this +% package is only needed for German texts. Meanwhile, I learned that also +% other countries use this strange convention for numbers. However, for +% downward compatibility, I decided to keep the name conventions anyway +% (after all, the name of the package is in German anyway). + +\ifx\newcommand\undefined\else + \newcommand{\ZifferAn}{} + \newcommand{\ZifferAus}{} + \newcommand{\ZifferPunktAn}{} + \newcommand{\ZifferPunktAus}{} + \newcommand{\ZifferStrichAn}{} + \newcommand{\ZifferStrichAus}{} + \newcommand{\ZifferLeer}{} + \newcommand{\ZifferStrich}{} +\fi + +\def\ZifferAn{\ZifferPunktAn\ZifferStrichAn} +\def\ZifferAus{\ZifferPunktAus\ZifferStrichAus} +\def\ZifferPunktAn{\mathcode`,="8000\mathcode`.="8000\relax} +\def\ZifferPunktAus{\mathcode`,="613B\mathcode`.="013A\relax} +\def\ZifferStrichAn{\mathcode`-="8000\relax} +\def\ZifferStrichAus{\mathcode`-="2200\relax} +\def\ZifferLeer{\phantom{.}} +\ifx\textrm\undefined + \def\ZifferStrich{\hbox{-\kern0.1em-}} +\else + \def\ZifferStrich{\textrm{-\kern0.1em-}} +\fi + +\mathchardef\ziffer@CommaMy="013B +\mathchardef\ziffer@CommaOri="613B +\mathchardef\ziffer@DotOri="013A +\mathchardef\ziffer@MinusOri="2200 +{\ZifferAn + \catcode`\,=\active\gdef,{\begingroup\obeyspaces\futurelet\n\ziffer@ccheck} + \catcode`\.=\active\gdef.{\begingroup\obeyspaces\futurelet\n\ziffer@dcheck} + \catcode`\-=\active\gdef-{\begingroup\obeyspaces\futurelet\n\ziffer@mcheck}} +\def\ziffer@ccheck{\ziffer@check\ziffer@CommaMy\ziffer@CommaOri} +\def\ziffer@dcheck{\ziffer@check\ZifferLeer\ziffer@DotOri} +\def\ziffer@mcheck{\ifx\n-\def\n-{\endgroup\ZifferStrich}% + \else\def\n{\endgroup\ziffer@MinusOri}\fi\n} +\def\ziffer@check#1#2{% + \ifx\n1\endgroup#1\else + \ifx\n2\endgroup#1\else + \ifx\n3\endgroup#1\else + \ifx\n4\endgroup#1\else + \ifx\n5\endgroup#1\else + \ifx\n6\endgroup#1\else + \ifx\n7\endgroup#1\else + \ifx\n8\endgroup#1\else + \ifx\n9\endgroup#1\else + \ifx\n0\endgroup#1\else + \endgroup#2% + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi} +\ZifferPunktAn |