summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/generic/expkv/README.md6
-rw-r--r--macros/generic/expkv/expkv.dtx157
-rw-r--r--macros/generic/expkv/expkv.pdfbin340584 -> 356549 bytes
-rw-r--r--macros/latex/contrib/nameauth/examples.tex100
-rw-r--r--macros/latex/contrib/nameauth/nameauth.dtx31
-rw-r--r--macros/latex/contrib/nameauth/nameauth.pdfbin1048607 -> 1049659 bytes
-rw-r--r--macros/luatex/generic/luatexja/README8
-rw-r--r--macros/luatex/generic/luatexja/doc/lltjp-geometry.pdfbin164326 -> 164277 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-en.pdfbin531789 -> 531833 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ja.pdfbin939101 -> 939140 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja.dtx1
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-plain.sty2
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.sty2
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjdefs.sty100
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty6
15 files changed, 241 insertions, 172 deletions
diff --git a/macros/generic/expkv/README.md b/macros/generic/expkv/README.md
index 854846ee33..5700d7ef05 100644
--- a/macros/generic/expkv/README.md
+++ b/macros/generic/expkv/README.md
@@ -1,7 +1,7 @@
-------------------------------------------------------------------------------
# expkv -- an expandable key=val implementation
-Version 2020-02-22 v0.4
+Version 2020-02-27 v0.5a
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
@@ -29,3 +29,7 @@ not the fastest key=val implementation available. It is generic code and
completely self-contained. There is a LaTeX package `expkv.sty` included to play
nice on LaTeX's package loading system, but that package is not needed and does
not provide more functionality than the generic code in `expkv.tex`.
+
+A key-defining interface that is not as rudimentary as the macros provided in
+this package is contained in expkv-def:
+https://github.com/Skillmon/tex_expkv-def
diff --git a/macros/generic/expkv/expkv.dtx b/macros/generic/expkv/expkv.dtx
index fc889e7d42..0f0491164e 100644
--- a/macros/generic/expkv/expkv.dtx
+++ b/macros/generic/expkv/expkv.dtx
@@ -85,7 +85,7 @@ and the derived files expkv.pdf
\ekvdef,\ekvdefNoVal,\ekvlet,\ekvletNoVal,\ekvletkv,\ekvletkvNoVal,^^A
\ekvset,\ekvparse,\ekvVersion,\ekvDate,\ekvifdefined,^^A
\ekvifdefinedNoVal,\ekvbreak,\ekvbreakPreSneak,\ekvbreakPostSneak,^^A
- \ekvsneak,\ekvsneakPre
+ \ekvsneak,\ekvsneakPre,\ekvchangeset
}
,morecomment=[l]\%
,commentstyle=\color[gray]{0.4}
@@ -108,16 +108,40 @@ and the derived files expkv.pdf
\mbox
{^^A
\BeginAccSupp{ActualText=expkv}^^A
+ \href{https://github.com/Skillmon/tex_expkv}
+ {^^A
+ \rmfamily
+ \bfseries
+ {\color{expkvgrey}e\kern-.05em x\kern-.05em}^^A
+ \lower.493ex
+ \hbox{{\color{expkvgrey}P}\kern-.1em{\color{expkvred}k}}^^A
+ \kern-.18em{\color{expkvred}v}^^A
+ }^^A
+ \EndAccSupp{}^^A
+ }^^A
+ }
+ {expkv}^^A
+ }
+\newcommand*\expkvd
+ {^^A
+ \texorpdfstring
+ {^^A
+ \mbox
+ {^^A
+ \BeginAccSupp{ActualText=expkv-def}^^A
\rmfamily
\bfseries
{\color{expkvgrey}e\kern-.05em x\kern-.05em}^^A
\lower.493ex
\hbox{{\color{expkvgrey}P}\kern-.1em{\color{expkvred}k}}^^A
\kern-.18em{\color{expkvred}v}^^A
+ {\color{expkvgrey}^^A
+ \kern.05em\rule[-.1ex]{.08em}{1.2ex}\kern.05em\textsc{def}^^A
+ }^^A
\EndAccSupp{}^^A
}^^A
}
- {expkv}^^A
+ {expkv-def}^^A
}
\newcommand\kv{\meta{key}=\meta{value}}
\newcommand\key{\meta{key}}
@@ -149,9 +173,7 @@ and the derived files expkv.pdf
{^^A
\texorpdfstring
{^^A
- \huge
- \href{https://github.com/Skillmon/tex_expkv}
- {\expkv}^^A
+ \huge\expkv
\\[\medskipamount]
\Large an expandable \kv\ implementation^^A
}{expkv - an expandable <key>=<value> implementation}^^A
@@ -199,6 +221,12 @@ and the derived files expkv.pdf
% |\ProvidesFile|.
%
% \subsection{Setting up Keys}\label{sec:define}
+% \expkv\ provides a rather simple approach to setting up keys, similar to
+% \pkg{keyval}. However there is an auxiliary package named
+% \href{https://github.com/Skillmon/tex_expkv-def}{\expkvd} (the files use
+% \file{expkv-def} instead because \string| isn't allowed in package names by
+% CTAN) which provides a more sophisticated interface, similar to well
+% established packages like \pkg{pgfkeys} or \pkg{l3keys}.
%
% Keys in \expkv\ (as in almost all other \kv\ implementations) belong to a
% \emph{set} such that different sets can contain keys of the same name. Unlike
@@ -292,11 +320,11 @@ and the derived files expkv.pdf
% If you need control over the necessary steps of expansion you
% can use |\expanded| around it.
%
-% |\ekvbreak| and |\ekvsneak| and their relatives don't work in |\ekvparse|.
-% It is analogue to \pkg{expl3}'s |\keyval_parse:NNn|, but not with the same
-% parsing rules -- |\keyval_parse:NNn| throws an error on multiple equal
-% signs per \kv\ pair and on empty \key\ names in a \kv\ pair, both of which
-% |\ekvparse| doesn't deal with.
+% |\ekvbreak|, |\ekvsneak|, and |\ekvchangeset| and their relatives don't work
+% in |\ekvparse|. It is analogue to \pkg{expl3}'s |\keyval_parse:NNn|, but
+% not with the same parsing rules -- |\keyval_parse:NNn| throws an error on
+% multiple equal signs per \kv\ pair and on empty \key\ names in a \kv\ pair,
+% both of which |\ekvparse| doesn't deal with.
%
% As a small example:
% \begin{lstlisting}
@@ -372,6 +400,17 @@ and the derived files expkv.pdf
% \autoref{sec:sneakex}.
% \end{function}
%
+% \begin{function}{\ekvchangeset}
+% \begin{syntax}
+% \cs{ekvchangeset}\marg{new-set}
+% \end{syntax}
+% Replaces the current set with \meta{new-set}, so for the rest of the current
+% |\ekvset| call, that call behaves as if it was called with
+% \texttt{\cs[no-index]{ekvset}\marg{new-set}}. Just like |\ekvsneak| this
+% reads and reinserts the remainder of the current |\ekvset| macro to do its
+% job. It is comparable to using \texttt{\meta{key}/.cd} in \pkg{pgfkeys}.
+% \end{function}
+%
% \bigskip
%
% \begin{function}{\ekv@name,\ekv@name@set,\ekv@name@key}
@@ -606,6 +645,22 @@ and the derived files expkv.pdf
% \ourmacro{width=5pt}\par
% \end{minipage}
%
+% \paragraph{The same key using \protect\expkvd}
+% Using \expkvd\ we can set up the equivalent key using a \kv\ interface, after
+% the following we could use |\ourmacro| in the same way as above. \expkvd\ will
+% allocate and initialise |\ourdim| and define the |width| key |\protected| for
+% us, so the result will be exactly the same -- with the exception that the
+% default will use |\ourdim=.9\hsize\relax| instead.
+% \begin{lstlisting}
+% \input expkv-def % or \usepackage{expkv-def}
+% \ekvdefinekeys{our}
+% {
+% dimen width = \ourdim,
+% qdefault width = .9\hsize,
+% initial width = 150pt
+% }
+% \end{lstlisting}
+%
% \subsubsection{An Expandable \kv\ Macro Using \cs[no-index]{ekvsneak}}
% \label{sec:sneakex}
%
@@ -794,7 +849,7 @@ and the derived files expkv.pdf
% \begin{lstlisting}
% ! Missing \endcsname inserted.
% <to be read again>
-% \ekv<set>(
+% \! expkv Error: Set `<set>' undefined.
% \end{lstlisting}
%
% \subsection{License}
@@ -866,8 +921,8 @@ and the derived files expkv.pdf
% \begin{macro}{\ekvVersion,\ekvDate}
% We're on our first input, so lets store the version and date in a macro.
% \begin{macrocode}
-\def\ekvVersion{0.4}
-\def\ekvDate{2020-02-22}
+\def\ekvVersion{0.5a}
+\def\ekvDate{2020-02-27}
% \end{macrocode}
% \end{macro}
%
@@ -893,7 +948,7 @@ and the derived files expkv.pdf
% \begin{macro}[internal]
% {
% \@gobble,\@firstofone,\@firstoftwo,\@secondoftwo,
-% \ekv@gobbletostop,\ekv@fi@gobble,\ekv@fi@secondoftwo
+% \ekv@gobbleto@stop,\ekv@fi@secondoftwo,\ekv@gobble@mark
% }
% Since branching tests are often more versatile than |\if...\else...\fi|
% constructs, we define helpers that are branching pretty fast. Also here are
@@ -904,12 +959,12 @@ and the derived files expkv.pdf
\long\def\@firstofone#1{#1}
\long\def\@firstoftwo#1#2{#1}
\long\def\@secondoftwo#1#2{#2}
-\long\def\ekv@gobbletostop#1\ekv@stop{}
-\long\def\ekv@fi@gobble\fi\@firstofone#1{\fi}
\long\def\ekv@fi@secondoftwo\fi\@firstoftwo#1#2{\fi#2}
+\long\def\ekv@gobbleto@stop#1\ekv@stop{}
+\def\ekv@gobble@mark\ekv@mark{}
% \end{macrocode}
% \end{macro}
-% As you can see |\ekv@gobbletostop| uses a special marker |\ekv@stop|. The
+% As you can see |\ekv@gobbleto@stop| uses a special marker |\ekv@stop|. The
% package will use three such markers, the one you've seen already, |\ekv@mark|
% and |\ekv@nil|. Contrarily to how for instance \pkg{expl3} does things, we
% don't define them, as we don't need them to have an actual meaning. This has
@@ -1021,6 +1076,18 @@ and the derived files expkv.pdf
\def\ekv@name@key#1{#1)}
% \end{macrocode}
% \end{macro}
+% \begin{macro}[internal]{\ekv@undefined@set}
+% We can misuse the macro name we use to expandably store the set-name in a
+% single token -- since this increases performance drastically, especially for
+% long set-names -- to throw a more meaningful error message in case a set isn't
+% defined. The name of |\ekv@undefined@set| is a little bit misleading, as it is
+% called in either case inside of |\csname|, but the result will be a control
+% sequence with meaning |\relax| if the set is undefined, hence will break the
+% |\csname| building the key-macro which will throw the error message.
+% \begin{macrocode}
+\def\ekv@undefined@set#1{! expkv Error: Set `#1' undefined.}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}[internal]{\ekv@checkvalid}
% We place some restrictions on the allowed names, though, namely sets and
% keys are not allowed to be empty -- blanks are fine (meaning \mbox{set-
@@ -1116,7 +1183,7 @@ and the derived files expkv.pdf
% \begin{macrocode}
\protected\def\ekv@defset#1%
{%
- \expandafter\edef\csname\ekv@name@set{#1}\endcsname##1%
+ \expandafter\edef\csname\ekv@undefined@set{#1}\endcsname##1%
{\ekv@name@set{#1}\ekv@name@key{##1}}%
}
% \end{macrocode}
@@ -1134,7 +1201,7 @@ and the derived files expkv.pdf
\endgroup
\long\def\ekvset##1##2%
{%
- \expandafter\ekv@set\csname\ekv@name@set{##1}\endcsname
+ \expandafter\ekv@set\csname\ekv@undefined@set{##1}\endcsname
\ekv@mark##2#1\ekv@stop#1{}%
}
% \end{macrocode}
@@ -1148,7 +1215,7 @@ and the derived files expkv.pdf
% \end{macrocode}
% Test whether we're at the end, if so invoke |\ekv@endset|,
% \begin{macrocode}
- \ekv@ifstop##2\ekv@endset\ekv@mark\ekv@stop
+ \ekv@gobbleto@markstop##2\ekv@endset\ekv@mark\ekv@stop
% \end{macrocode}
% else go on with other commas,
% \begin{macrocode}
@@ -1179,7 +1246,7 @@ and the derived files expkv.pdf
% \begin{macrocode}
\long\def\ekv@set@other##1##2,%
{%
- \ekv@ifstop##2\ekv@endset@other\ekv@mark\ekv@stop
+ \ekv@gobbleto@markstop##2\ekv@endset@other\ekv@mark\ekv@stop
\ekv@ifhas@eq@other##2=\ekv@ifempty@B\ekv@ifempty@false
\ekv@ifempty@A\ekv@ifempty@B\@firstoftwo
{\ekv@set@eq@other##1##2\ekv@stop}%
@@ -1278,7 +1345,7 @@ and the derived files expkv.pdf
% \begin{macrocode}
\long\def\ekv@parse##1##2##3#1%
{%
- \ekv@ifstop##3\ekv@endparse\ekv@mark\ekv@stop
+ \ekv@gobbleto@markstop##3\ekv@endparse\ekv@mark\ekv@stop
\ekv@parse@other##1##2##3,\ekv@stop,%
\ekv@parse##1##2\ekv@mark
}
@@ -1295,7 +1362,7 @@ and the derived files expkv.pdf
% \begin{macrocode}
\long\def\ekv@parse@other##1##2##3,%
{%
- \ekv@ifstop##3\ekv@endparse@other\ekv@mark\ekv@stop
+ \ekv@gobbleto@markstop##3\ekv@endparse@other\ekv@mark\ekv@stop
\ekv@ifhas@eq@other##3=\ekv@ifempty@B\ekv@ifempty@false
\ekv@ifempty@A\ekv@ifempty@B\@firstoftwo
{\ekv@parse@eq@other##3\ekv@stop##2}%
@@ -1373,12 +1440,40 @@ and the derived files expkv.pdf
\ekvset,=
% \end{macrocode}
%
-% \begin{macro}[internal]{\ekv@ifstop}
-% The |\ekv@ifstop| test works similar to our if-empty test, but instead of
-% using tokens which are used nowhere else (|\ekv@ifempty@A| and
-% |\ekv@ifempty@B|) we use |\ekv@mark| and |\ekv@stop|.
+% \begin{macro}{\ekvchangeset}
+% Provide a macro that is able to switch out the current \set\ in |\ekvset|.
+% This operation is slow (by comparison, it should be slightly faster than
+% |\ekvsneak|), but allows for something similar to \pkg{pgfkeys}'s
+% \texttt{\meta{key}/.cd} mechanism. However this operation is more expensive
+% than |/.cd| as we can't just redefine some token to reflect this, but have to
+% switch out the set expandably, so this works similar to the |\ekvsneak| macros
+% reading and reinserting the remainder of the \kv\ list.
+% \begin{macrocode}
+\def\ekvchangeset#1%
+ {%
+ \expandafter\ekv@changeset\csname\ekv@undefined@set{#1}\endcsname\ekv@mark
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[internal]{\ekv@changeset}
+% This macro does the real change-out of |\ekvchangeset|. We introduced an
+% |\ekv@mark| to not accidentally remove some braces which we have to remove
+% again.
+% \begin{macrocode}
+\long\def\ekv@changeset#1#2\ekv@set@other#3#4\ekv@set#5%
+ {%
+ \ekv@gobble@mark#2\ekv@set@other#1#4\ekv@set#1%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[internal]{\ekv@gobbleto@markstop}
+% The |\ekv@gobbleto@markstop| can be used to test for |\ekv@stop| similar to
+% our if-empty test, but instead of using tokens which are used nowhere else
+% (|\ekv@ifempty@A| and |\ekv@ifempty@B|) it uses |\ekv@mark| and |\ekv@stop|.
% \begin{macrocode}
-\long\def\ekv@ifstop#1\ekv@mark\ekv@stop{}
+\long\def\ekv@gobbleto@markstop#1\ekv@mark\ekv@stop{}
% \end{macrocode}
% \end{macro}
%
@@ -1400,7 +1495,7 @@ and the derived files expkv.pdf
\ekv@err@noarg
\ekv@err@unknown
#2{#1}%
- \ekv@gobbletostop
+ \ekv@gobbleto@stop
}%
}
% \end{macrocode}
@@ -1452,7 +1547,7 @@ and the derived files expkv.pdf
}%
}
\ekv@err
-\def\ekv@err@{\expandafter\ekv@gobbletostop}
+\def\ekv@err@{\expandafter\ekv@gobbleto@stop}
% \end{macrocode}
% \end{macro}
% \begin{macro}[internal]
@@ -1464,7 +1559,7 @@ and the derived files expkv.pdf
% use those instead of the full strings.
% \begin{macrocode}
\long\def\ekv@err@common #1#2{\expandafter\ekv@err@common@\string#2{#1}}
-\long\def\ekv@err@common@#1#2#3#4#5(#6#7{\ekv@err{#6 (`#7', set `#5')}}
+\long\def\ekv@err@common@#1`#2' #3.#4#5{\ekv@err{#4 (`#5', set `#2')}}
\long\def\ekv@err@unknown#1#2{\ekv@err@common{unknown key}#1{#2}}
\long\def\ekv@err@noarg #1#2{\ekv@err@common{value forbidden}#1{#2}}
\long\def\ekv@err@reqval #1#2{\ekv@err@common{value required}#1{#2}}
diff --git a/macros/generic/expkv/expkv.pdf b/macros/generic/expkv/expkv.pdf
index 2a26383dff..77441304df 100644
--- a/macros/generic/expkv/expkv.pdf
+++ b/macros/generic/expkv/expkv.pdf
Binary files differ
diff --git a/macros/latex/contrib/nameauth/examples.tex b/macros/latex/contrib/nameauth/examples.tex
index 2a71bd75be..105403ef84 100644
--- a/macros/latex/contrib/nameauth/examples.tex
+++ b/macros/latex/contrib/nameauth/examples.tex
@@ -1,14 +1,34 @@
-%% This is an example file used with the nameauth package.
-%% See README and nameauth.pdf for copyright info.
-%%
+%--------:| ----------------------------------------------------------------
+%nameauth:| Name authority mechanism for consistency in text and index
+% Author:| Charles P. Schaum
+% E-mail:| charles dot schaum@comcast.net
+% License:| Released under the LaTeX Project Public License 1.3c or later
+% See:| http://www.latex-project.org/lppl.txt
+%
+% This is an example file used with the nameauth package.
+% See README and nameauth.pdf for copyright info.
+%
\documentclass[11pt]{article}
+%
+% This part of the document preamble exists only for backward compatibility in older
+% distributions of LaTeX. It includes the iftex package only if it exists.
+% If the iftex package is older than 2019, it includes the older packages
+% that aid using multiple engines.
+
\IfFileExists{iftex.sty}{\usepackage{iftex}}{}
\unless\ifdefined\RequireTUTeX
\usepackage{ifxetex}
\usepackage{ifluatex}
\usepackage{ifpdf}
\fi
-% Used to create both dvi and pdf output
+%
+% This template can be used when creating both dvi and pdf output. We
+% do not actually use the tikz package in this example file. We set
+% the condition for using tikz with a Boolean flag.
+%
+% If compatibility with specific dvi viewers is not an issue, then
+% one might ignore the use of \ifDoTikZ altogether.
+%
\newif\ifDoTikZ
\ifxetex
\usepackage{fontspec}
@@ -30,7 +50,10 @@
\usepackage[TS1,T1]{fontenc}
\usepackage[american]{babel} % Use own language
\usepackage{lmodern}
- % Perhaps add \usepackage{tikz}
+%
+% There may be a need to include tikz using luatex in dvi mode;
+% that goes beyond the scope of the nameauth package.
+%
\fi
\else
\IfFileExists{utf8-2018.def}{}
@@ -44,18 +67,28 @@
\fi
\fi
\fi
+%
+% Below are the remainder of package inclusions.
+%
\usepackage{booktabs}
\usepackage[textwidth=137mm,textheight=237mm,right=30mm,marginparwidth=30mm,nohead]{geometry}
+\usepackage{makeidx}
\usepackage{nameauth}
\usepackage{verbatim}
-\usepackage{makeidx}
-\usepackage{hyperref}
-
+\usepackage[colorlinks=true]{hyperref}
+%
+% We set up indexing, put margin paragraphs on the left, set up the counter for
+% line numbering in verbatim environments, and set up \ifNoTag for use in the
+% life dates text tagging example.
+%
\makeindex
\reversemarginpar
\newcounter{VerbLine}
\newif\ifNoTag
-
+%
+% We establish name shorthands. Note the heavy use of \noexpand in the macro arguments
+% below. This is intrinsic to the proper function of such arguments.
+%
\begin{nameauth}
\< Adams & John & \noexpand\textSC{Adams} & >
\< SDJR & Sammy & \noexpand\textSC{Davis}, \noexpand\textSC{Jr}. & >
@@ -70,9 +103,13 @@
\< Sutorius & Quintus & \noexpand\SUTOR & >
\< Wash & George & Washington & >
\end{nameauth}
-
+%
+% We set up a text tag here, but we will set more up in the body text.
+%
\NameAddInfo{Demetrius, I}{ Soter}
-
+%
+% Below we establish sort tags for names. Note again the consistent use of \noexpand.
+%
\PretagName[John]{\noexpand\textSC{Adams}}{Adams, John}
\PretagName[Sammy]{\noexpand\textSC{Davis}, \noexpand\textSC{Jr}.}{Davis, Sammy, Jr.}
\PretagName{Demetrius, I}{Demetrius 1}
@@ -93,24 +130,35 @@
\TagName[Martin]{Van Buren}{, president}
\TagName[Ulysses S.]{Grant}{, president}
\TagName[George]{Washington}{, president}
-
+%
+% We set up line numbering in verbatim environments.
+%
\makeatletter
\newcommand*\ClearNum{\def\verbatim@processline{\the\verbatim@line\par}}
\newcommand*\StartNum{\setcounter{VerbLine}{0}\def\verbatim@processline{\stepcounter{VerbLine}\leavevmode\llap{\footnotesize\normalfont\theVerbLine\quad}\the\verbatim@line\par}}
\newcommand*\ContinueNum{\def\verbatim@processline{\stepcounter{VerbLine}\leavevmode\llap{\footnotesize\normalfont\theVerbLine\quad}\the\verbatim@line\par}}
\makeatother
-
+%
+% The default verbatim format is no line numbers.
+% We add title, author, and date.
+%
\ClearNum
\title{\bfseries Longer Examples}
\author{Charles P. Schaum}
-\date{2020/02/20}
+\date{2020/02/26}
\begin{document}
\maketitle
+\tableofcontents
+\bigskip
+
+{\large\bfseries\hyperlink{Index}{Index}}
+\newpage
+
\section{Particles}
-First we use variants with the \(\langle alternate\rangle\) argument:
+First we use variants with the \(\langle Alternate\rangle\) argument:
\begin{quote}\small
\StartNum
\begin{verbatim}
@@ -165,8 +213,9 @@ First we use variants with the \(\langle alternate\rangle\) argument:
\endgroup
\newpage
+\section{Roman Names}
\begingroup
-We want all names in the index, so we define macros that expand one or two components: \textit{praenomen} and \textit{nomen}, \textit{cognomen} and \textit{agnomen}. We begin by defining a name with macros using \verb+\noexpand+ to prevent error:
+We want all names in the index, so we define two macros that expand to be one or two components: \textit{praenomen} and \textit{nomen}; \textit{cognomen} and \textit{agnomen}. Below we want to index under the \textit{cognomen}. We begin by defining a name with macros using \verb+\noexpand+ to prevent error:
\newif\ifSkipGens
\newif\ifNoGens
\newif\ifSkipAgnomen
@@ -176,9 +225,17 @@ We want all names in the index, so we define macros that expand one or two compo
\newcommand*\SCIPii{\ifNoAgnomen Scipio\else
Scipio Africanus\fi}
\newcommand*\ScipioOnly{\SkipAgnomentrue\Scipio}
+%
+% This form of \NamesFormat produces the longest possible name form in the first mention.
+%
\renewcommand*\NamesFormat[1]%
{\ifSkipGens\NoGenstrue\fi\ifSkipAgnomen\NoAgnomentrue\fi#1%
\global\SkipGensfalse\global\SkipAgnomenfalse}
+%
+% If we always wanted to skip the nomen or agnomen in subsequent references, we could
+% force either \NoGenstrue or \NoAgnomentrue in \MainNameHook. The form below is
+% neutral to such preferences and thus, one must set them manually.
+%
\renewcommand*\MainNameHook[1]%
{\ifSkipGens\NoGenstrue\fi\ifSkipAgnomen\NoAgnomentrue\fi#1%
\global\SkipGensfalse\global\SkipAgnomenfalse}
@@ -217,10 +274,14 @@ We want all names in the index, so we define macros that expand one or two compo
\end{quote}
The index entry is fairly lengthy by necessity, governed by the global state of the Boolean flags, and expanding to:
- \begin{quote}
+\begin{quote}
\texttt{\ShowIdxPageref[\noexpand\SCIPi]{\noexpand\SCIPii}}
- \end{quote}
+\end{quote}
+%
+% We can keep the redefined formatting macros above.
+%
+If we want to index under the \textit{nomen}, we take a slightly different approach:
\begin{quote}\small
\StartNum
\begin{verbatim}
@@ -254,7 +315,7 @@ We want all names in the index, so we define macros that expand one or two compo
\section{Alternate Formatting: Inflections}
-In this section we use a scope to contain \verb+\AltFormatActive+ as we show how to implement a simple grammatical inflection.
+In this section we use a scope to contain \verb+\AltFormatActive+ as we show how to implement a simple grammatical inflection. Notice the similarities between handling the Roman names above and the grammatical inflections below this points to a general method when introducing variations into the name macro arguments, while keeping index entries consistent.
\begingroup\AltFormatActive
\newif\ifGenitive
@@ -1371,6 +1432,7 @@ The following equivalent conditional statements can help a macro or just the bod
\end{verbatim}
\end{quote}
+\def\indexname{\hypertarget{Index}{Index}}
\newpage
\printindex
diff --git a/macros/latex/contrib/nameauth/nameauth.dtx b/macros/latex/contrib/nameauth/nameauth.dtx
index 7efca1df6c..b523a08777 100644
--- a/macros/latex/contrib/nameauth/nameauth.dtx
+++ b/macros/latex/contrib/nameauth/nameauth.dtx
@@ -207,7 +207,7 @@ the README.txt or README for more information.
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{nameauth}
%<*package>
- [2020/02/20 3.3 Name authority mechanism for consistency in text and index]
+ [2020/02/26 3.4 Name authority mechanism for consistency in text and index]
%</package>
%<*driver>
\documentclass[11pt]{ltxdoc}
@@ -269,7 +269,7 @@ the README.txt or README for more information.
%^^A Set up initial page layout to fit both letter and DIN A4.
\usepackage[textwidth=137mm,textheight=237mm,right=25mm,marginparwidth=40mm,nohead]{geometry}
%^^A Include only this version of the package.
-\usepackage{\jobname}[2020/02/20]
+\usepackage{\jobname}[2020/02/26]
%^^A Set up all tabular information.
\usepackage{booktabs}
\usepackage{colortbl}
@@ -589,6 +589,7 @@ the README.txt or README for more information.
% \changes{2.0}{2015/11/11}{Use dtxgen; prevent bad args}
% \changes{2.5}{2016/04/06}{No default format}
% \changes{3.3}{2020/02/20}{Update manual}
+% \changes{3.4}{2020/02/26}{Update manual, \texttt{examples.tex}}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -619,7 +620,7 @@ the README.txt or README for more information.
% \fi
% \fi
% \fi
-%
+%
% \ClearNum
% \ifDoTikZ
% \tcbset{fonttitle=\bfseries\sffamily,box align=top,lower separated=false}
@@ -2207,12 +2208,12 @@ the README.txt or README for more information.
% \end{tabular}
% \end{quote}
%
-% The Roman naming\Info{Roman names} system does present some challenges. As long as we do not use \cmd{\CapThis}, we do not need alternate formatting (Section~\ref{sec:AltFormat}). Earlier we treated \LCicero[Marcus Tullius] as a Western name. Now we handle Roman names more properly.
+% The Roman naming\Info{Roman names} system does present some challenges. As long as we do not use \cmd{\CapThis}, we do not need alternate formatting (Section~\ref{sec:AltFormat}). Earlier we treated \LCicero[Marcus Tullius] as a Western name. Now we show how to handle Roman names more properly.
%
-% We have a \textit{praenomen}, a personal name. Then we have a \textit{nomen}, a clan name. Finally, we would have a \textit{cognomen}, a nickname, except it became hereditary to denote clan branches. Added to that are \textit{agnomina}, affixed names.
+% Roman names have a \textit{praenomen}, a personal name, then a \textit{nomen}, a clan name, followed by a \textit{cognomen}, a ``nickname,'' except it could be inherited from one's father to denote clan branches. Added to that are \textit{agnomina}, affixed names.
%
% Popular\Info{popular works} sources tend to treat the \textit{cognomen} as we might a surname, with the indexed form: \ShowIdxPageref*[\meta{praenomen} \meta{nomen}]{\meta{cognomen} \meta{agnomen}}.\footnote{See Geiss, \textit{Geschichte Griffbereit}; Kinder and Hilgemann, \textit{dtv-Atlas zur Weltgeschichte}, 2 vols., 29th printing (1964; Munich: Deutscher Taschenbuch Verlag, 1993). For further resources see: \url{http://books.infotoday.com/books/Indexing-names.shtml}. See also \url{https://en.wikipedia.org/wiki/Roman_naming_conventions}.}
-% We want all names in the index, so we define macros in \meta{FNN} and \meta{SNN} that expand one or two components: \textit{praenomen} and \textit{nomen}, \textit{cognomen} and \textit{agnomen}. We begin by defining a name with macros using \cmd{\noexpand} to prevent error:
+% We want all names in the index, so we define macros in \meta{FNN} and \meta{SNN} that expand to become one or two components: \textit{praenomen} and \textit{nomen}; \textit{cognomen} and \textit{agnomen}. We begin by defining a name with macros using \cmd{\noexpand} to prevent error:
%\newif\ifSkipGens
%\newif\ifNoGens
%\newif\ifSkipAgnomen
@@ -2268,7 +2269,7 @@ the README.txt or README for more information.
% The\Info{scholarly works} \textit{Oxford Classical Dictionary} and other scholarly sources index under the \textit{nomen}. That requires a similar approach, but it moves the \textit{nomen} from \meta{FNN} to \meta{SNN}. Although we will not index the name, we will show how to set up \SkipGenstrue\Scipio\ to work in that alternate configuration.
% \newpage
%
-% We keep the Boolean flags as previously created. We redefine the name in the following manner:
+% We keep the Boolean flags and formatting hooks from above. We redefine the name in the following manner:
% \begin{quote}\small
% \StartNum
% \begin{verbatim}
@@ -3444,7 +3445,7 @@ the README.txt or README for more information.
% \bfseries Defaults & \bfseries Name Length & \bfseries Format Hooks & \bfseries Test Path\\\midrule
% \bfseries Pre-First Use & Long & First & False\\
% \rowcolor{black!7!white}\bfseries Subsequent Use\quad\hbox{} & Long or short & Subsequent & True\\\bottomrule
-% \end{tabular}\bigskip\\
+% \end{tabular}\medskip\\
%
% \begin{tabular}{lll}\toprule
% \bfseries Modifications & \bfseries Form & \bfseries Function\\\midrule
@@ -3460,18 +3461,18 @@ the README.txt or README for more information.
% \end{center}
%
% \DescribeMacro{\ForgetName}
-% This macro takes the same arguments as \cmd{\Name}. It ``forgets'' a name, forcing a ``pre-first use'' case. The syntax is:
-% \begin{quote}\small
-% \cmd{\ForgetName}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate}
+% This macro takes the same arguments as \cmd{\Name}. It ``forgets'' a name, forcing a ``pre-first use'' state that will trigger a first-time name use:
+% \begin{quote}
+% \fbox{\mystrut\ \cmd{\ForgetName}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate}\ }
% \end{quote}
%
% \DescribeMacro{\ForgetThis}
% This prefix macro causes the next instance of a naming macro or shorthand to ``forget'' a name before printing it.\Version{3.1} After knowing |\Einstein| ``\Einstein'' we forget him and again have a first reference: |\ForgetThis\Einstein| ``\ForgetThis\Einstein.''\medskip
%
% \DescribeMacro{\SubvertName}
-% This macro takes the same arguments as \cmd{\Name}. It ``subverts'' a name, forcing a ``subsequent use'' case. The syntax is:
+% This macro takes the same arguments as \cmd{\Name}. It ``subverts'' a name, creating a name pattern control sequence and forcing a ``subsequent use'' case:
% \begin{quote}\small
-% \cmd{\SubvertName}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate}
+% \fbox{\mystrut\ \cmd{\SubvertName}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate}\ }
% \end{quote}
%
% \DescribeMacro{\SubvertThis}
@@ -3785,8 +3786,8 @@ the README.txt or README for more information.
% These convenience macros (an early feature) print a main name and a cross-reference in parentheses:
% \DescribeMacro{\PName*}
% \begin{quote}\small
-% \fbox{\vbox{\hbox{\mystrut\cmd{\PName\ }\oarg{FNN}\marg{SAFX}\oarg{xref\,FNN}\marg{xref\,SAFX}\oarg{xref\,Alternate}}\par
-% \hbox{\mystrut\cmd{\PName*}\oarg{FNN}\marg{SAFX}\oarg{xref\,FNN}\marg{xref\,SAFX}\oarg{xref\,Alternate}}}}
+% \fbox{\vbox{\hbox{\mystrut\ \cmd{\PName\ }\oarg{FNN}\marg{SAFX}\oarg{xref\,FNN}\marg{xref\,SAFX}\oarg{xref\,Alternate}\ }\par
+% \hbox{\mystrut\ \cmd{\PName*}\oarg{FNN}\marg{SAFX}\oarg{xref\,FNN}\marg{xref\,SAFX}\oarg{xref\,Alternate}\ }}}
% \end{quote}
% The starred form \cmd{\PName*} is like the starred form \cmd{\Name*} to the extent that it prints a long form of \meta{FNN}\meta{SAFX}. It does not affect the cross-reference arguments \meta{xref FNN}\meta{xref SAFX}\meta{xref Alternate}.
%
diff --git a/macros/latex/contrib/nameauth/nameauth.pdf b/macros/latex/contrib/nameauth/nameauth.pdf
index c7eacbb653..d33860b49e 100644
--- a/macros/latex/contrib/nameauth/nameauth.pdf
+++ b/macros/latex/contrib/nameauth/nameauth.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/README b/macros/luatex/generic/luatexja/README
index 4b90edfbf8..75afd2bdcb 100644
--- a/macros/luatex/generic/luatexja/README
+++ b/macros/luatex/generic/luatexja/README
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20200209.0
+The LuaTeX-ja Package 20200227.0
--------------------------------
Copyright (c) 2011--2020 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -43,9 +43,9 @@ Installation
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20200209.0 in the Git repository by
+ or tagged as 20200227.0 in the Git repository by
<http://git.osdn.jp/view?p=luatex-ja/luatexja.git
- ;a=snapshot;h=refs/tags/20200209.0;sf=tgz>
+ ;a=snapshot;h=refs/tags/20200227.0;sf=tgz>
b. Extract the archive and process following three files by LuaLaTeX
to generate classes for Japanese typesetting:
@@ -93,4 +93,4 @@ Notes
* src/*.{ins.dtx} and src/ltj-kinsoku_make.tex are not needed in regular use.
-Last commit date: Sun Feb 9 22:23:24 2020 +0900
+Last commit date: Thu Feb 27 18:45:53 2020 +0900
diff --git a/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf b/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf
index 1ff22ae348..92ac414f9f 100644
--- a/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf
+++ b/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
index 423dc450ab..9e049fda92 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
index e08555de70..0794623c32 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja.dtx b/macros/luatex/generic/luatexja/doc/luatexja.dtx
index 7b6f8fe5f5..87654172e7 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja.dtx
+++ b/macros/luatex/generic/luatexja/doc/luatexja.dtx
@@ -2047,6 +2047,7 @@ these eight ranges belongs to the character range~217.
"{1F}100--"{1F}1FF&Enclosed Alphanumeric Supp.&
"{1F}200--"{1F}2FF&Enclosed Ideographic Supp.\\
"{20}000--"{2F}FFF&(Supp. Ideographic Plane)&
+"{30}000--"{3F}FFF&(Tert. Ideographic Plane)\\
"{E0}100--"{E0}1EF&Variation Selectors Supp.
\end{tabular}
\end{table}
diff --git a/macros/luatex/generic/luatexja/src/ltj-plain.sty b/macros/luatex/generic/luatexja/src/ltj-plain.sty
index d6cc19595f..eb78843f47 100644
--- a/macros/luatex/generic/luatexja/src/ltj-plain.sty
+++ b/macros/luatex/generic/luatexja/src/ltj-plain.sty
@@ -86,7 +86,7 @@
\ltjdefcharrange{6}{%
"2460-"24FF, "2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF,
"4E00-"9FFF, "F900-"FAFF, "FE10-"FE1F, "FE30-"FE6F, "FF00-"FFEF,
- "1B000-"1B16F, "1F100-"1F2FF, "20000-"2FFFF, "E0100-"E01EF
+ "1B000-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF
}
\ltjdefcharrange{7}{%
"1100-"11FF, "2F00-"2FFF, "3100-"318F, "31A0-"31EF, "A000-"A4CF,
diff --git a/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty
index 90d2e1f7c2..57a0a05c8d 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja.sty
@@ -41,7 +41,7 @@
\ProcessOptions\relax
\fi %</LaTeX>
%%%% VERSION
-\def\LuaTeXjaversion{20200209.0}
+\def\LuaTeXjaversion{20200227.0}
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty b/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty
index 802ec029a3..3efb01116b 100644
--- a/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty
+++ b/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjdefs}[2020/02/07 Default font settings of LuaTeX-ja]
+\ProvidesPackage{lltjdefs}[2020/02/27 Default font settings of LuaTeX-ja]
\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{IPAExMincho}\fi
\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{IPAExGothic}\fi
@@ -144,7 +144,7 @@
\ltjdefcharrange{6}{%
"2460-"24FF, "2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF,
"4E00-"9FFF, "F900-"FAFF, "FE10-"FE1F, "FE30-"FE6F, "FF00-"FFEF,
- "1B000-"1B16F, "1F100-"1F2FF, "20000-"2FFFF, "E0100-"E01EF
+ "1B000-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF
}
\ltjdefcharrange{7}{%
"1100-"11FF, "2F00-"2FFF, "3100-"318F, "31A0-"31EF, "A000-"A4CF,
@@ -169,99 +169,3 @@
% END OF FILE
\endinput
-======== comment ========
-
-MIDDLE
-
-\ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF}
- % 2 "80-"FF num = 471/128 name = Latin-1 Supplement
- % 3 "100-"17F num = 484/128 name = Latin Extended-A
- % 4 "180-"24F num = 87/208 name = Latin Extended-B
- % 5 "250-"2AF num = 154/96 name = IPA Extensions
- % 6 "2B0-"2FF num = 42/80 name = Spacing Modifier Letters
- % 7 "300-"36F num = 98/112 name = Combining Diacritical Marks
- % 64 "1E00-"1EFF num = 16/256 name = Latin Extended Additional
-
-\ltjdefcharrange{2}{"370-"4FF, "1F00-"1FFF}
- % Greek and Coptic, Cyrillic, Greek Extended
-
-\ltjdefcharrange{3}{%
- "2070-"243F, "2500-"27BF, "2900-"29FF, "2B00-"2BFF}
- % 67 "2070-"209F num = 68/48 name = Superscripts and Subscripts
- % 68 "20A0-"20CF num = 5/48 name = Currency Symbols
- % 69 "20D0-"20FF num = 2/48 name = Combining Diacritical Marks for Symbols
- % 70 "2100-"214F num = 46/80 name = Letterlike Symbols
- % 71 "2150-"218F num = 90/64 name = Number Forms
- % 72 "2190-"21FF num = 39/112 name = Arrows
- % 73 "2200-"22FF num = 210/256 name = Mathematical Operators
- % 74 "2300-"23FF num = 69/256 name = Miscellaneous Technical
- % 75 "2400-"243F num = 1/64 name = Control Pictures
- % 78 "2500-"257F num = 241 name = Box Drawing
- % 79 "2580-"259F num = 17 name = Block Elements
- % 80 "25A0-"25FF num = 70 name = Geometric Shapes
- % 81 "2600-"26FF num = 49 name = Miscellaneous Symbols
- % 82 "2700-"27BF num = 23 name = Dingbats
- % 86 "2900-"297F num = 2 name = Supplemental Arrows-B
- % 87 "2980-"29FF num = 4 name = Miscellaneous Mathematical Symbols-B
- % 89 "2B00-"2BFF num = 3 name = Miscellaneous Symbols and Arrows
-
-\ltjdefcharrange{4}{%
- "500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF,
- "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A95F, "A980-"ABFF, "E000-"F8FF,
- "FB00-"FE0F, "FE20-"FE2F, "FE70-"FEFF, "10000-"1AFFF, "1B170-"1F0FF,
- "1F300-"1FFFF
-} % non-Japanese
-
-\ltjdefcharrange{5}{"D800-"DFFF, "E0000-"E00FF, "E01F0-"10FFFF}
- % Surrogates, Tags
- % 208 "F0000-"FFFFF num = 0/65536 name = Supplementary Private Use Area-A
- % 209 "100000-"10FFFF num = 0/65536 name = Supplementary Private Use Area-B
-
-POSITIVE
-
-% Japanese
-\ltjdefcharrange{6}{%
- "2460-"24FF, "2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF,
- "4E00-"9FFF, "F900-"FAFF, "FE10-"FE1F, "FE30-"FE6F, "FF00-"FFEF,
- "1B000-"1B16F, "1F100-"1F2FF, "20000-"2FFFF, "E0100-"E01EF
-}
-% 77 "2460-"24FF num = 150/160 name = Enclosed Alphanumerics
-% 98 "2E80-"2EFF num = 21 name = CJK Radicals Supplement
-% 101 "3000-"303F num = 144 name = CJK Symbols and Punctuation
-% 102 "3040-"309F num = 1074 name = Hiragana
-% 103 "30A0-"30FF num = 985 name = Katakana
-% 106 "3190-"319F num = 16/16 name = Kanbun
-% 109 "31F0-"31FF num = 128 name = Katakana Phonetic Extensions
-% 110 "3200-"32FF num = 143 name = Enclosed CJK Letters and Months
-% 111 "3300-"33FF num = 255 name = CJK Compatibility
-% 112 "3400-"4DBF num = 203 name = CJK Unified Ideographs Extension A
-% 114 "4E00-"9FFF num = 14087 name = CJK Unified Ideographs
-% 143 "F900-"FAFF num = 110/512 name = CJK Compatibility Ideographs
-% 147 "FE10-"FE1F num = 0/16 name = Vertical Forms
-% 149 "FE30-"FE4F num = 8/32 name = CJK Compatibility Forms
-% 150 "FE50-"FE6F num = 0/32 name = Small Form Variants
-% "FF00-"FFEF name = Halfwidth and Fullwidth Forms
-% "1B000-"1B0FF name = Kana Supplement
-% "1B100-"1B12F name = Kana Extended-A
-% "1B130-"1B16F name = Small Kana Extension
-% "1F100-"1F1FF name = Enclosed Alphanumeric Supplement
-% "1F200-"1F2FF name = Enclosed Ideographic Supplement
-% SIP
-% "E0000-"E01EF name = Variation Selectors Supplement
-
-\ltjdefcharrange{7}{%
- "1100-"11FF, "2F00-"2FFF, "3100-"318F, "31A0-"31EF, "A000-"A4CF,
- "A960-"A97F, "AC00-"D7FF
-}
- % 35 "1100-"11FF num = 1 name = Hangul Jamo
- % 99 "2F00-"2FDF num = 0/224 name = Kangxi Radicals
- % 100 "2FF0-"2FFF num = 0/16 name = Ideographic Description Characters
- % 104 "3100-"312F num = 0/48 name = Bopomofo
- % 105 "3130-"318F num = 0/96 name = Hangul Compatibility Jamo
- % 107 "31A0-"31BF num = 0/32 name = Bopomofo Extended
- % 108 "31C0-"31EF num = 0/48 name = CJK Strokes
- % 115 "A000-"A48F num = 0/1168 name = Yi Syllables
- % 116 "A490-"A4CF num = 0/64 name = Yi Radicals
- % "A960-"A97F name = Hangul Jamo Extended-A
- % 137 "AC00-"D7AF num = 0/11184 name = Hangul Syllables
- % 138 "D7B0-"D7FF num = 0/80 name = Hangul Jamo Extended-B
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty
index 678556e55e..9b8f1fc7a1 100644
--- a/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty
+++ b/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty
@@ -3,7 +3,8 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-geometry}[2018/01/19 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\ProvidesPackage{lltjp-geometry}[2020/02/25 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\RequirePackage{expl3}
\ifdefined\if@ltj@@geometry@tate\expandafter\endinput\fi
\newif\if@ltj@@geometry@tate
\newif\if@ltj@@geometry@forceoff
@@ -44,7 +45,7 @@
\else
\@gobble\iftrue\csname iftdir\endcsname\@ltj@@geometry@tatetrue\fi
\fi
-\patchcmd\@begindocumenthook{\tate}{\tate}{\@ltj@@geometry@tatetrue}{}%
+\csname tl_if_in:NnT\endcsname\@begindocumenthook{\tate}{\@ltj@@geometry@tatetrue}
\if@ltj@@geometry@tate
\if@ltj@@geometry@forceoff
\@ltj@@geometry@tatefalse
@@ -53,6 +54,7 @@
\fi
\fi
}
+
\AtEndOfPackageFile{geometry}{%
\let\PackageWarningNoLine=\orig@PackageWarningNoLine
\if@ltj@@geometry@tate