diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:00 +0000 |
commit | f99ca8ae9aedd7644f9f9e5957e3b40fdc82ddad (patch) | |
tree | f2d1fe425b384480aa650893145e68984d8f9552 /Master/texmf-dist/tex/latex | |
parent | bcb22177f6a6bbd02e6a2cbb8d32517bdf36997b (diff) |
lhelp
git-svn-id: svn://tug.org/texlive/trunk@1039 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/lhelp/lhelp.sty | 467 |
1 files changed, 467 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lhelp/lhelp.sty b/Master/texmf-dist/tex/latex/lhelp/lhelp.sty new file mode 100644 index 00000000000..1cffb2e4729 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lhelp/lhelp.sty @@ -0,0 +1,467 @@ +%% +%% This is file `lhelp.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lhelp.dtx (with options: `package') +%% +%% File: lhelp.dtx +%% Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2003, +%% 2004 Volker Kuhlmann +%% All rights are reserved. +%% +\def\packagedate{2004/07/13} +\def\packageversion{2.1} +\def\packagesummary{collection of little helpers (VK)} +\edef\packageinfo{\packagedate\space v\packageversion\space\space\packagesummary} +\typeout{Package: lhelp \packageinfo} +\NeedsTeXFormat{LaTeX2e}[1998/06/01] +\ProvidesPackage{lhelp} + [\packageinfo] +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\DeclareOption{unitxspace}{% + \def\lhelpxspace{\xspace}% +} +\newcommand\lunitbox[1]{\mbox{\,#1}\lhelpxspace} +\newcommand\luunitbox[1]{\mbox{\muunit #1}\lhelpxspace} +\newcommand\muunit{\@ifundefined{textmu}{\kern.05em\ensuremath{\mu}}{\,\textmu}} +\let\lhelpxspace\relax +\DeclareOption{unitbasic}{% + \newcommand\g{\,g\lhelpxspace} + \newcommand\kg{\,kg\lhelpxspace} + \newcommand\mm{\,mm\lhelpxspace} + \newcommand\mum{\luunitbox{m}}% micro-metre + \newcommand\cm{\,cm\lhelpxspace} + \newcommand\m{\,m\lhelpxspace} + \newcommand\ml{\mL\lhelpxspace} + \newcommand\mL{\,mL\lhelpxspace} + \newcommand\ns{\,ns\lhelpxspace} + \newcommand\mus{\luunitbox{s}}% micro-seconds + \newcommand\ms{\,ms\lhelpxspace} + \newcommand\s{\,s\lhelpxspace} + \newcommand\h{\,h\lhelpxspace} +} +\DeclareOption{unitBasic}{% + %\ExecuteOptions{unitbasic} + \renewcommand\l{\,L\lhelpxspace} + \renewcommand\L{\,L\lhelpxspace} + \renewcommand\min{\,min\lhelpxspace} +} +\DeclareOption{unittemp}{% + \newcommand\degree@temperature{\ensuremath{^\circ}} + \providecommand\degree{\degree@temperature\lhelpxspace} + \providecommand\Degree{\degree@temperature\lhelpxspace} + \newcommand\celsius{\mbox{\degree@temperature\kern-.05em C}\lhelpxspace} + \newcommand\fahren{\mbox{\degree@temperature F}\lhelpxspace} +} +\DeclareOption{unitelec}{% + \newcommand\muA{\luunitbox{A}} + \newcommand\muH{\luunitbox{H}} + \newcommand\muV{\luunitbox{V}} + \newcommand\muW{\luunitbox{W}} + \providecommand\ohm{\lunitbox{$\Omega$}} + \newcommand\kohm{\mbox{k}\ohm} + \newcommand\Mohm{\mbox{M}\ohm} + \newcommand\ac{\textsubscript{ac}\lhelpxspace} + \newcommand\dc{\textsubscript{dc}\lhelpxspace} + \newcommand\rms{\textsubscript{rms}\lhelpxspace} + \newcommand\Vac{\lunitbox{V\kern-.16em\ac}} + \newcommand\Vdc{\lunitbox{V\kern-.16em\dc}} + \newcommand\VLL{\lunitbox{V\kern-.16em\textsubscript{LL}}} + \newcommand\kVLL{\lunitbox{V\kern-.16em\textsubscript{LL}}} +} +\DeclareOption{units}{% + \ExecuteOptions{unitbasic,unitBasic,unittemp,unitelec}% +} +\DeclareOption{page}{% + \ifx\setpapersize\undefined\else + \lhelp@paper + \setmarginsrb{30mm}{20mm}{25mm}{10mm}{0pt}{0mm}{}{10mm} + \fi + \lhelp@pars +} +\DeclareOption{emptypage}{% + \ifx\setpapersize\undefined + \pagestyle{empty}% + \else + \lhelp@paper + \setmargnohfrb{30mm}{20mm}{25mm}{10mm} + \fi + \lhelp@pars +} +\newcommand\lhelp@paper{% + \typeout{Package lhelp: setting paper size and margins.} + \setpapersize{A4} +} +\newcommand\lhelp@pars{% + \columnsep 8mm + \parskip 2ex \@plus0.5ex \@minus0.5ex + \parindent \z@ +} +\newcommand\draftmark@select{% + \PackageWarning{lhelp}{DRAFT mark selected}% + \pagestyle{plain}% +} +\DeclareOption{draftmark}{% + \newcommand\@draft@odd{\llap{\hbox{\draftfont{\today\ \ \draftname}}}} + \newcommand\@draft@even{\rlap{\hbox{\draftfont{\draftname\ \ \today}}}} + \newcommand\@psdraft@empty{% + \def\@oddfoot{\reset@font\hfil\hfil\@draft@odd}% + \def\@evenfoot{\reset@font\@draft@even\hfil\hfil}} + \newcommand\@psdraft@plain{% + \def\@oddfoot{\reset@font\hfil\thepage\hfil\@draft@odd}% + \def\@evenfoot{\reset@font\@draft@even\hfil\thepage\hfil}} + \add@toks\ps@empty\@psdraft@empty + \add@toks\ps@plain\@psdraft@plain + %\add@toks\ps@headings\@psdraft@plain + %(should be odd foot of pagestyle empty, even foot of pagestyle plain) + \let\lhelp@o@ps@headings\ps@headings + \def\ps@headings{\lhelp@o@ps@headings\@psdraft@plain}% + \draftmark@select +} +\newtoks\lhelp@toks +\newcommand\add@toks[2]{% + \expandafter\lhelp@toks\expandafter{#1}% + \expandafter\def\expandafter#1\expandafter{\the\lhelp@toks #2}} +\providecommand\draftname{DRAFT} +\newcommand\draftfont{\textsf} +\newcommand\draftmark@watermark{% + \newcommand\putdraftmarkps{% + \placepos{.2\textwidth}{.8\textheight}{\rotatebox{65}{% + \fontfamily{phv}\fontsize{.2\textheight}\z@\selectfont + \color{draftgray}\draftname}}} + \@ifundefined{rotatebox}{\AtEndOfPackage{\RequirePackage{graphics}}}{} + \@ifundefined{color}{\AtEndOfPackage{\RequirePackage{color}}}{} + \AtEndOfPackage{\definecolor{draftgray}{gray}{0.9}} %0.955, 0.93 + \def\ps@plain{\let\@mkboth\@gobbletwo + \def\@oddhead{\putdraftmarkps\hfil}\let\@evenhead\@oddhead} + \let\ps@empty\ps@plain + \let\ps@h@old\ps@headings \def\ps@headings{\ps@h@old + \def\@oddhead{\putdraftmarkps{\slshape\rightmark}\hfil\thepage}% + \def\@evenhead{\putdraftmarkps\thepage\hfil\slshape\leftmark}}% + \let\draftmark@watermark\empty + \draftmark@select +} +\DeclareOption{draftmarkps}{% + \draftmark@watermark + \csname ds@draftmark\endcsname % = \ExecuteOptions{draftmark} +} +\DeclareOption{draftmarkpsonly}{% + \draftmark@watermark +} +\DeclareOption{epsdraft}{\def\EPSopt{draft}} +\DeclareOption{epspdf}{% + \@ifundefined{pdfpagewidth}{\def\EPSfileext{.eps}}{\def\EPSfileext{.pdf}}} +\DeclareOption{refshortcuts}{% + \newcommand\cref{chapter~\ref} + \newcommand\Cref{Chapter~\ref} + \newcommand\sref{section~\ref} + \newcommand\Sref{Section~\ref} + \newcommand\aref{appendix~\ref} + \newcommand\Aref{Appendix~\ref} + \newcommand\fref{figure~\ref} + \newcommand\Fref{Figure~\ref} + \newcommand\tref{table~\ref} + \newcommand\Tref{Table~\ref} + \newcommand\pgref{page~\pageref} + \newcommand\Pgref{Page~\pageref} + \providecommand\phref{photo~\ref} + \providecommand\Phref{Photo~\ref} +} +\DeclareOption{printnotes}{% + \printnotestrue +} +\newif\ifprintnotes +\DeclareOption{ddmonthyyyy}{% + \providecommand\month@english{% + \ifcase \month \or January\or February\or March\or + April\or May\or June\or July\or August\or September\or + October\or November\or December\fi} + \newcommand\ddmonthyyyy{\number\day\space + \month@english\space \number\year}% + \AtBeginDocument{\let\today=\ddmonthyyyy} +} +\DeclareOption{yyyymmdd}{% + \AtBeginDocument{\let\today=\yyyymmdd} +} +\newcommand\yyyymmdd{\number\year/\number\month/\number\day}% +\DeclareOption{hh:mm}{% + \AtBeginDocument{\todayaddtime}% +} +\newcount\hour +\newcount\minute +\hour\time \divide\hour 60 +\minute-\hour \multiply\minute 60\advance\minute\time +\edef\timehhmm{\ifnum\hour<10 0\fi\the\hour + :\ifnum\minute<10 0\fi\the\minute} +\newcommand\todayaddtime{\edef\today{\today\,~\timehhmm}} +\DeclareOption{morefontsizes}{% + \newcommand\HUGE {\@setfontsize\HUGE{29.86}{36}} + \newcommand\veryhuge{\@setfontsize\veryhuge{35.83}{43}} + \newcommand\veryHuge{\@setfontsize\veryHuge{43}{52}} + \newcommand\veryHUGE{\@setfontsize\veryHUGE{51.6}{62}} +} +\DeclareOption{verbose}{\lh@verbosetrue} +\newif\iflh@verbose +\DeclareOption{shorttoc}{% + \let\old@tableofcontents=\tableofcontents + \def\tableofcontents{{% + \parskip \z@ \@plus 1pt \parindent \z@ + \let\old@addvspace=\addvspace + \def\addvspace##1{\skip0=##1\relax\old@addvspace{.5\skip0}}% + \old@tableofcontents\par + }}% +} +\DeclareOption{countryselect}{% + \newcommand\selectD{\lhelp@lang@sel{german}} + \newcommand\selectNZ{\lhelp@lang@sel{UKenglish}} + \newcommand\selectUK{\lhelp@lang@sel{UKenglish}} + \newcommand\selectUSA{\lhelp@lang@sel{USenglish}} +} +\newcommand\lhelp@lang@sel[1]{ + \expandafter\ifx\csname date#1\endcsname\relax + \PackageWarning{lhelp}{Language '#1' not loaded, + selecting hyphenation only}% + \@ifundefined{l@#1}% + {\PackageWarning{lhelp}{Hyphenation patterns for '#1' unavailable}}% + {\language=\csname l@#1\endcsname}% + \else + \selectlanguage{#1}% + \fi +} +\DeclareOption{X}{\AtEndOfFile{\RequirePackage{lhelpx}}} +\ProcessOptions +\@ifundefined{textsubscript}{% + \DeclareRobustCommand\textsubscript[1]{% + \m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@\selectfont #1}}}% + }% +}{} +\newcommand\ul{\underline} +\newcommand\ulbf[1]{\underline{\textbf{#1}}} +\newcommand\lineout[1]{{\setbox0\hbox{#1}\rlap{\raise.4ex\hbox{% + \vrule \@height.15ex \@width\wd0 \@depth 0pt}}\box0}} +\newcommand\larr{\mbox{$\leftarrow$}} % leftarrow +\newcommand\rarr{\mbox{$\rightarrow$}} % rightarrow +\newcommand\bs{\ifdim\fontdimen3\font=0pt\char`\\% (tt font) + \else\ensuremath{\backslash}\fi} +\newcommand\PP{\ensuremath{+}} +\newcommand\MM{\ensuremath{-}} +\newcommand\PM{\ensuremath{\pm}} +\newcommand\about{\mbox{$\approx$}} +\providecommand\eg{e.g.\ } +\providecommand\ie{i.e.\ } +\providecommand\etc{etc.\ } +\providecommand\ca{ca.\ } +\providecommand\resp{resp.\ } +\newcommand\@edtext[1]{% + {\slshape\footnotesize\fboxrule.4mm\fboxsep.4mm\fbox{#1}}} +\newcommand\Discuss{\protect\@edtext{discuss}} +\newcommand\Edit{\protect\@edtext{edit}} +\newcommand\@showmark{\fbox{\small$\clubsuit$}} +\newcommand\Mark{\protect\@showmark} +\newcommand\diameter{\@ifundefined{varnothing}% + {\mbox{\raise.15ex\hbox{o}\kern-.5em/}}% + {\,\kern-0.07em\ensuremath{\varnothing}}} +\providecommand\careof{\mbox{\raise.5ex\hbox{c}\kern-.2em/\kern-.2emo~}} +\newcommand\fparbox[1][\hsize]{\@ifnextchar({\@fparbox{#1}}{\@fparbox{#1}()}} +\long\def\@fparbox#1(#2)#3{\mbox{\fbox + {\dimen0=#1\advance\dimen0-2\fboxsep\advance\dimen0-2\fboxrule + \parbox#2{\dimen0}{#3}}}} +\newcommand\xyfparbox[4][c]{\mbox{\fbox{% + \dimen0=2\fboxrule\advance\dimen0 2\fboxsep + \dimen1=#2\advance\dimen1 -\dimen0 + \dimen2=#3\advance\dimen2 -\dimen0 + \parbox[#1][\dimen2][c]{\dimen1}{#4}}}} +\newcommand\lrlap[1]{\hb@xt@\z@{\hss#1\hss}} +\newcommand\tlap[1]{\vbox to\z@{\vss#1}} +\newcommand\blap[1]{\vbox to\z@{#1\vss}} +\newcommand\tblap[1]{\vbox to\z@{\vss#1\vss}} +\newcommand\rtlap[1]{\rlap{\tlap{#1}}} +\newcommand\rblap[1]{\rlap{\blap{#1}}} +\providecommand\vnull{\vbox{}} +\providecommand\vnul{{\offinterlineskip\vnull}} +\providecommand\hrulenull{\hrule\@width\z@\@height\z@\@depth\z@} +\newcommand\notes[1]{\ifprintnotes + \begingroup\reset@font\notesfont + \bnotemark + \ignorespaces #1\relax + \enotemark + \endgroup + \fi +} +\newcommand\nnotes[1]{} +\newcommand\bnotemark{% + \leavevmode + \vadjust{\vbox to\z@{\vss\llap + {\raise1ex\hbox{\footnotesize$\bigtriangledown$}\ \ }}}% +} +\newcommand\enotemark{% + \leavevmode + \vadjust{\vbox to\z@{\vss\llap + {\hbox{\footnotesize$\bigtriangleup$}\ \ }\vss}}% +} +\newcommand\notesfont{\footnotesize\sffamily} +\newcommand\includelower[3]{\ifinclude{#1}\def\@tempa{#2}\else + \def\@tempa{#3}\fi\@tempa} +\newcommand\ifinclude[1]{\ifnum#1<\value{excludelevel}} +\newcounter{excludelevel} +\setcounter{excludelevel}{5} +\providecommand\EPSfileext{} +\newcommand\placeEPS[4][]{% + \begingroup + \edef\w{#2}\ifx\w\empty\def\w{\the\z@}\fi + \edef\h{#3}\ifx\h\empty\def\h{\the\z@}\fi + \edef\eps@fn{#4\EPSfileext}% + \normalsize + \IfFileExists{\eps@fn}{% + %\epsfig{file={\eps@fn}\@more,width=\w,height=\h}% + % (obsolete - hangs if \w, \h are 0pt) + \edef\opt{\EPSopt,#1}% + \ifdim\w=\z@\else\edef\opt{\opt,width=\w}\fi + \ifdim\h=\z@\else\edef\opt{\opt,height=\h}\fi + \iflh@verbose\typeout{Loading EPS file: \opt\space(\eps@fn)}\fi + \expandafter\includegraphics\expandafter[\opt]{\eps@fn}% + }{% + \typeout{EPS file not found: <\eps@fn>}% + \ifdim\w=\z@\def\w{.8\hsize}\fi\ifdim\h=\z@\def\h{40mm}\fi + \xyfparbox[b]\w\h{\texttt{\@Sanitize{#1 }\\ + \@Sanitize{\eps@fn}}}% + }% + \endgroup +} +\newcommand\@Sanitize[1]{{\escapechar=-1 + \expandafter\string\csname#1\endcsname}} +\newcommand\EPSopt{} +\newcommand\addEPSopt[1]{% + \edef\EPSopt{\EPSopt,#1}} +\newcommand\listlabelleft[4]{% + \leftmargin #1\labelwidth #2\labelsep #3\rightmargin #4 + \advance\leftmargin\labelwidth\advance\leftmargin\labelsep + \def\makelabel##1{##1\hfil}% + \listparindent\z@} +\newcommand\listlabelleftindent[1]{\listlabelleft{1.5em}{#1}{1.5em}{4.5em}} +\newcommand\listshort{\topsep\z@\partopsep\z@\itemsep\z@\parsep\z@} +\newcommand\Eenumerate[1]{\ifnum \@enumdepth >\thr@@ \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \expandafter\list\csname label\@enumctr\endcsname + {\usecounter\@enumctr + \def\makelabel##1{\hss\llap{##1}}#1}% + \fi} +\let\endEenumerate=\endlist +\newcommand\Eitemize[1]{\ifnum \@itemdepth >\thr@@ \@toodeep\else + \advance\@itemdepth \@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter\list\csname \@itemitem\endcsname + {\def\makelabel##1{\hss\llap{##1}}#1}% + \fi} +\let\endEitemize=\endlist +\newenvironment{enumerateshort}{\Eenumerate{\listshort}}{\endEenumerate} +\newenvironment{itemizeshort}{\Eitemize{\listshort}}{\endEitemize} +\newcommand\clearoddpage{\clearpage\@newodd} +\newcommand\clearevenpage{\clearpage\@neweven} +\newcommand\clearthispage{\null\clearpage} +\newcommand\newoddpage{\@ifstar{\null}{}\newpage\@newodd} +\newcommand\newevenpage{\@ifstar{\null}{}\newpage\@neweven} +\newcommand\@newodd{\ifodd\c@page\else + \null\newpage\if@twocolumn\null\newpage\fi\fi} +\newcommand\@neweven{\ifodd\c@page + \null\newpage\if@twocolumn\null\newpage\fi\fi} +\newcommand\ensureonecolumn{% + \if@twocolumn + \onecolumn + \def\ensurecolumnend{\twocolumn\let\ensurecolumnend\relax}% + \fi +} +\def\endensureonecolumn{\ensurecolumnend} +\newcommand\ensuretwocolumn{% + \if@twocolumn\else + \twocolumn + \def\ensurecolumnend{\onecolumn\let\ensurecolumnend\relax}% + \fi +} +\def\endensuretwocolumn{\ensurecolumnend} +\newcommand\ensurecolumnend{} +\newdimen \minlinelen +\minlinelen=\ifx\marginparwidth\Und@phined .2\hsize \else \marginparwidth \fi +\ifx \@tempdimb\Und@fyned \csname newdimen\endcsname \@tempdimb\fi +\def\absval#1{\ifnum#1<\z@ -\fi#1} +\newcommand\hanghere{\leavevmode +\ifinner\else \begingroup + \displaywidowpenalty\widowpenalty + \skip@\lastskip \unskip\unpenalty \penalty\@M \hskip\skip@ \null + $$% Need a display to measure previous width + \lineskiplimit-999\p@ % so we get a baselineskip that we can cancel with: + \abovedisplayskip-\baselineskip \abovedisplayshortskip-\baselineskip + \belowdisplayskip\z@skip \belowdisplayshortskip\z@skip + \halign{##\cr\noalign{\global\dimen@i\prevdepth}% get depth of line above + \hbox{\vrule width\z@ depth\dimen@i }\cr}% preserve its depth + \dimen@\hsize \advance\dimen@-\minlinelen + \ifdim\absval\predisplaysize>\dimen@ + \global\dimen@i\z@ \else + \global\dimen@i\predisplaysize \global\advance\dimen@i-2em + \fi + $$\endgraf + \ifdim\dimen@i>\z@ % then back up a line + \@tempdimb\prevdepth + \prevdepth-999\p@ % make sure I get an exact \baselineskip + \parskip-999\p@ % but cancel the extra space + \advance\parskip-\baselineskip % cancel the \baselineskip + \advance\parskip-\@tempdimb\relax + \else + \parskip\z@skip + \fi \parindent\z@ \leavevmode +%% \@tempdimb does not get past the \endgroup!, +%% \vrule has to be before \endgroup. +%% blame Volker if this is not true. + \vrule depth\@tempdimb width\z@ + \endgroup + \hangindent\dimen@i \hangafter\z@ +%% \vrule depth\@tempdimb width\z@ % see 4 lines above. +\fi} +\newcommand\labelhangindent[1]{\setbox\@tempboxa\hbox{#1}% + \expandafter\everypar\expandafter=\expandafter{\expandafter% + \hangindent\the\wd\@tempboxa\hangafter 0\relax}% + \leavevmode\box\@tempboxa\hangafter 1\ignorespaces} +\long\def\gobble#1{} +\long\def\gobbletwo#1#2{} +\newenvironment{narrowpars}[1]{% + \everypar={\hangindent #1\hangafter 0\relax}% + \advance\columnwidth-#1\relax + \advance\hsize-#1\relax +}{% + \par +} +\providecommand\thinthinspace{\kern .08em\relax} +\newcommand\setTBstruts{\def\T{\rule{\z@}{2.6ex}}% + \def\B{\rule[-1.2ex]{\z@}{\z@}}} +\newcommand\placepos[3]{\hbox to\z@{\kern#1 + \raisebox{-#2}[\z@][\z@]{#3}\hss}\ignorespaces} +\newcommand\PSadjust{ + \tolerance 800 + \emergencystretch 2em + \doublehyphendemerits 5000 + \hfuzz 0pt + \leftskip 0pt \@minus1pt + \rightskip 0pt \@minus1pt +} +\endinput +%% +%% End of file `lhelp.sty'. |