summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/ulem/ulem.sty (renamed from Master/texmf-dist/tex/latex/ltxmisc/ulem.sty)111
1 files changed, 79 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxmisc/ulem.sty b/Master/texmf-dist/tex/generic/ulem/ulem.sty
index eba281a4f45..f0daae070c7 100644
--- a/Master/texmf-dist/tex/latex/ltxmisc/ulem.sty
+++ b/Master/texmf-dist/tex/generic/ulem/ulem.sty
@@ -1,31 +1,37 @@
%
-% U L E M . S T Y [2000-05-26]
+% U L E M . S T Y [2010-01-21]
%
-% 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.
+% The ulem package provides various types of underlining that can stretch
+% between words and be broken across lines in LaTeX or plain TeX.
+% In LaTeX ulem replaces italics with underlining in \em-phasized text.
+% It is most suitable for simple text such as {\em ibid.} or \emph{\LaTeX:
+% A Document Preparation System} that may need to be underlined in a
+% manuscript submitted for publication. A declaration of \normalem (or
+% the \usepackage option "normalem") restores the normal \em behavior.
+%
+% Full instructions appear in ulem.ltx (ulem.pdf). In summary:
%
-% 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 //////.
+% \dashuline{dashing} dash underline
+% \dotuline{dotty} dotted underline
+%
% {\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
+% Use \markoverwith for defining new types of underlining.
%
-% Copyright (c) 1989-2000 by Donald Arseneau
+% Copyright (c) 1989-2010 by Donald Arseneau (Vancouver, Canada; asnd@triumf.ca)
%
-% These definitions may be freely transmitted, reproduced, or modified
-% provided that this notice is left intact.
-
+% This software may be freely transmitted, reproduced, or modified for any
+% purpose provided that this copyright notice is left intact.
+% (Small excerpts may be taken and used without any restriction.)
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Defend against multiple loading.
\expandafter \ifx \csname UL@box\endcsname \relax \else
\typeout{ulem.sty refuses to load twice. }\endinput \fi
@@ -48,21 +54,28 @@
\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
+% preset value, then start underlining.
+\def\ULset{\UL@setULdepth
\def\UL@leadtype{\leaders \hrule \@height\dimen@ \@depth\ULdepth}%
\ifmmode \ULdepth-4\p@ \fi
\dimen@-\ULdepth \advance\dimen@\ULthickness \ULon}
+% Automatically set \ULdepth if it is to be automatic (flagged by \maxdimen)
+\def\UL@setULdepth{\relax
+ \ifdim\ULdepth=\maxdimen % Set depth based on font, if not set already
+ \setbox\UL@box\hbox{{(j}}\ULdepth\dp\UL@box\advance\ULdepth.4\p@
+ % use setbox to support plain TeX
+ \fi}
+
% \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
+\long\def\UL@on#1{\leavevmode\UL@ender \let\UL@on\UL@onin
\everymath{\UL@hrest}\everyvbox{\UL@hrest}\let\hskip\UL@hskip
+ \let\par\UL@par
\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
@@ -184,15 +197,20 @@
% (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.
+% that `pixel' size = box size. Note that we generally need \leaders
+% (not \cleaders) for text, because an underline will be a patchwork
+% of small \leaders, and the characters must stay in registration.
+% However, we "hook" the leaders command so specific applications can
+% reassign it (\let\ULleaders\xleaders or \let\ULleaders\cleaders).
%
\newbox\ULC@box
+\let\ULleaders\leaders
\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}%
+ \def\UL@leadtype{\ULleaders\copy\ULC@box}%
\fi}
% Now define various special underlines. All the definitions go like
@@ -201,29 +219,46 @@
% 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}
+\def\uwave{\bgroup \markoverwith{\lower3.5\p@\hbox{\sixly \char58}}\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}
+\def\uuline{\bgroup \UL@setULdepth
+ \markoverwith{\lower\ULdepth\hbox
+ {\kern-.03em\vbox{\hrule width.2em\kern1.2\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}
+\def\sout{\bgroup \ULdepth=-.55ex \ULset}
% To mark //// over text instead of underlining (x-out)
%
-\def\xout{\bgroup \markoverwith{\kern-.1em{/}\kern-.1em}\ULon}
-
+\def\xout{\bgroup \markoverwith{\hbox to.35em{\hss/\hss}}\ULon}
+
+\def\dotuline{\bgroup
+ \UL@setULdepth
+ \markoverwith{\begingroup
+ \advance\ULdepth0.08ex
+ \lower\ULdepth\hbox{\kern.1em .\kern.04em}%
+ \endgroup}%
+ \ULon}
+
+\def\dashuline{\bgroup
+ \UL@setULdepth
+ \markoverwith{\kern.13em
+ \vtop{\kern\ULdepth \hrule width .3em}%
+ \kern.13em}\ULon}
+
+% A command to declare that an underline command should be used in
+% place of a particular font selection:
% \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
@@ -271,7 +306,7 @@
% Process LaTeX \package options; plain TeX skips this section
\expandafter\ifx\csname ProvidesPackage\endcsname \relax \else
- \ProvidesPackage{ulem}[2000/05/26]
+ \ProvidesPackage{ulem}[2010/01/21]
\DeclareOption{normalem}{\normalem}
\DeclareOption{ULforem}{\ULforem}
\DeclareOption{normalbf}{}
@@ -293,6 +328,10 @@
\endinput
+%====================== BEGIN INSTRUCTIONS ===========================
+These plain text instructions may disappear soon. The primary instructions
+are in ulem.ltx (ulem.pdf, ulem.dvi).
+
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
@@ -401,6 +440,8 @@ type of underlining, but have \em still produce italics, put the command
Some variations on underlining are provided, including a wavey underline
(\uwave{under-wave}), double underlines (\uuline{two lines under this}),
+dashed (\dashuline{dashes underneath}) or dotted (\dotuline{dots below})
+underlines,
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
@@ -454,20 +495,26 @@ the hook mechanism.
All the underlining commands are robust in LaTeX.
+%====================== END INSTRUCTIONS ===========================
+
% 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:
+% Version (identified by year)
+% 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.
+% 1996: use "\csname ProvidesPackage\endcsname", tidying.
% 1997: fix \\ when LaTeX changed; remove extra overlap in putbox.
% 2000: hook (and marginpar)
+% 2004: Fix spacing in \uwave and \xout. \ULleaders hook.
+% 2009: Accept \par in argument (\long)
+% 2010: Include \dotuline and \dashuline, typeset documentation, add \UL@setULdepth
%
-% Send problem reports to asnd@reg.triumf.ca
+% Send problem reports to asnd@triumf.ca
%
% test integrity:
% brackets: round, square, curly, angle: () [] {} <>