Record pdfTeX margin behavior and capture checkpoint evidence

This commit is contained in:
gloamxun committed 2026-11-19 20:15:49 +08:00
1 parent ee22f25ee0
commit 11063c65dd
4 files changed
+93

No files matched your search

@@ -0,0 +1,31 @@
\pdfoutput=1
\pdfadjustspacing=0
\pdfprotrudechars=0
\font\face=cmr10 at 10pt
\font\bigface=cmr10 at 20pt
\face
\begingroup
\lpcode\face`A=-1200
\rpcode\face`!=1200
\pdfprotrudechars=2
\message{!scope:inside:[\the\lpcode\face`A]/[\the\rpcode\face`!]/[\the\pdfprotrudechars]:end!}
\endgroup
\message{!scope:outside:[\the\lpcode\face`A]/[\the\rpcode\face`!]/[\the\pdfprotrudechars]:end!}
\message{!scope:other-font:[\the\lpcode\bigface`A]/[\the\rpcode\bigface`!]:end!}
\lpcode\face`A=-125
\rpcode\face`!=400
\lpcode\bigface`A=-125
\rpcode\bigface`!=400
\pdfprotrudechars=1
\parfillskip=0pt
\rightskip=0pt plus 1fil
\hsize=45pt
\def\probe#1{%
\setbox0=\vbox{#1\noindent A!\par\global\setbox2=\lastbox}%
\message{!scope:line:[\leftmarginkern2]/[\rightmarginkern2]:end!}%
\setbox3=\hbox{\unhcopy2}%
\message{!scope:unboxed:[\leftmarginkern3]/[\rightmarginkern3]:end!}%
\shipout\vbox{\copy2\box3}}
\probe\face
\probe\bigface
\end
@@ -0,0 +1,28 @@
\pdfoutput=1
\pdfadjustspacing=0
\font\face=cmr10
\face
\lpcode\face`A=125
\rpcode\face`!=400
\spaceskip=3.33333pt
\rightskip=0pt plus 1fil
\emergencystretch=0pt
\parindent=0pt
\tolerance=100
\showboxbreadth=100
\showboxdepth=100
\tracingoutput=1
\setbox0=\hbox{A! B!}
\hsize=\wd0
\advance\hsize by -1pt
\def\shipprobe#1{%
\pdfprotrudechars=#1
\setbox0=\vbox{\noindent A! B!\par
\global\setbox2=\lastbox
\message{!margin-check:#1:[\leftmarginkern2]/[\rightmarginkern2]:end!}%
\box2}%
\shipout\box0}
\shipprobe0
\shipprobe1
\shipprobe2
\end