Skip to content

Rotation of pgftext does not affect hyperref #1425

@lrlunin

Description

@lrlunin

Brief outline of the bug

Hello,

firstly, I would like to thank you all for the efforts you have made in maintaining this project.

I have encounted the problem when I used matplotlib pgf backend. The problem is that the hyperref links are not rotated with the \pgftext node.

After a quick research I found out that the problem is pretty common and is known for a long time:

All of the proposed solutions are based on use of \rotatebox which is rather poor if the exact placement of the node matters. In particular cases of rotation by 90, 180, 270 degrees the \rotatebox is fine with arguments of the text alignment of \pgftext but does not really work as inteded for arbitary degree.

I am aware that this issue is particularly related to the \hyperref package but this is nowdays not really maintained.

Since the problem is present for pretty long time and I believe that this is important, I would like to address this issue to your project. I would like to ask you if you can see any long-term robust solution for the problem or give any advices regarding the problem.

Best wishes

Minimal working example (MWE)

\documentclass{article}
\usepackage{hyperref}
\usepackage{pgfplots}
\begin{document}
\section{Introduction}
\label{text:intro}
\begin{figure}
    \centering
    \begin{pgfpicture}%
        \begin{pgfscope}%
        \pgftext[x=0.9in,y=0.5in]{Reference to \ref{text:intro}}
        \pgftext[x=0.2in,y=0.2in,rotate=90]{Reference to \ref{text:intro}}
        \end{pgfscope}
    \end{pgfpicture}
\end{figure}
\end{document}
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions