Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling bug in current xetex.def #13

Open
nolda opened this issue Aug 1, 2017 · 2 comments
Open

Scaling bug in current xetex.def #13

nolda opened this issue Aug 1, 2017 · 2 comments
Assignees

Comments

@nolda
Copy link

nolda commented Aug 1, 2017

Using \scalebox with XeLaTeX and current xetex.def may misalign content.

Consider the following MWE:

\documentclass{article}
\usepackage{graphics}
\usepackage{pstricks,pst-node}
\pagestyle{empty}
\newcommand{\sample}{%
\psset{nodesep=1pt}
\Rnode{A}{left} \hskip4em \Rnode{B}{right}%
\ncline{|-|}{A}{B}\naput{center}%
}

\begin{document}
\sample
\vskip\baselineskip
\scalebox{0.8}{\sample}
\end{document}

In the second, scaled sample, the "center" label is misaligned if the MWE is compiled with XeLaTeX and v. 5.0h of xetex.def (cf. the attached mwe_xetex-def_5.0h.pdf). With v. 4.10 of xetex.def (commit edf0eb48e2e70f7dc1147e79e28a7dceeda605d0) or with PDFTeX, however, it compiles correctly (cf. mwe_xetex-def_4.10.pdf and mwe_pdftex-def.pdf, respectively).
mwe_xetex-def_5.0h.pdf
mwe_xetex-def_4.10.pdf
mwe_pdftex-def.pdf

@josephwright josephwright self-assigned this Aug 2, 2017
@josephwright
Copy link
Member

The issue comes up as we've altered how scalings are done: one can use the xdvipdfmx built-in x:scale or a PDF transformation matrix. The latter was what was used by v4.10, but that is then not 'aware' of any other effects, most notably hyperlinks: scaling misplaced those. The x:scale approach doesn't have that problem as the driver is tracking everything. I'll see if I can track down why that's failing here: I have a feeling it's because the PStricks stuff has to happen at the 'bare metal' end ...

@josephwright
Copy link
Member

BTW, the use of a PDF-based scaling matrix wasn't in the release for all that long: a few months last year. It seemed attractive until the hyperlink business came up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants