summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex')
-rw-r--r--Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex220
1 files changed, 220 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex b/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex
new file mode 100644
index 00000000000..2c76a9782a8
--- /dev/null
+++ b/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex
@@ -0,0 +1,220 @@
+%#!ptex2pdf -e inhibitglue.tex
+\parindent0pt
+\def\head#1{\par\noindent{\tentt ■\string#1}\par}
+\noautospacing \noautoxspacing
+
+%%% unexpandable tokens with non-discardable nodes
+
+\head{\null}
+あ)\inhibitglue (あ\par % ベタ
+あ)\null\inhibitglue (あ\par % 二分
+あ)\inhibitglue\null (あ\par % 二分
+あ)\null\inhibitglue\null (あ\par % 全角【TL17二分】
+あ)\null (あ\par % 全角
+
+\head{\unbox}
+\def\unbox{\unhcopy200 }
+\setbox200=\hbox{}
+あ)\inhibitglue (あ\par % ベタ
+あ)\unbox\inhibitglue (あ\par % 二分
+あ)\inhibitglue\unbox (あ\par % ベタ【TL17二分】
+あ)\unbox\inhibitglue\unbox (あ\par % 二分
+あ)\unbox (あ\par % 全角
+\setbox200=\hbox{漢}
+あ)\inhibitglue (あ\par % ベタ
+あ)\unbox\inhibitglue (あ\par % 前二分
+あ)\inhibitglue\unbox (あ\par % 後二分
+あ)\unbox\inhibitglue\unbox (あ\par % 前後二分【TL17前二分】
+あ)\unbox (あ\par % 前後二分
+
+\head{\vrule}
+あ)\inhibitglue (あ\par % ベタ
+あ)\vrule\inhibitglue (あ\par % 二分
+あ)\inhibitglue\vrule (あ\par % 二分
+あ)\vrule\inhibitglue\vrule (あ\par % 全角【TL17二分】
+あ)\vrule (あ\par % 全角
+
+\head{\discretionary}
+\def\disc{\discretionary{}{}{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\disc\inhibitglue (あ\par % 二分
+あ)\inhibitglue\disc (あ\par % 二分
+あ)\disc\inhibitglue\disc (あ\par % 全角【TL17二分】
+あ)\disc (あ\par % 全角
+
+\head{\special}
+\def\spec{\special{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\spec\inhibitglue (あ\par % 二分
+あ)\inhibitglue\spec (あ\par % 二分
+あ)\spec\inhibitglue\spec (あ\par % 全角【TL17二分】
+あ)\spec (あ\par % 全角
+
+\head{\write-1}
+\def\tlog{\write-1{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\tlog\inhibitglue (あ\par % 二分
+あ)\inhibitglue\tlog (あ\par % 二分
+あ)\tlog\inhibitglue\tlog (あ\par % 全角【TL17二分】
+あ)\tlog (あ\par % 全角
+
+\head{\insert}
+\def\ins{\insert201{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\ins (あ\par % 二分
+あ)\ins\inhibitglue (あ\par % 二分
+あ)\ins\inhibitglue\ins (あ\par % 全角【TL17二分】
+あ)\ins (あ\par % 全角
+
+\head{\mark}
+\def\mrk{\mark{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\mrk (あ\par % 二分
+あ)\mrk\inhibitglue (あ\par % 二分
+あ)\mrk\inhibitglue\mrk (あ\par % 全角【TL17二分】
+あ)\mrk (あ\par % 全角
+
+\head{\vadjust}
+\def\adj{\vadjust{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\adj (あ\par % 二分
+あ)\adj\inhibitglue (あ\par % 二分
+あ)\adj\inhibitglue\adj (あ\par % 全角【TL17二分】
+あ)\adj (あ\par % 全角
+
+\head{\math}
+\def\math{$ $}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\math (あ\par % 二分
+あ)\math\inhibitglue (あ\par % 二分
+あ)\math\inhibitglue\math (あ\par % 全角【TL17二分】
+あ)\math (あ\par % 全角
+
+%%% unexpandable tokens with discardable nodes (glue, kern, penalty)
+
+\head{\hskip0pt}
+\def\zskip{\hskip0pt}
+あ)\inhibitglue (あ\par % ベタ
+あ)\zskip\inhibitglue (あ\par % 二分
+あ)\inhibitglue\zskip (あ\par % 二分
+あ)\zskip\inhibitglue\zskip (あ\par % 全角
+あ)\zskip (あ\par % 全角
+
+\head{\kern0pt}
+\def\zkern{\kern0pt}
+あ)\inhibitglue (あ\par % ベタ
+あ)\zkern\inhibitglue (あ\par % 二分
+あ)\inhibitglue\zkern (あ\par % 二分
+あ)\zkern\inhibitglue\zkern (あ\par % 全角
+あ)\zkern (あ\par % 全角
+
+\head{\penalty10000}
+\def\zpena{\penalty10000 }
+あ)\inhibitglue (あ\par % ベタ
+あ)\zpena\inhibitglue (あ\par % 二分
+あ)\inhibitglue\zpena (あ\par % 二分
+あ)\zpena\inhibitglue\zpena (あ\par % 全角【TL17二分】
+あ)\zpena (あ\par % 全角
+
+%%% unexpandable tokens
+
+\head{\relax}
+あ)\inhibitglue (あ\par % ベタ
+あ)\relax\inhibitglue (あ\par % 二分
+あ)\inhibitglue\relax (あ\par % ベタ【TL17二分】
+あ)\relax\inhibitglue\relax (あ\par % 二分
+あ)\relax (あ\par % 全角
+ああ\inhibitglue\relax (あ\par % ベタ【TL17二分】
+ああ\relax\inhibitglue (あ\par % ベタ
+あ)\relax\inhibitglue ああ\par % 二分
+あ)\inhibitglue\relax ああ\par % ベタ
+
+\head{\ignorespaces}
+\let\ignsp=\ignorespaces
+あ)\inhibitglue (あ\par % ベタ
+あ)\ignsp\inhibitglue (あ\par % 二分
+あ)\inhibitglue\ignsp (あ\par % ベタ【TL17二分】
+あ)\ignsp\inhibitglue\ignsp (あ\par % 二分
+あ)\ignsp (あ\par % 全角
+
+\head{\spacefactor1000}
+\def\spf{\spacefactor1000 }
+あ)\inhibitglue (あ\par % ベタ
+あ)\spf\inhibitglue (あ\par % 二分
+あ)\inhibitglue\spf (あ\par % ベタ【TL17二分】
+あ)\spf\inhibitglue\spf (あ\par % 二分
+あ)\spf (あ\par % 全角
+
+\head{\let}
+\def\letab{\let\a\b}
+あ)\inhibitglue (あ\par % ベタ
+あ)\letab\inhibitglue (あ\par % 二分
+あ)\inhibitglue\letab (あ\par % ベタ【TL17二分】
+あ)\letab\inhibitglue\letab (あ\par % 二分
+あ)\letab (あ\par % 全角
+
+%%% grouping
+
+\head{\group}
+あ)(あ\par % 一括
+あ){}(あ\par % 別々
+あ){}\inhibitglue (あ\par % 左
+あ)\inhibitglue {}(あ\par % なし【TL17右】
+あ){}\inhibitglue{}(あ\par % 左
+あ){\inhibitglue }(あ\par % 左
+あ)\inhibitglue (あ\par % なし
+あ)・あ\par % 一括
+あ){}・あ\par % 別々
+あ){}\inhibitglue ・あ\par % 左
+あ)\inhibitglue {}・あ\par % なし【TL17右】
+あ){}\inhibitglue{}・あ\par % 左
+あ){\inhibitglue }・あ\par % 左
+あ)\inhibitglue ・あ\par % なし
+あ・(あ\par % 一括
+あ・{}(あ\par % 別々
+あ・{}\inhibitglue (あ\par % 左
+あ・\inhibitglue {}(あ\par % なし【TL17右】
+あ・{}\inhibitglue{}(あ\par % 左
+あ・{\inhibitglue }(あ\par % 左
+あ・\inhibitglue (あ\par % なし
+
+
+\head{\inhibitglue\ at 内側リスト}
+あ\inhibitglue\setbox0=\vbox{『}(\par % ベタ【TL17二分】
+あ\setbox0=\hbox{\inhibitglue}(\par % 二分【TL17ベタ】
+)\setbox0=\hbox{\inhibitglue}(\par % 全角【TL17二分】
+
+あ\setbox0=\vbox{\hsize10zw「}(い\box0\par % (前:二分,「前:二分
+あ\setbox0=\vbox{\hsize10zw「\inhibitglue}(い\box0\par % (前:二分,「前:二分
+あ\inhibitglue\setbox0=\vbox{\hsize10zw「}(い\box0\par % (前:ベタ【TL17二分】,「前:二分
+あ\setbox0=\vbox{\hsize10zw\leavevmode\inhibitglue 「}(い\box0\par % (前:二分,「前:ベタ
+
+
+%%% \unskip vs \inhibitglue (e-pTeX \lastnodesubtype is required)
+\ifx\lastnodesubtype\undefined \expandafter\end \fi
+
+\head{\inhibitglue\ test}
+\setbox200=\hbox{)\hskip10pt\unskip
+ \xdef\gluetype{\the\lastnodetype}%
+ \xdef\jfmgluesubtype{\the\lastnodesubtype}}
+\protected\def\removejfmglue{%
+ \ifnum\lastnodetype=\gluetype\relax
+ \ifnum\lastnodesubtype=\jfmgluesubtype\relax
+ \unskip
+ \fi
+ \fi}
+
+あ)\inhibitglue あ\par % 消える
+あ)\relax\inhibitglue あ\par % 消えない
+あ)\relax\removejfmglue あ\par % 消える【新設】
+%% for tabular environment
+あ)\hskip20pt\unskip\unskip あ\par % 消える
+あ)\hskip20pt\unskip\inhibitglue あ\par % 消えない
+あ)\hskip20pt\unskip\removejfmglue あ\par % 消える【新設】
+
+
+%% reset \inhibitglue at char_node
+\vrule\inhibitglue ;あ( % ;前ベタ,;後四分
+
+
+\bye