[latex3-commits] [git/LaTeX3-latex3-xxetex] main: more image options (3eb4795)
David Carlisle
d.p.carlisle at gmail.com
Sat Jan 28 18:53:15 CET 2023
Repository : https://github.com/latex3/xxetex
On branch : main
Link : https://github.com/latex3/xxetex/commit/3eb4795090279538ab175f382d14a1acddb228eb
>---------------------------------------------------------------
commit 3eb4795090279538ab175f382d14a1acddb228eb
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Sat Jan 28 17:53:15 2023 +0000
more image options
>---------------------------------------------------------------
3eb4795090279538ab175f382d14a1acddb228eb
examples/test-pic2.tex | 18 ++++++++++++++++++
xxetex.lua | 13 +++++++++++++
2 files changed, 31 insertions(+)
diff --git a/examples/test-pic2.tex b/examples/test-pic2.tex
new file mode 100644
index 0000000..d29fc37
--- /dev/null
+++ b/examples/test-pic2.tex
@@ -0,0 +1,18 @@
+\ifdefined\directlua
+\ifdefined\XeTeXinterchartokenstate\else
+\input{xxetex.tex}
+\fi
+\fi
+
+\addtolength\textwidth{200pt}
+\documentclass{article}
+
+\begin{document}
+
+
+1: \fbox{\XeTeXpdffile example-image.pdf scaled 500 rotated 180}
+
+
+2: \fbox{\XeTeXpdffile example-image-letter-numbered.pdf page 2 scaled 500 }
+
+\end{document}
diff --git a/xxetex.lua b/xxetex.lua
index 66e87f0..a173435 100644
--- a/xxetex.lua
+++ b/xxetex.lua
@@ -236,6 +236,19 @@ repeat
if angle==90 then
t.transform= 1
end
+ if angle==180 then
+ t.transform= 2
+ end
+ if angle==-90 then
+ t.transform= 3
+ end
+ end
+ -- just pdf but do for both here
+ token.scan_keyword(' ')
+ if token.scan_keyword('page') then
+ scan=true
+ -- img.page is now read-only
+ -- t.page= token.scan_int()
end
until not(scan)
img.write(t)
More information about the latex3-commits
mailing list.