Skip to content

Get pdf x and y position #2324

@egidioln

Description

@egidioln

Hey all, following up on my question in #2307, I implemented the following feature:

Ctrl+shift+LeftMouseClick on the pdfViewer copies to clipboard the mouse coordinates x and y in cm with respect to the bottom left corner of the page. This is useful to add floating elements (especially in beamer presentations) as in the following example:

\documentclass{beamer}
\usepackage{tikz}

\tikzstyle{float} = [overlay,remember picture, shift=(current page.south west)]

\begin{document}
		\tikz[float] \draw (0,0)  grid (16,10);
		\tikz[float] \node at (8.6955,4.32964) {\Huge a}; % this coordinate was obtained by ctrl+shift+click on the pdf and ctrl+v here
\end{document}

It's already working in the commit b7e0e9b.

Let me know if there is interest in merging this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions