summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-30 03:04:17 +0000
committerNorbert Preining <norbert@preining.info>2023-01-30 03:04:17 +0000
commit326add29024271cbd541ac55448e616e833ae5fa (patch)
tree3a7301e802591c20575b65b94b21291641e7641f /macros/latex
parentdab4e7c261c34234f9d9f1ac92923d6f903046ef (diff)
CTAN sync 202301300304
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/fixdif/fixdif-zh-cn.pdfbin159497 -> 155063 bytes
-rw-r--r--macros/latex/contrib/fixdif/fixdif-zh-cn.tex6
-rw-r--r--macros/latex/contrib/fixdif/fixdif.dtx6
-rw-r--r--macros/latex/contrib/fixdif/fixdif.pdfbin92154 -> 92149 bytes
-rw-r--r--macros/latex/contrib/hvextern/Changes2
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.pdfbin1417949 -> 1495836 bytes
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.tex18
-rw-r--r--macros/latex/contrib/hvextern/latex/hvextern.sty354
-rwxr-xr-xmacros/latex/contrib/hvextern/script/hvextern-checkfile.lua2
-rw-r--r--macros/latex/contrib/naive-ebnf/DEPENDS.txt3
-rw-r--r--macros/latex/contrib/naive-ebnf/LICENSE.txt21
-rw-r--r--macros/latex/contrib/naive-ebnf/README.md33
-rw-r--r--macros/latex/contrib/naive-ebnf/naive-ebnf.dtx283
-rw-r--r--macros/latex/contrib/naive-ebnf/naive-ebnf.ins55
-rw-r--r--macros/latex/contrib/naive-ebnf/naive-ebnf.pdfbin0 -> 443528 bytes
15 files changed, 766 insertions, 17 deletions
diff --git a/macros/latex/contrib/fixdif/fixdif-zh-cn.pdf b/macros/latex/contrib/fixdif/fixdif-zh-cn.pdf
index 079be1bc7f..da89964e6e 100644
--- a/macros/latex/contrib/fixdif/fixdif-zh-cn.pdf
+++ b/macros/latex/contrib/fixdif/fixdif-zh-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/fixdif/fixdif-zh-cn.tex b/macros/latex/contrib/fixdif/fixdif-zh-cn.tex
index 851065ebc8..d47b803baf 100644
--- a/macros/latex/contrib/fixdif/fixdif-zh-cn.tex
+++ b/macros/latex/contrib/fixdif/fixdif-zh-cn.tex
@@ -1,6 +1,6 @@
\documentclass[letterpaper,11pt]{article}
\usepackage{fixdif}
-\date{2023/01/31\quad Version 2.0%
+\date{2023/02/01\quad Version 2.0a%
\thanks{源代码见~\hyperref{https://github.com/AlphaZTX/fixdif}{}{}{GitHub}
或~\hyperref{https://www.ctan.org/pkg/fixdif}{}{}{CTAN}。}
}
@@ -29,8 +29,8 @@
\renewcommand\abstractname{摘\hskip.8em 要}
\renewcommand\contentsname{目\hskip.8em 录}
\DeclareRobustCommand\zhemph{\CJKunderdot}
-%\usepackage{unicode-math}
-%\setmathfont{STIX Two Math}
+\usepackage{unicode-math}
+\setmathfont{STIX Two Math}
\usepackage{hyperref}
\hypersetup{pdffitwindow,
pdftitle = {fixdif 宏包},
diff --git a/macros/latex/contrib/fixdif/fixdif.dtx b/macros/latex/contrib/fixdif/fixdif.dtx
index e6f37a330f..e27b276fe8 100644
--- a/macros/latex/contrib/fixdif/fixdif.dtx
+++ b/macros/latex/contrib/fixdif/fixdif.dtx
@@ -131,7 +131,7 @@ Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>.
%</internal>
%
%<*driver>
-\ProvidesFile{fixdif.dtx}[2023/01/31 (c) Copyright 2022-2023 by Zhang Tingxuan]
+\ProvidesFile{fixdif.dtx}[2023/02/01 (c) Copyright 2022-2023 by Zhang Tingxuan]
\documentclass{ltxdoc}
\usepackage{xcolor}
@@ -150,7 +150,7 @@ Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>.
\title{The \pkg{fixdif} Package}
\author{Zhang Tingxuan}
-\date{2023/01/31\quad Version 2.0\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
+\date{2023/02/01\quad Version 2.0a\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
\usepackage{hyperref}
\hypersetup{
@@ -447,7 +447,7 @@ Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>.
% Check the \TeX{} format and provides the package name.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fixdif}[2023/01/31 Interface for defining differential operators.]
+\ProvidesPackage{fixdif}[2023/02/01 Interface for defining differential operators.]
% \end{macrocode}
%
% \subsection{Control the skip between slashes and differential operator}
diff --git a/macros/latex/contrib/fixdif/fixdif.pdf b/macros/latex/contrib/fixdif/fixdif.pdf
index 8e80606dd3..835ed6520e 100644
--- a/macros/latex/contrib/fixdif/fixdif.pdf
+++ b/macros/latex/contrib/fixdif/fixdif.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes
index 422e5ce894..2b5f16f44c 100644
--- a/macros/latex/contrib/hvextern/Changes
+++ b/macros/latex/contrib/hvextern/Changes
@@ -1,5 +1,7 @@
hvextern.sty ----------------
+v 0.33 2023-01-29 - fixed bug with vertical space before and end of
+ the example code
v 0.32 2022-06-23 - fixed introduced bug
- added checkCode also for pdflatex and xelatex
v 0.31 2022-06-20 - added package option checkCode to run the external
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf
index 6213f9215f..79279aab99 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.pdf
+++ b/macros/latex/contrib/hvextern/doc/hvextern.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex
index 5971c04744..5e40c2b98b 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.tex
+++ b/macros/latex/contrib/hvextern/doc/hvextern.tex
@@ -1,4 +1,4 @@
-%% $Id: hvextern.tex 577 2022-06-20 16:35:21Z herbert $
+%% $Id: hvextern.tex 678 2023-01-29 09:59:12Z herbert $
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass[ngerman,a4paper,twoside]{article}
@@ -907,6 +907,7 @@ or \Lkeyval{b}.
crop,
cleanup,
force=false,
+ aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -931,6 +932,7 @@ or \Lkeyval{b}.
crop,
cleanup,
force=false,
+ aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -956,6 +958,7 @@ or \Lkeyval{b}.
crop,
cleanup,
force=false,
+ aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -982,6 +985,7 @@ or \Lkeyval{b}.
cleanup,
force=false,
mpwidth=0.5\linewidth,
+ aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -1007,6 +1011,7 @@ or \Lkeyval{b}.
cleanup,
force=false,
mpwidth=0.5\linewidth,
+ aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -1033,6 +1038,7 @@ or \Lkeyval{b}.
cleanup,
force=false,
mpwidth=0.5\linewidth,
+ aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -1476,6 +1482,16 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not
\end{description}
+The listings environment uses its own keywords \Lkeyword{aboveskip} and \Lkeyword{belowskip}, also preset
+to \Lcs{medskipamount}. These ones can be changed by using the keyword \Lkeyword{lstOptions}:
+
+\begin{verbatim}
+..., lstOptions = {aboveskip=..., belowskip=...}, ...
+\end{verbatim}
+
+
+
+
\subsection{No output}
By default there is an image or text as output of the external run. In a case, where
you are only interested in the code, which should be formatted in the same style as
diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty
index bf76925308..9f90b708a2 100644
--- a/macros/latex/contrib/hvextern/latex/hvextern.sty
+++ b/macros/latex/contrib/hvextern/latex/hvextern.sty
@@ -1,7 +1,7 @@
-%% $Id: hvextern.sty 579 2022-06-20 19:23:29Z herbert $
+%% $Id: hvextern.sty 678 2023-01-29 09:59:12Z herbert $
%% This is file `hvextern.sty',
%%
-%% Copyright (C) 2016-22
+%% Copyright (C) 2016-23
%% Herbert Voss
%%
%% It may be distributed and/or modified under the
@@ -12,8 +12,8 @@
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\def\hvexternFileversion{0.32}
-\ProvidesFile{hvextern}[2022/06/23 v\hvexternFileversion: package for running external documents (HV)]
+\def\hvexternFileversion{0.33}
+\ProvidesFile{hvextern}[2023/01/29 v\hvexternFileversion: package for running external documents (HV)]
\newif\ifhv@extern@checkCode
\hv@extern@checkCodefalse
@@ -29,6 +29,7 @@
\def\hv@ex@typeout#1{\ifhv@extern@verbose\typeout{>>(hvextern) #1}\fi}
+
\ifwindows
\def\hv@move{move }%
\def\hv@rm{del }%
@@ -287,18 +288,18 @@
\hv@ex@typeout{Running PreambleListing with #1, #2}%
\ifhv@extern@tcbox
\begin{tcolorbox}[before skip=0pt,after skip=0pt,breakable,enhanced jigsaw%,top=-2pt
- ]\expandafter\lstinputlisting\expandafter[#1,aboveskip=0pt,belowskip=0pt]{#2}\end{tcolorbox}%
+ ]\expandafter\lstinputlisting\expandafter[#1]{#2}\end{tcolorbox}%
\else
- \expandafter\lstinputlisting\expandafter[#1,aboveskip=0pt,belowskip=0pt]{#2}%
+ \expandafter\lstinputlisting\expandafter[#1]{#2}%
\fi}
\newcommand\BodyListing[2][]{%
\hv@ex@typeout{Running BodyListing with #1, #2}%
\ifhv@extern@tcbox
\begin{tcolorbox}[before skip=0pt,after skip=0pt,breakable,enhanced jigsaw,%top=-2pt
- ]\expandafter\lstinputlisting\expandafter[#1,aboveskip=0pt,belowskip=0pt]{#2}\end{tcolorbox}%
+ ]\expandafter\lstinputlisting\expandafter[#1]{#2}\end{tcolorbox}%
\else
- \expandafter\lstinputlisting\expandafter[#1,aboveskip=0pt,belowskip=0pt]{#2}%
+ \expandafter\lstinputlisting\expandafter[#1]{#2}%
\fi}
\newcounter{hv@example@counter}
@@ -516,6 +517,7 @@
\fi% end force
\hfuzz=\maxdimen
\ifhv@extern@code%-------------- Code Part
+ \vspace{\hv@extern@aboveskip}%
\hv@ex@typeout{Starting Code part with preamble ...}%
\begingroup
\if@twocolumn
@@ -658,7 +660,7 @@
\vspace{\hv@extern@belowskip}%
}
-\newcommand\runExtCmd[3][]{%
+\newcommand\runExtCmd[3][]{% #1:options; #2:comamnd; #3:filename
\begingroup
\setkeys{hv}{cleanup={},code=false,includegraphic=false,#1}%
\xdef\hvExternDateiname{#3-\arabic{hv@example@counter}}%
@@ -732,6 +734,340 @@
\endgroup
}
+\def\WriteVerb{\FV@Environment{}{WriteVerb}}
+\def\FVB@WriteVerb#1{%
+ \@bsphack
+ \begingroup
+ \FV@UseKeyValues
+ \FV@DefineWhiteSpace
+ \def\FV@Space{\space}%
+ \FV@DefineTabOut
+ \def\FV@ProcessLine{\immediate\write\FV@OutFile}%
+ \immediate\openout\FV@OutFile #1\relax
+ \let\FV@FontScanPrep\relax
+ \let\@noligs\relax
+ \FV@Scan}
+\def\FVE@WriteVerb{\immediate\closeout\FV@OutFile\endgroup\@esphack}
+\DefineVerbatimEnvironment{WriteVerb}{WriteVerb}{}
+
+\begingroup
+\catcode`\^^M=\active
+ \gdef\FV@BeginScanning#1^^M{%
+ \def\@tempa{#1}\ifx\@tempa\@empty\else\FV@BadBeginError\fi% <------
+ \FV@GetLine}%
+\gdef\FancyVerbGetLine#1^^M{%
+ \@nil
+ \FV@CheckEnd{#1}%
+ \ifx\@tempa\FV@EnvironName% % True if end is found
+ \ifx\@tempb\FV@@@CheckEnd\else\FV@BadEndError\fi%
+ \let\next\FV@EndScanning%
+ \else%
+ \def\FV@Line{#1}%
+ \def\next{\FV@PreProcessLine\FV@GetLine}%
+ \fi%
+ \next}%
+\endgroup
+
+{\catcode`\ =12 \gdef\FancyVerbSpace{\ttfamily }}
+
+\newcommand\BeginPSTcode{%
+ \nobreak
+ \VerbatimEnvironment
+ \catcode`\<=12
+ \begin{VerbatimOut}{\EX@dir\EX@prefix\theEX@ct.\EX@suffix}}
+%
+\newcommand\EndPSTcode{%
+\end{VerbatimOut}
+ \global\let\Preamble@Commands\@empty
+ \global\let\Hidden@Preamble@Commands\@empty
+ \global\let\Require@Packages\@empty
+}
+%
+\renewcommand\FVE@VerbatimOut{%
+ \Write@Postamble
+ \immediate\closeout\FV@OutFile\endgroup\@esphack}
+
+\newcommand\Write@Ex[1]{%
+ \begingroup
+ \let\protect\@unexpandable@protect
+ \edef\reserved@a{\immediate\write\FV@OutFile{#1}}%
+ \reserved@a
+ \endgroup}
+
+\newcommand\Write@ExOne[1]{{%
+ \@temptokena\expandafter{#1}%
+ \immediate\write\FV@OutFile{\the\@temptokena}}}
+
+\renewcommand\FVB@VerbatimOut[1]{%
+ \@bsphack
+ \begingroup
+ \FV@UseKeyValues%
+ \FV@DefineWhiteSpace%
+ \def\FV@Space{\space}%
+ \FV@DefineTabOut%
+ \def\FV@ProcessLine##1{\toks@{##1}\immediate\write\FV@OutFile{\the\toks@}}%
+ \immediate\openout\FV@OutFile #1\relax%
+ \Write@Preamble
+ \let\FV@FontScanPrep\relax
+ \let\@noligs\relax%
+ \FV@Scan}
+%
+
+\newcommand\Write@Preamble@PST{%
+ \Write@Ex{\string\documentclass[pstricks]{standalone}}%
+ \Write@Ex{\string\pagestyle{empty}}%
+ \ifx\Preamble@Commands\@empty\else
+ \Write@Ex{\Preamble@Commands}%
+ \fi
+ \Write@Ex{\string\begin{document}}%
+}
+%
+%\hv@extern@ExampleType{ltx}
+% {\Write@Preamble@LaTeX}
+% {\Write@Ex{\string\end{document}}}
+% {\string\begin{document}}
+% {\string\end{document}}
+% {\perCent StartShownPreambleCommands}
+% {\perCent StopShownPreambleCommands}
+
+\newenvironment{createPNGfromPSTricks}[3][]% #1:options #2: pstricks packages #3: filename
+ {%
+ \xdef\hvExternDateiname{#2-\arabic{hv@example@counter}}%
+ \gdef\hv@extern@savePara{#1}%
+ \setkeys{hv}{#1}% \begin
+ \hv@ex@typeout{External filename: \hvExternDateiname}%
+ \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.pdf}{}{%
+ \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.png}{}{%
+ \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.txt}{}{%
+ \global\hv@extern@forcetrue}}}% set force, if no pdf or png exists
+ \begingroup
+ \hv@ex@typeout{writing file \hvExternDateiname\hv@extern@ext ...}%
+ \filecontents[force,noheader]{\hvExternDateiname\hv@extern@ext}%
+ }
+ {\endfilecontents% \end%
+ \hv@ex@typeout{... done}%
+ \global\stepcounter{hv@example@counter}%
+ \endgroup
+ \expandafter\hvExternSetKeys\expandafter{\hv@extern@savePara}%
+ \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}%
+ \ifhv@extern@checkCode
+ \ifluatex
+ \directlua{if GetFileContents("\hvExternDateiname\hv@extern@ext",
+ "\hv@extern@ExamplesDir\hvExternDateiname\hv@extern@ext") then
+ tex.print("\\csname hv@ex@typeout\\endcsname{current file is NOT newer: no run }\\global\\csname hv@extern@forcefalse\\endcsname")
+ else
+ tex.print("\\csname hv@ex@typeout\\endcsname{current file is newer: force run }\\global\\csname hv@extern@forcetrue\\endcsname")
+ end}%
+ \else
+ \hv@ex@typeout{Check, if new file has a different code}%
+ \ShellEscape{hvextern-checkfile "\hvExternDateiname\hv@extern@ext"
+ "\hv@extern@ExamplesDir\hvExternDateiname\hv@extern@ext"}%
+ \InputIfFileExists{\hvExternDateiname\hv@extern@ext.diff}{}{}%
+ \ifx\hvCheckNewFile\empty
+ \hv@ex@typeout{current file is NOT newer: no run }%
+ \global\hv@extern@forcefalse
+ \else
+ \hv@ex@typeout{current file is newer: force run }%
+ \global\hv@extern@forcetrue
+ \fi
+ \ifhv@extern@verbose\else\hv@rm{\hvExternDateiname\hv@extern@ext.diff}\fi
+ \fi
+ \fi
+ \ifhv@extern@force
+ \ifx\hv@extern@runsequence\@empty
+ \hv@ex@typeout{force=true: running \hv@extern@progpath\hv@extern@compiler~ \hvExternDateiname\hv@extern@ext ...}%
+ \setcounter{@@@runs}{\value{hv@extern@runs}}%
+ \loop\ifnum\the@@@runs > 0\relax
+ \ifcase\hv@extern@compilerNo \relax % we have metapost
+ \hv@ex@typeout{running mpost \hvExternDateiname\hv@extern@ext}%
+ \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}%
+ \or %1
+ \hv@ex@typeout{running tex \hvExternDateiname\hv@extern@ext}%
+ \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}%
+ \or %2
+ \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}%
+ \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}%
+ \else
+ \ifhv@extern@redirect
+ \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}%
+ \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext\space > \hvExternDateiname.txt}%
+ \else
+ \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}%
+ \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext}%
+ \fi
+ \fi
+ \addtocounter{@@@runs}{-1}%
+ \repeat
+ \hv@ex@typeout{... done}%
+ \ifhv@extern@biber
+ \ShellEscape{biber \hvExternDateiname}% NAch biber nochmal latex
+ \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}%
+ \fi
+ \ifhv@extern@xindex
+ \ShellEscape{xindex \hv@extern@xindexOptions\space \hvExternDateiname.idx}% NAch xindex nochmal latex
+ \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}%
+ \fi
+ \else % runsequence
+ \expandafter\run@hv@extern@sequenceList\expandafter{\hv@extern@runsequence}%
+ \fi
+ \ifhv@extern@crop
+ \ShellEscape{pdfcrop --margins \hv@extern@cropmargin \hvExternDateiname}%
+ \ShellEscape{\hv@move \hvExternDateiname-crop.pdf \hvExternDateiname.pdf}%
+ \fi
+ \ifhv@extern@eps
+ \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}%
+ \fi
+ \else
+ \hv@ex@typeout{force=false: NOT running \hvExternDateiname\hv@extern@ext ...}%
+ \fi% end force
+ \hfuzz=\maxdimen
+ \ifhv@extern@code%-------------- Code Part
+ \hv@ex@typeout{Starting Code part with preamble ...}%
+ \begingroup
+ \if@twocolumn
+ \ifhv@extern@outerFN
+ \hv@TextWidth=\textwidth
+ \else
+ \hv@TextWidth=\columnwidth
+ \fi
+ \else
+ \hv@TextWidth=\textwidth
+ \fi
+ \ifdim\hv@extern@mpwidth>\z@
+ \noindent
+ \tcbset{breakable=false}%
+ \minipage[\hv@extern@mpvalign]{\hv@extern@mpwidth}
+ \vspace{0pt}%
+ \else
+ \vspace{\hv@extern@aboveskip}\noindent
+ \fi
+ \ifhv@extern@usefancyvrb
+ \@nameuse{\hv@extern@docType @initPreambleFancy}%
+ \edef\@@@temp{\@nameuse{\hv@extern@docType @initPreamble}}%
+ % we need lstinputlisting, because \VerbatimInput doesn't work in a box
+ \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv@extern@ext}}%
+ \ifdim\wd\hv@extern@box > \z@\relax
+ \expandafter\fvset\expandafter{\hv@extern@lstOptions}%
+ \tcbset{colback=\hv@extern@BGpreamble,colframe=\hv@extern@BOpreamble}%
+ \PreambleVerbatim{\hvExternDateiname\hv@extern@ext}%
+ \vspace{\hv@extern@belowpreambleskip}%
+ \fi
+ \else
+ \edef\@@@temp{\@nameuse{\hv@extern@docType @initPreamble}}%
+ \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv@extern@ext}}%
+ \ifdim\wd\hv@extern@box>\z@\relax
+ \expandafter\lstset\expandafter{\hv@extern@lstOptions}%
+ \tcbset{colback=\hv@extern@BGpreamble,colframe=\hv@extern@BOpreamble}%
+ \PreambleListing[\@@@temp]{\hvExternDateiname\hv@extern@ext}%
+ \vspace{\hv@extern@belowpreambleskip}%
+ \fi
+ \fi
+ \ifhv@extern@showFilename
+ \hv@ex@typeout{Set filename in the margin!}%
+ \noindent
+ \hfuzz=\maxdimen
+ \hv@marginpar{\hvExternDateiname\hv@extern@ext}%
+ \fi
+%
+ \hv@ex@typeout{Starting Code body ...}%}
+ \ifhv@extern@usefancyvrb
+ \@nameuse{\hv@extern@docType @initTextFancy}%
+ \expandafter\fvset\expandafter{\hv@extern@lstOptions}%
+ \tcbset{colback=\hv@extern@BGbody,colframe=\hv@extern@BObody}%
+ \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hvExternDateiname\hv@extern@ext}%
+ \else
+ \expandafter\lstset\expandafter{\hv@extern@lstOptions}%
+ \edef\@@@temp{\@nameuse{\hv@extern@docType @initText}}%
+ \tcbset{colback=\hv@extern@BGbody,colframe=\hv@extern@BObody}%
+ \BodyListing[\@@@temp]{\hvExternDateiname\hv@extern@ext}%
+ \fi
+ \ifdim\hv@extern@mpwidth > \z@\relax \endminipage\fi
+ \endgroup
+ \fi % end code part
+ \ifhv@extern@code\else % only if no code
+ \ifhv@extern@showFilename
+ \hv@ex@typeout{Set filename in the margin!}%
+ \noindent
+ \hv@marginpar{\hvExternDateiname\hv@extern@ext}%
+ \fi
+ \fi
+ \ifhv@extern@moveToExampleDir
+% \ShellEscape{mkdir\space\hv@extern@ExamplesDir/}%
+ \hv@ex@typeout{Move file into example dir}%
+ \hv@ex@typeout{\hvExternDateiname ----> \hv@extern@ExamplesDir}%
+ \ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}%
+ \fi
+ \ifhv@extern@showoutput
+ \ifhv@extern@includegraphic
+ \ifhv@extern@inline
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}%
+ \else
+ \ifhv@extern@float
+ \hv@ex@typeout{Floating environment}%
+ \expandafter\figure\expandafter[\hv@extern@floatsetting]
+ \else
+ \hv@ex@typeout{No floating environment}%
+ \vspace{\hv@extern@belowbodyskip}
+ \ifdim\hv@extern@mpwidth>\z@
+ \hfill\minipage[\hv@extern@mpvalign]{\dimexpr\linewidth-\hv@extern@mpwidth-1em\relax}\vspace{0pt}%
+ \else
+ \vspace{\hv@extern@belowbodyskip}\noindent
+ \begingroup
+ \fi
+ \fi
+ \hv@extern@align
+ \hv@ex@typeout{Input image \hv@extern@fullPath}%
+ \ifhv@extern@frame
+ \begingroup
+ \fboxsep=\hv@extern@framesep
+ \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
+ \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]%
+ {\hv@extern@fullPath}}\hspace{\hv@extern@pagesep}}%
+ \hspace*{-\hv@extern@pagesep}%
+ \endgroup
+ \else
+ \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]%
+ {\hv@extern@fullPath}\hspace{\hv@extern@pagesep}}%
+ \hspace*{-\hv@extern@pagesep}%
+ \fi
+ \par% for \hv@extern@align
+ \ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi
+ \ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi
+ \ifhv@extern@float
+ \endfigure
+ \else
+ \ifdim\hv@extern@mpwidth>\z@ \endminipage\else\endgroup\fi
+ \fi
+ \fi
+ \else% no graphic, only text
+ \ifdim\hv@extern@mpwidth>\z@
+ \hfill\minipage[t]{\dimexpr\linewidth-\hv@extern@mpwidth-\hv@extern@mpsep\relax}\vspace{0pt}
+ \ifhv@extern@usefancyvrb
+ \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \else
+ \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \fi
+ \endminipage
+ \else
+ \vspace{\hv@extern@belowbodyskip}%
+ \noindent
+ \ifhv@extern@usefancyvrb
+ \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \else
+ \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \fi
+ \fi
+ \fi
+ \fi% end of \ifshowoutput
+ \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup
+ \vspace{\hv@extern@belowskip}%
+}
+
+
+
+
+
\stepcounter{hv@example@counter}%
%
%%
diff --git a/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua b/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua
index 627f86d6bb..ea163c6a72 100755
--- a/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua
+++ b/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua
@@ -6,7 +6,7 @@
-- AUTHOR: Herbert Voß
-- LICENSE: LPPL1.3
--
--- $Id: hvextern.lua 578 2022-06-20 16:41:45Z herbert $
+-- $Id: hvextern-checkfile.lua 585 2022-07-21 13:28:06Z herbert $
-----------------------------------------------------------------------
kpse.set_program_name("luatex")
diff --git a/macros/latex/contrib/naive-ebnf/DEPENDS.txt b/macros/latex/contrib/naive-ebnf/DEPENDS.txt
new file mode 100644
index 0000000000..489f2ded15
--- /dev/null
+++ b/macros/latex/contrib/naive-ebnf/DEPENDS.txt
@@ -0,0 +1,3 @@
+hard pgfopts
+hard filecontentsdef
+hard expl3 \ No newline at end of file
diff --git a/macros/latex/contrib/naive-ebnf/LICENSE.txt b/macros/latex/contrib/naive-ebnf/LICENSE.txt
new file mode 100644
index 0000000000..412bdfe98e
--- /dev/null
+++ b/macros/latex/contrib/naive-ebnf/LICENSE.txt
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2023 Yegor Bugayenko
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the 'Software'), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/macros/latex/contrib/naive-ebnf/README.md b/macros/latex/contrib/naive-ebnf/README.md
new file mode 100644
index 0000000000..6e02dfc45c
--- /dev/null
+++ b/macros/latex/contrib/naive-ebnf/README.md
@@ -0,0 +1,33 @@
+[![l3build](https://github.com/yegor256/naive-ebnf/actions/workflows/l3build.yml/badge.svg)](https://github.com/yegor256/naive-ebnf/actions/workflows/l3build.yml)
+[![CTAN](https://img.shields.io/ctan/v/naive-ebnf)](https://ctan.org/pkg/naive-ebnf)
+[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/naive-ebnf/blob/master/LICENSE.txt)
+
+This LaTeX package helps you typeset an
+[Extended Backus-Naur Form](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) (EBNF)
+using plain text format.
+
+First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
+from [CTAN](https://ctan.org/pkg/naive-ebnf)
+and then use in the preamble:
+
+```text
+\documentclass{article}
+\usepackage{naive-ebnf}
+\begin{document}
+\begin{ebnf}
+<Expression> := <Variable>
+ | "$\lambda$" <Variable> "." <Expression>
+ | "(" <Expression> <Expression> ")"
+\end{ebnf}
+\end{document}
+```
+
+Otherwise, you can download [`naive-ebnf.sty`](https://raw.githubusercontent.com/yegor256/naive-ebnf/gh-pages/naive-ebnf/naive-ebnf.sty) and add to your project.
+
+## How to Contribute
+
+If you want to contribute yourself, make a fork, then create a branch,
+then run `l3build ctan` in the root directory.
+It should compile everything without errors. If not, submit an issue and wait.
+Otherwise, make your changes and then run `l3build ctan` again. If the build is
+still clean, submit a pull request.
diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx b/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx
new file mode 100644
index 0000000000..6213cf6d52
--- /dev/null
+++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx
@@ -0,0 +1,283 @@
+% \iffalse meta-comment
+% (The MIT License)
+%
+% Copyright (c) 2023 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+% \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 \~}
+
+% \GetFileInfo{naive-ebnf.dtx}
+% \DoNotIndex{\endgroup,\begingroup,\let,\else,\s,\n,\r,\\,\1,\fi}
+
+% \iffalse
+%<*driver>
+\ProvidesFile{naive-ebnf.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{naive-ebnf}
+%<*package>
+[2023-01-29 0.0.2 EBNF in Plain Text]
+%</package>
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage[tt=false, type1=true]{libertine}
+\usepackage{microtype}
+\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
+\usepackage{href-ul}
+\usepackage{xcolor}
+\usepackage[dtx]{docshots}
+\PageIndex
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{naive-ebnf.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+
+% \title{|naive-ebnf|: \LaTeX{} Package \\ for EBNF in Plain Text\thanks{The sources are in GitHub at \href{https://github.com/yegor256/naive-ebnf}{yegor256/naive-ebnf}}}
+% \author{Yegor Bugayenko \\ \texttt{yegor256@gmail.com}}
+% \date{\filedate, \fileversion}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% This package helps render a
+% \href{https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form}{Extended Backus-Naur Form}
+% using plain text notation:
+% \begin{docshot}
+% \documentclass{minimal}
+% \usepackage{naive-ebnf}
+% \usepackage{mathtools}
+% \begin{document}
+% \begin{ebnf}
+% <Expr> := <Var>
+% | "$\lambda$" <Var> "." <Expr>
+% | "$\lparen$" <Expr> <Expr> "$\rparen$"
+% \end{ebnf}
+% \end{document}
+% \end{docshot}
+
+% The following syntax is understood inside the |ebnf| environment:
+% \begin{itemize}
+% \item |:=| separates the left-hand side from the right-hand side of the production rule;
+% \item |<...>| denotes a non-terminal (variable);
+% \item |"..."| denotes a terminal symbol;
+% \item \texttt{(...\char`\|...)} denotes a series of options to choose from;
+% \item |[...]| denotes an optional substitution;
+% \item |{...}| denotes a zero or more times repetition;
+% \end{itemize}
+
+% \textbf{Attention}: The usage of some symbols is prohibited inside terminals. Instead, the following substitutions are recommended:
+% \begin{itemize}
+% \item |$\lparen$| and |$\rparen$| instead of ``|(|'' and ``|)|'' (from the \href{https://ctan.org/pkg/mathtools}{mathtools} package);
+% \item |$\langle$| and |$\rangle$| instead of ``|<|'' and ``|>|'';
+% \item |$\lbrace$| and |$\rbrace$| instead of ``|{|'' and ``|}|'' (also |mathtools|);
+% \item |$\lbrack$| and |$\rbrack$| instead of ``|[|'' and ``|]|'' (also |mathtools|);
+% \item |$\vert$| instead of ``\texttt{\char`\|}''.
+% \end{itemize}
+
+% \DescribeMacro{\terminal}
+% \DescribeMacro{\nonterminal}
+% Inside the text, terminals and non-terminals may be formatted using two supplementary commands:
+% \docshotOptions{firstline=6,lastline=10}
+% \begin{docshot}
+% \documentclass{article}
+% \pagestyle{empty}
+% \usepackage[paperwidth=3in]{geometry}
+% \usepackage{naive-ebnf}
+% \begin{document}
+% The non-terminal \nonterminal{Var}
+% in $\lambda$-calculus may be equal
+% to $v_1, v_2, \dots$. Application
+% starts with \terminal{(} and ends
+% with \terminal{)}.
+% \end{document}
+% \end{docshot}
+
+% \section{Package Options}
+
+% It's possible to configure the behavior of the package with the help of a few package options:
+
+% \DescribeMacro{bw}
+% By default, some colors are used in the rendered grammar. However, the |bw| package option disables any colors and makes sure the gammar is black-and-white:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\usepackage[bw]{naive-ebnf}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+
+% \StopEventually{}
+
+% \section{Implementation}
+% \changes{0.0.1}{2023/01/28}{First draft.}
+% \changes{0.0.2}{2023/01/29}{Proper parsing of grouping.}
+% \changes{0.0.2}{2023/01/29}{Substitutions suggested for special symbols.}
+
+% First, we process package options:
+% \begin{macrocode}
+\RequirePackage{pgfopts}
+\pgfkeys{
+ /ebnf/.cd,
+ bw/.store in=\ebnf@bw,
+}
+\ProcessPgfPackageOptions{/ebnf}
+% \end{macrocode}
+
+% Then, we include a few packages, mostly to deal with \LaTeX{}3 expressions:
+% \begin{macrocode}
+\RequirePackage{filecontentsdef}
+\RequirePackage{expl3}
+% \end{macrocode}
+
+% \begin{macro}{\ebnf@color}
+% Then, we include \href{https://ctan.org/pkg/xcolor}{xcolor} to colorize the output a bit:
+% \begin{macrocode}
+\makeatletter\ifdefined\ebnf@bw\else
+ \RequirePackage{xcolor}
+\fi
+\newcommand\ebnf@color[2]
+ {\ifdefined\ebnf@bw#2\else\textcolor{#1}{#2}\fi}
+\makeatother
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\terminal}
+% \changes{0.0.2}{2023/01/29}{New command \texttt{\char`\\terminal} added, to enable rendering terminal symbols outside of the \texttt{ebnf} environment.}
+% Then, we a command to render a single terminal:
+% \begin{macrocode}
+\makeatletter
+\newcommand\terminal[1]{%
+ \relax\ifmmode\else\ttfamily\fi%
+ \ebnf@color{gray}{"}#1\ebnf@color{gray}{"}}
+\makeatother
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\nonterminal}
+% \changes{0.0.2}{2023/01/29}{New command \texttt{\char`\\nonterminal} added, to enable rendering non-terminal symbols outside of the \texttt{ebnf} environment.}
+% Then, we a command to render a single non-terminal:
+% \begin{macrocode}
+\makeatletter
+\newcommand\nonterminal[1]
+ {\(\ebnf@color{gray}{\langle}\textsf{#1}\ebnf@color{gray}{\rangle}\)}
+\makeatother
+% \end{macrocode}
+% \end{macro}
+
+% Then, we define supplementary commands:
+% \begin{macrocode}
+\makeatletter
+\newcommand\ebnf@optional[1]
+ {\ebnf@color{gray}{[}#1\ebnf@color{gray}{]}}
+\newcommand\ebnf@repetition[1]
+ {\ebnf@color{gray}{\{}#1\ebnf@color{gray}{\}}}
+\newcommand\ebnf@grouping[1]
+ {\ebnf@color{gray}{(}#1\ebnf@color{gray}{)}}
+\ExplSyntaxOn
+\newcommand\ebnf@terminal[1]{
+ \tl_set:Nn \l_ebnf_tl { }
+ \tl_set_rescan:Nno \l_ebnf_tl { } { #1 }
+ \terminal{\l_ebnf_tl}
+}
+\ExplSyntaxOff
+\newcommand\ebnf@to
+ {\ebnf@color{gray}{\(\to\)}}
+\newcommand\ebnf@alternation
+ {\ebnf@color{gray}{\(\vert\)}}
+\newcommand\ebnf@eol{\\}
+\makeatother
+% \end{macrocode}
+
+% \begin{macro}{ebnf}
+% Then, we define the |ebnf| environment:
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nx}
+\NewDocumentEnvironment{ebnf}{}{\filecontentsdefmacro\l__ebnf_tmp_tl}{
+ \endfilecontentsdefmacro
+ \str_set:NV \l__ebnf_tmp_tl \l__ebnf_tmp_tl
+ \str_set:Nx \l__ebnf_tmp_tl {\str_range:Nnn \l__ebnf_tmp_tl {1} {-2}}
+ \regex_replace_all:nnN { \{(.+?)\} }
+ {\c{ebnf@repetition}{\1}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { \((.+?)\) }
+ {\c{ebnf@grouping}{\1}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { \[([^\]]+?)\] }
+ {\c{ebnf@optional}{\1}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { <([A-Za-z][a-z-]+)> }
+ {\c{nonterminal}{\1}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { "([^"]+)" }
+ {\c{ebnf@terminal}{\1}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { \^^M\s*\| }
+ {\^^M :=} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { \| }
+ {\c{ebnf@alternation}{}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { \^^M\s*:= }
+ {\^^M \c{-}\c{hspace}{3em}\c{ebnf@alternation}{}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { := }
+ {\c{ebnf@to}{}} \l__ebnf_tmp_tl
+ \regex_replace_all:nnN { \^^M }
+ {\c{ebnf@eol}{}} \l__ebnf_tmp_tl
+ \tl_put_left:Nn \l__ebnf_tmp_tl {}
+ \tl_put_right:Nn \l__ebnf_tmp_tl {}
+ \l__ebnf_tmp_tl
+}
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\endinput
+% \end{macrocode}
+
+% \Finale
+
+% \clearpage
+% \clearpage
+
+% \PrintChanges
+% \clearpage
+% \PrintIndex
diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.ins b/macros/latex/contrib/naive-ebnf/naive-ebnf.ins
new file mode 100644
index 0000000000..ba41686ec6
--- /dev/null
+++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.ins
@@ -0,0 +1,55 @@
+%% (The MIT License)
+%%
+%% Copyright (c) 2023 Yegor Bugayenko
+%%
+%% Permission is hereby granted, free of charge, to any person obtaining a copy
+%% of this software and associated documentation files (the 'Software'), to deal
+%% in the Software without restriction, including without limitation the rights
+%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+%% copies of the Software, and to permit persons to whom the Software is
+%% furnished to do so, subject to the following conditions:
+%%
+%% The above copyright notice and this permission notice shall be included in all
+%% copies or substantial portions of the Software.
+%%
+%% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+%% SOFTWARE.
+
+\input docstrip.tex
+\keepsilent
+\usedir{macros/latex/contrib/naive-ebnf}
+\preamble
+(The MIT License)
+
+Copyright (c) 2023 Yegor Bugayenko
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the 'Software'), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+\endpreamble
+\generate{\file{naive-ebnf.sty}{\from{naive-ebnf.dtx}{package}}}
+\obeyspaces
+\Msg{To finish the installation you have to move the ".sty"}
+\Msg{file into a directory searched by TeX. To produce the}
+\Msg{documentation run the file ".dtx" through LaTeX. If any}
+\Msg{questions, submit a new GitHub issue.}
+\endbatchfile
diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf b/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf
new file mode 100644
index 0000000000..fdf6d14f90
--- /dev/null
+++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf
Binary files differ