[latex3-commits] [git/LaTeX3-latex3-xxetex] main: pdfsavepos (3dca787)

David Carlisle d.p.carlisle at gmail.com
Sat Jan 28 12:16:10 CET 2023


Repository : https://github.com/latex3/xxetex
On branch  : main
Link       : https://github.com/latex3/xxetex/commit/3dca787a3a4b46520eb97ef5b28409920b1d8958

>---------------------------------------------------------------

commit 3dca787a3a4b46520eb97ef5b28409920b1d8958
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Jan 28 11:16:10 2023 +0000

    pdfsavepos


>---------------------------------------------------------------

3dca787a3a4b46520eb97ef5b28409920b1d8958
 examples/test-charclass1.tex     |  2 ++
 examples/test-fontprimitives.tex |  2 ++
 examples/test-pdfxxx.tex         | 14 ++++++++++++++
 xxetex.tex                       |  6 ++++++
 4 files changed, 24 insertions(+)

diff --git a/examples/test-charclass1.tex b/examples/test-charclass1.tex
index d71d715..907d211 100644
--- a/examples/test-charclass1.tex
+++ b/examples/test-charclass1.tex
@@ -11,8 +11,10 @@
 \documentclass{article}
 \usepackage{color}
 \ifdefined\directlua
+\ifdefined\XeTeXinterchartokenstate\else
 \input{xxetex.tex}
 \fi
+\fi
 
 
 \begin{document}
diff --git a/examples/test-fontprimitives.tex b/examples/test-fontprimitives.tex
index 794c8e5..e08517f 100644
--- a/examples/test-fontprimitives.tex
+++ b/examples/test-fontprimitives.tex
@@ -1,7 +1,9 @@
 \ifdefined\directlua
+\ifdefined\XeTeXinterchartokenstate\else
   \input xxetex.tex
   \input luaotfload.sty
 \fi
+\fi
 
 \font\1="[lmroman10-italic.otf]" at 10pt\1
 \font\2=cmr10 at 10pt
diff --git a/examples/test-pdfxxx.tex b/examples/test-pdfxxx.tex
new file mode 100644
index 0000000..83833cc
--- /dev/null
+++ b/examples/test-pdfxxx.tex
@@ -0,0 +1,14 @@
+\ifdefined\directlua
+\ifdefined\XeTeXinterchartokenstate\else
+\input{xxetex.tex}
+\fi
+\fi
+
+\documentclass{article}
+\pdfpageheight=3cm
+\pdfpagewidth=5cm
+\begin{document}
+
+x\pdfsavepos\write20{(\the\pdflastxpos,\the\pdflastypos)}
+
+\end{document}
diff --git a/xxetex.tex b/xxetex.tex
index 38a69e6..d079ade 100644
--- a/xxetex.tex
+++ b/xxetex.tex
@@ -82,6 +82,12 @@ end
   \xe at alloc@intercharclass=\z@
 \fi
 
+%%% \pdfsaveps
+\let\pdfpageheight\pageheight
+\let\pdfpagewidth\pagewidth
+\let\pdfsavepos\savepos
+\let\pdflastxpos\lastxpos
+\let\pdflastypos\lastypos
 
 %\catcode`\{=12
 %\catcode`\{=12





More information about the latex3-commits mailing list.