# How to know the tikz working area coordinates in a beamer frame with header and footer?

In this example, slightly modified, the positionning of 'N' has been corrected with textheight to not be masked by the header:

\documentclass[beamer]{beamerswitch}
\usetheme{metropolis}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{frame}\frametitle{My title}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north] at ($(current page.north)+(0,-0.1\textheight)$) {N};
\node[anchor=west] at (current page.west) {W};
\node[anchor=east] at (current page.east) {E};
\node[anchor=south] at (current page.south) {S};
\node at (current page.center) {C};
\end{tikzpicture}
\end{frame}
\end{document}


• Is there other metrics than textheight to manage the different areas of the frame (header, footer, between) for tikz drawing?
• Which one in particular permits to work between from 0.0 to 1.0?

With tikzmark one can automatically get the position where the frametitle ends:

\documentclass[beamer]{beamerswitch}
\usetheme{metropolis}
\usepackage{tikz}
\usetikzlibrary{calc}

\usetikzlibrary{tikzmark}

\begin{document}
\begin{frame}\frametitle{My title}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\node at (pic cs:endframetitle) {N};
\node[anchor=west] at (current page.west) {W};
\node[anchor=east] at (current page.east) {E};
\node[anchor=south] at (current page.south) {S};
\node at (current page.center) {C};
\end{tikzpicture}
\end{frame}

\end{document}


edit:

\documentclass[beamer]{beamerswitch}
\usetheme{metropolis}
\usepackage{tikz}
\usetikzlibrary{calc}

\usetikzlibrary{tikzmark}

\begin{document}
\begin{frame}\frametitle{My title}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\node  at (pic cs:endframetitle) {N};
\node[anchor=west] at (current page.west) {W};
\node[anchor=east] at (current page.east) {E};
\node[anchor=south] at (current page.south) {S};
\node at (current page.center) {C};
\fill[red] let \p1 = (pic cs:endframetitle),
\p2 = (current page.center) in
(\x2,\y1) circle (0.1);
\end{tikzpicture}
\end{frame}

\end{document}

• 'N' is actually at the right vertical position with your proposition, but not centered for the horizontal position. Could you improve it please? – lalebarde May 17 at 21:52
• I have added \fill (0cm,0cm) circle (5pt); which shows that your solution writes 'N' on the y axis as expected. The remaining problem is how to center the origin of the xy coordinate system – lalebarde May 18 at 6:06
• I don't find the pic coordinate system in the pgfmanual.pdf. Where could I find a description for it please? Sorry, § 14.19 – lalebarde May 18 at 6:13
• @lalebarde the pic coordinate syntax comes from the tikzmark library. This has an own manual and is not include in the pgfmanual. To find the manual, open a command line and type texdoc tikzmark – user189125 May 18 at 13:18
• @lalebarde To get the coordinate in the center, use the calc library. This library allows to mix the x and y coordinates of different coordinated. In This case use the y coordinate from pic cs:endframetitle and the x coordinate from current page.center – user189125 May 18 at 13:19