summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty22
1 files changed, 13 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
index 32e4ef0b8ab..40f8c1e94e0 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
@@ -132,15 +132,19 @@
{ \fontspec_visible_space_fallback: }
}
-\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\fi % same as lltjcore
- \bgroup
- \verb@eol@error \let\do\@makeother \dospecials
- \verbatim@font\@noligs
- \@ifstar\__fontspecsverb\@verb
- }
-
+\AtBeginDocument{
+ \cs_if_exist:NF \verbvisiblespace {
+ % >= LaTeX2e <2018-12-01> does not need the following patch
+ \def\verb
+ {
+ \relax\ifmmode\hbox\else\leavevmode\fi % same as lltjcore
+ \bgroup
+ \verb@eol@error \let\do\@makeother \dospecials
+ \verbatim@font\@noligs
+ \@ifstar\__fontspecsverb\@verb
+ }
+ }
+}
\cs_set:Npn \emshape { \gtfamily \itshape }
\cs_set:Npn \eminnershape { \mcfamily \upshape }