diff options
author | Norbert Preining <preining@logic.at> | 2006-10-04 08:43:01 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2006-10-04 08:43:01 +0000 |
commit | ba9472aebfed07843bc4faa00c7b96bc86194691 (patch) | |
tree | 4a952a012e2f1663beaac6384dec265fb50dd361 /Master/texmf-dist/tex/latex/ltxmisc | |
parent | a88bdfe70c672cfced299babf0a54881a916bcca (diff) |
Fix ctan2tds for pgf installation
comment powerdot-doc-vn in tpm-ctan-check, it always breaks
Update of the following packages:
labelcas pstricks-add sectionbox ltxmisc frenchle flowfram verse emulateapj
pst-pdf poemscol babelbib dk-bib breakurl screenplay ncctools xkeyval bibleref
muthesis pst-labo pgf ncclatex active-conf xcolor commath lineno dottex makeplo
git-svn-id: svn://tug.org/texlive/trunk@2240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ltxmisc')
-rw-r--r-- | Master/texmf-dist/tex/latex/ltxmisc/chappg.sty | 191 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ltxmisc/perpage.sty | 33 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ltxmisc/statex.sty | 278 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ltxmisc/underscore.sty | 116 |
4 files changed, 213 insertions, 405 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxmisc/chappg.sty b/Master/texmf-dist/tex/latex/ltxmisc/chappg.sty deleted file mode 100644 index 943cf041424..00000000000 --- a/Master/texmf-dist/tex/latex/ltxmisc/chappg.sty +++ /dev/null @@ -1,191 +0,0 @@ -% Define \thepage to output chapter-page (such as 1-3, 5-2, etc.) -% and have each chapter's page number begin on 1. -% -% Largely reimplemented for use as a LaTeX2e package, taking account -% of \mainmatter, etc., and providing various extra capabilities, -% Robin Fairbairns <rf@cl.cam.ac.uk>, from an original by -% Max Hailperin <max@nic.gac.edu>, who asserted that the original -% source was TeXMaG Vol. 5, No. 3 (part 1) -% -% See documentation after \endinput -% -% 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 chappg.sty - -\NeedsTeXFormat{LaTeX2e}% Seems to work with any version -\ProvidesPackage{chappg}[2000/05/24 v2.0d page numbering by chapter] - -% -% reset page number when chapter number is stepped -\@addtoreset{page}{chapter} - -\renewcommand\pagenumbering[2][\@chappg@thechapter]{% - \global\c@page\@ne - \protected@xdef\thepage{% - \expandafter\noexpand\csname @#2\endcsname - \noexpand\c@page - }% - \gdef\@chappg@prefix{#1}% -} - -% This is the command used by \pagenumbering{bychapter} to actually -% create the page number -\newcommand\@bychapter[1]{% - \@chappg@prefix\chappgsep\@arabic#1% - \ifx\@chappg@prefix\@chappg@surprise - \if@chappgsurprised\else - \xdef\@chappg@surprise@line{\the\inputlineno}% - \global\@chappgsurprisedtrue - \fi - \fi -} - -% output a chapter number if there have been any chapters; otherwise -% gobble the following thing, which will be \chappgsep -\def\@chappg@thechapter{% - \ifnum\c@chapter=0 - \expandafter\@gobble - \else - \thechapter - \fi -} - -% separator in the above -\providecommand\chappgsep{-} - -% -% select default: this will be hacked by \frontmatter if the author -% uses it -\pagenumbering{bychapter} - -% -% Hack at \mainmatter so that it restores bychapter numbering if -% there's been a \frontmatter command -\let\@@mainmatter\mainmatter -\def\mainmatter{\@@mainmatter - \pagenumbering{bychapter}% -} - -% -% Hack at \backmatter so that it warns the user of possibly surprising -% results if \pagenumbering[whatever]{bychapter} hasn't been used -\let\@@backmatter\backmatter -\def\backmatter{\@@backmatter - \let\@chappg@prefix\@chappg@surprise -} -\def\@chappg@surprise{\textbf{??}} -\newif\if@chappgsurprised \@chappgsurprisedfalse - -\AtEndDocument{\if@chappgsurprised - \PackageWarningNoLine{chappg}{Possibly surprising page numbering in - \string\backmatter - \MessageBreak - Use \string\pagenumbering[prefix]{bychapter}% - \MessageBreak - to select alternative before line \@chappg@surprise@line - } - \fi -} - -%% -%% command to hack at an environment to cause it to behave prettily -%% #1->environment name, #2->prefix for page numbers -%\newcommand\bychapterenv[2]{% -% \@ifundefined{@@#1}{% -% \expandafter\let\csname @@#1\expandafter\endcsname -% \csname#1\endcsname -% }{}% -% \expandafter\edef\csname#1\endcsname{% -% \expandafter\noexpand\csname @@#1\endcsname -% \global\let\noexpand\@@bychapter\noexpand\@bychapter -% \noexpand\pagenumbering[\noexpand#2]{bychapter}% -% }% -% \@ifundefined{@@end#1}{% -% \expandafter\let\csname @@end#1\expandafter\endcsname -% \csname end#1\endcsname -% }{}% -% \expandafter\edef\csname end#1\endcsname{% -% \expandafter\noexpand\csname @@end#1\endcsname -% \global\let\noexpand\@bychapter\noexpand\@@bychapter -% }% -%} -% -%% -%% Specific cases: set up for dealing with bibliography, index, and (if -%% it's defined) glossary -%\bychapterenv{thebibliography}\bibname -%\bychapterenv{theindex}\indexname -%\@ifundefined{theglossary}{}{% -% \bychapterenv{theglossary}{Glossary}% -%} - -% -% The next magic makes the page counter be reset to one rather than zero -\renewcommand\@stpelt[1]{% - \global\csname c@#1\endcsname - \expandafter\ifx \csname c@#1\endcsname \c@page - \@ne - \else - \z@ - \fi -} -\endinput - -chappg.sty: number pages by chapter - -Basic operation of the package is to redefine \thepage to be -\thechapter-\arabic{page}, and to cause the page number to be reset -(to 1) at the start of each chapter. So the pages of chapter 3 will -be numbered 3-1, 3-2, ..., and the pages of appendix B will be -numbered B-1, B-2, ... - -The package assumes the environment of the standard report or book -classes (or classes derived from them by inclusion or copying). - -The package's effect is achieved by defining a new \pagenumbering -style `bychapter', and using it. The package changes \pagenumbering -to take an optional argument, which is the `prefix' to the page -number. Ordinarily, this will be the chapter number, but a user may -care to say (for example): - - \chapter*{Preface} - \pagenumbering[Preface]{bychapter} - -in her document somewhere, and the pages of the preface will be -numbered Preface-1, Preface-2, ... - -The separator between the chapter and page numbers (hyphen above, but -I can imagine people wanting it to be an en-dash) is \chappgsep, which -en-dash-lovers may redefine (after loading the package); for example: - - \renewcommand{\chappgsep}{--}% - -Havoc is wreaked with this structure in the LaTeX \frontmatter and -\mainmatter commands (which both explicitly use \pagenumbering and -therefore destroy the changed definition of \thepage - -My design decision was to assume that \frontmatter is indeed to be in -\pagenumbering{roman}, and to restore the chapter-numbering in -\mainmatter. Chapters in the frontmatter can not be numbered `by' -their chapters, since the chapters don't actually have numbers. If -the author wishes to have some special treatment of part of the -frontmatter, the analogue of the above is - - \chapter{Preface} - \pagenumbering[Preface]{bychapter} - -The conception breaks down again in \backmatter; again, the \chapter -commands don't number the chapters, so that the pages will all be -numbered as if they were `within' the last real chapter. Therefore, -if by-chapter page numbering is still enabled while in the backmatter, -and the user hasn't issued a new \pagenumbering[prefix]{bychapter} -since the \backmatter command, the package rewrites the prefix as -{\bf??}, and produces a warning at the end of the document. - diff --git a/Master/texmf-dist/tex/latex/ltxmisc/perpage.sty b/Master/texmf-dist/tex/latex/ltxmisc/perpage.sty deleted file mode 100644 index a9412b77c17..00000000000 --- a/Master/texmf-dist/tex/latex/ltxmisc/perpage.sty +++ /dev/null @@ -1,33 +0,0 @@ -% $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/statex.sty b/Master/texmf-dist/tex/latex/ltxmisc/statex.sty index f0be39a5145..a8f3f6f7d19 100644 --- a/Master/texmf-dist/tex/latex/ltxmisc/statex.sty +++ b/Master/texmf-dist/tex/latex/ltxmisc/statex.sty @@ -1,7 +1,7 @@ %% %% This is file `statex.sty'. %% -%% Copyright (C) 2002-2004 by Rodney A Sparapani <rsparapa@mcw.edu> +%% Copyright (C) 2002-2006 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 @@ -14,12 +14,13 @@ %% version 1999/12/01 or later. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{statex}[2004/04/03 v1.5 a statistics style for latex] +\ProvidesPackage{statex}[2006/05/17 v1.6 a statistics style for latex] \RequirePackage{ifthen} \RequirePackage{amsmath} \RequirePackage{amssymb} \RequirePackage{bm} -\RequirePackage[dvipsnames, usenames]{color} +\RequirePackage{color} +%\RequirePackage[dvipsnames,usenames]{color} %begin: borrowed from upgreek; thanks to Walter Schmidt <was@VR-Web.de> %use Adobe Symbol for upright pi (constant) @@ -46,39 +47,53 @@ \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*{\exp}[1]{\mathrm{e}^{#1}} +\newcommand*{\E}[2][]{\text{E}\ifthenelse{\equal{#1}{}}{}{_{#1}} \wrap{#2}} \newcommand*{\ha}{{\frac{\alpha}{2}}} -\newcommand*{\I}[2][]{\text{I}\ifthenelse{\equal{#1}{}}{}{_{#1}} \lb #2 \rb} +\newcommand*{\I}[2][]{\text{I}\ifthenelse{\equal{#1}{}}{}{_{#1}} \wrap[()]{#2}} +\newcommand*{\IBeta}[2]{\frac{\Gamma[#1+#2]}{\Gamma[#1]\Gamma[#2]}} \newcommand*{\If}{\;\text{if}\;\;} -\newcommand*{\iid}{\;\text{iid}\;} -\newcommand*{\ij}{{i,j}} +%\newcommand*{\ij}{{i,j}} \newcommand*{\im}{\mathrm{i}} -\newcommand*{\lb}{\left[} -\newcommand*{\lp}{\left(} -\newcommand*{\lr}[1][]{\left[ #1 \right]} +%\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*{\V}[2][]{\text{V}\ifthenelse{\equal{#1}{}}{}{_{#1}} \wrap{#2}} +\newcommand*{\where}{\;\;\text{where}\;\;} +\newcommand*{\wrap}[2][]% +{\ifthenelse{\equal{#1}{}}{\left[ #2 \right]}% +{\ifthenelse{\equal{#1}{()}}{\left( #2 \right)}% +{\ifthenelse{\equal{#1}{\{\}}}{\left\{ #2 \right\}}% +%{\ifthenelse{\equal{#1}{(.}}{\left( #2 \right.}% +%{\ifthenelse{\equal{#1}{[.}}{\left[ #2 \right.}% +{\ifthenelse{\equal{#1}{\{.}}{\left\{ #2 \right.}{}}}}} \newcommand*{\xy}{{xy}} \newcommand*{\XY}{{XY}} %\newcommand*{\n}[1][]{_{n #1}} -\def\bp(#1){\left(#1\right)} -\newcommand*{\bb}[1][]{\left[ #1 \right]} +%\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} +\newcommand*{\iid}{\;\stackrel{\text{iid}}{~}\;} +\newcommand*{\ind}{\;\stackrel{\text{ind}}{~}\;} +\newcommand*{\indpr}{\;\stackrel{\text{ind}}{\stackrel{\text{prior}}{~}}\;} +\newcommand*{\post}{\;\stackrel{\text{post}}{~}\;} +\newcommand*{\prior}{\;\stackrel{\text{prior}}{~}\;} + %\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}} +\renewcommand*{\Gamma}[1][]{\STATEXGamma\ifthenelse{\equal{#1}{}}{}{\wrap[()]{#1}}} \let\STATEXand=\and \renewcommand*{\and}{\relax\ifmmode\expandafter\;\;\text{and}\;\;\else\expandafter\STATEXand\fi} @@ -88,20 +103,20 @@ \let\STATEXP=\P \renewcommand*{\P}[2][]{\ifthenelse{\equal{#2}{}}{\STATEXP}% -{\ifthenelse{\equal{#1}{}}{\text{P} \lb #2 \rb}{\text{P}_{#1} \lb #2 \rb}}} +{\text{P}\ifthenelse{\equal{#1}{}}{}{_{#1}}\wrap{#2}}} \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} +\newcommand*{\B}[1]{\mathrm{B}\wrap[()]{#1}} +\newcommand*{\BB}[1]{\mathrm{Beta\!-\!Bin}\wrap[()]{#1}} +\newcommand*{\Bin}[1]{\mathrm{Bin}\wrap[()]{#1}} +\newcommand*{\Dir}[1]{\mathrm{Dirichlet}\wrap[()]{#1}} +\newcommand*{\HG}[1]{\mathrm{Hypergeometric}\wrap[()]{#1}} +\newcommand*{\M}[1]{\mathrm{Multinomial}\wrap[()]{#1}} +\newcommand*{\NB}[1]{\mathrm{Neg\!-\!Bin}\wrap[()]{#1}} +\newcommand*{\Poi}[1]{\mathrm{Poisson}\wrap[()]{#1}} \let\Poisson=\Poi %probability mass functions \newcommand*{\pBB}[4][x]{\frac{\Gamma[#2+1]\Gamma[#3+#1]\Gamma[#2+#4-#1]\Gamma[#3+#4]}% @@ -111,54 +126,54 @@ %\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*{\pBin}[3][x]{\binom{#2}{#1}#3^#1 \wrap[()]{1-#3}^{#2-#1}% +\I[#1]{\{0,1,\.,#2\}}, \where p \in \wrap[()]{0, 1} \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} +\newcommand*{\Cau}[1]{\mathrm{Cauchy}\wrap[()]{#1}} \let\Cauchy=\Cau -\newcommand*{\Chi}[1]{\mathrm{\chi^2}\lp #1 \rp} +\newcommand*{\Chi}[1]{\mathrm{\chi^2}\wrap[()]{#1}} \let\Chisq=\Chi -\newcommand*{\Bet}[1]{\mathrm{Beta}\lp #1 \rp} +\newcommand*{\Bet}[1]{\mathrm{Beta}\wrap[()]{#1}} \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} +\newcommand*{\Exp}[1]{\mathrm{Exp}\wrap[()]{#1}} +\newcommand*{\F}[1]{\mathrm{F}\wrap[()]{#1}} +\newcommand*{\Gam}[1]{\mathrm{Gamma}\wrap[()]{#1}} +\newcommand*{\IC}[1]{\mathrm{\chi^{-2}}\wrap[()]{#1}} +\newcommand*{\IG}[1]{\mathrm{Gamma^{-1}}\wrap[()]{#1}} +\newcommand*{\IW}[1]{\mathrm{Wishart^{-1}}\wrap[()]{#1}} +\newcommand*{\Log}[1]{\mathrm{Logistic}\wrap[()]{#1}} +\newcommand*{\LogN}[1]{\mathrm{Log\!-\!N}\wrap[()]{#1}} +\newcommand*{\N}[3][]{\mathrm{N}\ifthenelse{\equal{#1}{}}{}{_{#1}}\wrap[()]{#2,\ #3}} +\newcommand*{\Par}[1]{\mathrm{Pareto}\wrap[()]{#1}} \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} +\newcommand*{\Tsq}[1]{\mathrm{T^2}\wrap[()]{#1}} +\newcommand*{\U}[1]{\mathrm{U}\wrap[()]{#1}} +\newcommand*{\W}[1]{\mathrm{Wishart}\wrap[()]{#1}} \let\STATEXt=\t -\renewcommand*{\t}[1]{\relax\ifmmode\expandafter\mathrm{t}\lp #1 \rp% +\renewcommand*{\t}[1]{\relax\ifmmode\expandafter\mathrm{t}\wrap[()]{#1}% \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*{\pBet}[3][x]{\IBeta{#2}{#3}% +#1^{#2-1}\wrap[()]{1-#1}^{#3-1}\I[#1]{0,\ 1}, \where #2>0 \and #3>0} +\newcommand*{\pCau}[3][x]{\ifthenelse{\equal{#2, #3}{0, 1}}{\frac{1}{\cpi\wrap[()]{1+#1}^2}}% +{\frac{1}{#3\cpi\left\{1+\wrap{\wrap[()]{x-#2}/#3}^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,% +\I[#1]{0,\infty}, \where #2>0} +\newcommand*{\pExp}[2][x]{\frac{1}{#2}\e{-#1/#2}\I[#1]{0,\infty},% \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} +\I[#1]{0,\infty}, \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,% +{\frac{1}{\sqrt{2\cpi#3}}\e{-\wrap[()]{#1-#2}^2/2#3}}} +\newcommand*{\pPar}[3][x]{\frac{#3}{#2\wrap[()]{1+#1/#2}^{#3+1}}\I[#1]{0,\infty},% \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}} +\newcommand*{\pU}[3][x]{\ifthenelse{\equal{#2, #3}{0, 1}}{\I[#1]{0,\ 1}}% +{\frac{1}{#3-#2}\I[#1]{#2,\ #3}, \where #2<#3}} %re-define other accents \let\STATEXequal=\= @@ -168,7 +183,7 @@ \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} +\renewcommand*{\'}[1]{\relax\ifmmode\expandafter{\wrap[()]{#1}}\else\expandafter\STATEXsinglequote{#1}\fi} \let\STATEXb=\b \renewcommand*{\b}{\relax\ifmmode\expandafter\bar\else\expandafter\STATEXb\fi} \let\STATEXc=\c @@ -212,180 +227,181 @@ \endinput -\documentclass{report} +\documentclass[dvipsnames,usenames]{report} \usepackage{statex} \usepackage{shortvrb} -\MakeShortVerb{!} +\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... +@ c \c{c} \pi \cpi@ $$ 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 +@int \e{\im x} \d{x}@ $$\int \e{\im x} \d{x}$$ %\d{x}; also note new commands \e and \im -$$\^{\beta_1}=b_1$$ +@\^{\beta_1}=b_1@ $$\^{\beta_1}=b_1$$ -$$\=x=\frac{1}{n}\sum x_i$$ %also, \b{x}, but see \ol{x} below +@\=x=\frac{1}{n}\sum x_i@ $$\=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$$ +@\b{x} = \frac{1}{n} \wrap[()]{x_1 +\.+ x_n}@ $$\b{x} = \frac{1}{n} \wrap[()]{x_1 +\.+ x_n}$$ -Sometimes overline is better: $$\b{x}\ vs.\ \ol{x}$$ +Sometimes overline is better: @\b{x}\ vs.\ \ol{x}@ $$\b{x}\ vs.\ \ol{x}$$ -And, underlines are nice too: $$\ul{x}$$ +And, underlines are nice too: @\ul{x}@ $$\ul{x}$$ A few other nice-to-haves: -$$\binom{n}{x}$$ %provided by amsmath package +@\Gamma[n+1]=n!@ $$\Gamma[n+1]=n!$$ -$$\e$$ +@\binom{n}{x}@ $$\binom{n}{x}$$ %provided by amsmath package -$\H_0: \mu_\ij=0$ vs. $\H_1: \mu_\ij \neq 0$ %\ijk too +@\e{x}@ $$\e{x}$$ -$$\logit \lb p \rb = \log \lb \frac{p}{1-p} \rb$$ +%$\H_0: \mu_\ij=0$ vs. $\H_1: \mu_\ij \neq 0$ %\ijk too +@\logit \wrap{p} = \log \wrap{\frac{p}{1-p}}@ $$\logit \wrap{p} = \log \wrap{\frac{p}{1-p}}$$ +\pagebreak Common distributions along with other features follows: Normal Distribution -$$Z ~ \N{0, 1}, \where \E{Z}=0 \and \V{Z}=1$$ +@Z ~ \N{0}{1}, \where \E{Z}=0 \and \V{Z}=1@ $$Z ~ \N{0}{1}, \where \E{Z}=0 \and \V{Z}=1$$ -$$\P{|Z|>z_\ha}=\alpha$$ +@\P{|Z|>z_\ha}=\alpha@ $$\P{|Z|>z_\ha}=\alpha$$ -$$\pN[z]{0}{1}$$ +@\pN[z]{0}{1}@ $$\pN[z]{0}{1}$$ or, in general -$$\pN[z]{\mu}{\sd^2}$$ +@\pN[z]{\mu}{\sd^2}@ $$\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$$ +@\E[z]{Z}=0, \V[z]{Z}=1, \and \P[z]{|Z|>z_\ha}=\alpha@ $$\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 +@\bm{X} ~ \N[p]{\bm{\mu}}{\sfsl{\Sigma}}@ $$\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$$ +@Z_i \iid \N{0}{1}, \where i=1 ,\., n@ $$Z_i \iid \N{0}{1}, \where i=1 ,\., n$$ -$$\chisq = \sum_i Z_i^2 ~ \Chi{n}$$ +@\chisq = \sum_i Z_i^2 ~ \Chi{n}@ $$\chisq = \sum_i Z_i^2 ~ \Chi{n}$$ -$$\pChi[z]{n}$$ +@\pChi[z]{n}@ $$\pChi[z]{n}$$ t Distribution -$$\frac{\b{Z}}{\sqrt{\frac{\chisq}{n}}} ~ \t{n}$$ - +@\frac{\N{0}{1}}{\sqrt{\frac{\Chisq{n}}{n}}} ~ \t{n}@ $$\frac{\N{0}{1}}{\sqrt{\frac{\Chisq{n}}{n}}} ~ \t{n}$$ +\pagebreak 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 +@X_i, Y_{\~i} \iid \N{0}{1} \where i=1 ,\., n; \~i=1 ,\., m \and \V{X_i, Y_{\~i}}=\sd_\xy=0@ $$X_i, Y_{\~i} \iid \N{0}{1} \where i=1 ,\., n; \~i=1 ,\., m \and \V{X_i, Y_{\~i}}=\sd_\xy=0$$%\XY too -$$\chisq_x = \sum_i X_i^2 ~ \Chi{n}$$ +@\chisq_x = \sum_i X_i^2 ~ \Chi{n}@ $$\chisq_x = \sum_i X_i^2 ~ \Chi{n}$$ -$$\chisq_y = \sum_i Y_i^2 ~ \Chi{n}$$ +@\chisq_y = \sum_{\~i} Y_{\~i}^2 ~ \Chi{m}@ $$\chisq_y = \sum_{\~i} Y_{\~i}^2 ~ \Chi{m}$$ -$$\frac{\chisq_x}{\chisq_y} ~ \F{n, n}$$ +@\frac{\chisq_x}{\chisq_y} ~ \F{n, m}@ $$\frac{\chisq_x}{\chisq_y} ~ \F{n, m}$$ Beta Distribution -$$B=\frac{F}{1+F} ~ \Bet{\frac{n}{2}, \frac{n}{2}}$$ +@B=\frac{\frac{n}{m}F}{1+\frac{n}{m}F} ~ \Bet{\frac{n}{2}, \frac{m}{2}}@ $$B=\frac{\frac{n}{m}F}{1+\frac{n}{m}F} ~ \Bet{\frac{n}{2}, \frac{m}{2}}$$ -$$\pBet{\alpha}{\beta}$$ +@\pBet{\alpha}{\beta}@ $$\pBet{\alpha}{\beta}$$ Gamma Distribution -$$G ~ \Gam{\alpha, \beta}$$ +@G ~ \Gam{\alpha, \beta}@ $$G ~ \Gam{\alpha, \beta}$$ -$$\pGam{\alpha}{\beta}$$ +@\pGam{\alpha}{\beta}@ $$\pGam{\alpha}{\beta}$$ Cauchy Distribution -$$C ~ \Cau{\theta, \nu}$$ +@C ~ \Cau{\theta, \nu}@ $$C ~ \Cau{\theta, \nu}$$ -$$\pCau{\theta}{\nu}$$ +@\pCau{\theta}{\nu}@ $$\pCau{\theta}{\nu}$$ Uniform Distribution -$$X ~ \U{0, 1}$$ +@X ~ \U{0, 1}@ $$X ~ \U{0, 1}$$ -$$\pU{0}{1}$$ +@\pU{0}{1}@ $$\pU{0}{1}$$ or, in general -$$\pU{a}{b}$$ +@\pU{a}{b}@ $$\pU{a}{b}$$ Exponential Distribution -$$X ~ \Exp{\lambda}$$ +@X ~ \Exp{\lambda}@ $$X ~ \Exp{\lambda}$$ -$$\pExp{\lambda}$$ +@\pExp{\lambda}@ $$\pExp{\lambda}$$ Hotelling's $T^2$ Distribution -$$X ~ \Tsq{\nu_1, \nu_2}$$ +@X ~ \Tsq{\nu_1, \nu_2}@ $$X ~ \Tsq{\nu_1, \nu_2}$$ Inverse Chi-square Distribution -$$X ~ \IC{\nu}$$ +@X ~ \IC{\nu}@ $$X ~ \IC{\nu}$$ Inverse Gamma Distribution -$$X ~ \IG{\alpha, \beta}$$ +@X ~ \IG{\alpha, \beta}@ $$X ~ \IG{\alpha, \beta}$$ Pareto Distribution -$$X ~ \Par{\alpha, \beta}$$ +@X ~ \Par{\alpha, \beta}@ $$X ~ \Par{\alpha, \beta}$$ -$$\pPar{\alpha}{\beta}$$ +@\pPar{\alpha}{\beta}@ $$\pPar{\alpha}{\beta}$$ Wishart Distribution -$$\sfsl{X} ~ \W{\nu, \sfsl{S}}$$ +@\sfsl{X} ~ \W{\nu, \sfsl{S}}@ $$\sfsl{X} ~ \W{\nu, \sfsl{S}}$$ Inverse Wishart Distribution -$$\sfsl{X} ~ \IW{\nu, \sfsl{S^{-1}}}$$ +@\sfsl{X} ~ \IW{\nu, \sfsl{S^{-1}}}@ $$\sfsl{X} ~ \IW{\nu, \sfsl{S^{-1}}}$$ Binomial Distribution -$$X ~ \Bin{n, p}$$ +@X ~ \Bin{n, p}@ $$X ~ \Bin{n, p}$$ -$$\pBin{n}{p}$$ +@\pBin{n}{p}@ $$\pBin{n}{p}$$ Bernoulli Distribution -$$X ~ \B{p}$$ +@X ~ \B{p}@ $$X ~ \B{p}$$ Beta-Binomial Distribution -$$X ~ \BB{p}$$ +@X ~ \BB{p}@ $$X ~ \BB{p}$$ -$$\pBB{n}{\alpha}{\beta}$$ +@\pBB{n}{\alpha}{\beta}@ $$\pBB{n}{\alpha}{\beta}$$ Negative-Binomial Distribution -$$X ~ \NB{n, p}$$ +@X ~ \NB{n, p}@ $$X ~ \NB{n, p}$$ Hypergeometric Distribution -$$X ~ \HG{n, M, N}$$ +@X ~ \HG{n, M, N}@ $$X ~ \HG{n, M, N}$$ Poisson Distribution -$$X ~ \Poi{\mu}$$ +@X ~ \Poi{\mu}@ $$X ~ \Poi{\mu}$$ -$$\pPoi{\mu}$$ +@\pPoi{\mu}@ $$\pPoi{\mu}$$ Dirichlet Distribution -$$\bm{X} ~ \Dir{\alpha_1 \. \alpha_k}$$ +@\bm{X} ~ \Dir{\alpha_1 \. \alpha_k}@ $$\bm{X} ~ \Dir{\alpha_1 \. \alpha_k}$$ Multinomial Distribution -$$\bm{X} ~ \M{n, \alpha_1 \. \alpha_k}$$ +@\bm{X} ~ \M{n, \alpha_1 \. \alpha_k}@ $$\bm{X} ~ \M{n, \alpha_1 \. \alpha_k}$$ \pagebreak @@ -394,32 +410,32 @@ 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\\ +\Prgm\to@NEW@\to@1:Create New@\\ +@Name=@\Rect\\ NCRIT\Enter\\ -!:!\Rect\\ -\Prgm\to!I/O!\to!2:Prompt!\\ -!:Prompt! \Rect\\ +@:@\Rect\\ +\Prgm\to@I/O@\to@2:Prompt@\\ +@:Prompt@ \Rect\\ \Alpha[A],\Alpha[T]\Enter\\ -!:!\Rect\\ -\Distr\to!DISTR!\to!3:invNorm(!\\ -!:invNorm(!\Rect\\ +@:@\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\\ +@:@\Rect\\ +\Prgm\to@I/O@\to@3:Disp@\\ +@:Disp@ \Rect\\ \Alpha[C]\Enter\\ -!:!\Rect\\ +@:@\Rect\\ \Quit\\ -Suppose !A! is $\alpha$ and !T! is the number of tails. To run the program:\\ +Suppose @A@ is $\alpha$ and @T@ is the number of tails. To run the program:\\ \Rect\\ -\Prgm\to!EXEC!\to!NCRIT!\\ -!prgmNCRIT!\Rect\\ +\Prgm\to@EXEC@\to@NCRIT@\\ +@prgmNCRIT@\Rect\\ \Enter\\ -!A=?!\Rect\\ +@A=?@\Rect\\ 0.05\Enter\\ -!T=?!\Rect\\ +@T=?@\Rect\\ 2\Enter\\ -!1.959963986! +@1.959963986@ \end{document} diff --git a/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty b/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty index a274b39e521..f0cfb895d19 100644 --- a/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty +++ b/Master/texmf-dist/tex/latex/ltxmisc/underscore.sty @@ -1,13 +1,14 @@ -% underscore.sty 12-Oct-2001 Donald Arseneau asnd@triumf.ca +% underscore.sty 21-Sep-2005 Donald Arseneau asnd@triumf.ca % Make the "_" character print as "\textunderscore" in text. -% Copyright 1998,2001 Donald Arseneau; Distribute freely if unchanged. +% Copyright 1998,2001,2005,2006 Donald Arseneau; +% License: LPPL version 1.2 or later. % Instructions follow after the definitions. -\ProvidesPackage{underscore}[2001/10/12] +\ProvidesPackage{underscore}[2006/09/13] \begingroup \catcode`\_=\active - \gdef_{% \relax % No relax gives a small vulnerability in alignments + \gdef _{% \relax % No relax gives a small vulnerability in alignments \ifx\if@safe@actives\iftrue % must be outermost test! \string_% \else @@ -18,13 +19,20 @@ \else \protect_% \fi\fi \fi} + \global\let\ActiveUnderscore=_ + \gdef\normalUnderscoreDef{\let_\ActiveUnderscore} \endgroup % At begin: set catcode; fix \long \ttdefault so I can use it in comparisons; +% reapply definition of active _ in output routine (\@firstofone to strip +% away braces, so avoiding deeper nesting). \AtBeginDocument{% {\immediate\write\@auxout{\catcode\number\string`\_ \string\active}}% \catcode\string`\_\string=\active \edef\ttdefault{\ttdefault}% + \output=\expandafter\expandafter\expandafter + {\expandafter\expandafter\expandafter\normalUnderscoreDef + \expandafter\@firstofone\the\output}% } \newcommand{\BreakableUnderscore}{\leavevmode\nobreak\hskip\z@skip @@ -34,6 +42,7 @@ \DeclareRobustCommand{\_}{% \ifmmode \nfss@text{\textunderscore}\else \BreakableUnderscore \fi} + \let\usc@dischyph\@dischyph \DeclareOption{nohyphen}{\def\usc@dischyph{\discretionary{}{}{}}} \DeclareOption{strings}{\catcode`\_=\active} @@ -50,6 +59,7 @@ \do\@input \do\@iinput \do\InputIfFileExists \do\ref \do\pageref \do\newlabel \do\bibitem \do\@bibitem \do\cite \do\nocite \do\bibcite + \do\Ginclude@graphics \do\@setckpt } % Macro to redefine a macro to pre-process its string argument @@ -91,23 +101,24 @@ \endinput -underscore.sty 12-Oct-2001 Donald Arseneau +underscore.sty 13-Sep-2006 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. +The "\_" command (which normally prints an underscore character or +facsimile) is altered 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$ +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. +but they use a rule if there is no proper character. Deficiencies: ~~~~~~~~~~~~~ @@ -127,22 +138,23 @@ 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. +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 +option [strings] is provided to redefine commands that take such a string +argument so that protection is applied (with "\protect" being "\string"). +The list of commands is given in "\UnderscoreCommands", with "\do" before +each; plus several others covering "\input", "\includegraphics, "\cite", +"\ref", 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} @@ -155,19 +167,17 @@ before loading this package; e.g. 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. +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 listing it in "\UnderscoreCommands". -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! When you use the [strings] option, you must load this package !! -!! last (or nearly last). !! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +*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 +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. @@ -176,56 +186,62 @@ 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). +"\UnderscoreCommands" mechanism. Beware that using both [strings] and +babel might lead to conflicts, but none are seen yet (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 +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 +handles the "\protect"ion without causing "\relax" to be inserted before the character. -\BreakableUnderscore uses "\nobreak\hskip\z@skip" to separate the +"\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 +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". +because "\ttdefault" is `long' whereas "\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. + + - retain the original command as "\US_"*command* (e.g., "\US_ref") + - redefine the command as "\US@prot\US_command" for ordinary commands + ("\US@prot\US_ref") or as "\US@protopt\US_command" when an optional + argument is possible (e.g., "\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. +contortions involving "\meaning". -\US@prot and \US@protopt read the argument, process it with \protect -enabled, then invoke the saved \US_command. +"\US@prot" and "\US@protopt" read the argument, process it with +"\protect" enabled, then invoke the saved "\US_command". Modifications: ~~~~~~~~~~~~~~ +13-Sep-2006 Reassert my definition in the output routine (listings). +21-Sep-2005 \includegraphics safe. 12-Oct-2001 Babel (safe@actives) compatibility and [nohyphen] option. Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789 |