在用设计海报时,tikzposter
我遇到了一个小问题。通常可以使用wrapfig
包让文本环绕图形,但在 tikzposter 中的框中,这似乎完全失败,如下面的 MWE 所示。
有没有办法在不使用 wrapfig 的情况下环绕图形以使其按预期工作?
\documentclass[25pt, a4paper, portrait, margin=0mm, innermargin=15mm]{tikzposter}
\title{Title}
\author{Name}
\institute{University}
\usetheme{Default}
\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
\maketitle
\begin{columns}
\column{.5}
\block[roundedcorners=40]{First block}{
Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure.
\begin{wrapfigure}[5]{r}{0.5\textwidth}
\begin{tikzfigure}[Caption]
\includegraphics{example-image}
\end{tikzfigure}
\end{wrapfigure}
Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure.
}
\end{columns}
\end{document}
答案1
在宽度受限的地方工作时,您需要使用\linewidth
(或 \columnwidth
在其他情况下)来获取缩放的相关长度。此外,wrapfig
您提供的参数 5 是换行段落中要使用的行数。因此,其余部分会泄漏到下面的段落中。使用 11 之类的值就可以了。
\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm]{tikzposter}
\title{Title}
\author{Name}
\institute{University}
\usetheme{Default}
\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}
%\usepackage{graphicx}%<= Tikz loads this so no need.
\usepackage{wrapfig,kantlipsum}
\begin{document}
\maketitle
\begin{columns}
\column{.5}
\block[roundedcorners=40]{First block}{
\kant[1-2]
\begin{wrapfigure}[12]{r}{0.5\linewidth}
\begin{tikzfigure}[Caption]
\includegraphics{example-image}
\end{tikzfigure}
\end{wrapfigure}
\kant[1]
}
\end{columns}
\end{document}