diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/ushort | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/ushort')
-rw-r--r-- | Master/texmf-dist/doc/latex/ushort/ushort.tex | 20 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ushort/ushort.txt | 167 |
2 files changed, 187 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/ushort/ushort.tex b/Master/texmf-dist/doc/latex/ushort/ushort.tex new file mode 100644 index 00000000000..88f1a9841a0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ushort/ushort.tex @@ -0,0 +1,20 @@ +\documentclass{ltxdoc} +\OnlyDescription%% Comment this out, or +%%\AlsoImplementation%% uncomment this line, if you want to see the source. + +%% If you want an index, uncomment one of the following lines. +%% After running latex a first time, you have to use +%% makeindex -s gind.ist ushort +%% Then run latex again. +%%\CodelineIndex% comment this out if you want an index referring to codelines +%%\PageIndex% comment this out if you want an index referring to pages +%%\OldMakeindex% uncomment this line, if your MakeIndex is pre-v2.9 + +\setlength\hfuzz{15pt} +\hbadness=7000 +\begin{document} +\DocInput{ushort.dtx} +\end{document} +\endinput +%% +%% End of file `ushort.tex'. diff --git a/Master/texmf-dist/doc/latex/ushort/ushort.txt b/Master/texmf-dist/doc/latex/ushort/ushort.txt new file mode 100644 index 00000000000..46128d5c222 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ushort/ushort.txt @@ -0,0 +1,167 @@ + +%%# +%%# Author: +%%# +%%# M. V\"ath vaeth@mathematik.uni-wuerzburg.de +%%# + +%%############################################################################# +%%# +%%# With this package you may write shorter (or longer) underlines/underbars. +%%# This is particularly useful for `underlined' variables which are needed +%%# by some engineers. +%%# +%%############################################################################# + +%%# +%%# This package was tested with plain TeX, LaTeX 2.09, and LaTeX 2e, +%%# and it should actually run with most other TeX formats. +%%# + + +%%# In the newsgroup de.comp.text.tex the question arose whether it is +%%# possible to define `underlined' variables: Such variables are required for +%%# complex vectors by electrical engineers. +%%# The usual \underline command is not appropriate for this purpose, because +%%# the underlines of concatenated variables merge which is not desired. +%%# One may use the macro "\ushort" of this package instead. +%%# +%%# However, this package also provides a generic macro which allows to +%%# create new commands which work similarly but use different parameters +%%# for the underlines. In particular, it is possible to create e.g. a macro +%%# which draws longer underlines than usual or which does a similar task with +%%# \underbar. + +%%# +%%# Installation: +%%# + +%%# To use ushort, you have to put `ushort.sty' in a path where TeX looks +%%# for its input files. The TeX documents using ushort need the +%%# following modifications in their header: +%%# +%%# a) If you use LaTeX2.09, use ushort as a style option, e.g. +%%# \documentstyle[ushort]{article} +%%# or +%%# \documentstyle[ushort,12pt]{article} +%%# b) If you use LaTeX2e, put in the preamble the command +%%# \usepackage{ushort} +%%# c) If you use some other (non-LaTeX) format, you will probably have to +%%# insert a line like +%%# \catcode`\@=11\relax \input ushort.sty \catcode`\@=12\relax +%%# +%%# The only LaTeX-specific commands used in `ushort.sty' are: +%%# +%%# \newcommand (only in the form \newcommand{\command}{} to ensure that +%%# \command was not defined before) +%%# \ProvidesPackage +%%# \typeout +%%# +%%# The above commands are used only if they are defined. +%%# + +%%# +%%# Description of the provided macros: +%%# + +%%# This package provides the following macros. +%%# +%%# \ushort +%%# 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 +%%# This is analogous to \ushort 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. +%%# 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 +%%# or \ushortd but for which certain parameters can be changed. +%%# \ushortEnsuremath +%%# This is rather equivalent to the LaTeX2e macro \ensuremath +%%# (but is available also e.g. in compatibility mode or if this package +%%# is used with plain TeX or LaTeX 2.09). +%%# +%%# Only \ushortCreate needs a detailed description. Its call syntax is: +%%# +%%# \ushortCreate*:\command[Summand]<FactorBefore>(FactorAfter) +%%# +{additional calculations}{Name} +%%# +%%# All arguments except for the last one {Name} are optional. +%%# Moreover, also the order of these arguments can be changed arbitrarily, +%%# and they can be repeated (all except for the last occurrence of each +%%# each type of argument is ignored). +%%# Only the last argument {Name} can not be repeated and must be at the end. +%%# +%%# 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. +%%# +%%# The macro \Name can be used analogously to \underline, but the precise +%%# behavior depends on the arguments of \ushortCreate. +%%# +%%# The meaning of the arguments is as follows: +%%# +%%# * If the * is present, then the command \underbar is used +%%# (instead of the default \underline) to draw the underline. +%%# Moreover, the command \underbar is not used in math mode (while +%%# \underline is used in math mode). +%%# :\command Use \command instead of the default \underline to draw the +%%# underline. Whether \command is executed in math mode or not +%%# depends on whether * has been used. +%%# [Summand] Add Summand to the length of the underline before drawing. +%%# Values like -.3\ht0 are admissible. Summand is expanded only when \Name +%%# is expanded, and \wd0 or \ht0 give the width respectively height of the +%%# argument given to \name. In particular, also the value of the unit `em' +%%# depends on the mode in which \Name is called. +%%# The default is empty (which means 0pt but is faster). +%%# <FactorBefore> Multiply the length of the underline before adding Summand. +%%# The empty string means 1 (and costs no time). +%%# The default is empty. +%%# (FactorAfter) Multiply the length of the underline after adding Summand. +%%# The empty string means 1 (and costs no time). +%%# The default is `.8'. +%%# +{Additional calculations} With this argument, you can introduce an +%%# arbitrary command sequence into the generated command: This sequence +%%# is executed (within a group) after Summand was added, but before +%%# FactorAfter is applied. This sequence is meant to do additional +%%# calculation with \dimen0 which is the length of the generated +%%# underline. When the calculations are carried out, \box0 contains the +%%# content which is to be underlined. However, in contrast to previous +%%# releases of this package, modifications of this box are ignored. +%%# Instead, the registers \dimen1 and \dimen2 also contain the height and +%%# depth of this box - you have to modify these values to attain the +%%# desired effect. +%%# +%%# Examples: +%%# +%%# The most important examples are the macros \ushort and \ushortd which +%%# have been created by +%%# +%%# \ushortCreate{ushort} +%%# \ushortCreate:\ushortdline{ushortd} +%%# +%%# A further example demonstrating other parameters is +%%# +%%# \ushortCreate(3)(.5){uline} +%%# +%%# 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)). +%%# +%%# A more useful example is +%%# +%%# \ushortCreate()[-.3\ht0]{ushort} +%%# +%%# This modifies \ushort such that the underline is shrunken by .3 times +%%# the height of the argument of \ushort. If the argument is one letter, this +%%# means: The higher the letter, the shorter the underline. This looks good +%%# for italic fonts with some exceptions (like the letter `b'). + +\endinput +%% +%% End of file `ushort.txt'. |