If you use remember picture, overlay
as options to a tikzpicture
you can then use current page
as a coordinate (well actually you use .north
or stuff like that, just like you can use node.north
as the top of a node named node
).
The remember picture
has the effect that the positioning of the picture is adapted to match the specified positions because the tikzpicture
is not guaranteed to be at the bottom left of the current page -- you use it somewhere in the frame
environment and it is there as far as LaTeX is concerned. TikZ stores that position in the .aux file and moves the picture accordingly on the second run. Therefore you need at least two runs with this approach to get correct positioning. overlay
just makes sure that your picture doesn't have a size as far as LaTeX's typesetting is concerned (it still introduces white space around the spot it is used in if used at the wrong place -- make sure to not start a new paragraph accidentally and put a %
after \end{tikzpicture}
to not introduce unwanted spaces).
If you want to place arbitrary stuff on a specified coordinate on a frame, I'd use a \node
in a tikzpicture
which I know is on that slide. For a small template I created for myself I used the following approach:
Put a tikzpicture
in the beamer template background
. In that tikzpicture
put a macro like \MyPlacedStuff
and after the tikzpicture
put \gdef\MyPlacedStuff{}
.
In a frame
you can now add stuff with \xdef\MyPlacedStuff{\unexpanded\expandafter{\MyPlacedStuff <stuff you want to place on the slide>}}
You should write a macro or two around point 2 to ease the process.
The following does that and adds the help lines if you use \HelpLinestrue
outside of the frame (until you use \HelpLinesfalse
).
\PlaceAt
takes the coordinates in multiples of \paperwidth
and \paperheight
as first argument in ()
, optional arguments to a \node
in []
, and finally the contents of the node in {}
. The first and last are mandatory, options to the node are optional.
\AddToPlaced
takes only one argument, which should be able to contain anything you can add to a tikzpicture
.
Beware the background
might already contain stuff which you hereby would overwrite. You'll have to sort that out if it conflicts. It seems to not conflict in your MWE.
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{tikz,ifthen}
\usepackage{xparse}
\usetikzlibrary{calc, intersections,through,backgrounds}
\usepackage{pgfpages}
\usetheme[progressbar=frametitle]{metropolis}
\newif\ifHelpLines
\newcommand*\MyPlacedStuff{}
\setbeamertemplate{background}{%>>>
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\paperwidth,\paperheight);
\ifHelpLines
\draw[help lines] (0,0) grid (\paperwidth,\paperheight);
\fi
\MyPlacedStuff
\end{tikzpicture}\gdef\MyPlacedStuff{}}
\NewDocumentCommand{\PlaceAt}{ >{\SplitArgument{1}{,}}r() O{} +m }
{%
\PlaceAtB#1{#2}{#3}%
}
\NewDocumentCommand{\PlaceAtB}{ m m m +m }
{%
\xdef\MyPlacedStuff%
{%
\unexpanded\expandafter{\MyPlacedStuff
\node[#3] at (#1\paperwidth,#2\paperheight) {#4};%
}%
}%
}
\newcommand{\AddToPlaced}[1]
{%
\xdef\MyPlacedStuff%
{%
\unexpanded\expandafter{\MyPlacedStuff#1}%
}%
}
\begin{document}
\HelpLinestrue
\begin{frame}{Slide}
\PlaceAt(.8,.6){This text}
\AddToPlaced{\draw (.1,1) -- (.9\textwidth,.9\textheight);}
\end{frame}
\end{document}

\begin{tikzpicture}[remember picture, overlay]
for the pictures. You can fix the origin of yourtikzpictures
with something like:\node[xshift=<x>,yshift=<y>] at (current page.south west)
with<x>
and<y>
the real position of the node measured from the bottom left corner of the frame.remember picture
. So the correct way (IMHO) is\begin{tikzpicture}[overlay,remember picture] \draw[help lines] (current page.south west) grid (current page.north east); \end{tikzpicture}
.remember picture
;-) Any chance you want to answer the question?overlay,remember picture
.