summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/labels4easylist/labels4easylist.tex
blob: 2624de02e1d355e4d271a8801cf8a81f846a6b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
% Copyright (c) 2015-2019 Robert Ryszard Paciorek <rrp@opcode.eu.org>
% 
% MIT License
% 
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% 
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
% 
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.

\documentclass[a4paper]{article}
\usepackage[ampersand]{labels4easylist}

\begin{document}

\title{The \texttt{labels4easylist} package}
\author{Robert Ryszard Paciorek <rrp@opcode.eu.org>}
\date{2019-05-13}
\maketitle

\section{Introduction}

This packgage provide \verb#\itemLabel# macro for adding configurable reference labels to easylist items.
Macro requires one argument - label identifier (using in \verb#\ref# for references to label).
Macro accepts two optional argument - number of easylist hierarchy levels to omission in label text.

\section{Example}

\begin{easylist}
\NewList(
	% separator pomiędzy numerami oraz separatory końcowe
	Mark=.,FinalMark=.,
	% ustawienie odstępów między punktami
	Space=0.5em,Space*=0.5em,
	% ustawienia wcięć
	Hang=true,Align=move,FinalSpace=0.5em,Progressive*=3ex,Margin1=1ex,
	Numbers5=l,Hide5=4,FinalMark5={)},Margin5=12ex,
	Hide6=6,Style6*=-- ,Margin6=15ex,
)
\ListProperties(Start1=2)
& aaa aaa     \label{A1} x\itemLabel{A2}x
&& bbb bbb    \label{B1} x\itemLabel{B2}x
\ListProperties(Start3=5)
&&&& ddd ddd  \label{C1} \itemLabel{C2} x\itemLabel{C3}[2]x x\itemLabel{C4}[0][2]x
&&&&& eee eee \label{D1} \itemLabel{D2} x\itemLabel{D3}[4]x
\end{easylist}

\vspace{0.5cm}

\begin{tabular}{ p{2.5cm} p{2.5cm} p{4.5cm} }
standard \textbackslash{}label &
\textbackslash{}itemLabel &
\textbackslash{}itemLabel with extra args \\

\ref{A1} & \ref{A2} & \\
\ref{B1} & \ref{B2} & \\
\ref{C1} & \ref{C2} & \ref{C3} in \ref{C4}\\
\ref{D1} & \ref{D2} & \ref{D3}
\end{tabular}

\subsection{easylist code}
\begin{verbatim}
\ListProperties(Start1=2)
& aaa aaa     \label{A1} x\itemLabel{A2}x
&& bbb bbb    \label{B1} x\itemLabel{B2}x
\ListProperties(Start3=5)
&&&& ddd ddd  \label{C1} \itemLabel{C2} x\itemLabel{C3}[2]x x\itemLabel{C4}[0][2]x
&&&&& eee eee \label{D1} \itemLabel{D2} x\itemLabel{D3}[4]x
\end{verbatim}

\subsection{table code}
\begin{verbatim}
\ref{A1} & \ref{A2} & \\
\ref{B1} & \ref{B2} & \\
\ref{C1} & \ref{C2} & \ref{C3} in \ref{C4}\\
\ref{D1} & \ref{D2} & \ref{D3}
\end{verbatim}

\end{document}