"Fossies" - the Fresh Open Source Software Archive 
Member "libsafe-2.0-16/doc/whitepaper-2.0/entry.sty" (19 Apr 2001, 3686 Bytes) of package /linux/misc/old/libsafe-2.0-16.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 % This is the entry package, which is copied directly from the Dog Book (i.e.,
2 % "The LaTeX Companion" by Goossens, Mittelbach, and Samarin.
3 %
4 % Four new environments are provided to improve upon the appearance of the
5 % description environment:
6 % entry
7 % Ventry
8 % Lentry
9 % Mentry
10 %
11 % For the entry environment, the item text for all items is indented the same,
12 % fixed length. If the label is longer than this fixed length, then text is
13 % shifted to accomodate the longer label:
14 % Description: Returns from a function. If
15 % issued at top-lvel, the interpreter
16 % simply terminates, just as if end of
17 % input had been reached.
18 % Errors: None.
19 % Return values: Any arguments in effect are
20 % passed back to the caller.
21 %
22 % For the Ventry environment, the item text for all items is indented the same
23 % length, such that all text will be to the right of the longest label:
24 % Description: Returns from a function. If
25 % issued at top-lvel, the interpreter
26 % simply terminates, just as if end of
27 % input had been reached.
28 % Errors: None.
29 % Return values: Any arguments in effect are
30 % passed back to the caller.
31 %
32 % For the Lentry environment, the item text for all items is indented the same,
33 % fixed length. If the label is longer than this fixed length, then start the
34 % item text on the next line:
35 % Description:
36 % Returns from a function. If
37 % issued at top-lvel, the interpreter
38 % simply terminates, just as if end of
39 % input had been reached.
40 % Errors: None.
41 % Return values:
42 % Any arguments in effect are
43 % passed back to the caller.
44 %
45 % For the Mentry environment, the item text for all items is indented the same,
46 % fixed length. The label is set inside a parbox and will be hyphenated if
47 % necessary:
48 % Descrip- Returns from a function. If
49 % tion: issued at top-lvel, the interpreter
50 % simply terminates, just as if end of
51 % input had been reached.
52 % Errors: None.
53 % Return Any arguments in effect are
54 % values: passed back to the caller.
55 %
56 % Timothy K. Tsai
57 % Lucent Technologies, Bell Labs
58
59 \ProvidesPackage{entry}[1998/09/29 New description environments from Dog Book]
60
61 \RequirePackage{calc}
62 \RequirePackage{ifthen}
63
64 \newcommand{\entrylabel}[1]{\mbox{\textsf{#1:}}\hfil}
65 \newenvironment{entry}
66 {\begin{list}{}%
67 {\renewcommand{\makelabel}{\entrylabel}%
68 \setlength{\labelwidth}{35pt}%
69 \setlength{\leftmargin}{\labelwidth+\labelsep}%
70 }%
71 }%
72 {\end{list}}
73
74 % Definition for Ventry
75 % Similar to description environment, but shifts all descriptions parts
76 % to the right
77 \newenvironment{Ventry}[1]%
78 {\begin{list}{}%
79 {\renewcommand{\makelabel}[1]{\textsf{##1:}\hfill}%
80 \settowidth{\labelwidth}{\textsf{#1:}}%
81 \setlength{\leftmargin}{\labelwidth+\labelsep}
82 }%
83 }%
84 {\end{list}}
85
86 \newlength{\Mylen}
87 \newcommand{\Lentrylabel}[1]{%
88 \settowidth{\Mylen}{\textsf{#1:}}%
89 \ifthenelse{\lengthtest{\Mylen > \labelwidth}}%
90 {\parbox[b]{\labelwidth}% term > labelwidth
91 {\makebox[0pt][l]{\textsf{#1:}}\\}}%
92 {\textsf{#1:}}% term < labelwidth
93 \hfil\relax}
94 \newenvironment{Lentry}%
95 {\renewcommand{\entrylabel}{\Lentrylabel}%
96 \begin{entry}}%
97 {\end{entry}}
98
99 \newcommand{\Mentrylabel}[1]%
100 {\raisebox{0pt}[1ex][0pt]{\makebox[\labelwidth][1]%
101 {\parbox[t]{\labelwidth}{\hspace{0pt}\textsf{#1:}}}}}
102 \newenvironment{Mentry}%
103 {\renewcommand{\entrylabel}{\Mentrylabel}\begin{entry}}%
104 {\end{entry}}