连续文本块之间的间距均匀(或等效)

连续文本块之间的间距均匀(或等效)

我正在用 LaTeX 写一张海报(\documentclass[a0,portrait]{a0poster})海报的每个块都是用文本块创建的,例如:

%MOTIVATION
\begin{textblock}{16.4}(.3,1.8)
  \begin{tikzpicture}
    \node [mybox] (box){%
      \begin{minipage}{0.45\textwidth}
         ---Some Text----
      \end{minipage}
    };
    \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north
west) {\Huge{Introduction}};
  \end{tikzpicture}
\end{textblock}

问题是它textblock采用绝对位置;因此,对于每个文本块,我必须手动放置新块;不可能以规则间距放置块(即保持\vgap两个块之间相同)。是否可以用类似

\textblock{size}{x-coor, "\vspace{1cm} from the bottom of the last block"}

我没有任何承诺textblock,因此,任何其他实现这一目标的方法都将受到赞赏。

我试图把所有的都去掉textblock,在\vspace每个底部textblock,像

\vspace{1cm}

%MOTIVATION
%\begin{textblock}{16.4}(.3,1.8)
  \begin{tikzpicture}
    \node [mybox] (box){%
      \begin{minipage}{0.45\textwidth}
         ---Some Text---
      \end{minipage}
    };
    \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north
west) {\Huge{Introduction}};
  \end{tikzpicture}
%\end{textblock}

问题是,由于我的海报有两列、自上而下的布局,我无法在第二列放置“块”。

答案1

您是否考虑使用stackengine包装来堆叠海报块?“短堆叠”机制允许堆叠的物品之间保持恒定的垂直间隙。然后,您无需担心绝对定位。

\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\newlength\hgap
\hgap=2ex
\setstackgap{S}{2ex}
\begin{document}
\def\blockA{\fbox{\parbox[b]{2in}{Introduction\\\Large This is my text block}}}
\def\blockB{\rule{1.8in}{1.8in}}
\def\blockC{\fbox{\parbox[b]{2in}{Setup\\\Large This is my text block}}}
\def\blockD{\fbox{\parbox[b]{2in}{Results\\\Large This is my text block
  in which I share my results}}}
\def\blockE{\rule{.84in}{.84in}\hskip\hgap\rule{.84in}{.84in}}
\def\blockF{\fbox{\parbox[b]{2in}{Conclusions\\\Large This is my text block
  in which I share my conclusions}\strut}}

\centering
\Huge Framistats of the 20th Century\\
\footnotesize Prof. Z. Courantloop\\
\Shortstack{\blockA\\ \blockB\\ \blockC}
\hskip \hgap
\Shortstack{\blockD \\ \\ \blockE \\ \\ \blockF}

\end{document}

在此处输入图片描述

相关内容