summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ushort
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/ushort')
-rw-r--r--Master/texmf-dist/source/latex/ushort/ushort.dtx110
1 files changed, 81 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/ushort/ushort.dtx b/Master/texmf-dist/source/latex/ushort/ushort.dtx
index cc6483debc9..79671790d66 100644
--- a/Master/texmf-dist/source/latex/ushort/ushort.dtx
+++ b/Master/texmf-dist/source/latex/ushort/ushort.dtx
@@ -1,4 +1,4 @@
-% \def\fileversion{2.1}\def\filedate{2001/06/07}\def\docdate{2001/06/08}
+% \def\fileversion{2.2}\def\filedate{2001/06/13}\def\docdate{2001/06/19}
%\iffalse These lines are necessary for the doc and docstrip utilities
%<*asciidocu>
@@ -100,6 +100,7 @@
%%# insert a line like
%%# \catcode`\@=11\relax \input ushort.sty \catcode`\@=12\relax
%%#
+%%# For TeX insiders:
%%# The only LaTeX-specific commands used in `ushort.sty' are:
%%#
%%# \newcommand (only in the form \newcommand{\command}{} to ensure that
@@ -120,13 +121,22 @@
%%# This command is used analogously to \underline with the difference that
%%# the underlines are slightly shorter than usual (and so, in particular,
%%# in concatenations of `\ushort'ed variable names the underlines do not
-%%# merge).
-%%# \ushortd
+%%# merge). The length of the underline is chosen under the assumption that
+%%# the argument is a single character. If you want to underline a variable
+%%# name which consists of more than one character, use instead the command
+%%# \ushortw [Mnemonic: ushort word]
+%%# which is analogous to \ushort but such that the length of the underline
+%%# is chosen appropriate for a `long' argument. (This does not look as
+%%# good as \ushort if the argument is a single character).
+%%# \ushortd [Mnemonic: ushort double]
%%# This is analogous to \ushort except that the underline is doubled.
+%%# \ushortdw [Mnemonic: ushortd word]
+%%# This is analogous to \ushortw except that the underline is doubled.
%%# \ushortdline
%%# This is analogous to \underline except that the underline is doubled.
-%%# This command is internally used by \ushortd and thus redefinitions
-%%# change also the behavior of \ushortd correspondingly.
+%%# This command is internally used by \ushortd and \ushortdw and
+%%# thus redefinitions change also the behavior of \ushortd and \ushortdw
+%%# correspondingly.
%%# In Plain TeX, this macro can be used only in math mode.
%%# \ushortCreate
%%# This can be used to generate a macro which behaves similarly to \ushort
@@ -149,7 +159,9 @@
%%#
%%# This command creates a new macro \Name. It is not tested whether \Name
%%# already exists; if it exists already, it is overridden. In particular,
-%%# it is admissible to use \ushortCreate to redefine \ushort or \ushortd.
+%%# it is admissible to use \ushortCreate to redefine \ushort, \ushortw,
+%%# \ushortd, or \ushortdw. This is the recommended method, if you want to
+%%# change the default values.
%%#
%%# The macro \Name can be used analogously to \underline, but the precise
%%# behavior depends on the arguments of \ushortCreate.
@@ -189,11 +201,13 @@
%%#
%%# Examples:
%%#
-%%# The most important examples are the macros \ushort and \ushortd which
-%%# have been created by
+%%# The most important examples are the macros \ushort, \ushortw, \ushortd,
+%%# and \ushortdw which have been created by
%%#
%%# \ushortCreate{ushort}
+%%# \ushortCreate()[-.1em]{ushortw}
%%# \ushortCreate:\ushortdline{ushortd}
+%%# \ushortCreate:\ushortdline()[-.1em]{ushortdw}
%%#
%%# A further example demonstrating other parameters is
%%#
@@ -238,7 +252,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
-% \CheckSum{265}
+% \CheckSum{272}
% \iffalse
% \RecordChanges
@@ -250,6 +264,11 @@
% \newcommand{\cmdcite}[1]{\texttt{\textbackslash#1}}
% \def\mypar{}
+% \changes{2.2}{2001/06/13}{As
+% Alessandro Russo \texttt{<russo@ian.pv.cnr.it>} suggested,
+% the case of arguments consisting of more than a single character is
+% now documented. Corresponding macros \cmdcite{ushortw} and
+% \cmdcite{ushortdw} have been added}
% \changes{2.1}{2001/06/07}{Improved speed dramatically (up to factor 4)
% by not using \cmdcite{phantom} anymore. Unfortunately, if bad hacks had
% been used for the argument ``Additional calculations'' in
@@ -360,7 +379,7 @@
% \section{Installation}
-% This package was tested with \TeX, \LaTeX 2.09, and \LaTeXe, and it
+% This package was tested with plain \TeX, \LaTeX 2.09, and \LaTeXe, and it
% should actually run with most other \TeX\ formats.
% To use ``ushort'', you have to put the file "ushort.sty" in a path where
@@ -386,6 +405,7 @@
%
% \end{itemize}
%
+% For \TeX\ insiders:
% The only \LaTeX-specific commands used in "ushort.sty" are:
%
% \begin{itemize}
@@ -407,12 +427,23 @@
% "\underline" with the difference that the underlines are slightly shorter
% than usual (and so, in particular, in concatenations of "\ushort"'ed
% variable names the underlines do not merge).
-% \iDescribe{ushortd}
+% The length of the underline is chosen under the assumption that
+% the argument is a single character. If you want to underline a variable
+% name which consists of more than one character, use instead the
+% following command "\ushortw".
+% \iDescribe{ushortw} (Mnemonic: ``ushort word'').
+% This command is analogous to "\ushort" but such that the length of the
+% underline is chosen appropriate for a `long' argument. (This does not
+% look as good as "\ushort" if the argument is a single character).
+% \iDescribe{ushortd} (Mnemonic: ``ushort double'').
% This is analogous to "\ushort" except that the underline is doubled.
+% \iDescribe{ushortdw} (Mnemonic: ``ushortd word'').
+% This is analogous to "\ushortd" except that the underline is doubled.
% \iDescribe{ushortdline}
% This is analogous to "\underline" except that the underline is doubled.
-% This command is internally used by "\ushortd" and thus redefinitions
-% change also the behavior of "\ushortd" correspondingly.
+% This command is internally used by "\ushortd" and "\ushortdw",
+% and thus redefinitions change also the behavior of "\ushortd" and
+% "\ushortdw" correspondingly.
% In Plain \TeX, this macro can be used only in math mode.
% \iDescribe{ushortCreate}
% This can be used to generate a macro which behaves similarly to "\ushort"
@@ -421,7 +452,7 @@
% \iDescribe{ushortEnsuremath}
% This is rather equivalent to the \LaTeXe\ macro "\ensuremath"
% (but is available also e.g.\ in compatibility mode or if this package
-% is used with plain \TeX\ or \LaTeX 2.09).
+% is used with plain \TeX\ or \LaTeX 2.09).
% \end{description}
%
% Only "\ushortCreate" needs a detailed description. Its call syntax is:
@@ -441,7 +472,9 @@
% This command creates a new macro \textbackslash\meta{name}.
% It is not tested whether \textbackslash\meta{name} already exists;
% if it exists already, it is overridden. In particular,
-% it is admissible to use "\ushortCreate" to redefine "\ushort" or "\ushortd".
+% it is admissible to use "\ushortCreate" to redefine "\ushort", "\ushortw",
+% "\ushortd", or "\ushortdw". This is the recommended method, if you want to
+% change the default values.
%
% The macro \textbackslash\meta{name} can be used analogously to "\underline",
% but the precise behavior depends on the arguments of "\ushortCreate".
@@ -489,15 +522,16 @@
% \end{description}
%
% Examples:
-% The most important examples are the macros "\ushort" and "\ushortd"
-% which have been created by
+% The most important examples are the macros "\ushort", "\ushortw",
+% "\ushortd", and "\ushortdw" which have been created by
% \begin{verbatim}
-% \ushortCreate{ushort}\end{verbatim}
-% \begin{verbatim}
-% \ushortCreate:\ushortdline{ushortd}\end{verbatim}
+% \ushortCreate{ushort}
+% \ushortCreate()[-.1em]{ushortw}
+% \ushortCreate:\ushortdline{ushortd}
+% \ushortCreate:\ushortdline()[-.1em]{ushortdw}\end{verbatim}
% A further example demonstrating other parameters is
% \begin{verbatim}
-% \ushortCreate*(3)(.5){uline}\end{verbatim}
+% \ushortCreate*(3)(.5){uline}\end{verbatim}
% This creates the macro "\uline" which underbars its argument but such that
% the underbar has only half of the usual length (the argument "(3)" in
% the above call is overridden by the later argument "(.5)").\par
@@ -538,22 +572,26 @@
\else
\let\ushrt@tmp\typeout
\fi
-\ushrt@tmp{ushort.sty by M. Vaeth: Release: 2.1 }
+\ushrt@tmp{ushort.sty by M. Vaeth: Release: 2.2 }
%% First, some LaTeX support:
\ifx\ProvidesPackage\undefined\else
- \ProvidesPackage{ushort}[2001/06/07 v2.1]
+ \ProvidesPackage{ushort}[2001/06/13 v2.2]
\fi
\ifx\newcommand\undefined\else
\newcommand{\ushort}{}
+ \newcommand{\ushortw}{}
\newcommand{\ushortd}{}
+ \newcommand{\ushortdw}{}
\newcommand{\ushortdline}{}
\newcommand{\ushortCreate}{}
\newcommand{\ushortEnsuremath}{}
\fi
+%% The implementation follows
+
% \end{macrocode}
%
% \begin{macro}{\ushortCreate}
@@ -646,13 +684,13 @@
{\setbox0\hbox{\mathsurround0pt$##1##2$}%
\dimen0=#4\wd0#3\dimen1\ht0\dimen2\dp0#2%
\setbox0\hbox to#5\dimen0{}\ht0\dimen1\dp0\dimen2%
- \box0}}$\hss}}}
+ \box0}}$\hss}}}%
\else
\def#7##1##2{\hbox to 0pt{#1{%
{\setbox0\hbox{\mathsurround0pt$##1##2$}%
\dimen0=#4\wd0#3\dimen1\ht0\dimen2\dp0#2%
\setbox0\hbox to#5\dimen0{}\ht0\dimen1\dp0\dimen2%
- \box0}}\hss}}
+ \box0}}\hss}}%
\fi}
% \end{macrocode}
@@ -691,22 +729,36 @@
% with the default values.
% \begin{macrocode}
\ushortCreate{ushort}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ushortw}
+% "\ushortw" is nothing else but an instance created by "\ushortCreate"
+% where the default values are changed by omitting \meta{factor after} and
+% by setting another value for \meta{summand}:
+% \begin{macrocode}
+\ushortCreate()[-.1em]{ushortw}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ushortd}
% "\ushortd" is nothing else but an instance created by "\ushortCreate"
% with the default values but the \textbackslash\meta{command} value
-% "\ushortdline"
+% "\ushortdline":
% \begin{macrocode}
\ushortCreate:\ushortdline{ushortd}
% \end{macrocode}
-% \begin{macro}{\ushortdline}
+% \end{macro}
+% \begin{macro}{\ushortdw}
+% "\ushortdw" is nothing else but an instance created by "\ushortCreate"
+% where the default values are modified as in "\ushortw" and "\ushortd":
+% \begin{macrocode}
+\ushortCreate:\ushortdline()[-.1em]{ushortdw}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ushortdline}
% "\ushortdline" in turn is very simple to implement:
% \begin{macrocode}
\def\ushortdline#1{\underline{\underline #1}}
% \end{macrocode}
-% \end{macro}
% \end{macro}
%
%