summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/scontents
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-27 03:00:33 +0000
committerNorbert Preining <norbert@preining.info>2019-10-27 03:00:33 +0000
commit874b3a98f7af65cb9aed61dc81891548a4013ba9 (patch)
tree5551b827d5b4f81959be4ed9f176f5493ce4c68d /macros/latex/contrib/scontents
parent1548fb7616f0f4b1619d8e01a9daf1c1a6fce96e (diff)
CTAN sync 201910270300
Diffstat (limited to 'macros/latex/contrib/scontents')
-rw-r--r--macros/latex/contrib/scontents/README.md6
-rw-r--r--macros/latex/contrib/scontents/scontents.dtx81
-rw-r--r--macros/latex/contrib/scontents/scontents.ins8
-rw-r--r--macros/latex/contrib/scontents/scontents.pdfbin340870 -> 338561 bytes
4 files changed, 63 insertions, 32 deletions
diff --git a/macros/latex/contrib/scontents/README.md b/macros/latex/contrib/scontents/README.md
index 73e9648df8..5e2fcf02fd 100644
--- a/macros/latex/contrib/scontents/README.md
+++ b/macros/latex/contrib/scontents/README.md
@@ -1,6 +1,6 @@
## scontents — Stores LaTeX contents in memory or files
-- Version: 1.5
-- Date: 2019-10-24
+- Version: 1.6
+- Date: 2019-10-26
- Author: Pablo González
## Description
@@ -26,7 +26,7 @@ the files to appropriate locations:
scontents.tex -> TDS:tex/generic/scontents/
scontents-code.tex -> TDS:tex/generic/scontents/
scontents.sty -> TDS:tex/latex/scontents/
- t-scontents.mkvi -> TDS:tex/context/third/scontents/
+ t-scontents.mkiv -> TDS:tex/context/third/scontents/
scontents.pdf -> TDS:doc/latex/scontents/
README.md -> TDS:doc/latex/scontents/
scontents.dtx -> TDS:source/latex/scontents/
diff --git a/macros/latex/contrib/scontents/scontents.dtx b/macros/latex/contrib/scontents/scontents.dtx
index 4b77c043ee..70c7ea4b14 100644
--- a/macros/latex/contrib/scontents/scontents.dtx
+++ b/macros/latex/contrib/scontents/scontents.dtx
@@ -18,7 +18,7 @@
% scontents.ins,
% and the derived files scontents.sty,
% scontents.tex,
-% t-scontents.mkvi and
+% t-scontents.mkiv and
% scontents-code.tex.
%
%<*driver>
@@ -32,16 +32,37 @@
% so that entries written to both streams end up in the same file.
\usepackage[top=0.5in,bottom=0.5in,left=2in,right=0.7in,footskip=0.2in,headsep=10pt]{geometry}
\usepackage[osf,mono=false,scale=0.95,llscaled=0.95]{libertine}
+\setmonofont[
+ Ligatures = TeX,
+ Numbers = OldStyle,
+ Scale = 0.80,
+ UprightFont = *-Regular,
+ ItalicFont = *-RegularIt,
+ BoldFont = *-Semibold,
+ BoldItalicFont = *-SemiboldIt,
+ RawFeature = {+zero,+ss06},
+ FontFace = {m}{sc}{*-ExtraLight},
+ Extension = .otf]{SourceCodePro}
+\newfontfamily\sourcecodeprolight{SourceCodePro-Regular.otf}[Scale = 0.80,FakeStretch =0.75]
+\RenewDocumentCommand{\MacroLongFont}{}
+ { \sourcecodeprolight\small }
\usepackage{unicode-math}
+
+% Unicode-math changes the position of the glyphs, so the position 26A is now
+% a letter `j'. The doc package ensures that mathcode and the | actually prints
+% a j inside docstrip guards. This changes the mathcode of | to 07C:
+\makeatletter
+\def\mod@math@codes{\mathcode`\|="207C \mathcode`\&="2026
+ \mathcode`\-="702D \mathcode`\+="702B
+ \mathcode`\:="703A \mathcode`\=="703D }
+\makeatother
+
\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,%
ItalicFont = lmmono10-italic,%
- SmallCapsFont = lmmonocaps10-oblique,%
- SlantedFont = lmmonoslant10-regular,
]
\newfontfamily\fetamontotf{ffmw10.otf}[
Scale = 0.95,%
@@ -52,7 +73,6 @@
\usepackage{hyperxmp,lastpage,imakeidx,microtype,attachfile2}
\usepackage{adjustbox,multicol,listings,accsupp,titletoc}
\usepackage{scontents} % main
-\usepackage[osf,scale=0.80,semibold]{sourcecodepro}
\usepackage[contents]{colordoc}
% Patching colordoc.sty to work with l3doc.cls
@@ -92,7 +112,7 @@
% Now, after imakeidx opens the write stream for the index file, we copy
% the reference to \@indexfile:
\makeatletter
-\let\@indexfile\scontents@idxfile
+\expandafter\let\expandafter\@indexfile\csname \jobname @idxfile\endcsname
\makeatother
\setlength{\parindent}{0pt}
@@ -1579,11 +1599,17 @@ No tab
%
% \setlist[itemize,1]{label=\textendash,wide=0.5em,nosep,noitemsep,leftmargin=10pt}
% \newlength\descrwidth
-% \settowidth{\descrwidth}{\textsf{v1.0, (ctan), 2019/07/30} }
+% \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 The internal behavior of |\getstored| has been modified.
+% \item The internal behavior of |\foreachsc| has been modified.
+% \item Corrected file extension for \hologo{ConTeXt}.
+% \end{itemize}
+% \item [v1.5 (ctan), 2019-10-24]
+% \begin{itemize}
% \item Add support for \hologo{plainTeX} and \hologo{ConTeXt}.
% \item Split internal code for optimization.
% \item Add support for vertical spaces in |key=val|.
@@ -1596,27 +1622,27 @@ No tab
% \item Messages and keys were separated.
% \item Restructuring of documentation.
% \item Now the version of |expl3| is checked instead of |xparse|.
-% \item The internal behavior of \verb+force-eol+ has been modified.
+% \item The internal behavior of |force-eol| has been modified.
% \end{itemize}
% \item [v1.3 (ctan), 2019-09-24]
% \begin{itemize}
% \item The environment can now nest.
-% \item Added \verb+force-eol+, \verb+verb-font+ and \verb+width-tab+ keys.
-% \item The extra space has been removed when you run \verb+\getstored+.
+% \item Added |force-eol|, |verb-font| and |width-tab| keys.
+% \item The extra space has been removed when you run |\getstored|.
% \item Internal code has been rewritten more efficiently.
-% \item Remove \verb+\typestored*+.
-% \item Remove \verb+filecontentsdef+ dependency.
-% \item Changing \verb+\regex_replace_all:+ for \verb+\tl_replace_all:+.
+% \item Remove |\typestored|.
+% \item Remove |filecontentsdef| dependency.
+% \item Changing |\regex_replace_all:| for |\tl_replace_all:|.
% \end{itemize}
% \item [v1.2 (ctan), 2019-08-28]
% \begin{itemize}
% \item Restructuring of documentation.
-% \item Added copy of \verb+\tex_scantokens:D+.
+% \item Added copy of |\tex_scantokens:|.
% \end{itemize}
% \item [v1.1 (ctan), 2019-08-12]
% \begin{itemize}
% \item Extension of documentation.
-% \item Replace \verb+\tex_endinput:D+ by \verb+\file_input_stop:+.
+% \item Replace |\tex_endinput:D| by |\file_input_stop:|.
% \end{itemize}
% \item [v1.0 (ctan), 2019-07-30]
% \begin{itemize}
@@ -1651,10 +1677,10 @@ No tab
%
% Now we define some common macros to hold the package date and version:
% \begin{macrocode}
-%<loader>\def\ScontentsFileDate{2019-10-24}%
-%<core>\def\ScontentsCoreFileDate{2019-10-24}%
+%<loader>\def\ScontentsFileDate{2019-10-26}%
+%<core>\def\ScontentsCoreFileDate{2019-10-26}%
%<*loader>
-\def\ScontentsFileVersion{1.5}%
+\def\ScontentsFileVersion{1.6}%
\def\ScontentsFileDescription{Stores LaTeX contents in memory or files}%
% \end{macrocode}
%
@@ -2394,8 +2420,7 @@ No tab
%
% We define the environment \env{scontents}, next to the system
% \myoarg{key \textnormal{\textcolor{gray}{=}} val}. The environment
-% is divided into three parts. This implementation is taken from answer
-% by Enrico Gregorio in \url{https://tex.stackexchange.com/a/487746/7832}.
+% is divided into two parts.
%
% \begin{macro}{
% scontents,
@@ -2622,7 +2647,8 @@ No tab
{ \tl_if_blank_p:n {#2} }
{ \str_if_eq_p:ee {#2} { \c_percent_str } }
{
- \msg_warning:nnn { scontents } { rescanning-text } {#2}
+ \str_if_eq:VnF \c_@@_hidden_space_str {#2}
+ { \msg_warning:nnn { scontents } { rescanning-text } {#2} }
\@@_rescan_tokens:n {#2}
}
}
@@ -2834,7 +2860,6 @@ No tab
% \Scontents,
% \@@_norm_arg:n,
% \@@_Scontents_auxi:N,
-% \Scontents code,
% \@@_Scontents_internal:nn,
% \@@_verb_arg:w,
% \@@_verb_arg_internal:n,
@@ -2912,8 +2937,10 @@ No tab
\group_begin:
\int_set:Nn \tex_newlinechar:D { `\^^J }
\@@_rescan_tokens:x
- { \@@_getfrom_seq:nn {#1} {#2} }
- \group_end:
+ {
+ \endgroup % This assumes \catcode`\\=0... Things might go off otherwise.
+ \@@_getfrom_seq:nn {#1} {#2}
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2946,8 +2973,12 @@ No tab
{ \l_@@_foreach_step_int }
{ \l_@@_foreach_stop_int }
\@@_foreach_add_body:n
- \seq_use:Nn \l_@@_foreach_print_seq { \tl_use:N \l_@@_foreach_sep_tl }
+ \tl_gset:Nx \g_@@_temp_tl
+ { \seq_use:Nn \l_@@_foreach_print_seq { \tl_use:N \l_@@_foreach_sep_tl } }
\group_end:
+ \exp_after:wN \tl_gclear:N
+ \exp_after:wN \g_@@_temp_tl
+ \g_@@_temp_tl
}
\cs_new_protected:Npn \@@_foreach_add_body:n #1
{
diff --git a/macros/latex/contrib/scontents/scontents.ins b/macros/latex/contrib/scontents/scontents.ins
index 70db162f19..760aea2951 100644
--- a/macros/latex/contrib/scontents/scontents.ins
+++ b/macros/latex/contrib/scontents/scontents.ins
@@ -21,7 +21,7 @@ This work consists of the files scontents.dtx and
scontents.ins,
and the derived files scontents.sty,
scontents.tex,
- t-scontents.mkvi and
+ t-scontents.mkiv and
scontents-code.tex.
\endpreamble
@@ -33,11 +33,11 @@ and the derived files scontents.sty,
\declarepreamble\context
\string\module
[ file=t-scontents,
- version=1.5,
+ version=1.6,
title=\string\CONTEXT\ User Module,
subtitle=Storing Contents,
author=Pablo González,
- date=2019-10-24,
+ date=2019-10-26,
copyright=Pablo González,
email=pablgonz@educarchile.cl,
license=LPPL]
@@ -52,7 +52,7 @@ and the derived files scontents.sty,
\file{scontents.tex} {\from{scontents.dtx}{loader,plain}}%
\file{scontents-code.tex}{\from{scontents.dtx}{core}}%
\edef\tmpa{\standard^^J\context}\usepreamble\tmpa
- \file{t-scontents.mkvi} {\from{scontents.dtx}{loader,context}}%
+ \file{t-scontents.mkiv} {\from{scontents.dtx}{loader,context}}%
}%
\Msg{*****************************************************************}%
diff --git a/macros/latex/contrib/scontents/scontents.pdf b/macros/latex/contrib/scontents/scontents.pdf
index ee0ed05e8d..55eb50773f 100644
--- a/macros/latex/contrib/scontents/scontents.pdf
+++ b/macros/latex/contrib/scontents/scontents.pdf
Binary files differ