
我的問題與 Tikzposter 和列內的區塊有關。
開始情況:
該程式碼描述了 Tikzposter 中的三列,每列一個區塊。第二列區塊沒有文字。
期望的情況:
我的目標是讓中間(第二)列的區塊充當水平“箭頭”或從三列中的第一個區塊到三列中的第三個區塊的視覺路線。因此海報的讀者會遵循海報上預定的資訊路線,以使我的訊息盡可能清晰。
我想怎麼做:
我想「擠壓」第二個區塊的標題和正文的高度,並將其放置在第一和第三列區塊的水平中心線上。 (海報中的垂直“箭頭”是我透過更改“bodywidthscale”來管理的)
問題:
如何將塊的形狀更改為水平平坦的矩形並移動塊的 y 位置,以便它與三部分列的第一個和第三個塊的水平中心線對齊?
最好的,
Tikzposter 用戶
代碼:
\documentclass{tikzposter}
\begin{document}
\maketitle
\begin{columns}
\column{0.5}
\block{First read this}{
\begin{itemize}
\item A message
\item Follow the horizontal arrow
\end{itemize}
}
\column{0.2}
\block{}{\vspace{3.5ex}}
\column{0.3}
\block{Than read this}{
\begin{itemize}
\item Second message.
\item Follow the next 'arrow'.
\end{itemize}
}
\end{columns}
\end{document}
答案1
\defineblockstyle
您可以按照 tikzposter 手冊第 5.5 節所述使用:
\documentclass{tikzposter}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\defineblockstyle{sampleblockstyle}{}{
\draw[->, line width=2cm, -{stealth[length=10mm]},color=framecolor, fill=backgroundcolor] (blockbody.west) -- (blockbody.east);
}
\maketitle
\begin{columns}
\column{0.5}
\block{First read this}{
\begin{itemize}
\item A message
\item Follow the horizontal arrow
\end{itemize}
}
\column{0.2}
\useblockstyle{sampleblockstyle}
\block[bodyverticalshift=5cm]{}{\vspace{3.5ex}}
\useblockstyle{Default}
\column{0.3}
\block{Than read this}{
\begin{itemize}
\item Second message.
\item Follow the next 'arrow'.
\end{itemize}
}
\end{columns}
\end{document}
您可以定義一個區塊,它基本上繪製一個箭頭。可以透過更改line width
和 來進行調整arrow tip
(請參閱 pgf 手冊的第 16.3 節)。要使用您定義的箭頭塊,只需將塊樣式變更為\useblockstyle{sampleblockstyle}
。不要忘記隨後將其更改回您想要的佈局,即使用\useblockstyle{Default}
.可以透過將bodyverticalshift
選項傳遞給箭頭塊來完成箭頭的垂直對齊。