Debian Codegraph @

texmf-dist/tex/latex/lwarp/lwarp-hang.sty

raw
1 %%
2 %% This is file `lwarp-hang.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% lwarp.dtx (with options: `hang')
8 %% This is a generated file.
9 %% Copyright 2016-2026 Brian Dunn
10 %%
11 %% This work may be distributed and/or modified under the
12 %% conditions of the LaTeX Project Public License, either version 1.3
13 %% of this license or (at your option) any later version.
14 %% The latest version of this license is in
15 %% http://www.latex-project.org/lppl.txt
16 %% and version 1.3 or later is part of all distributions of LaTeX
17 %% version 2005/12/01 or later.
18 \LWR@ProvidesPackageDrop{hang}[2017/02/18]
19 \newlength{\hangingindent}
20 \setlength{\hangingindent}{1em}
21 \newlength{\hangingleftmargin}
22 \setlength{\hangingleftmargin}{0em}
23
24 \newcommand*{\LWR@findhangingleftmargin}{%
25 \setlength{\LWR@templengthone}{\hangingleftmargin}%
26 \addtolength{\LWR@templengthone}{\hangingindent}%
27 }
28
29 \newenvironment{hangingpar}
30 {
31 \LWR@findhangingleftmargin%
32 \BlockClass[%
33 \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
34 \LWR@print@mbox{text-indent:-\LWR@printlength{\hangingindent}}%
35 ]%
36 {hangingpar}%
37 }
38 {\endBlockClass}
39
40 \newenvironment{hanginglist}
41 {%
42 \renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}%
43 \renewcommand*{\LWR@printopenlist}{%
44 \LWR@findhangingleftmargin%
45 ul % space
46 class=\textquotedbl{}hanging\textquotedbl{} % space
47 style=\textquotedbl%
48 \LWR@print@mbox{list-style-type:none;} % extra space
49 \LWR@print@mbox{%
50 margin-left:\LWR@printlength{\LWR@templengthone}%
51 } ; % extra space
52 \LWR@print@mbox{%
53 text-indent:-\LWR@printlength{\hangingindent}%
54 }%
55 \textquotedbl%
56 }%
57 \LetLtxMacro\item\LWR@itemizeitem%
58 \list{}{}%
59 }
60 {\endlist}
61
62 \newenvironment{compacthang}
63 {\hanginglist}
64 {\endhanginglist}
65
66 \newlength{\labeledleftmargin}
67 \setlength{\labeledleftmargin}{0em}
68
69 \newenvironment{labeledpar}[2]
70 {%
71 \BlockClass[%
72 \LWR@findhangingleftmargin%
73 \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
74 \LWR@print@mbox{text-indent:-\LWR@printlength{\hangingindent}}%
75 ]{labeledpar}%
76 \InlineClass{labeledparlabel}{#2}%
77 }
78 {\endBlockClass}
79
80 \newenvironment{labeledlist}[1]
81 {\hanginglist}
82 {\endhanginglist}
83
84 \newenvironment{compactlabel}[1]
85 {\hanginglist}
86 {\endhanginglist}
87
88 \endinput
89 %%
90 %% End of file `lwarp-hang.sty'.