summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx52
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin571527 -> 580944 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex51
-rw-r--r--macros/latex/contrib/graphicscache/LICENSE29
-rw-r--r--macros/latex/contrib/graphicscache/README.md72
-rw-r--r--macros/latex/contrib/graphicscache/graphicscache.dtx596
-rw-r--r--macros/latex/contrib/graphicscache/graphicscache.ins35
-rw-r--r--macros/latex/contrib/graphicscache/graphicscache.pdfbin0 -> 242162 bytes
-rw-r--r--macros/latex/contrib/lipsum/CHANGELOG.md7
-rw-r--r--macros/latex/contrib/lipsum/lipsum.dtx4
-rw-r--r--macros/latex/contrib/lipsum/lipsum.ins10
-rw-r--r--macros/latex/contrib/lipsum/lipsum.pdfbin650355 -> 650470 bytes
12 files changed, 815 insertions, 41 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7f671cf194..ab3c09ae3c 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -8,7 +8,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/08/01}{1.28b}
+\ProvidesExplClass{easybook}{2021/08/02}{1.28c}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -292,12 +292,12 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/08/01}{1.28b}
+\ProvidesExplPackage{easybase}{2021/08/02}{1.28c}
{Typeset Chinese theses or books}
-\cs_generate_variant:Nn \int_to_arabic:n { v }
\cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
\cs_generate_variant:Nn \dim_set:Nn { NV }
+\cs_generate_variant:Nn \int_to_arabic:n { v }
\cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV }
\cs_generate_variant:Nn \skip_set:Nn { NV }
\cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
@@ -786,20 +786,20 @@
{ \exp_not:N \c@footnote }
}
}
-\cs_new_protected:Npn \eb_fnmark_shorter_label_set:nn #1#2
+\cs_new_protected:Npn \eb_fnmark_short_label_set:nn #1#2
{
- \tl_set:Nn \l__eb_fnmark_shorter_label_tl {#1}
+ \tl_set:Nn \l__eb_fnmark_short_tokens_tl {#1}
\eb_clist_map_inline:nn
{ A,a,1,I,i,c }
{
\tl_if_in:nnT {#1} {##1}
{
- \tl_replace_once:Nnn \l__eb_fnmark_shorter_label_tl {##1}
+ \tl_replace_once:Nnn \l__eb_fnmark_short_tokens_tl {##1}
{ \eb_int_format_trans:NN ##1 \c@footnote }
\seq_map_break:
}
}
- \cs_set_eq:cN {#2} \l__eb_fnmark_shorter_label_tl
+ \cs_set_eq:cN {#2} \l__eb_fnmark_short_tokens_tl
}
\bool_new:N \l__eb_fntext_bottom_bool
\ctex_define:nn { hdrset }
@@ -834,13 +834,13 @@
{ \eb_fnmark_normal_label_set:nn {#1} { the@footnote } },
fnmark-num .value_required:n = true,
fnmark-num/unknown .code:n =
- { \eb_fnmark_shorter_label_set:nn {#1} { the@footnote } },
+ { \eb_fnmark_short_label_set:nn {#1} { the@footnote } },
fntext-num .choices:nn =
{ plain,pifont,pifont*,pifont-sans,pifont-sans* }
{ \eb_fnmark_normal_label_set:nn {#1} { thefootnote } },
fntext-num .value_required:n = true,
fntext-num/unknown .code:n =
- { \eb_fnmark_shorter_label_set:nn {#1} { thefootnote } },
+ { \eb_fnmark_short_label_set:nn {#1} { thefootnote } },
fnboth-num .meta:n = { fntext-num = #1,fnmark-num = #1 },
fnboth-num .initial:n = plain,
@@ -956,12 +956,13 @@
}
\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}}
\providecommand{\spb@textsuperscript@save}{\textsuperscript}
+\providecommand{\spbset}{\use_none:n}
\cs_set_protected:Npn \footref #1
{
\group_begin:
\unrestored@protected@xdef\eb@thefnmark{\ref{#1}}
\group_end:
- \@footnotemark
+ \H@@footnotemark
}
\cs_set_protected:Npn \footnote
{
@@ -994,13 +995,14 @@
\setcounter{footnote}{#1}
\unrestored@protected@xdef\eb@thefnmark{\the@footnote}
\group_end:
- \@footnotemark
+ \H@@footnotemark
}
}
\cs_set:Npn \@makefnmark
{
\hbox:n
{
+ \spbset{super-format = { }}
\tl_use:N \l__eb_subfont_footnote_tl
\tl_use:N \l__eb_fnmark_format_tl
{
@@ -1028,18 +1030,27 @@
}
}
\tl_clear:N \@thefnmark
-\cs_new:Npn \eb@@makefnmark #1
+\tl_new:N \eb@thefnmark
+\cs_new:Npn \eb@@makefnmark #1#2
{
- \tl_if_empty:oF {#1}
+ \tl_if_empty:oF {#2}
{
\group_begin:
- \unrestored@protected@xdef\@thefnmark{#1}
+ \unrestored@protected@xdef\eb@thefnmark{#1}
+ \unrestored@protected@xdef\@thefnmark{#2}
\group_end:
}
}
-\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext }
-\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark }
-\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext }
+\NewDocumentCommand{\Footnote}{O{#2}m}
+ {
+ \eb@@makefnmark{#2}{#1}
+ \@footnotemark
+ \@footnotetext
+ }
+\cs_new_protected:Npn \Footnotemark #1
+ { \eb@@makefnmark{#1}{#1}\@footnotemark }
+\cs_new_protected:Npn \Footnotetext #1
+ { \eb@@makefnmark{#1}{#1}\@footnotetext }
\cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi }
\cs_set:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } }
@@ -1375,7 +1386,7 @@
\thechapter
\tl_use:c { l__eb_#1_connector_tl }
}
- \eb_arabic:n {#1}
+ \int_to_arabic:v { c@#1 }
}
}
@@ -2352,7 +2363,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/01}{1.28b}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/02}{1.28c}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
@@ -2500,6 +2511,7 @@
}
}
\tl_if_empty:NF \eb@tc@list@prologue { \eb@tc@list@prologue }
+ \exp_last_unbraced:NnNo
\begin{eb@exercise@list}[\eb@tc@list@number,#5]
#6
\end{eb@exercise@list}
@@ -2527,7 +2539,7 @@
IfValueT = {#3}{title = #3},
top = 0pt,bottom = 0pt,right = 0pt,toptitle = 0pt
},
- colframe = #2,coltitle = #2,tc-ebparbox,#4
+ coltitle = #2,tc-ebparbox,#4
}
\DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}}
{colback = #1!10!white,colframe = #1!50!black,tc-ebfbox,#3}{#2}
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index e8f8782172..932e678f7b 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index da6802b68f..cf55a6de1d 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -11,8 +11,8 @@
{
name = easybook,
title = EASYBOOK 使用手册,
- version = v1.28b,
- date = 2021/08/01,
+ version = v1.28c,
+ date = 2021/08/02,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = quee123@foxmail.com,
@@ -115,7 +115,6 @@
\begin{document}
-\clearpage
\section{使用说明}
您在使用 \cls*{easybook} 文档类编写文档前可能需要满足以下的条件:
\begin{itemize}
@@ -125,9 +124,10 @@
\end{itemize}
\subsection{基本用法}
+\label{subsec:basic usage}
以下一份简单的 \TeX 文档演示了 \cls*{easybook} 的最基本用法,在导言区进行宏包载入与文档设置,一些详细的使用样例会不定期上传在 \href{https://www.latexstudio.net/}{\LaTeX 工作室} 的网站。
\begin{frameverb}
- \documentclass{easybook}
+ \documentclass[文档类选项]{easybook}
\ctexset{键值列表}
\usepackage{宏包列表}
@@ -139,11 +139,11 @@
\end{document}
\end{frameverb}
-或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类。它的宏包选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。
+或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类,包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。它的宏包选项共享文档类选项的一部分,支持的选项见节 \ref{sec:document class options}。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。
\begin{frameverb}
- \documentclass{ctexbook}
+ \documentclass[文档类选项]{ctexbook}
- \usepackage{easybase}
+ \usepackage[宏包选项]{easybase}
\ctexset{键值列表}
\usepackage{宏包列表}
@@ -169,6 +169,7 @@
\section{文档类选项}
\label{sec:document class options}
+文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见小节 \ref{subsec:basic usage} 的例子。目前 \pkg*{easybase} 宏包可用的选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage}。除了下面列举的选项,还可使用标准文档类和 C\TeX 文档类的选项。
\begin{options}
\opt{draft}\Default!
开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见小节 \ref{subsec:box}。
@@ -364,10 +365,10 @@
使章标题跟随每一部分编号,开启新的一部分时章编号从 1 开始,默认不跟随。
\keychoice{footwith}{part,chapter,page}\Default{chapter}
使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从 1 开始。
- \keyval-{rulewidth}{线宽}\Default{0.75pt}
- 调整页眉、定理盒子以及代码框线条的粗细。
+ \keyval-{rulewidth}{刚性长度}\Default{0.75pt}
+ 统一调整页眉、定理盒子以及代码框等线条的粗细。
\keybool{uppercase}\Default{true}
- 使用 \cs*{rightmark} 及 \cs*{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
+ 使用 \cs*{rightmark} 及 \cs*{leftmark} 页眉标记命令获取标题内容时英文是否大写。
\kvsplit*{figurepath}{\meta{路径名1}\code{\}}\code{\{}\meta{路径名2}}\Default
设置插入图片的文件夹路径名,可以有多个路径名,每个路径包含在括号分隔,只有一个路径时需要包含在两层括号内。
\end{options}
@@ -413,7 +414,7 @@
\subsection{超链接}
\label{subsec:hyperlinks}
-\module*{refset} 将超链接选项(包括以上选项)交给 \pkg*{hyperref} 处理,除了一些关于 \code{pdf} 书签的选项可能会失效,其它由键值选项命令 \cs*{hypersetup} 支持的多数选项可用。
+模块 \module*{refset} 将超链接选项交给 \pkg*{hyperref} 宏包处理,除了一些关于 \code{pdf} 书签或已预设的选项可能失效,其它由接口命令 \cs*{hypersetup} 支持的多数选项可用。
\begin{options}
\keychoice{linktype}{edge,colors,none}\Module{refset}\Default{edge}
使超链接为边框形式,\option{various} 使超链接变为彩色,预置了四种颜色样式。\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。
@@ -522,7 +523,7 @@
定理内容部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval-{notefont}{字体命令}\Default
定理题注部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
- \keychoice{headfont}{字体命令}\Default
+ \keyval-{headfont}{字体命令}\Default
定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval-{headindent}{刚性长度}\Default{0em}
定理标题的缩进,默认无缩进,可用 \cs*{parindent} 命令设置为段落缩进。
@@ -1099,10 +1100,10 @@
\subsubsection{自定义脚注}
\begin{commands}\noitemsep
- \command{Footnote}[\marg{标记}\marg{脚注文本}]\default{}
+ \command{Footnote}[\oarg{内容标记}\marg{正文标记}\marg{脚注文本}]\default{}
\command{Footnotetext}[\marg{标记}\marg{脚注文本}]\default{}
\command{Footnotemark}[\marg{标记}]
- 这些是自定义 \meta{标记} 且不影响正常编号的脚注命令,用法与它们对应首字母小写的命令类似。如果 \meta{标记} 为空,那么将会使用上一个脚注标记。
+ 这些是自定义 \meta{标记} 且不影响正常编号的脚注命令,用法与它们对应首字母小写的命令类似。\meta{内容标记} 默认与 \meta{正文标记} 一致,可以进行微调。如果 \meta{标记} 为空,那么将会使用上一个脚注标记。
\begin{ctexexam}
\Footnote{*}{这是可以自定义标记的脚注。}
\end{ctexexam}
@@ -1114,6 +1115,28 @@
命令 \cs{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
\end{commands}
+\subsection{插入文档}
+\begin{commands}
+ \command*{includepdf}[\oarg{键值列表}\marg{文档名}]
+ 该命令由 \pkg*{pdfpages} 提供,将其他 \code{pdf} 文档插入当前文档,比如插入封面。可以指定插入页数、
+ 逻辑页和横向等,详情查看宏包文档。
+\end{commands}
+
+\subsection{指定行距的段落}
+\begin{environments}
+ \environment*{spacing}[\marg{浮点数}]
+ 该环境由 \pkg*{setspace} 提供,可以指定环境内段落的行距,使用 \meta{浮点数} 控制行距倍数。
+\end{environments}
+
+\subsection{下划线}
+\begin{commands}\noitemsep
+ \command*{uline}[\marg{下划直线}]\default{}
+ \command*{uuline}[\marg{下划双直线}]\default{}
+ \command*{uwave}[\marg{下划波浪线}]
+ \pkg*{ulem} 宏包提供了多种下划线命令,可以通过命令重新定义 \cs*{ULthickness} 命令控制下划线的粗细由。下划线的深度由 \cs*{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允
+ 许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。
+\end{commands}
+
\appendix
\section{依赖的宏包}
diff --git a/macros/latex/contrib/graphicscache/LICENSE b/macros/latex/contrib/graphicscache/LICENSE
new file mode 100644
index 0000000000..189aad77d3
--- /dev/null
+++ b/macros/latex/contrib/graphicscache/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Max Schwarz
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/macros/latex/contrib/graphicscache/README.md b/macros/latex/contrib/graphicscache/README.md
new file mode 100644
index 0000000000..7bcb689121
--- /dev/null
+++ b/macros/latex/contrib/graphicscache/README.md
@@ -0,0 +1,72 @@
+# graphicscache
+
+This LaTeX package provides caching of `\includegraphics` calls, with several
+useful effects:
+
+* Recompilations are much faster (10x speedup observed)
+* Images can be postprocessed with `ghostscript` before inclusion, thus:
+ * Automatic downscaling to specified DPI
+ * Automatic JPEG compression with configurable quality
+ * Much smaller files (e.g. 10MB instead of 150MB)!
+
+Note: Due to the one-by-one invocation of `pdflatex` and `ghostscript` for
+each graphics element, the first compilation is typically slower than usual.
+
+Note: graphicscache needs the `\write18` call (also called shell escape). This
+is a security risk if you have untrusted TeX sources.
+
+graphicscache supports **PDFLaTeX** and **LuaLaTeX**, **XeLaTeX** is not supported.
+
+## Quickstart
+
+Compile the package using
+
+ latex graphicscache.ins
+
+to generate the file `graphicscache.sty`, which you should place in your TeX
+input path. On Unix systems, this can be done by:
+
+ mkdir -p ~/texmf/tex/latex/graphicscache
+ cp graphicscache.sty ~/texmf/tex/latex/graphicscache/
+ texhash
+
+Or just drop the graphicscache.sty next to your TeX document.
+
+Activate caching with
+
+ \usepackage{graphicscache}
+
+and you are finished. Remember to compile your document with `-shell-escape`,
+like
+
+ pdflatex -shell-escape paper.tex
+
+Most LaTeX editors allow you to enable shell escape in their settings.
+
+Your PDF should now re-compile faster and be significantly smaller!
+
+## Releasing
+
+Another feature is creating a "release" tarball containing your TeX sources
+and the downscaled images. **NOTE**: This is not required for using the caching
+& compression features of graphicscache!
+
+Just use the `release.sh` shell script in your source
+directory. In this case it is recommended to place the `graphicscache.sty` file
+in your source tree, since your release target will probably not have it.
+
+ # first copy graphicscache.sty and release.sh into your paper directory
+ cp ...
+
+ # then release!
+ bash release.sh paper.tex
+
+After checking `test_release/submission.pdf`, the file `release.tar` can be uploaded
+to arXiv (they will extract it automatically).
+
+## Documentation
+
+For more information, check the package documentation, which you can generate
+with:
+
+ pdflatex graphicscache.dtx
diff --git a/macros/latex/contrib/graphicscache/graphicscache.dtx b/macros/latex/contrib/graphicscache/graphicscache.dtx
new file mode 100644
index 0000000000..50215f8796
--- /dev/null
+++ b/macros/latex/contrib/graphicscache/graphicscache.dtx
@@ -0,0 +1,596 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2021 by Max Schwarz <max.schwarz@online.de>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the BSD 3-clause license. See LICENSE for details.
+%
+% The Current Maintainer of this work is Max Schwarz.
+%
+% This work consists of the files graphicscache.dtx and graphicscache.ins
+% and the derived filebase graphicscache.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{graphicscache.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{graphicscache}
+%<*package>
+ [2021/08/02 v0.3 Cache includegraphics calls]
+%</package>
+%
+%<*driver>
+\documentclass[a4paper,11pt]{ydoc}
+\usepackage{ydoc-expl}
+% \usepackage{graphicscache}
+\usepackage[capitalize]{cleveref}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{graphicscache.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{0}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v0.1}{2018/10/03}{Initial version}
+% \changes{v0.2}{2021/04/08}{Better compatibility with different graphicx versions}
+% \changes{v0.3}{2021/08/02}{Added cachedir option}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{graphicscache.dtx}
+% \title{The \textsf{graphicscache} package}
+% \author{Max Schwarz \\ \url{max.schwarz@online.de}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The \texttt{graphicx} package offers the versatile |\includegraphics| command,
+% which offers image transformations like scaling, cropping, rotation, etc.
+% However, these transformations have to be performed on every compilation of
+% the document. Users can avoid this with the |draft| option at the cost of
+% not seeing the images.
+%
+% Furthermore, images are always included as-is with full resolution, even if
+% they are shown at a very small actual size. This increases compilation time
+% again and leads to large output files. A typical solution is to resize the
+% input images to a lower resolution---but here, the user has to manually
+% calculate or guess the required resolution. What we really want is to specify
+% a \textit{document DPI}, which automatically leads to the correct image
+% resolution. This is possible using post-processing tools like ghostscript,
+% but these do not help with compilation times and are typically not applicable
+% for preprint servers or journals which require LaTeX sources.
+%
+% |graphicscache| aims to solve these problems by decoupling the rendering
+% of images from the actual inclusion. Images are rendered to the correct size
+% using a separate |pdflatex| call, post-processed with ghostscript, and then
+% included as PDF. As a bonus, the resulting PDF is cached, resulting in very
+% fast recompilation times.
+%
+% \section{Usage}
+%
+% |graphicscache| requires the usage of the |\write18| call (also called shell
+% escape). For |pdflatex|, you have to specify the |-shell-escape| argument
+% during compilation. After enabling shell-escape, simply call
+%
+% \begin{example}
+% |\usepackage{graphicscache}|
+% \end{example}
+%
+% to enable caching.
+%
+% |graphicscache| overrides the |\includegraphics| command so that you can use
+% it as usual. Internally, it calculates a hash from the |includegraphics|
+% arguments and the package options to generate a cache key.
+% If you change the input image file or the options, the file will be
+% automatically rendered again.
+%
+% \textbf{Note:} The first compilation process might take a while, since the
+% cached PDFs are generated one-by-one.
+%
+% \subsection{Generated files}
+%
+% |graphicscache| will create a folder called |graphicscache| in the compilation
+% directory. Additionally, latex output files under the jobname
+% |graphicscacheout| will be created. All of these files and folders are
+% temporary and can be deleted safely (at the cost of re-creating the cache).
+%
+% \subsection{Package options}
+%
+% \DescribeKey{compress}'=false|flat|jpeg'
+% Specifies the image compression algorithm. If |false|, the ghostscript call
+% is skipped, thus embedding the image at its original resolution and format.
+% If |flat|, the lossless |FlatEncode| algorithm is chosen. Finally, |jpeg|
+% indicates that JPEG encoding using |DCTEncode| is to be performed.
+%
+% \textbf{Note:} In the |flat| case, the images are still downsampled to match
+% the DPI specified using the |dpi| key.
+%
+% \DescribeKey{dpi}'='<number>
+% Controls the image resolution in dots per inch. The default value is 300.
+% This option only takes effect if |compress| is not |false|.
+%
+% \DescribeKey{qfactor}'='<number>
+% This controls the quality parameter of the JPEG encoder (see |compress|).
+% Smaller values give higher quality. The default value is 0.15, which
+% corresponds to the ``Maximum'' setting mentioned by Adobe.
+%
+% \DescribeKey{listing}'=true|false'
+% If enabled, |graphicscache| will write an extra |.graphicscache| file with
+% mappings from |includegraphics| arguments to cache files. This can be used
+% to produce a version of the TeX source code that directly references the
+% PDF files instead of the original sources.
+%
+% \DescribeKey{render}'=true|false'
+% Controls whether rendering is allowed. The default is |true|. If |false|,
+% |graphicscache| is not allowed to create new cache files. Instead, it will
+% attempt to use the appropriate cache file. If it does not exist,
+% |graphicscache| will fall back to |graphicx| in-place rendering.
+% This can be used to perform a final release (see \cref{sec:release}).
+%
+% \DescribeKey{cachedir}'='<dir>
+% This key can be used to move the cache directory to another location.
+% The default value is |graphicscache|.
+%
+% \subsection{Macros}
+%
+% \DescribeMacro{\includegraphics}[args]{path}
+% This behaves exactly like the original |graphicx| |\includegraphics|.
+% However, only a limited number of keys in |args| is supported at the moment:
+% |width|, |height|, |trim|, |clip|, |angle|, |origin|, |keepaspectratio|,
+% |scale|. In addition, you can specify any of the package options above
+% here as well. For example, you might want to disable compression for
+% a particular image with
+%
+% \begin{example}
+% |\includegraphics[width=...,compress=false]{...}|.
+% \end{example}
+%
+% \StopEventually{}
+%
+% \section{Tips \& Tricks}
+% \subsection{Releasing your manuscript}
+% \label{sec:release}
+%
+% In case you want to upload your manuscript to a journal or preprint server,
+% you can use |graphicscache| to make your work easier:
+% \begin{enumerate}
+% \item Use |latexpand| to strip comments and flatten your tex sources into
+% one file (optional).
+% \item Compile the file as usual to generate the cache files.
+% \item Compile the file again with the |-recorder| command line option.
+% Here, we want to hide accesses of the original image files
+% (|render=false|), but changing the package options will change the
+% cache hash. For this purpose, |graphicspath| also reacts to a global
+% definition of |\graphicscache@inhibit|, which has the same effect as
+% |render=false|.
+% \item The generated |.fls| file will contain all cache files that are needed
+% to compile your manuscript. Package them and your |.tex| file.
+% \end{enumerate}
+%
+% This process is automated in the |release.sh| script included in the
+% distribution.
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{graphicscache}[2018/10/02 Graphics Cache]
+\RequirePackage{graphicx}
+\RequirePackage{xstring}
+\RequirePackage{filemod}
+\RequirePackage{letltxmacro}
+\RequirePackage{pgfopts}
+\RequirePackage{ifplatform}
+\RequirePackage{pdftexcmds}
+\RequirePackage{ltxcmds}
+\newif\ifgraphicscache@render
+\newif\ifgraphicscache@compress
+\newif\ifgraphicscache@listing
+\newif\ifgraphicscache@hashshortnames
+\def\graphicscache@graphicsargs{}
+\newlength\graphicscache@tmplen
+\newcommand{\graphicscache@addarg}[1]{%
+ \ifx\graphicscache@graphicsargs\empty
+ \edef\graphicscache@graphicsargs{#1}%
+ \else
+ \edef\graphicscache@graphicsargs{\graphicscache@graphicsargs,#1}%
+ \fi
+}
+\pgfkeys{
+ /graphicscache/.cd,
+ render/.is if=graphicscache@render,
+ render=true,
+% \end{macrocode}
+% \begin{macrocode}
+ cachedir/.store in=\graphicscache@cachedir,
+ cachedir={graphicscache},
+% \end{macrocode}
+% \begin{macrocode}
+ compress/.is choice,
+ compress/false/.code={\graphicscache@compressfalse},
+ compress/jpeg/.code={\graphicscache@compresstrue \def\graphicscache@compress@mode{DCTEncode}},
+ compress/flat/.code={\graphicscache@compresstrue \def\graphicscache@compress@mode{FlatEncode}},
+ compress=jpeg,
+% \end{macrocode}
+% \begin{macrocode}
+ dpi/.store in=\graphicscache@dpi,
+ dpi=300,
+% \end{macrocode}
+% \begin{macrocode}
+ qfactor/.store in=\graphicscache@qfactor,
+ qfactor={0.15},
+% \end{macrocode}
+% \begin{macrocode}
+ hashshortnames/.is if=graphicscache@hashshortnames,
+ hashshortnames=false,
+% \end{macrocode}
+% We now define the list of supported graphicx arguments:
+% \begin{macrocode}
+ width/.code={%
+ \setlength\graphicscache@tmplen{#1}%
+ \graphicscache@addarg{width=\the\graphicscache@tmplen}%
+ },
+ height/.code={%
+ \setlength\graphicscache@tmplen{#1}%
+ \graphicscache@addarg{height=\the\graphicscache@tmplen}%
+ },
+ trim/.code={\graphicscache@addarg{trim=#1}},
+ clip/.code={\graphicscache@addarg{clip}},
+ angle/.code={%
+ \edef\graphicscache@tmp{#1}%
+ \graphicscache@addarg{angle=\graphicscache@tmp}%
+ },
+ origin/.code={\graphicscache@addarg{origin=#1}},
+ keepaspectratio/.code={\graphicscache@addarg{keepaspectratio}},
+ scale/.code={%
+ \edef\graphicscache@tmp{#1}%
+ \graphicscache@addarg{scale=\graphicscache@tmp}%
+ },
+ page/.code={%
+ \edef\graphicscache@tmp{#1}%
+ \graphicscache@addarg{page=\graphicscache@tmp}%
+ },
+ listing/.is if=graphicscache@listing,
+ listing=false,
+%
+% adjustbox package
+%
+ frame/.code={%
+ \edef\graphicscache@tmp{#1}%
+ \graphicscache@addarg{frame=\graphicscache@tmp}%
+ },
+ valign/.code={%
+ \edef\graphicscache@tmp{#1}%
+ \graphicscache@addarg{valign=\graphicscache@tmp}%
+ },
+ raise/.code={%
+ \edef\graphicscache@tmp{#1}%
+ \graphicscache@addarg{raise=\graphicscache@tmp}%
+ },
+}
+\ProcessPgfOptions{/graphicscache}\relax
+\ifdefined\graphicscache@inhibit
+ \pgfkeys{/graphicscache/render=false}%
+\fi
+\ifgraphicscache@listing
+ \newwrite\graphicscache@listout
+ \immediate\openout\graphicscache@listout=\jobname.graphicscache
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\graphicscache@dorender}
+% Here, we actually perform the rendering. Sadly, this is quite complex due
+% to cross-platform support.
+% \begin{macrocode}
+\newcommand{\graphicscache@dorender}{%
+ \message{Rendering \graphicscache@outputhash: \graphicscache@fname\space with args: \graphicscache@graphicsargs\space (master file)}%
+ \ifwindows
+ \immediate\write18{md "\graphicscache@cachedir" 2>NUL}%
+ \else
+ \immediate\write18{mkdir -p "\graphicscache@cachedir"}%
+ \fi
+% \end{macrocode}
+% First, render the graphics.
+% \begin{macrocode}
+ \ifwindows
+ \immediate\write18{del /q \graphicscache@cachedir\string\graphicscacheout.pdf}
+ \immediate\write18{pdflatex
+ -jobname graphicscacheout
+ -interaction nonstopmode
+ -output-directory "\graphicscache@cachedir"
+ "\string\documentclass{standalone}
+ \string\usepackage{graphicx}
+ \string\usepackage[export]{adjustbox}
+ \string\begin{document}\string\includegraphics[\graphicscache@graphicsargs]{\graphicscache@fname}\string\end{document}"
+ }%
+ \IfFileExists{\graphicscache@cachedir/graphicscacheout.pdf}{}{%
+ \PackageError{graphicscache}{External pdflatex call failed (see above)}{}%
+ \def\graphicscache@output{}%
+ }
+ \else
+ \immediate\write18{pdflatex
+ -jobname graphicscacheout
+ -interaction nonstopmode
+ -output-directory "\graphicscache@cachedir"
+ '\string\documentclass{standalone}
+ \string\usepackage{graphicx}
+ \string\usepackage[export]{adjustbox}
+ \string\begin{document}\string\includegraphics[\graphicscache@graphicsargs]{\graphicscache@fname}\string\end{document}'
+ > /dev/null || rm "\graphicscache@cachedir/graphicscacheout.pdf"
+ }%
+ \fi
+% \end{macrocode}
+% Now, call ghostscript for compression---if required, otherwise just copy the
+% file.
+% \begin{macrocode}
+ \ifgraphicscache@compress
+ \message{With compression: \graphicscache@compress@mode}%
+ \ifwindows
+ \immediate\write18{mgs
+ -sOutputFile=\graphicscache@output\space
+ -sDEVICE=pdfwrite
+ -dCompatibilityLevel=1.4
+ -dPDFSETTINGS=/prepress
+ -dNOPAUSE -dQUIET -dBATCH
+ -c ".setpdfwrite <<
+ /AutoFilterColorImages false
+ /EncodeColorImages true
+ /ColorImageFilter /\graphicscache@compress@mode\space
+ /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+ /ColorImageResolution \graphicscache@dpi\space
+ /AutoFilterGrayImages false
+ /EncodeGrayImages true
+ /GrayImageFilter /\graphicscache@compress@mode\space
+ /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+ /GrayImageResolution \graphicscache@dpi\space
+ >> setdistillerparams"
+ -f \graphicscache@cachedir\string\graphicscacheout.pdf
+ }%
+ \else
+ \immediate\write18{gs
+ -sOutputFile=\graphicscache@output\space
+ -sDEVICE=pdfwrite
+ -dCompatibilityLevel=1.4
+ -dPDFSETTINGS=/prepress
+ -dNOPAUSE -dQUIET -dBATCH
+ -c '.setpdfwrite <<
+ /AutoFilterColorImages false
+ /EncodeColorImages true
+ /ColorImageFilter /\graphicscache@compress@mode\space
+ /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+ /ColorImageResolution \graphicscache@dpi\space
+ /AutoFilterGrayImages false
+ /EncodeGrayImages true
+ /GrayImageFilter /\graphicscache@compress@mode\space
+ /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+ /GrayImageResolution \graphicscache@dpi\space
+ >> setdistillerparams'
+ -f \graphicscache@cachedir/graphicscacheout.pdf || rm \graphicscache@output
+ }%
+ \fi
+ \else
+ \message{Direct}%
+ \ifwindows
+ \immediate\write18{
+ copy \graphicscache@cachedir\string\graphicscacheout.pdf \graphicscache@output
+ }%
+ \else
+ \immediate\write18{
+ cp \graphicscache@cachedir/graphicscacheout.pdf \graphicscache@output
+ }%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% save original |\includegraphics|
+% \begin{macrocode}
+\LetLtxMacro\graphicscache@includegraphics\includegraphics%
+\newcommand\graphicscache@native{%
+ \expandafter\graphicscache@includegraphics\expandafter[\graphicscache@graphicsargs]{\graphicscache@fname}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\graphicscache@work}
+% This macro performs the update check: Do we need to render the file again
+% or can we just include the cached version?
+% \begin{macrocode}
+\newcommand{\graphicscache@work}{%
+ \ifgraphicscache@render
+% \end{macrocode}
+% Check if output file exists and is newer than input
+% \begin{macrocode}
+ \filemodcmp{\graphicscache@fname}{\graphicscache@output}{% input is newer
+ \graphicscache@dorender%
+ }{% Output is newer
+ \message{Already have \graphicscache@outputhash: \graphicscache@fname}%
+ }%
+% \end{macrocode}
+% If it still does not exist, we are likely in a strange environment
+% (e.g. tabu). In that case, fall back to original includegraphics.
+% \begin{macrocode}
+ \filemodcmp{\graphicscache@fname}{\graphicscache@output}{% input is newer/output does not exist
+ \graphicscache@native
+ }{% otherwise, use the generated file!
+ \graphicscache@includegraphics{\graphicscache@output}%
+ }%
+ \else
+% \end{macrocode}
+% Here, we just look if the output file exists. If not, fall back to
+% original includegraphics.
+% \begin{macrocode}
+ \IfFileExists{\graphicscache@output}{%
+ \graphicscache@includegraphics{\graphicscache@output}%
+ }{%
+ \PackageWarning{graphicscache}{Could not find cache file \graphicscache@output, for \graphicscache@fname, falling back to native...}{}%
+ \graphicscache@native
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\graphicscache@getfname}
+% This macro resolves base names (i.e. includegraphics arguments with or
+% without extensions) to relative paths.
+% \begin{macrocode}
+\catcode`\*=11
+\newif\ifgraphicscache@exists
+\newcommand{\graphicscache@getfname}[1]{%
+ \ifx\detokenize\@undefined\else
+ \edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}%
+ \fi
+ \begingroup
+ \global\graphicscache@existstrue
+ \let\input@path\Ginput@path
+ \ltx@ifpackagelater{graphics}{2017/06/26}{%
+ \set@curr@file{#1}%
+ \expandafter\filename@parse\expandafter{\@curr@file}%
+ \ifx\filename@ext\Gin@gzext
+ \expandafter\filename@parse\expandafter{\filename@base}%
+ \ifx\filename@ext\relax
+ \let\filename@ext\Gin@gzext
+ \else
+ \edef\Gin@ext{\Gin@ext\Gin@sepdefault\Gin@gzext}%
+ \fi
+ \fi
+ }{%
+ \filename@parse{#1}%
+ }%
+ \ifx\filename@ext\relax
+ \@for\Gin@temp:=\Gin@extensions\do{%
+ \ifx\Gin@ext\relax
+ \Gin@getbase\Gin@temp
+ \fi}%
+ \else
+ \Gin@getbase{\Gin@sepdefault\filename@ext}%
+ \ltx@ifpackagelater{graphics}{2017/06/26}{%
+ \ifx\Gin@ext\relax
+ \let\Gin@savedbase\filename@base
+ \let\Gin@savedext\filename@ext
+ \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}%
+ \let\filename@ext\relax
+ \@for\Gin@temp:=\Gin@extensions\do{%
+ \ifx\Gin@ext\relax
+ \Gin@getbase\Gin@temp
+ \fi}%
+ \ifx\Gin@ext\relax
+ \let\filename@base\Gin@savedbase
+ \let\filename@ext\Gin@savedext
+ \fi
+ \fi
+ }{}%
+ \fi
+ \ifx\Gin@ext\relax
+ \global\graphicscache@existsfalse
+ \else
+ \@ifundefined{Gin@rule@\Gin@ext}%
+ {\global\graphicscache@existsfalse}%
+ {}%
+ \fi
+ \ifgraphicscache@exists
+ \xdef\graphicscache@fname{\Gin@base\Gin@ext}%
+ \fi
+ \endgroup
+}
+\catcode`\*=12
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\includegraphics}
+% Main entry point.
+% \begin{macrocode}
+\renewcommand{\includegraphics}[2][]{%
+ \begingroup
+ \expandarg
+% \end{macrocode}
+% Hash everything!
+% \begin{macrocode}
+ \edef\graphicscache@options{\@nameuse{opt@graphicscache.sty}}%
+ \pgfkeys{/graphicscache/.cd,#1}%
+% \end{macrocode}
+% If we are rendering, we need the actual filename, so that we can check
+% modification times. Otherwise, just assume the file exists, |\includegraphics|
+% will throw an error itself otherwise.
+% \begin{macrocode}
+ \ifgraphicscache@render
+ \graphicscache@getfname{#2}%
+ \else
+ \edef\graphicscache@fname{#2}%
+ \graphicscache@existstrue
+ \fi
+ \ifgraphicscache@exists
+ \ifgraphicscache@hashshortnames
+ \edef\graphicscache@hashedname{#2}%
+ \else
+ \edef\graphicscache@hashedname{\graphicscache@fname}%
+ \fi
+ \edef\graphicscache@outputhash{\pdf@mdfivesum{\graphicscache@options\graphicscache@graphicsargs\graphicscache@hashedname}}%
+ \edef\graphicscache@output{\graphicscache@cachedir/\graphicscache@outputhash.pdf}%
+ \ifgraphicscache@listing
+ \message{graphicscache: includegraphics\{#2\} => \graphicscache@output}%
+ \immediate\write\graphicscache@listout{#2 \graphicscache@fname\space \graphicscache@output}%
+ \fi
+ \graphicscache@work
+ \else
+ \PackageError{graphicscache}{Could not find file #2}{}%
+ \fi
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\includegraphicscache}
+% \begin{macrocode}
+\newcommand{\includegraphicscache}[3][]{%
+ \begingroup
+ \expandarg
+ \pgfkeys{/graphicscache/.cd,#2}%
+ \includegraphics[#1]{#3}%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\endinput
+% \end{macrocode}
+
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/graphicscache/graphicscache.ins b/macros/latex/contrib/graphicscache/graphicscache.ins
new file mode 100644
index 0000000000..29c45a3565
--- /dev/null
+++ b/macros/latex/contrib/graphicscache/graphicscache.ins
@@ -0,0 +1,35 @@
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/graphicscache}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2021 by Max Schwarz <max.schwarz@online.de>
+based on the sty2dtx template by Scott Pakin <scott+dtx@pakin.org>.
+
+This file may be distributed and/or modified under the conditions of
+the BSD 3-clause license (see LICENSE).
+
+\endpreamble
+
+\generate{\file{graphicscache.sty}{\from{graphicscache.dtx}{package}}}
+
+\obeyspaces
+\Msg{***************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* graphicscache.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file graphicscache.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{***************************************************************}
+
+\endbatchfile
diff --git a/macros/latex/contrib/graphicscache/graphicscache.pdf b/macros/latex/contrib/graphicscache/graphicscache.pdf
new file mode 100644
index 0000000000..27682695fe
--- /dev/null
+++ b/macros/latex/contrib/graphicscache/graphicscache.pdf
Binary files differ
diff --git a/macros/latex/contrib/lipsum/CHANGELOG.md b/macros/latex/contrib/lipsum/CHANGELOG.md
index 379801f73f..470e445784 100644
--- a/macros/latex/contrib/lipsum/CHANGELOG.md
+++ b/macros/latex/contrib/lipsum/CHANGELOG.md
@@ -5,6 +5,11 @@ documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project uses major+minor version identifiers.
+## [v2.6]
+
+### Changed
+- Minor changes to `lipsum.ins` ([related issue][1]).
+
## [v2.5]
### Fixed
@@ -47,3 +52,5 @@ and this project uses major+minor version identifiers.
### Fixed
- Internal change to avoid error with newer `xparse`.
+
+ [1]: https://github.com/latex3/latex2e/issues/636
diff --git a/macros/latex/contrib/lipsum/lipsum.dtx b/macros/latex/contrib/lipsum/lipsum.dtx
index 6371737414..944dac139f 100644
--- a/macros/latex/contrib/lipsum/lipsum.dtx
+++ b/macros/latex/contrib/lipsum/lipsum.dtx
@@ -16,7 +16,7 @@
% https://github.com/PhelypeOleinik/lipsum
%
\def\lipsumversion{2.5}
-\def\lipsumdate{2021-07-28}
+\def\lipsumdate{2021-08-01}
%<*driver>
\ProvidesFile{lipsum.dtx}%
[\lipsumdate\space v\lipsumversion\space
@@ -1319,7 +1319,7 @@
% Warn the user about an unknown/missing language. Most of the time
% the issue is a minimal installation that doesn't have Latin, but
% sometimes it may be a typo. Regardless of the case, warn the user
-% then change the lanugage to \cs{languagename} so the warning appears
+% then change the language to \cs{languagename} so the warning appears
% only once, at least until it is changed again.
% \begin{macrocode}
\cs_new_protected:Npn \@@_missing_language_warning:
diff --git a/macros/latex/contrib/lipsum/lipsum.ins b/macros/latex/contrib/lipsum/lipsum.ins
index 4a289f65f3..e22af4b0c8 100644
--- a/macros/latex/contrib/lipsum/lipsum.ins
+++ b/macros/latex/contrib/lipsum/lipsum.ins
@@ -12,7 +12,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-\input l3docstrip.tex
+\input docstrip.tex
\askforoverwritefalse
\keepsilent
\preamble
@@ -58,12 +58,12 @@ Please send error reports and suggestions for improvements to
\inparfalse
\parno=0
\endlinechar=-1
- \def~{ }%
+ \def\~{ }%
\def\ReferenceLines{%
\MetaPrefix ^^J%
- \MetaPrefix~The original source files were:^^J%
+ \MetaPrefix\~The original source files were:^^J%
\MetaPrefix ^^J%
- \MetaPrefix~\inFileName^^J}%
+ \MetaPrefix\~\inFileName^^J}%
\immediate\write\lipswrite{\defaultpreamble}%
\immediate\write\lipswrite{\string\SetLipsumLanguage{#3}}%
\genlipsumaux\genlipsumaux
@@ -96,7 +96,7 @@ Please send error reports and suggestions for improvements to
\genlipsum{cs}{lipsum-cs}{czech}
\genlipsum{cicero}{cicero}{latin}
-\obeyspaces
+\catcode`\ =13 \edef {\space}%
\Msg{****************************************************}
\Msg{* *}
\Msg{* To finish the installation you have to move the *}
diff --git a/macros/latex/contrib/lipsum/lipsum.pdf b/macros/latex/contrib/lipsum/lipsum.pdf
index c27ddc7e8b..a9a5d52217 100644
--- a/macros/latex/contrib/lipsum/lipsum.pdf
+++ b/macros/latex/contrib/lipsum/lipsum.pdf
Binary files differ