diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-15 22:08:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-15 22:08:43 +0000 |
commit | 77d3c063b0fe9ca99f061b382eef58d9ae33d667 (patch) | |
tree | 0320a918d38419291d417f7d79d86ca5090ef814 /Master/texmf-dist/tex/latex/asciilist | |
parent | 08627691402a42859c7f9f555582d79570442ce9 (diff) |
asciilist (15may16)
git-svn-id: svn://tug.org/texlive/trunk@41158 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/asciilist')
-rw-r--r-- | Master/texmf-dist/tex/latex/asciilist/asciilist.sty | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/asciilist/asciilist.sty b/Master/texmf-dist/tex/latex/asciilist/asciilist.sty index bbfc13c3ffc..0b673bcd428 100644 --- a/Master/texmf-dist/tex/latex/asciilist/asciilist.sty +++ b/Master/texmf-dist/tex/latex/asciilist/asciilist.sty @@ -20,7 +20,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{asciilist} - [2016/03/31 v2.1b Package for quickly creating nested lists] + [2016/04/15 v2.2 Package for quickly creating nested lists] \RequirePackage{etoolbox} \RequirePackage{trimspaces} \newenvironment{AsciiList}[2][]{% @@ -33,6 +33,9 @@ {\asclst@autocharstrue}% {\asclst@autocharsfalse\forcsvlist{\listadd\asclst@itemchars}{#2}}% \asclst@nlsetup\asclst@newline + \def\input##1{% + \everyeof{\noexpand}% + \expandafter\asclst@newline\@@input##1\relax}% \global\asclst@curlevel=0\relax% \let\UP=\asclst@levelsup% \let\UPTO=\asclst@levelsupto% @@ -43,14 +46,11 @@ \egroup} \newcommand\AsciiListFromFile[3][]{% \AsciiList[#1]{#2}% - \everyeof{\relax}% - \expandafter\asclst@newline\@@input #3\relax + \input{#3}% \endAsciiList} \newcommand\AsciiListFromFiles[3][]{% \AsciiList[#1]{#2}% - \everyeof{\relax}% - \def\asclst@@load##1{\expandafter\asclst@newline\@@input ##1\relax}% - \forcsvlist{\asclst@@load}{#3}% + \forcsvlist{\input}{#3}% \endAsciiList} {\catcode`\^^M=\active% \gdef\asclst@checknext#1#2{% @@ -134,6 +134,8 @@ \bgroup \def\asclst@curnestlvl{}% \asclst@nlsetup\asclst@docnewline% + \def\input##1{% + \expandafter\asclst@docnewline\@@input##1\relax}% \def\asclst@levelchrs{}% \def\do##1{\asclst@parsechmapentry##1\@undefined}% \ifstrempty{#1}% @@ -147,17 +149,16 @@ \egroup} \newcommand\AsciiDocListFromFile[2][]{% \AsciiDocList[#1]% - \everyeof{\relax}% - \expandafter\asclst@docnewline\@@input #2\relax + \input{#2}% \endAsciiDocList} \newcommand\AsciiDocListFromFiles[2][]{% \AsciiDocList[#1]% - \everyeof{\relax}% - \def\asclst@@load##1{\expandafter\asclst@docnewline\@@input##1\relax}% - \forcsvlist{\asclst@@load}{#2}% + \forcsvlist{\input}{#2}% \endAsciiDocList} {\catcode`\^^M=\active% - \gdef\asclst@docnewline{\asclst@docnewline@i{}}% + \gdef\asclst@docnewline{% + \everyeof{\noexpand}% + \asclst@docnewline@i{}}% \gdef\asclst@docnewline@i#1#2{% \ifinlist{#2}{\asclst@levelchrs}% {\asclst@docnewline@i{#1#2}}% @@ -284,6 +285,21 @@ \AsciiListRegisterEnv{subsubsection*}{}{}% {\AsciiListEndArg{\subsubsection*}} \AsciiListRegisterEnv{paragraph}{}{}{\AsciiListEndArg{\paragraph}} +\AsciiListRegisterEnv{Heading}{\asclst@Heading}{\endasclst@Heading}% + {\AsciiListEndArg{\csuse{\asclst@@sec}}} +\AsciiListRegisterEnv{Heading*}{\asclst@Heading}{\endasclst@Heading}% + {\AsciiListEndArg{\csuse{\asclst@@sec}*}} +\newenvironment{asclst@Heading}[1][section]% + {\bgroup\ifdefmacro{\asclst@@sec}% + {\edef\asclst@@sec{\csuse{asclst@Sec@\asclst@@sec}}}% + {\def\asclst@@sec{#1}}}% + {\egroup} +\newcommand\asclst@Sec@part{chapter} +\newcommand\asclst@Sec@chapter{section} +\newcommand\asclst@Sec@section{subsection} +\newcommand\asclst@Sec@subsection{subsubsection} +\newcommand\asclst@Sec@subsubsection{paragraph} +\newcommand\asclst@Sec@paragraph{subparagraph} \AsciiListRegisterDescEnv{description} \AsciiListRegisterDescEnv{compactdesc} \AsciiListRegisterEnv{Description}{\description}{\enddescription}% |