Debian Codegraph @

texmf-dist/doc/latex/labels4easylist/labels4easylist.tex

raw
1 % Copyright (c) 2015-2019 Robert Ryszard Paciorek <[email protected]>
2 %
3 % MIT License
4 %
5 % Permission is hereby granted, free of charge, to any person obtaining a copy
6 % of this software and associated documentation files (the "Software"), to deal
7 % in the Software without restriction, including without limitation the rights
8 % to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 % copies of the Software, and to permit persons to whom the Software is
10 % furnished to do so, subject to the following conditions:
11 %
12 % The above copyright notice and this permission notice shall be included in all
13 % copies or substantial portions of the Software.
14 %
15 % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 % IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 % FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 % AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 % LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 % SOFTWARE.
22
23 \documentclass[a4paper]{article}
24 \usepackage[ampersand]{labels4easylist}
25
26 \begin{document}
27
28 \title{The \texttt{labels4easylist} package}
29 \author{Robert Ryszard Paciorek <[email protected]>}
30 \date{2019-05-13}
31 \maketitle
32
33 \section{Introduction}
34
35 This packgage provide \verb#\itemLabel# macro for adding configurable reference labels to easylist items.
36 Macro requires one argument - label identifier (using in \verb#\ref# for references to label).
37 Macro accepts two optional argument - number of easylist hierarchy levels to omission in label text.
38
39 \section{Example}
40
41 \begin{easylist}
42 \NewList(
43 % separator pomiędzy numerami oraz separatory końcowe
44 Mark=.,FinalMark=.,
45 % ustawienie odstępów między punktami
46 Space=0.5em,Space*=0.5em,
47 % ustawienia wcięć
48 Hang=true,Align=move,FinalSpace=0.5em,Progressive*=3ex,Margin1=1ex,
49 Numbers5=l,Hide5=4,FinalMark5={)},Margin5=12ex,
50 Hide6=6,Style6*=-- ,Margin6=15ex,
51 )
52 \ListProperties(Start1=2)
53 & aaa aaa \label{A1} x\itemLabel{A2}x
54 && bbb bbb \label{B1} x\itemLabel{B2}x
55 \ListProperties(Start3=5)
56 &&&& ddd ddd \label{C1} \itemLabel{C2} x\itemLabel{C3}[2]x x\itemLabel{C4}[0][2]x
57 &&&&& eee eee \label{D1} \itemLabel{D2} x\itemLabel{D3}[4]x
58 \end{easylist}
59
60 \vspace{0.5cm}
61
62 \begin{tabular}{ p{2.5cm} p{2.5cm} p{4.5cm} }
63 standard \textbackslash{}label &
64 \textbackslash{}itemLabel &
65 \textbackslash{}itemLabel with extra args \\
66
67 \ref{A1} & \ref{A2} & \\
68 \ref{B1} & \ref{B2} & \\
69 \ref{C1} & \ref{C2} & \ref{C3} in \ref{C4}\\
70 \ref{D1} & \ref{D2} & \ref{D3}
71 \end{tabular}
72
73 \subsection{easylist code}
74 \begin{verbatim}
75 \ListProperties(Start1=2)
76 & aaa aaa \label{A1} x\itemLabel{A2}x
77 && bbb bbb \label{B1} x\itemLabel{B2}x
78 \ListProperties(Start3=5)
79 &&&& ddd ddd \label{C1} \itemLabel{C2} x\itemLabel{C3}[2]x x\itemLabel{C4}[0][2]x
80 &&&&& eee eee \label{D1} \itemLabel{D2} x\itemLabel{D3}[4]x
81 \end{verbatim}
82
83 \subsection{table code}
84 \begin{verbatim}
85 \ref{A1} & \ref{A2} & \\
86 \ref{B1} & \ref{B2} & \\
87 \ref{C1} & \ref{C2} & \ref{C3} in \ref{C4}\\
88 \ref{D1} & \ref{D2} & \ref{D3}
89 \end{verbatim}
90
91 \end{document}