我正在尝试将 tikzposter 块拆分到不同的列中。列环境可用于拆分海报并在其中插入块。但是列环境在块内不起作用。
以下是 MWE:
\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}
\usepackage{xcolor}
\usepackage{filecontents}% http://ctan.org/pkg/filecontents
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{tikz}
\begin{filecontents*}{myDummyPictureCode.tex}
\begin{tikzfigure}[Some nice caption for the figure]
\centering
\begin{tikzpicture}
\draw [color=red] (0,0) rectangle (20,10) node [midway] {\huge myFigure};
\end{tikzpicture}
\end{tikzfigure}
\end{filecontents*}
\title{Title}
\author{Name}
\usetheme{Autumn}\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}
\begin{document}\maketitle
\begin{columns}
\column{0.7} \block{FigureOutside Block}{
\lipsum[1]
}
\column{0.3} \block{}{
\input{./myDummyPictureCode.tex}
}
\end{columns}
% Text and figure Inside the Block
\block{Text and figure Block}{
\begin{columns}
\column{0.7} \lipsum[1]
\column{0.3} \input{./myDummyPictureCode.tex}
\end{columns}
}
\end{document}
有什么方法可以达到预期的结果吗?
答案1
您始终可以使用minipage
:
\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}
\usepackage{xcolor}
\usepackage{filecontents}% http://ctan.org/pkg/filecontents
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{tikz}
\usepackage{adjustbox}
\begin{filecontents*}{myDummyPictureCode.tex}
\begin{tikzfigure}[Some nice caption for the figure]
\centering
\begin{tikzpicture}
\draw [color=red] (0,0) rectangle (20,10) node [midway] {\huge myFigure};
\end{tikzpicture}
\end{tikzfigure}
\end{filecontents*}
\title{Title}
\author{Name}
\usetheme{Autumn}\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}
\begin{document}
\maketitle
\begin{columns}
\column{0.7} \block{FigureOutside Block}{
\lipsum[1]
}
\column{0.3} \block{}{
\input{./myDummyPictureCode.tex}
}
\end{columns}
% Text and figure Inside the Block
\block{Text and figure Block}{
\begin{minipage}[t]{0.7\linewidth}
\lipsum[1]
\end{minipage}%
\begin{adjustbox}{valign=t}
\begin{minipage}[t]{0.3\linewidth}
\input{./myDummyPictureCode.tex}
\end{minipage}
\end{adjustbox}
}
\end{document}
答案2
为了完整性,在某些情况下使用\usepackage{multicol}
可能会有用。
\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}
\usepackage{xcolor}
\usepackage{filecontents}% http://ctan.org/pkg/filecontents
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{tikz}
\usepackage{multicol}
\usepackage{adjustbox}
\setlength{\columnsep}{2cm}
\begin{filecontents*}{myDummyPictureCode.tex}
\begin{tikzfigure}[Some nice caption for the figure]
\centering
\begin{tikzpicture}
\draw [color=red] (0,0) rectangle (20,10) node [midway] {\huge myFigure};
\end{tikzpicture}
\end{tikzfigure}
\end{filecontents*}
\title{Title}
\author{Name}
\usetheme{Autumn}\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}
\begin{document}\maketitle
\begin{columns}
\column{0.7} \block{FigureOutside Block}{
\lipsum[1]
}
\column{0.3} \block{}{
\input{./myDummyPictureCode.tex}
}
\end{columns}
% Text and figure Inside the Block
\block{Text and figure Block using COLUMNS}{
\begin{columns}
\column{0.7} \lipsum[1]
\column{0.3} \input{./myDummyPictureCode.tex}
\end{columns}
}
% Text and figure Inside the Block using minipage
\block{Text and figure Block using MINIPAGE}{
\fbox{
\begin{minipage}[t]{0.7\linewidth}
\lipsum[1]
\end{minipage}%
}
%
\fbox{
\begin{adjustbox}{valign=t}
\fbox{
\begin{minipage}[t]{0.3\linewidth}
\input{./myDummyPictureCode.tex}
\end{minipage}
}
\end{adjustbox}
}
}
% playing with multicolumn text
\block{Text and figure Block using MULTICOLS}{
\begin{multicols*}{3}
\lipsum[1]
\input{./myDummyPictureCode.tex}
\end{multicols*}
}
% playing with multicolumn text
\block{Text and figure Block using MINIPAGE and MULTICOLS}{
\fbox{
\begin{minipage}[t]{0.7\linewidth}
\begin{multicols*}{2}
\lipsum[1]
\end{multicols*}
\end{minipage}%
}
%
\fbox{
\begin{adjustbox}{valign=t}
\fbox{
\begin{minipage}[t]{0.3\linewidth}
\input{./myDummyPictureCode.tex}
\end{minipage}
}
\end{adjustbox}
}
}
\end{document}