summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-19 20:47:54 +0000
committerKarl Berry <karl@freefriends.org>2018-06-19 20:47:54 +0000
commit6c451de193d3fd68824f8c782701799d5444f68d (patch)
treef0748a572fc34bde02261382105340288613a340 /Master/texmf-dist/tex
parent1f887a120619a155a50a90c3bdcb0de5202c6856 (diff)
gatherenum (19jun18)
git-svn-id: svn://tug.org/texlive/trunk@48051 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/gatherenum/gatherenum.sty74
1 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/gatherenum/gatherenum.sty b/Master/texmf-dist/tex/latex/gatherenum/gatherenum.sty
new file mode 100644
index 00000000000..80f2ef139c4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/gatherenum/gatherenum.sty
@@ -0,0 +1,74 @@
+%%
+%% This is file `gatherenum.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gatherenum.dtx (with options: `package')
+%%
+%% File: gatherenum.dtx (C) Copyright 2016-2018 RIVAUD Julien
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% General Public License (GPL), either version 3 of this
+%% license or (at your option) any later version.
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\RequirePackage{expl3}[2016/01/19]
+\def\ExplFileName{gatherenum}
+\def\ExplFileDescription{Crossover between align* and enumerate}
+\def\ExplFileDate{2018/06/19}
+\def\ExplFileVersion{1.7}
+\ProvidesExplPackage
+ {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
+\RequirePackage{enumitem}
+\RequirePackage{xparse}
+\tl_set:Nn \enit@shortgatherenum {enum}
+\newlist{gatherenum}{enumerate*}{3}
+\tl_new:N \l__gatherenum_itemformat
+\cs_new_protected_nopar:Nn \__gatherenum_boxitem: {
+ \nobreak\skip_horizontal:n {\labelsep}
+ \hbox_set:Nn \enit@inbox {
+ \hbox:n {
+ \l__gatherenum_itemformat{\hbox_unpack:N \enit@inbox}
+ }
+ }
+}
+\enitkv@key{enumitem}{gatherformat}{\tl_set:Nn\l__gatherenum_itemformat{#1}}
+\let\__gatherenum_save_enumerate:w\enumerate
+\let\__gatherenum_save_endenumerate:w\endenumerate
+\RenewDocumentEnvironment{enumerate}{ O{} }{
+ \clist_if_in:nnTF { #1 } { gathered } {
+ \if@inlabel
+ \leavevmode
+ \fi
+ \par
+ \centering
+ \int_set_eq:NN \enitdp@gatherenum \enitdp@enumerate
+ \penalty \predisplaypenalty
+ \begin{gatherenum}[
+ itemjoin=\skip_horizontal:n{1em plus 1fil},
+ #1,
+ mode=boxed,
+ align=none,
+ afterlabel=\__gatherenum_boxitem:,
+ ]
+ }{
+ \__gatherenum_save_enumerate:w[#1]
+ }
+}{
+ \clist_if_in:nnTF { #1 } { gathered } {
+ \end{gatherenum}
+ \unskip
+ \int_set_eq:NN \clubpenalty \interlinepenalty
+ \int_set_eq:NN \widowpenalty \interlinepenalty
+ \par
+ }{
+ \__gatherenum_save_endenumerate:w
+ }
+}
+\SetEnumitemKey{gathered}{}
+\SetLabelAlign{none}{#1}
+\SetEnumitemKey{centered}{before*=\centering}
+\SetEnumitemKey{alignleft}{before*=\raggedright}
+%%
+%%
+%% End of file `gatherenum.sty'.