有没有办法使用、、 、 ... 参数在特定坐标处anchor
完成?我配置了一个网格,在by选项中激活时显示背景坐标。然后我在它上面(在本例中为)绘制了一个 tikzpicture,这是我的 beamer 幻灯片的左上角。现在我想知道如何将完整的 tikzpicture 垂直对齐到 0,0 处的锚点或 7,0 处的锚点。我通常用来在我的幻灯片上独立绘制 tikzpictures。tikzpicture
north
east
center
frame
g
(0,3.5)
west
center
overlay
代码:
\documentclass[8pt,aspectratio=169]{beamer}
\usepackage[british]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,shapes.geometric,arrows,fit,positioning,arrows.meta,arrows.spaced,angles,quotes,decorations.pathmorphing,decorations.shapes,decorations.text,patterns,overlay-beamer-styles,external,calc,math,backgrounds,automata}
\tikzstyle{every picture}+=[overlay,remember picture,shift={([xshift=1cm,yshift=-0.41cm]current page.west)}]
\defbeamertemplate{background}{mydefault}{%
%
}
\defbeamertemplate{background}{g}{%
\begin{tikzpicture}
\foreach \y in {3.5,3,...,-3.5}
\draw[opacity=0.3,line width=0.1] (0,\y) -- (14,\y);
\foreach \x in {0,0.5,...,14}
\draw[opacity=0.3,line width=0.1] (\x,3.5) -- (\x,-3.5);
\begin{scope}[opacity=0.4]
\foreach \x in {0,1,...,14}
\foreach \y in {3.5,3,2.5,...,-3.5}
\node[font=\footnotesize] at (\x,\y) {\x, \y};
\end{scope}
\end{tikzpicture}%
}
\BeforeBeginEnvironment{frame}{%
\setbeamertemplate{background}[mydefault]%
}
\makeatletter
\define@key{beamerframe}{g}[true]{%
\setbeamertemplate{background}[g]%
}
\makeatother
\begin{document}
\begin{frame}[g]
\frametitle{Agenda}
\begin{tikzpicture}[Numbox/.style={rectangle,draw=magenta,fill=magenta,text=white,font=\bfseries,text width=12pt, minimum height=28pt,anchor=north west,align=center},
Textbox/.style={rectangle,draw=magenta,text width=7cm, minimum height=28pt,anchor=north west,align=left,font=\bfseries,inner xsep=9pt}
]
\tikzmath{
\numskip=9pt;
\textnumskip=3pt;
}
]
\node[Numbox] (I) at (0,3.5) {I.};
\node[Textbox] (IT) at ([xshift=\textnumskip]I.north east) {Problemstellung und Forschungsfragen};
\node[Numbox] (II) at ([yshift=-\numskip]I.south west) {II.};
\node[Textbox] (IIT) at ([xshift=\textnumskip]II.north east) {Problemstellung und Forschungsfragen};
\node[Numbox] (III) at ([yshift=-\numskip]II.south west) {III.};
\node[Textbox] (IIIT) at ([xshift=\textnumskip]III.north east) {Problemstellung und Forschungsfragen};
\node[Numbox] (IV) at ([yshift=-\numskip]III.south west) {IV.};
\node[Textbox] (IVT) at ([xshift=\textnumskip]IV.north east) {Problemstellung und Forschungsfragen};
\node[Numbox] (V) at ([yshift=-\numskip]IV.south west) {V.};
\node[Textbox] (VT) at ([xshift=\textnumskip]V.north east) {Problemstellung und Forschungsfragen};
\end{tikzpicture}
\end{frame}
\end{document}