![Tikzposter 图像对齐](https://linux22.com/image/381177/Tikzposter%20%E5%9B%BE%E5%83%8F%E5%AF%B9%E9%BD%90.png)
我正在尝试写一张海报,我几乎完成了,但我无法完成最后一部分,我必须对齐图像。我正在使用\tikzpicture
alongwith\minipage
处理多张图片,但没有得到想要的结果。我的最小工作示例:
\documentclass[25pt, a0paper, portrait]{tikzposter}
\usepackage[utf8]{inputenc}
\title{Tikz Poster Example}
\author{Duck}
\date{\today}
\institute{Duck Institute}
\usepackage{blindtext}
\usepackage{comment}
\usetheme{Board}
\begin{document}
\maketitle
\block{Abstract}
{
Hello this is my poster for Duck Institute of technology.
}
\begin{columns}
\column{0.5}
\block{Intro}{Didn't do anything special}
\column{0.5}
\block{Observation}
{Hardly there were any observations}
\end{columns}
\begin{columns}
\column{0.5}
\block{Results 1}
{
Still on long waiting queue
}
\column{0.5}
\block{Results 2}{God bless me}
\end{columns}
\block{Summary}
{
\begin{center}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure1]
\includegraphics[height = 10cm]{example-image-a}
\end{tikzfigure}%
\end{minipage}\hfill
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-b}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-c}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-a}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-b}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-a}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-b}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-a}
\end{tikzfigure}%
\end{minipage}
\begin{minipage}{0.45\linewidth}
\centering
\begin{tikzfigure}[Caption of figure2]
\includegraphics[height = 10cm]{example-image-b}
\end{tikzfigure}%
\end{minipage}
\end{center}
}
\end{document}
我没有得到想要的Summary
部分结果。这就是我应该得到的,带有指向不同图片的箭头。但我不知道如何实现它。我还必须有参考部分。
答案1
我的相当天真的尝试:
\documentclass[25pt,a0paper,portrait]{tikzposter}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{microtype}
\newsavebox{\ReferencesBox}
\title{Ti\emph{k}Z Poster Example}
\author{Duck}
\date{\today}
\institute{Duck Institute}
\makeatletter
\newenvironment{mytikzfigure}[1][]{
\def \rememberparameter{#1}
\vspace{10pt}
\refstepcounter{figurecounter}
\begin{minipage}{.4\linewidth}
}{
\centering
\ifx\rememberparameter\@empty
\else %nothing
\\[10pt]
{\small Fig.~\thefigurecounter: \rememberparameter}
\fi
\end{minipage}
}
\makeatother
\usetheme{Board}
\begin{document}
\maketitle
\block{Summary}{%
\begin{minipage}{0.33\linewidth}
\hfill
\begin{mytikzfigure}[Caption of Figure~A1]
\includegraphics[width=\linewidth]{example-image-a}
\end{mytikzfigure}%
\enskip
\begin{mytikzfigure}[Caption of Figure~B1]
\includegraphics[width=\linewidth]{example-image-b}
\end{mytikzfigure}%
\hfill\strut
\end{minipage}%
\hfill
\begin{minipage}{0.33\linewidth}
\hfill
\begin{mytikzfigure}[Caption of Figure~A2]
\includegraphics[width=\linewidth]{example-image-a}
\end{mytikzfigure}%
\enskip
\begin{mytikzfigure}[Caption of Figure~B2]
\includegraphics[width=\linewidth]{example-image-b}
\end{mytikzfigure}%
\hfill\strut
\end{minipage}
\begin{minipage}{\linewidth}
\hspace*{.295\linewidth}%
\begin{tikzpicture}
\draw[fill=red!20]
(0,6) -- (0,10)
arc[radius=10, start angle=90, delta angle=90] --
(-10,0) -- (-6,0)
arc[radius=6, start angle=180, delta angle=-90] -- cycle;
\draw[fill=green!20]
(6,0) -- (10,0)
arc[radius=10, start angle=0, delta angle=90] --
(0,10) -- (0,6)
arc[radius=6, start angle=90, delta angle=-90] -- cycle;
\draw[fill=blue!20]
(-6,0) -- (-10,0)
arc[radius=10, start angle=180, delta angle=90] --
(0,-10) -- (0,-6)
arc[radius=6, start angle=270, delta angle=-90] -- cycle;
\draw[fill=yellow!20]
(0,-6) -- (0,-10)
arc[radius=10, start angle=270, delta angle=90] --
(10,0) -- (6,0)
arc[radius=6, start angle=0, delta angle=-90] -- cycle;
\draw[fill=gray!20]
(-{10*cos(atan(1.5/10))},1.5) -- ({10*cos(atan(1.5/10))},1.5)
arc[radius=10, start angle={atan(1.5/10)}, delta angle={-atan(1.5/10)}] --
({10*cos(atan(1.5/10))},-1.5) -- (-{10*cos(atan(1.5/10))},-1.5)
arc[radius=10, start angle={180+atan(1.5/10)}, delta angle={-atan(1.5/10)}] -- cycle;
\draw[->, line width=4pt]
({9*cos(120)},{9*sin(120)}) to[bend right=10] (-12,12);
\draw[->, line width=4pt]
({9*cos(60)},{9*sin(60)}) to[bend left=10] (12,12);
\draw[->, line width=4pt]
({9*cos(220)},{9*sin(220)}) to[bend right=10] (-16,-12);
\draw[->, line width=4pt]
(0,-0.6) to[bend left] (0,-14);
\end{tikzpicture}
\end{minipage}
\vspace*{2em}
\begin{minipage}[b]{0.33\linewidth}
\hfill
\begin{mytikzfigure}[Caption of Figure~A3]
\includegraphics[width=\linewidth]{example-image-a}
\end{mytikzfigure}%
\enskip
\begin{mytikzfigure}[Caption of Figure~B3]
\includegraphics[width=\linewidth]{example-image-b}
\end{mytikzfigure}%
\hfill\strut
\end{minipage}%
\begin{minipage}[b]{0.33\linewidth}
\hfill
\begin{mytikzfigure}[Caption of Figure~A4]
\includegraphics[width=\linewidth]{example-image-a}
\end{mytikzfigure}%
\enskip
\begin{mytikzfigure}[Caption of Figure~B4]
\includegraphics[width=\linewidth]{example-image-b}
\end{mytikzfigure}%
\hfill\strut
\end{minipage}%
\setbox\ReferencesBox=\hbox{%
\begin{minipage}[b]{0.33\linewidth}
\innerblock{References}{%
\blindtext[2]
}
\end{minipage}%
}%
\ht\ReferencesBox=0pt%
\usebox\ReferencesBox
}
\end{document}
这不是蒙娜丽莎,也许需要一些解释:
- 加载该
microtype
包是为了改善窄列的排版。 - 环境
tikzfigure
使用\begin{center}...\end{center}
来放置其内容。我修改了代码以创建mytikzfigure
使用 的环境\begin{minipage}{.4\linewidth}...\end{minipage}
。 - 中间的环是从头开始绘制的,仅使用
\draw
。 - 引用的内部块是使用创建的
\innerblock
。添加引用块比较棘手:- 首先,创建一个盒子:
\newsavebox{\ReferencesBox}
。 - 接下来,我将图形和参考资料对齐在底部的最后一行:
\begin{minipage}[b]...
。 - 然后,引用的内容被存储到
\ReferencesBox
没有正在打字。 - 我把高度设置
\ReferencesBox
为0pt
所以引用不会增加行高。 - 最后输入参考文献:
\usebox\ReferencesBox
。
- 首先,创建一个盒子: