summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/ltj-latex.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-01 03:04:13 +0000
committerNorbert Preining <norbert@preining.info>2020-10-01 03:04:13 +0000
commitd2a6bb90e56a2836bb59477b8f27248aab9149f5 (patch)
tree5d6be29a531495452688a3c8456355fa58d485f2 /macros/luatex/generic/luatexja/src/ltj-latex.sty
parent36f406d8d1fc994af516d837e6a87c68839cdb2d (diff)
CTAN sync 202010010304
Diffstat (limited to 'macros/luatex/generic/luatexja/src/ltj-latex.sty')
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-latex.sty24
1 files changed, 16 insertions, 8 deletions
diff --git a/macros/luatex/generic/luatexja/src/ltj-latex.sty b/macros/luatex/generic/luatexja/src/ltj-latex.sty
index 55fd5d4ebd..834f16e70a 100644
--- a/macros/luatex/generic/luatexja/src/ltj-latex.sty
+++ b/macros/luatex/generic/luatexja/src/ltj-latex.sty
@@ -12,7 +12,7 @@
\def\luatexjalatexLoaded{\endinput}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2020-08-08 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2020-10-01 LaTeX support of LuaTeX-ja]
% cleanup at end of the document
%\let\ltj@@orig@end=\@@end
@@ -21,17 +21,23 @@
\endlinechar=13
+%%% LaTeX version detection
+\ifcsname tex_shipout:D\endcsname
+ \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout
+\fi
+\newif\ifltj@ltfilehook@avail
+\@ifl@t@r\fmtversion{2020-10-01}{%
+ \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltfilehook@availtrue\fi
+ \else\ltj@ltfilehook@availtrue\fi
+}{}
+
%%% patch for LaTeX
\usepackage{lltjfont}
\usepackage{lltjdefs}
\usepackage{lltjcore}
+\RequirePackage{lltjp-atbegshi}
%%% patching commands
-\newif\ifltj@ltfilehook@avail
-\@ifl@t@r\fmtversion{2020-10-01}{%
- \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltfilehook@availtrue\fi
- \else\ltj@ltfilehook@availtrue\fi
-}{}
\ifltj@ltfilehook@avail
\def\@@ltj@ExecuteAfterPackage#1{\AddToHook{package/after/#1}}
\def\@@ltj@ExecuteBeforePackage#1{\AddToHook{package/before/#1}}
@@ -80,15 +86,17 @@
\ltj@pkgpatch{tascmac}
\ltj@pkgpatch{ascmac}[lltjp-tascmac]
\ltj@pkgpatch@im{stfloats}
-\ltj@pkgpatch{preview} %% at \begin{document}
+\ifltj@ltfilehook@avail\else
+ \ltj@pkgpatch{preview} %% at \begin{document}
% (preview package has delayed option)
+\fi
\ltj@pkgpatch{array} %% at \begin{document}
\ltj@pkgpatch{collcell} %% at \begin{document}
\ltj@pkgpatch@im{unicode-math}
\ltj@pkgpatch@im{siunitx}
\ltj@pkgpatch@im{microtype}
-\ifltj@ltshipout@avail\else\ltj@pkgpatch@im{everyshi}\fi
+\ifltj@ltfilehook@avail\else\ltj@pkgpatch@im{everyshi}\fi
\RequirePackage{lltjp-geometry}