texlive[51124] Master: labels4easylist (14may19)
commits+karl at tug.org
commits+karl at tug.org
Tue May 14 23:41:07 CEST 2019
Revision: 51124
http://tug.org/svn/texlive?view=revision&revision=51124
Author: karl
Date: 2019-05-14 23:41:06 +0200 (Tue, 14 May 2019)
Log Message:
-----------
labels4easylist (14may19)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/labels4easylist/
trunk/Master/texmf-dist/doc/latex/labels4easylist/README
trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.pdf
trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.tex
trunk/Master/texmf-dist/tex/latex/labels4easylist/
trunk/Master/texmf-dist/tex/latex/labels4easylist/labels4easylist.sty
trunk/Master/tlpkg/tlpsrc/labels4easylist.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/labels4easylist/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/labels4easylist/README (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/labels4easylist/README 2019-05-14 21:41:06 UTC (rev 51124)
@@ -0,0 +1,10 @@
+Package labels4easylist provide \itemLabel macro for adding configurable
+reference labels to easylist items. Macro requires one argument - label
+identifier (using in \ref for references to label).
+
+Version 1.0 (2019-05-13): first public release
+
+
+Copyright (C) 2015-2019, Robert Ryszard Paciorek <rrp at opcode.eu.org>
+
+This is free software distributed under terms of The MIT License.
Property changes on: trunk/Master/texmf-dist/doc/latex/labels4easylist/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.pdf 2019-05-14 21:40:28 UTC (rev 51123)
+++ trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.pdf 2019-05-14 21:41:06 UTC (rev 51124)
Property changes on: trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.tex 2019-05-14 21:41:06 UTC (rev 51124)
@@ -0,0 +1,91 @@
+% Copyright (c) 2015-2019 Robert Ryszard Paciorek <rrp at 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 at 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}
Property changes on: trunk/Master/texmf-dist/doc/latex/labels4easylist/labels4easylist.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/labels4easylist/labels4easylist.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/labels4easylist/labels4easylist.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/labels4easylist/labels4easylist.sty 2019-05-14 21:41:06 UTC (rev 51124)
@@ -0,0 +1,90 @@
+% Copyright (c) 2015-2019 Robert Ryszard Paciorek <rrp at 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.
+
+% Version 1.0 (2019-05-13): first public release
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{labels4easylist}
+
+\RequirePackage{xparse}
+\RequirePackageWithOptions{easylist}
+
+%
+% configurable refernece labels for easylist items
+%
+
+% add label to item entry, usage:
+% \itemLabel{LabelName}[skipA][skibB]
+% skipA - number of level to skip at front
+% skipB - number of level to skip at end
+\DeclareDocumentCommand{\itemLabel}{ m O{0} o } {%
+ % prepare ref-label text in \elLabel at currRefLabel
+ \xdef\elLabel at currRefLabel{}{%
+ \elLabel at currLevel=1%
+ \elLabel at minLevel=#2%
+ \elLabel at maxLevel=\el at PreviousItem%
+ \IfValueTF{#3}{\advance\elLabel at maxLevel by -#3}{\elLabel at GetLastLevel}%
+ \elLabel at RecurencyGetEnumLevel%
+ }%
+ % create ref-label with id from #1 and text from \elLabel at currRefLabel
+ \let\@currentlabel\elLabel at currentlabel%
+ \def\@currentlabel{\elLabel at currRefLabel}%
+ \label{#1}%
+ \let\elLabel at currentlabel\@currentlabel%
+}
+
+% counters
+\newcount\elLabel at currLevel
+\newcount\elLabel at minLevel
+\newcount\elLabel at maxLevel
+
+% recursive skip final unused levels and not enumerate levels
+\newcommand{\elLabel at GetLastLevel} {
+ \ifnum\elLabel at maxLevel>\elLabel at minLevel%
+ \ifnum\elLabel at maxLevel=\csname Hide\the\elLabel at maxLevel\endcsname
+ \advance\elLabel at maxLevel by -1
+ \elLabel at GetLastLevel
+ \else%
+ \ifnum\value{List\the\elLabel at maxLevel}=0
+ \advance\elLabel at maxLevel by -1
+ \elLabel at GetLastLevel
+ \fi%
+ \fi%
+ \fi%
+}
+
+% recursive build label text for reference
+\newcommand{\elLabel at RecurencyGetEnumLevel} {%
+ % if (minLev < currLev AND currLev <= maxLev AND value !=0)
+ \ifnum\elLabel at currLevel>\elLabel at minLevel \ifnum\elLabel at currLevel>\elLabel at maxLevel\else \ifnum\value{List\the\elLabel at currLevel}=0\else%
+ \xdef\elLabel at currRefLabel{\elLabel at currRefLabel%
+ \csname el at NumberDenotation:\csname Numbers\the\elLabel at currLevel\endcsname\endcsname{List\the\elLabel at currLevel}%
+ \ifnum\elLabel at currLevel<\elLabel at maxLevel \csname Mark\the\elLabel at currLevel\endcsname \fi%
+ }%
+ \fi\fi\fi%
+ % recursion:
+ \ifnum\elLabel at currLevel<\elLabel at maxLevel
+ \advance\elLabel at currLevel by 1
+ \elLabel at RecurencyGetEnumLevel
+ \fi%
+}
Property changes on: trunk/Master/texmf-dist/tex/latex/labels4easylist/labels4easylist.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2019-05-14 21:40:28 UTC (rev 51123)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2019-05-14 21:41:06 UTC (rev 51124)
@@ -381,7 +381,8 @@
ktv-texdata ku-template kurdishlipsum kurier kvmap
l2picfaq l2tabu l2tabu-english l2tabu-french l2tabu-italian l2tabu-spanish
l3build l3kernel l3packages l3experimental
- labbook labels labelschanged labyrinth ladder lambda-lists langcode langsci
+ labbook labels labels4easylist labelschanged
+ labyrinth ladder lambda-lists langcode langsci
lapdf lastpackage lastpage
latex latex-bib-ex latex-bib2-ex latex-brochure
latex-course latex-doc-ptr latex-fonts
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2019-05-14 21:40:28 UTC (rev 51123)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2019-05-14 21:41:06 UTC (rev 51124)
@@ -619,6 +619,7 @@
depend l3build
depend labbook
depend labels
+depend labels4easylist
depend labelschanged
depend lastpackage
depend lastpage
Added: trunk/Master/tlpkg/tlpsrc/labels4easylist.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list