summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2020-05-05 12:37:43 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2020-05-05 12:37:43 +0000
commit9fac64baaa5e3e817cde6db5f350e739ccb78c7f (patch)
tree127bd8db54a2fa58436928813256912b454baa43 /Build/source/texk
parentb43b8205755406f22742ebf4c72125c6e5c9e8f6 (diff)
[e][u]ptex: inhibit_glue_flag in extensions (H. Kitagawa)
git-svn-id: svn://tug.org/texlive/trunk@55026 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/eptexdir/pdfutils.ch1
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch58
-rw-r--r--Build/source/texk/web2c/ptexdir/tests/inhibitglue_extensions.tex50
5 files changed, 113 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog
index c273bad7fa1..58f0987ff03 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-05 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * pdfutils.ch: Sync with inhibit_glue_flag improvement.
+ https://github.com/texjporg/tex-jp-build/pull/102
+
2019-12-10 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* am/eptex.am (eptex_CPPFLAGS): append $(ZLIB_INCLUDES).
diff --git a/Build/source/texk/web2c/eptexdir/pdfutils.ch b/Build/source/texk/web2c/eptexdir/pdfutils.ch
index 36e821d1f9a..c8ccd05ed82 100644
--- a/Build/source/texk/web2c/eptexdir/pdfutils.ch
+++ b/Build/source/texk/web2c/eptexdir/pdfutils.ch
@@ -1572,6 +1572,7 @@ end;
@ @<Implement \.{\\pdfsavepos}@>=
begin
new_whatsit(pdf_save_pos_node, small_node_size);
+ inhibit_glue_flag:=false;
end
@ @<Save current position in DVI mode@>=
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index b80ac3052ed..0c640c96592 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-05 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * ptex-base.ch: Improved resetting inhibit_glue_flag in extensions.
+ https://github.com/texjporg/tex-jp-build/pull/102
+
2020-02-09 Phelype Oleinik <phe.h.o1@gmail.com>
* ptexdir/ptex-base.ch: extra end; needed for the scan_file_name
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index fce669324f6..6d1e0f405d7 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -6323,15 +6323,61 @@ undump_things(char_base[null_font], font_ptr+1-null_font);
ctype_base[null_font]:=0; char_base[null_font]:=0; width_base[null_font]:=0;
@z
-@x [53.????] do_extension, inhibit_glue_flag
-begin case cur_chr of
-open_node:@<Implement \.{\\openout}@>;
+@x [53.????] new_write_whatsit, inhibit_glue_flag
+write_stream(tail):=cur_val;
+end;
@y
-begin inhibit_glue_flag:=false;
-case cur_chr of
-open_node:@<Implement \.{\\openout}@>;
+write_stream(tail):=cur_val;
+inhibit_glue_flag:=false;
+end;
@z
+@x [53.????] Implement \special, inhibit_glue_flag
+@<Implement \.{\\special}@>=
+begin new_whatsit(special_node,write_node_size); write_stream(tail):=null;
+p:=scan_toks(false,true); write_tokens(tail):=def_ref;
+end
+@y
+@<Implement \.{\\special}@>=
+begin new_whatsit(special_node,write_node_size); write_stream(tail):=null;
+p:=scan_toks(false,true); write_tokens(tail):=def_ref;
+inhibit_glue_flag:=false;
+end
+@z
+
+@x [53.????] Implement \immediate, inhibit_glue_flag
+ begin p:=tail; do_extension; {append a whatsit node}
+ out_what(tail); {do the action immediately}
+ flush_node_list(tail); tail:=p; link(p):=null;
+ end
+@y
+ begin k:=inhibit_glue_flag;
+ p:=tail; do_extension; {append a whatsit node}
+ out_what(tail); {do the action immediately}
+ flush_node_list(tail); tail:=p; link(p):=null;
+ inhibit_glue_flag:=k;
+ end
+@z
+
+@x [53.????] fix_language, inhibit_glue_flag
+if l<>clang then
+ begin new_whatsit(language_node,small_node_size);
+@y
+if l<>clang then
+ begin inhibit_glue_flag:=false;
+ new_whatsit(language_node,small_node_size);
+@z
+
+@x [53.????] set_language, inhibit_glue_flag
+if abs(mode)<>hmode then report_illegal_case
+else begin new_whatsit(language_node,small_node_size);
+@y
+if abs(mode)<>hmode then report_illegal_case
+else begin inhibit_glue_flag:=false;
+ new_whatsit(language_node,small_node_size);
+@z
+
+
@x [53.1376] l.26309 - pTeX:
@<Glob...@> =
@!debug_format_file: boolean;
diff --git a/Build/source/texk/web2c/ptexdir/tests/inhibitglue_extensions.tex b/Build/source/texk/web2c/ptexdir/tests/inhibitglue_extensions.tex
new file mode 100644
index 00000000000..b4942bd2df6
--- /dev/null
+++ b/Build/source/texk/web2c/ptexdir/tests/inhibitglue_extensions.tex
@@ -0,0 +1,50 @@
+\documentclass{jsarticle}
+\usepackage[deluxe]{otf}
+\begin{document}
+\def\cs#1{\texttt{\textbackslash #1}}
+\immediate\openout15="\jobname.hoge"\immediate\closeout15
+
+\tracingonline1\showboxdepth100\showboxbreadth10000
+あい\inhibitglue(あ)
+
+あい\inhibitglue\openout14="\jobname-P.out"
+(あ\cs{openout}←whatsit作る
+
+あい\inhibitglue\write14{う}(あ\cs{write}←whatsit作る
+
+あい\inhibitglue\closeout14(あ\cs{closeout}←whatsit作る
+
+あい\inhibitglue\special{A}(あ\cs{special}←whatsit作る
+
+あい\inhibitglue\immediate(あ\cs{immediate}
+
+あい\inhibitglue\immediate\openout14="\jobname-I.out"
+(あ\cs{immediate}\cs{openout}
+
+あい\inhibitglue\immediate\write14{え}(あ\cs{immediate}\cs{write}
+
+あい\inhibitglue\immediate\closeout14(あ\cs{immediate}\cs{closeout}
+
+あい\inhibitglue\immediate\special{A}(あ\cs{immediate}\cs{special}$^*$
+
+あい\inhibitglue\pdfsavepos(あ\cs{pdfsavepos}←whatsit作る
+
+あい\inhibitglue\immediate\pdfsavepos(あ\cs{immediate}\cs{pdfsavepos}$^*$
+
+あい\inhibitglue\read16to\CS (あ\cs{read}
+
+あい\inhibitglue\openin1="\jobname.aux"
+(あ\cs{openin}\closein1
+
+あい\inhibitglue\setlanguage1(あ\cs{setlanguage}←whatsit作る
+
+
+あい\inhibitglue\textbf{(う)}
+
+あい\inhibitglue\textsf{(う)}
+
+あい\inhibitglue\textsf{(う)}
+
+$^*$: \cs{immediate}は効力なし
+\end{document}
+