summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty98
1 files changed, 66 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty
index c47da0e73d4..bbfee64e8a3 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-space-code.sty
@@ -1,45 +1,79 @@
-\ProvidesExplPackage {tagpdf-space-code} {2019/07/02} {0.61}
+%%
+%% This is file `tagpdf-space-code.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tagpdf-space.dtx (with options: `space')
+%%
+%% Copyright (C) 2019 Ulrike Fischer
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% https://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "tagpdf bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% File: tagpdf-space.dtx
+\ProvidesExplPackage {tagpdf-space-code} {2021/02/23} {0.80}
{part of tagpdf - code related to real space chars}
-% luatex uses an attribute (declared in the driver file) and some luacode in tagpdf.lua
-% perhaps I will split the code by engine in the future
\sys_if_engine_pdftex:T
-{
- \pdfglyphtounicode{space}{0020}
- \keys_define:nn { uftag / setup }
{
- interwordspace .choices:nn = { true, on } { \pdfinterwordspaceon },
- interwordspace .choices:nn = { false, off }{ \pdfinterwordspaceon },
- show-spaces .bool_set:N = \l__uftag_showspaces_bool
+ \pdfglyphtounicode{space}{0020}
+ \keys_define:nn { __tag / setup }
+ {
+ interwordspace .choices:nn = { true, on } { \pdfinterwordspaceon },
+ interwordspace .choices:nn = { false, off }{ \pdfinterwordspaceon },
+ show-spaces .bool_set:N = \l__tag_showspaces_bool
+ }
}
-}
-
-
\sys_if_engine_luatex:T
-{
- \keys_define:nn { uftag / setup }
{
- interwordspace .choices:nn = { true, on }
- { \directlua{uftag.func.markspaceon()} },
+ \keys_define:nn { __tag / setup }
+ {
+ interwordspace .choices:nn =
+ { true, on }
+ { \directlua{ltx.__tag.func.markspaceon()} },
+ interwordspace .choices:nn =
+ { false, off }
+ {\directlua{ltx.__tag.func.markspaceoff()} },
+ show-spaces .choice:,
+ show-spaces / true .code:n =
+ {\directlua{ltx.__tag.trace.showspaces=true}},
+ show-spaces / false .code:n =
+ {\directlua{ltx.__tag.trace.showspaces=nil}},
+ show-spaces .default:n = true
+ }
- interwordspace .choices:nn = { false, off }
- {\directlua{uftag.func.markspaceoff()} },
- show-spaces .choice:,
- show-spaces / true .code:n = {\directlua{uftag.trace.showspaces=true}},
- show-spaces / false .code:n = {\directlua{uftag.trace.showspaces=nil}},
- show-spaces .default:n = true
+ \cs_new_protected:Nn \__tag_fakespace:
+ {
+ \group_begin:
+ \setattribute\g__tag_interwordspace_attr{1}
+ \setattribute\g__tag_interwordfont_attr
+ {
+ \directlua{tex.print(\the\catcodetable@latex, font.current())}
+ }
+ \skip_horizontal:n{\c_zero_skip}
+ \group_end:
+ }
}
- \cs_new_protected:Nn \__uftag_fakespace:
+
+\sys_if_engine_xetex:T
{
- \group_begin:
- \setattribute\g__uftag_interwordspace_attr{1}
- \setattribute\g__uftag_interwordfont_attr{\directlua{tex.print(\the\catcodetable@latex, font.current())}}
- \skip_horizontal:n{\c_zero_skip}
- \group_end:
+ \keys_define:nn { __tag / setup }
+ {
+ interwordspace .choices:nn = { true, on } { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex} },
+ interwordspace .choices:nn = { false, off }{ \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex} },
+ show-spaces .bool_set:N = \l__tag_showspaces_bool
+ }
}
-}
-
-
-\endinput
+%%
+%%
+%% End of file `tagpdf-space-code.sty'.