podtrhavani

Petr Sojka sojka at daeron.ics.muni.cz
Thu May 25 19:33:16 CEST 1995


"Filip Kadlec wrote:"
:
: Dobry den, vazeni.
: Nedavno kdosi shanel makro na podtrhavani textu takove, aby se automaticky
: uvnitr zalamovala slova. Nahodou jsem neco takoveho nasel. Nemam s tim
: ovsem zadne zkusenosti, takze nevim vubec jestli to funguje... ale snad ano.
: Je to na ftp.muni.cz:\pub\incoming\ulem.tex   .

Jde o styl Donalda Arsenau -- na CTAN (t.j i na ftp.muni.cz) je novejsi verse
hned v nekolika adresarich pod nazvem ulem.sty. Funguje pod LaTeX[2e]
i plain. Nize prikladam vynatek z dokumentace.

Zdravi
Petr Sojka
:                 Zdravi a uspesne TeXovani preje
:                                    Filip Kadlec

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.



More information about the csTeX mailing list