Hello Ikumi Keita, Thank you for the reply. On Tue, Jun 11, 2024 at 8:45 AM Ikumi Keita <ik...@ikumi.que.jp> wrote: > >>>>> Udicoudco <udifog...@gmail.com> writes: > > On Sat, Jun 8, 2024 at 1:20 PM Udicoudco <udifog...@gmail.com> wrote: > >> In LuaTeX, when \pagedirection is right to left then \pagerightoffset is > >> used instead of \hoffset to position the page. I attached a patch and an > >> example > >> that demonstrates the problem. > >> > >> > > There is a typo in the patch, so I attached a new one. > > Thanks for your proposal, but "make" doesn't run with this patch:
Oh, there was another typo. I did not test that the documentation is typesetting properly, and there was a "\begn{macro}" instead of `\begin{macro}`. I also updated the checksum of preview.dtx. Tested now with the various engines and things seems to be working (but please test thoroughly :) > By the way, I suppose we need copyright assignment if this contribution > is to be incorporated into AUCTeX. Have you signed FSF copyright > assignment form before? If not, please have a look at > https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future Just sent an email, but in case it is suffice, when I'll get an answer I'll attach the assignment. BTW, it is not that important, but why is my postal address needed? Regards, Udi
From 0fe4d61af2d9494539e79ffd354623df9efde3e1 Mon Sep 17 00:00:00 2001 From: Udi Fogiel <udifoglle@gmail.com> Date: Tue, 11 Jun 2024 11:33:35 +0300 Subject: [PATCH] consider pagerightoffset in luatex with rtl languages This patch will calculate \pagerightoffset when LuaTeX is used and the page direction is right to left. It is important as in this case LuaTeX will use this register, and not \hoffset to position the page. --- latex/preview.dtx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/latex/preview.dtx b/latex/preview.dtx index 23f5b2da..483e6f82 100644 --- a/latex/preview.dtx +++ b/latex/preview.dtx @@ -20,7 +20,7 @@ % Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, % Boston, MA 02110-1301 USA % \fi -% \CheckSum{1758} +% \CheckSum{1779} % \GetFileInfo{preview.sty} % \date{\filedate} % \author{David Kastrup\thanks{\texttt{bug-auctex@gnu.org}}} @@ -752,6 +752,7 @@ \ifx\pr@offset@override\@undefined \voffset=-\ht\pr@box \hoffset=\z@ + \pr@set@pagerightoffset \fi \c@page=\pr@snippet \pr@shipout @@ -769,6 +770,22 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \begin{macro}{\pr@set@pagerightoffset} +% In |luatex| when page direction is right to left, |\pagerightoffset| +% is used instead of |\hoffset|, so we need to calculate that as well. +% \begin{macrocode} +\let\pr@set@pagerightoffset\@empty +\ifx\pagerightoffset\@undefined\else + \def\pr@set@pagerightoffset{% + \ifnum\pagedirection=1 + \pagerightoffset=-1in + \advance\pagerightoffset-\pr@bb@i + \advance\pagerightoffset\pr@bb@iii + \fi + } +\fi +% \end{macrocode} +% \end{macro} % Oh, and we kill off the usual meaning of \cmd{\shipout} in case % somebody makes a special output routine. The following test is % pretty much the same as in |everyshi.sty|. One of its implications -- 2.44.0
_______________________________________________ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex