From 3152d4876d6ed4d4713ea524baec83e02924ec4b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 13 Aug 2019 20:54:26 +0000 Subject: scontents (13aug19) git-svn-id: svn://tug.org/texlive/trunk@51872 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/scontents/README.md | 17 +- .../texmf-dist/doc/latex/scontents/scontents.pdf | Bin 182019 -> 193183 bytes .../source/latex/scontents/scontents.dtx | 373 +++++++++++---------- .../texmf-dist/tex/latex/scontents/scontents.sty | 8 +- 4 files changed, 209 insertions(+), 189 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/scontents/README.md b/Master/texmf-dist/doc/latex/scontents/README.md index 71639b8d695..ddcb6524ede 100644 --- a/Master/texmf-dist/doc/latex/scontents/README.md +++ b/Master/texmf-dist/doc/latex/scontents/README.md @@ -1,10 +1,10 @@ -# scontents — Store LaTeX content in Sequences (l3seq) -- Version: 1.0 -- Date: 2019/07/30 -- Authors: Pablo González and Phelype Oleinik +## scontents — Stores LaTeX contents in memory or files +- Version: 1.1 +- Date: 2019/08/12 +- Author: Pablo González ## Description -The `scontents` package stores valid `LaTeX` code in sequences using the +The `scontents` package stores valid `LaTeX` code in memory (sequences) using the `l3seq` module of `expl3`. The stored content (including verbatim) can be used as many times as desired in the document, additionally can be written to external files if desired. @@ -15,12 +15,17 @@ The package requires the following packages: - [l3keys2e](https://ctan.org/pkg/l3keys2e) - [xparse](https://ctan.org/pkg/xparse) +## Installation + +The package `scontents` is present in `TeXLive` and `MiKTeX`, use the +package manager to install. For a manual installation, put `scontents.dtx` +in your working directory and run `tex scontents.dtx`. + ## License The scontents package may be modified and distributed under the terms and conditions of the [LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater. ## Contents - README.md (this file) -- scontents.sty (the sty) - scontents.pdf (documentation) - scontents.dtx (master file that produced all files) diff --git a/Master/texmf-dist/doc/latex/scontents/scontents.pdf b/Master/texmf-dist/doc/latex/scontents/scontents.pdf index 240570a5e1d..81229e496b2 100644 Binary files a/Master/texmf-dist/doc/latex/scontents/scontents.pdf and b/Master/texmf-dist/doc/latex/scontents/scontents.pdf differ diff --git a/Master/texmf-dist/source/latex/scontents/scontents.dtx b/Master/texmf-dist/source/latex/scontents/scontents.dtx index c376fd9dc2c..6787d4e4880 100644 --- a/Master/texmf-dist/source/latex/scontents/scontents.dtx +++ b/Master/texmf-dist/source/latex/scontents/scontents.dtx @@ -1,37 +1,5 @@ % \iffalse meta-comment %<*internal> -\iffalse -% -%<*readme> -# scontents — Store LaTeX content in Sequences (l3seq) -- Version: 1.0 -- Date: 2019/07/30 -- Authors: Pablo González and Phelype Oleinik - -## Description -The `scontents` package stores valid `LaTeX` code in sequences using the -`l3seq` module of `expl3`. The stored content (including verbatim) can be -used as many times as desired in the document, additionally can be written -to external files if desired. - -## Requirements -The package requires the following packages: -- [filecontentsdef](https://ctan.org/pkg/filecontentsdef) -- [l3keys2e](https://ctan.org/pkg/l3keys2e) -- [xparse](https://ctan.org/pkg/xparse) - -## License -The scontents package may be modified and distributed under the terms and -conditions of the [LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater. - -## Contents -- README.md (this file) -- scontents.sty (the sty) -- scontents.pdf (documentation) -- scontents.dtx (master file that produced all files) -% -%<*internal> -\fi \def\nameofplainTeX{plain} \ifx\fmtname\nameofplainTeX\else \expandafter\begingroup @@ -53,11 +21,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \generate{ \file{\jobname.ins}{\from{\jobname.dtx}{install}} } -\nopreamble\nopostamble -\usedir{doc/latex/scontents} -\generate{ - \file{README.md}{\from{\jobname.dtx}{readme}} -} + \ifx\fmtname\nameofplainTeX \expandafter\endbatchfile \else @@ -67,35 +31,11 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l %<*driver> \documentclass[full]{l3doc} \usepackage[top=0.5in,bottom=0.5in,left=2.0in,right=1in,footskip=0.2in,headsep=10pt]{geometry} +\usepackage[osf,mono=false,scale=0.95,llscaled=0.95]{libertine} \usepackage{unicode-math} -\setmathfont[Scale = 0.95]{Latin Modern Math} -\setmainfont[ - Numbers = OldStyle, - Ligatures = TeX, - Scale = 0.95, - UprightFont = *-Regular, - ItalicFont = *-Italic, - BoldFont = *-Bold, - BoldItalicFont = *-BoldItalic, - SmallCapsFeatures = {Letters=SmallCaps}, - Extension =.otf]{LibertinusSerif} -\setsansfont[ - Numbers = OldStyle, - Ligatures = TeX, - Scale = 0.95, - UprightFont = *-Regular, - ItalicFont = *-Italic, - BoldFont = *-Bold, - SmallCapsFeatures = {Letters=SmallCaps}, - Extension = .otf]{LibertinusSans} -\setmonofont[ - Scale = 0.80, - Extension = .otf, - UprightFont = *-Regular , - ItalicFont = *-RegularIt, - BoldFont = *-Medium , - BoldItalicFont = *-MediumIt - ]{SourceCodePro} +\setmathfont[Scale = 0.95]{latinmodern-math.otf} +\usepackage[osf,scale=0.80,semibold]{sourcecodepro} +\usepackage{fontawesome5} \newfontfamily\lmmitalic{lmmono10-italic.otf}[ Scale = 0.95,% Extension = .otf,% @@ -108,7 +48,6 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l RawFeature = {+latn,+rand,+kern,+size},% ] \usepackage[svgnames]{xcolor} -\usepackage{fontawesome5} \usepackage[sf,bf,compact,medium,pagestyles]{titlesec} \usepackage{hyperxmp,lastpage,imakeidx,microtype,attachfile2} \usepackage{adjustbox,multicol,listings,accsupp,titletoc} @@ -140,102 +79,102 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \expandafter\DoNotIndex\expandafter{\string\}} \expandafter\DoNotIndex\expandafter{\string\begin} \newcommand{\HP}[1]{\emph{\hyperpage{#1}}\normalsize} -\def\MYSortIndex#1#2{\index[mydoc]{#1\actualchar#2|HP}} +\def\MYSortIndex#1#2{\index[userdoc]{#1\actualchar#2|HP}} \indexsetup{level=\section,firstpagestyle=myheader} -\makeindex[name=mydoc,options=-s gind.ist,columnsep=15pt,title={Index of Documentation}] +\makeindex[name=userdoc,options=-s gind.ist,columnsep=15pt,title={Index of Documentation}] \makeindex[options=-s gind.ist,columnsep=15pt,title={Index of Implementation}] \setlength{\parindent}{0pt} -%%-------------------- ONLY FOR DOCUMENTATION ------------------------%% -% Colors for options +%^^A------------------- ONLY FOR DOCUMENTATION ------------------------%% +%^^A Colors for options \definecolor{optcolor}{rgb}{0.281,0.275,0.485} \definecolor{mypkgcolor}{RGB}{0,128,128}% -% Custom \mymeta[...]{...}, \mymarg[...]{...} and \myoarg[...]{...} for color +%^^A Custom \meta[...]{...}, \marg[...]{...} and \oarg[...]{...} with color \ExplSyntaxOn %^^A user level commands \NewDocumentCommand{\mymeta}{O{}m} { - \mydoc_mymeta_generic:Nnn \mydoc_mymeta:n { #1 } { #2 } + \userdoc_meta_generic:Nnn \userdoc_meta:n { #1 } { #2 } } \NewDocumentCommand{\mymarg}{O{}m} { - \mydoc_mymeta_generic:Nnn \mydoc_mymarg:n { #1 } { #2 } + \userdoc_meta_generic:Nnn \userdoc_marg:n { #1 } { #2 } } \NewDocumentCommand{\myoarg}{O{}m} { - \mydoc_mymeta_generic:Nnn \mydoc_myoarg:n { #1 } { #2 } + \userdoc_meta_generic:Nnn \userdoc_oarg:n { #1 } { #2 } } %^^A variables and keys -\tl_new:N \l_mydoc_mymeta_font_tl +\tl_new:N \l_userdoc_meta_font_tl -\keys_define:nn { mydoc / mymeta } +\keys_define:nn { userdoc / mymeta } { type .choice:, - type / tt .code:n = \tl_set:Nn \l_mydoc_mymeta_font_tl { \ttfamily }, - type / rm .code:n = \tl_set:Nn \l_mydoc_mymeta_font_tl { \rmfamily }, + type / tt .code:n = \tl_set:Nn \l_userdoc_meta_font_tl { \ttfamily }, + type / rm .code:n = \tl_set:Nn \l_userdoc_meta_font_tl { \rmfamily }, type .initial:n = tt, - cf .tl_set:N = \l_mydoc_mymeta_color_tl, + cf .tl_set:N = \l_userdoc_meta_color_tl, cf .initial:n = black, - ac .tl_set:N = \l_mydoc_mymeta_anglecolor_tl, + ac .tl_set:N = \l_userdoc_meta_anglecolor_tl, ac .initial:n = black, - sbc .tl_set:N = \l_mydoc_mymeta_brackcolor_tl, + sbc .tl_set:N = \l_userdoc_meta_brackcolor_tl, sbc .initial:n = black, - cbc .tl_set:N = \l_mydoc_mymeta_bracecolor_tl, + cbc .tl_set:N = \l_userdoc_meta_bracecolor_tl, cbc .initial:n = black, } %^^A internal commands -\cs_new_protected:Npn \mydoc_mymeta_generic:Nnn #1 #2 #3 +\cs_new_protected:Npn \userdoc_meta_generic:Nnn #1 #2 #3 { \group_begin: - \keys_set:nn { mydoc / mymeta } { #2 } - \color{ \l_mydoc_mymeta_color_tl } - \l_mydoc_mymeta_font_tl - #1 { #3 } % #1 is \mydoc_mymeta:n, \mydoc_mymarg:n or \mydoc_myoarg:n + \keys_set:nn { userdoc / mymeta } { #2 } + \color{ \l_userdoc_meta_color_tl } + \l_userdoc_meta_font_tl + #1 { #3 } % #1 is \userdoc_meta:n, \userdoc_marg:n or \userdoc_oarg:n \group_end: } -\cs_new_protected:Npn \mydoc_mymeta:n #1 +\cs_new_protected:Npn \userdoc_meta:n #1 { - \mydoc_mymeta_angle:n { \textlangle } - \mydoc_mymeta_mymeta:n { #1 } - \mydoc_mymeta_angle:n { \textrangle } + \userdoc_meta_angle:n { \textlangle } + \userdoc_meta_meta:n { #1 } + \userdoc_meta_angle:n { \textrangle } } -\cs_new_protected:Npn \mydoc_mymarg:n #1 +\cs_new_protected:Npn \userdoc_marg:n #1 { - \mydoc_mymeta_brace:n { \textbraceleft } - \mydoc_mymeta:n { #1 } - \mydoc_mymeta_brace:n { \textbraceright } + \userdoc_meta_brace:n { \textbraceleft } + \userdoc_meta:n { #1 } + \userdoc_meta_brace:n { \textbraceright } } -\cs_new_protected:Npn \mydoc_myoarg:n #1 +\cs_new_protected:Npn \userdoc_oarg:n #1 { - \mydoc_mymeta_brack:n { [ } - \mydoc_mymeta:n { #1 } - \mydoc_mymeta_brack:n { ] } + \userdoc_meta_brack:n { [ } + \userdoc_meta:n { #1 } + \userdoc_meta_brack:n { ] } } -\cs_new_protected:Npn \mydoc_mymeta_mymeta:n #1 +\cs_new_protected:Npn \userdoc_meta_meta:n #1 { \textnormal{\textit{#1}} } -\cs_new_protected:Npn \mydoc_mymeta_angle:n #1 +\cs_new_protected:Npn \userdoc_meta_angle:n #1 { \group_begin: \fontfamily{lmr}\selectfont - \textcolor{\l_mydoc_mymeta_anglecolor_tl}{#1} + \textcolor{\l_userdoc_meta_anglecolor_tl}{#1} \group_end: } -\cs_new_protected:Npn \mydoc_mymeta_brace:n #1 +\cs_new_protected:Npn \userdoc_meta_brace:n #1 { \group_begin: - \color{\l_mydoc_mymeta_bracecolor_tl} + \color{\l_userdoc_meta_bracecolor_tl} #1 \group_end: } -\cs_new_protected:Npn \mydoc_mymeta_brack:n #1 +\cs_new_protected:Npn \userdoc_meta_brack:n #1 { - \textcolor{\l_mydoc_mymeta_brackcolor_tl}{#1} + \textcolor{\l_userdoc_meta_brackcolor_tl}{#1} } -% \envexamp{m} +%^^A \envexamp{m} \newsavebox{\marginexa} \NewDocumentCommand{\envexamp}{m} { @@ -253,7 +192,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \ignorespaces% } -% \cmdexamp{s m o m o} +%^^A \cmdexamp{s m o m o} \DeclareDocumentCommand{\cmdexamp}{s m o m o} { \group_begin: @@ -273,7 +212,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \MYSortIndex{Commands}{Commands ~ provide ~ by ~ \textcolor{gray}{scontents}>\texttt{\textbackslash#2}}% } -% \keyexamp{mmm} +%^^A \keyexamp{mmm} \DeclareDocumentCommand{\keyexamp}{ m m m } { \par @@ -285,7 +224,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \MYSortIndex{Keys}{Keys>\texttt{#1}}% } -% \mypkg{sm} +%^^A \mypkg{sm} \NewDocumentCommand{\mypkg}{sm} { \IfBooleanTF{#1} @@ -299,7 +238,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l } } -% \myenv{sm} +%^^A \myenv{sm} \DeclareDocumentCommand{\myenv}{sm} { \IfBooleanTF{#1} @@ -313,7 +252,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l } } -% \ics{sm} +%^^A \ics{sm} \DeclareDocumentCommand{\ics}{sm} { \IfBooleanTF{#1} @@ -328,7 +267,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l } \ExplSyntaxOff -% email https://tex.stackexchange.com/a/663 +%^^A email https://tex.stackexchange.com/a/663 \catcode`\_=11\relax% \newcommand\email[1]{\_email #1\q_nil}% \def\_email#1@#2\q_nil{% @@ -339,7 +278,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \catcode`\_=8\relax% \makeatletter -% Logo whit textffmw font for title +%^^A Logo whit fetamont font for title \newsavebox{\logobox} \savebox{\logobox}{% \normalsize\fetamontotf{\textcolor{mypkgcolor}{s}\textcolor{OrangeRed}{content}\textcolor{mypkgcolor}{s}}} @@ -349,10 +288,10 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l } \makeatother -% don't copy numbers in code example +%^^A Don't copy numbers in code example \newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}} -% Create a language for documentation +%^^A Create a language for documentation \lstdefinelanguage{scontents-doc}{ texcsstyle=*,% escapechar=`,% @@ -393,7 +332,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l {=}{{\textcolor{red}{=}}}{1},% }[keywords,tex,comments,strings]% end languaje -% \begin{examplecode}[optlst]...\end{examplecode} +%^^A \begin{examplecode}[key=val]...\end{examplecode} \lstnewenvironment{examplecode}[1][]{% \lstset{ language=scontents-doc,% @@ -410,7 +349,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l }% close lstset }{}% close examplecode -% \lstinline[style=inline]|...| +%^^A \lstinline[style=inline]|...| \lstdefinestyle{inline} { language=scontents-doc,% @@ -422,13 +361,13 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l literate=*{\%}{{\bfseries\textcolor{gray}{\%}}}{1} } -% set default style +%^^A Set default style \lstset{style=inline} -% Get file info +%^^A Get file info \GetFileInfo{\jobname.sty} -% Config hyperref +%^^A Config hyperref \hypersetup{ linkcolor = blue!50, citecolor = red!50,% @@ -436,23 +375,23 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l colorlinks = true,% linktoc = all,% pdftitle = {.:: The scontents package --- \fileinfo{} ::.},% - pdfauthor = {Pablo González L and Phelype Oleinik}, + pdfauthor = {Pablo González L}, pdfsubject = {Documentation for \fileversion{} [\filedate] },% - pdfcopyright = {\textcopyright 2019 by Pablo González and Phelype Oleinik}, + pdfcopyright = {\textcopyright 2019 by Pablo González}, pdfcontacturl = {https://github.com/pablgonz/scontents}, pdfkeywords = {filecontents, filecontentsdef, xparse, expl3, l3seq, Store contents}, pdfstartview = {FitH},% - bookmarksopenlevel = 2,% + bookmarksopenlevel = 1,% } -% Configuration titleps +%^^A Configuration titleps and titlesec \settitlemarks{section} \renewpagestyle{plain}[\color{gray}\small\sffamily]{ \setfoot{}{}{\thepage/\pageref{LastPage}}} \newpagestyle{myheader}[\color{gray}\small\sffamily]{ \renewcommand\makeheadrule{\color{gray}\rule[0.45\baselineskip]{\linewidth}{0.4pt}} -\setfoot{\scalebox{0.8}{\mylogo}\space\textcopyright\space 2019 by Pablo González and Phelype Oleinik} +\setfoot{\scalebox{0.8}{\mylogo}\space\textcopyright\space 2019 by Pablo González} {} {\thepage/\pageref{LastPage}} \sethead{\raisebox{0.75\baselineskip}{Documentation for \fileversion\space[\filedate]}} @@ -460,24 +399,18 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l {\raisebox{0.75\baselineskip}{\scshape\small\S.\thesection\space\sectiontitle}} } -% add headheight \setlength{\headheight}{21pt}% -% Table of contents \titlecontents{section}[0mm]{}% - {\bfseries\contentspush{\makebox[4mm][l]{\thecontentslabel\hfill}}}% - {\hspace*{-4mm}}% numberless + {\bfseries\contentspush{\makebox[5mm][l]{\thecontentslabel\hfill}}}% + {\hspace*{-5mm}}% numberless {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}% -\titlecontents{subsection}[4mm]{}% +\titlecontents{subsection}[5mm]{}% {\contentspush{\makebox[6mm][l]{\thecontentslabel\hfill}}} - {\hspace*{-10mm}}% numberless - {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}% -\titlecontents{subsubsection}[10mm]{}% - {\contentspush{\makebox[8mm][l]{\thecontentslabel\hfill}}} - {\hspace*{-18mm}}% numberless + {\hspace*{-11mm}}% numberless {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}% -% Table of contents +%^^A Table of contents \makeatletter \renewcommand\tableofcontents{% \begingroup% @@ -494,12 +427,6 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l \endgroup } \makeatother - -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname pdfxform\endcsname\relax - \usepackage{luatex85} % For LuaTeX -\fi - \begin{document} \DocInput{\jobname.dtx} \end{document} @@ -507,16 +434,15 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \fi % % \title{ -% \scalebox{1.1}{\mylogo}\\[2pt] -% \large -% \textsf{Store \hologo{LaTeX} contents in seq}\\[3pt] +% \scalebox{1.025}{\mylogo}\\[2pt] % \Large +% \textsf{Stores \hologo{LaTeX} contents}\\[3pt] % \fileversion{} --- \filedate\thanks{ % This file describes a documentation for \fileversion, last revised % \filedate.}\\[25pt] % \author{ % \large -% \raisebox{-1pt}{\textcopyright}{}2019 by Pablo González and Phelype Oleinik +% \raisebox{-1pt}{\textcopyright}{}2019 by Pablo González % \thanks{E-mail: \textsf{\guillemotleft}\email{pablgonz@educarchile.cl}\textsf{\guillemotright}}% % } % \small @@ -528,7 +454,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \maketitle % % \begin{abstract} -% The \mypkg*{scontents} package stores valid \hologo{LaTeX} code in sequences using +% The \mypkg*{scontents} package stores valid \hologo{LaTeX} code in memory (sequences) using % the \mypkg{l3seq} module of \mypkg{expl3}. The stored content (including % \emph{verbatim}) can be used as many times as desired in the document, % additionally can be written to external files if desired. @@ -538,7 +464,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % % \setlength{\parskip}{3pt} % -% \section[Description]{Description} +% \section*{Description} % % The \mypkg*{scontents} package encapsulates the \mypkg{filecontentsdef} % package of \textsc{Jean Fran\c{c}ois Burnol} which allows you to save the @@ -546,7 +472,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % style \myoarg{key = val} along with the ability to save content in sequences % for later use in different parts of the document. % -% \section{Motivation and Acknowledgments} +% \section*{Motivation and Acknowledgments} % % In \hologo{LaTeX} there is no direct way to record content for later use, although % you can do this using \verb|\macros|, recording \meta{verbatim content} is a @@ -560,7 +486,8 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % This package would not be possible without the great work of \textsc{Jean % Fran\c{c}ois Burnol} who was kind enough to take my requirements into account % and add the \myenv{filecontentsdefmacro} environment. Also a special thanks to -% all the \hologo{LaTeX3} team for their great work and to the different members +% Phelype Oleinik who has collaborated and adapted a large part of the code and +% all \hologo{LaTeX3} team for their great work and to the different members % of the \href{https://tex.stackexchange.com}{TeX-SX} community who have provided % great answers and ideas. Here a note of the main ones: % @@ -576,8 +503,8 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \item \href{https://tex.stackexchange.com/q/373647/7832}{Collect contents of an environment (that contains verbatim content)} % \end{enumerate} % -% \section[License and Requirements]{License and Requirements} -% \label{sec:Licenseandreq} +% \section*{License and Requirements} +% \label{sec:licence} % % Permission is granted to copy, distribute and/or modify this software under % the terms of the LaTeX Project Public License (lppl), version 1.3 or later @@ -595,7 +522,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % % \pagestyle{myheader} % -% \section{The scontents package} +% \section{The \texttt{scontents} package} % % The \mypkg*{scontents} package provides the \myenv*{scontents} environment, % \ics*{Scontents} and \ics*{Scontents*} command to stored contents and \ics*{getstored} @@ -638,13 +565,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % % The summary with all possible options can be found in \ref{sec:optover}. % -% \section{User interface} -% \label{sec:userinterface} -% -% The user interface provided by the package provides an environment and several -% commands with some limitations that must be taken into account. -% -% \subsection{The environment scontents} +% \section{The environment \env{scontents}} % \label{sec:envscontents} % % \envexamp{scontents} @@ -668,7 +589,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % For more technical information about the environment it is better to read % the documentation of the \mypkg{filecontentsdef} package. % -% \subsubsection*{Options for environment} +% \subsection*{Options for environment} % % The environment options can be configured globally using option % in package or the \ics*{setupsc} command and locally @@ -698,7 +619,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % it will not store the contents of this one. It is analogous to the % \myenv{filecontents*} environment. % -% \subsection{The command \cs{Scontents}} +% \section{The command \cs{Scontents}} % \label{sec:Scontents} % % \cmdexamp{Scontents}[key=val]{argument} @@ -726,7 +647,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \ics{relax} or \lstinline[style=inline]|%| at the end. % \end{enumerate} % -% \subsubsection*{Options for command} +% \subsection*{Options for command} % % The command options (including star version) can be configured globally % using option in package or the \ics*{setupsc} command and locally @@ -742,7 +663,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \keyexamp{print-cmd}{true\textbar false}{false} % It will show the current content of \ics*{Scontents}. % -% \subsection{The command \cs{getstored}} +% \section{The command \cs{getstored}} % \label{sec:getstored} % % \cmdexamp{getstored}[index]{seq name} @@ -751,7 +672,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % and can be used as an \meta{argument} for another command. If the optional argument % is not passed it defaults to the last element saved in the \meta{seq name}. % -% \subsection{The command \cs{typestored}} +% \section{The command \cs{typestored}} % \label{sec:typestored} % % \cmdexamp{typestored}[index]{seq name} @@ -825,9 +746,9 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % % \fi % -% \subsection{Other commands provided} +% \section{Other commands provided} % -% \subsubsection*{The command \cs{meaningsc}} +% \subsection*{The command \cs{meaningsc}} % \label{sec:meaningsc} % % \cmdexamp{meaningsc}[index]{seq name} @@ -835,19 +756,19 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % in \meta{seq name}. If the optional argument is not passed it defaults to the % last element saved in the \meta{seq name}. % -% \subsubsection*{The command \cs{countsc}} +% \subsection*{The command \cs{countsc}} % \label{sec:countsc} % % \cmdexamp{countsc}{seq name} % The command \ics*{countsc} count a number of contents stored in \meta{seq name}. % -% \subsubsection*{The command \cs{cleansc}} +% \subsection*{The command \cs{cleansc}} % \label{sec:cleansc} % % \cmdexamp{cleansc}{seq name} % The command \ics*{cleansc} remove all contents stored in \meta{seq name}. % -% \subsection{Options Overview} +% \section{Options Overview} % \label{sec:optover} % % \newcommand*{\xmark}{\textcolor{red}{✘}}% @@ -1198,21 +1119,38 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % % \section{Test \texttt{\textbackslash getstored}} % \getstored[2]{contents}\par -% % \getstored[1]{contents} % % \section{Test \texttt{\textbackslash typestored}} -% % \typestored[1]{contents} % \end{document} % \end{VerbatimOut} +% % Customization of \myenv*{verbatimsc} using the \mypkg{minted} package % \textattachfile[color=0 0 1]{scexamp8.ltx}{\faFile*[regular]}. % \lstinputlisting[language=scontents-doc,numbers=left]{scexamp8.ltx} % +% \section{Change history} +% +% \label{sec:changes} +% +% \setlist[itemize,1]{label=\textendash, wide=0.5em, nosep, noitemsep, leftmargin=10pt} +% \newlength\descrwidth +% \settowidth{\descrwidth}{\textsf{v1.0, (ctan), 2019/07/30} } +% \begin{description}[font=\small\sffamily, wide=0pt, style=multiline, leftmargin=\descrwidth, nosep, noitemsep] +% \item [\fileversion{} (ctan), \filedate] +% \begin{itemize} +% \item Extension of documentation. +% \item Replace \verb+\tex_endinput:D+ by \verb+\file_input_stop:+. +% \end{itemize} +% \item [v1.0 (ctan), 2019/07/30] +% \begin{itemize} +% \item First public release, +% \end{itemize} +% \end{description} % \newpage % -% \printindex[mydoc] +% \printindex[userdoc] % \newpage % \StopEventually{^^A % \newgeometry{top=0.5in,bottom=0.5in,left=1.0in,right=1in,footskip=0.2in,headsep=10pt} @@ -1222,9 +1160,86 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \printindex % } % -% \section{Implementation} +% \section{scontents implementation} % \label{sec:Implementation} % \addtocontents{toc}{\protect\setcounter{tocdepth}{0}} +% +% \begin{documentation} +% \subsection{User interface} +% +% The \emph{user interface} provided by this package consists of a couple of environments +% and a series of commands described below. +% +% \begin{function}{\setupsc} +% \begin{syntax} +% \cs{setupsc} \Arg{key=val} +% \end{syntax} +% The command to set options for \cs{Scontents}, \cs{Scontents*} and the +% environment \env{scontents}. +% \end{function} +% +% \begin{function}{scontents} +% \begin{syntax} +% \oarg{key=val} +% \end{syntax} +% The environment encapsulating \env{filecontentsdef*} and +% \env{filecontentsdefmacro} from \pkg{filecontentsdef} package. +% \end{function} +% +% \begin{function}{\Scontents} +% \begin{syntax} +% \cs{Scontents}~ \oarg{key=val} \Arg{argument} +% \cs{Scontents*} \oarg{key=val} \Arg{argument} +% \cs{Scontents*} \oarg{key=val} \meta{del}\Arg{argument}\meta{del} +% \end{syntax} +% The command to store content directly in memory, the star version allows to save +% \meta{verbatim} content. +% \end{function} +% +% \begin{function}{\getstored} +% \begin{syntax} +% \cs{getstored}~\oarg{index} \Arg{seq name} +% \end{syntax} +% The command to receive content stored in memory. +% \end{function} +% +% \begin{function}{\typestored} +% \begin{syntax} +% \cs{typestored}~\oarg{index} \Arg{seq name} +% \cs{typestored*}\oarg{index} \Arg{seq name} +% \end{syntax} +% The command to display the content stored in memory within the \env{verbatimsc}, +% the starred version displays the content stored by \cs{Scontents*}. +% \end{function} +% +% \begin{function}{verbatimsc} +% Internal environment used by \cs{typestored} and \cs{typestored*} to display +% \meta{verbatim style} content. +% \end{function} +% +% \begin{function}{\countsc} +% \begin{syntax} +% \cs{countsc} \Arg{seq name} +% \end{syntax} +% The command to count the number of elements stored. +% \end{function} +% +% \begin{function}{\meaningsc} +% \begin{syntax} +% \cs{meaningsc}~\oarg{index} \Arg{seq name} +% \end{syntax} +% The command to display the \cs{meaning} of the stored content. +% \end{function} +% +% \begin{function}{\cleanseqsc} +% \begin{syntax} +% \cs{meaningsc} \Arg{seq name} +% \end{syntax} +% The command to erase the memory sequence at the point at which it is executed. +% \end{function} +% +% \end{documentation} +% % \iffalse %<*package> % \fi @@ -1241,9 +1256,9 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l % \begin{macrocode} \RequirePackage{filecontentsdef}[2019/04/20] \RequirePackage{l3keys2e} -\RequirePackage{xparse}[2019/05/03] -\ProvidesExplPackage{scontents}{2019/07/30}{1.0} - {Store LaTeX content in Sequences (l3seq)} +\RequirePackage{xparse}[2019/05/28] +\ProvidesExplPackage{scontents}{2019/08/12}{1.1} + {Stores LaTeX contents in memory or files} % \end{macrocode} % A check to make sure that \pkg{xparse} is not too old % \begin{macrocode} @@ -1256,7 +1271,7 @@ conditions of the [LaTeX Project Public License](https://www.latex-project.org/l 'l3kernel'~and~'l3packages'.\MessageBreak Loading~scontents~will~abort! } - \tex_endinput:D + \file_input_stop: } % \end{macrocode} % diff --git a/Master/texmf-dist/tex/latex/scontents/scontents.sty b/Master/texmf-dist/tex/latex/scontents/scontents.sty index 2f3dca7e604..5b26bcc19a0 100644 --- a/Master/texmf-dist/tex/latex/scontents/scontents.sty +++ b/Master/texmf-dist/tex/latex/scontents/scontents.sty @@ -1,8 +1,8 @@ \RequirePackage{filecontentsdef}[2019/04/20] \RequirePackage{l3keys2e} -\RequirePackage{xparse}[2019/05/03] -\ProvidesExplPackage{scontents}{2019/07/30}{1.0} - {Store LaTeX content in Sequences (l3seq)} +\RequirePackage{xparse}[2019/05/28] +\ProvidesExplPackage{scontents}{2019/08/12}{1.1} + {Stores LaTeX contents in memory or files} \@ifpackagelater { xparse } { 2019/05/03 } { } { @@ -12,7 +12,7 @@ 'l3kernel'~and~'l3packages'.\MessageBreak Loading~scontents~will~abort! } - \tex_endinput:D + \file_input_stop: } \keys_define:nn { scontents } { -- cgit v1.2.3