我正在尝试使用 baposter 模板构建海报,它工作正常,直到我添加了一些内联数学方程式和标签,然后我开始收到此错误,此外还有:“!\headerbox 的参数有一个多余的 }。”!段落在 \headerbox 完成之前结束。”,“!LaTeX 错误:这里没有可以结束的行。”对于我的“抽象”标题框。
任何关于如何解决这个问题的建议都将不胜感激,因为我在网上找不到任何东西。我不擅长使用乳胶,这是从模板中复制而来的,所以我不确定作者和标题之前的整个序言是否有必要。
\documentclass[a1paper,portrait,fontscale=0.45,dvipsnames]{baposter}
%preamble
\usepackage{wrapfig}
\usepackage{lmodern}
\usepackage[utf8]{inputenc} %unicode support
\usepackage[T1]{fontenc}
%end preamble
\begin{document}
\begin{poster}
{
grid=false,
headerborder=open, % Adds a border around the header of content boxes
colspacing=1em, % Column spacing
bgColorOne=White, % Background color for the gradient on the left side of the poster
bgColorTwo=White, % Background color for the gradient on the right side of the poster
borderColor=BlueViolet, % Border color
headerColorOne=Periwinkle, % Background color for the header in the content boxes (left side)
headerColorTwo=Periwinkle, % Background color for the header in the content boxes (right side)
headerFontColor=White, % Text color for the header text in the content boxes
boxColorOne=White, % Background color of the content boxes
textborder=rounded, %rectangle, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=false, % Set to false for ignoring the left logo in the title and move the title left
headerheight=0.11\textheight, % Height of the header
headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headershade=plain,
headerfont=\Large\textsf, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
}
%
%----------------------------------------------------------------------------------------
% TITLE AND AUTHOR NAME
%----------------------------------------------------------------------------------------
%
{\vspace{0.01em}
\textsf
{Modelling Oncolytic Virotherapies: the effect of different non-linear interactions.
}
}
{\sf\vspace{0.2em}\\
my name
\hspace{0.2em}
\small{ email
\hspace{17em}{more info}}
\vspace{-2em}
}
\headerbox{1. Abstract}{name=abstract,column=0,row=0,span=3}{
Paragraph 1
Paragraph 2
Paragraph 3 %I've removed the text blocks here so that its not a wall of text
%but the spacing is the same
} %this is the first line that throws up an error, but not the one from title
\headerbox{\large{2. Biological background}}{name=bio,column=0,below=abstract,span=1}{
\includegraphics[width=\linewidth]{virotherapy.pdf}
{\tiny Oncolytic Virotherapy Also Boosts Systemic Immunity, The American Society for Gene and Cell Therapy \cite{russell_peng_2017}}
line of text about onco viruses
\vspace{0.5em}
Talimogene laherparepvec: TVEC, blah blah:
\begin{itemize}
\item Modified type 1 HSV
\item Preferentially infects tumour cells
\item No longer causes cold sores
\end{itemize}
}%the main error here
%I've removed the rest of the poster here
\headerbox{4. Aims}{name=aims,column=1,span=2,below=abstract}{
1. aim 1
\vspace{0.6em}
2. aim 2
\vspace{0.6em}
3. aim 3
} %the main error here
%removed rest of content here too
\end{poster}
\end{document}
在无法解决问题后,我删除了添加到 headerboxes 的标签,但这没有帮助。以防万一这与此有关,我在错误出现之前还添加了内联数学和 flushleft 环境,如下所示:
\headerbox{5. Results}{name=results,span=1,column=2,below=aims}{
\underline{Steady States}
\vspace{0.3em}
Tumour free - This steady state was unstable, ... 1 line of text
\vspace{0.3em}
Immune free - This steady state was unstable, ... 1 line text
Virus free - Stable steady states ... 1 line text
\includegraphics[width=6cm]{VF1}
\begin{flushleft}\label{eqns:steadystates}
$rd_{t}h_{e}(x^{*}_{u})^{3}$\\
$ + (rh_{e}(d_{e}+d_{t}h_{v}-d_{t}k) + rp_{e}x^{*}_{m})(x^{*}_{u})^{2}$\\
$+ (rh_{e}(d_{e}h_{v}-d_{t}h{v}k-d_{e}k) + kp_{e}(d_{u}-r)x^{*}_{m})x^{*}_{u}$\\
$- rkh_{e}d_{e}h_{v} = 0$
$x^{*}_{e} = \frac{p_{e}x^{*}_{m}\frac{x^{*}_{u}}{h_{v}+x^{*}_{u}}}{d_{e}+d_{t}x^{*}_{u}}$
\end{flushleft}
Tumour, virus, immune present - 1 line text
}
但是我在另一个 headerbox 中使用了相同的格式,所以不确定是否相关。抱歉发了这么长的帖子,只是想确保所有信息都在那里。谢谢!
答案1
baposter
期望将徽标的定义应用于海报标题的左侧和右侧,即使eyecatcher
传递给poster
环境的键是false
。在指定海报标题之前和指定作者姓名之后添加{}
或{\includegraphics[width=2cm]{example-image-a}}
,即可解决问题。作者姓名的规范也存在错误,可以通过替换\sf\vspace{0.2em}\\
来纠正\sffamily\vspace{0.2em}
。there is no line here to end
如果您确实想将徽标添加到海报,这可以避免错误。最后,dvipsnames
无法传递给baposter
类。如果要使用这些名称,请\PassOptionsToPackage{dvipsnames}{xcolor}
在声明 之前使用\documentclass
。
您可以考虑切换至使用tcolorbox
带有海报库的包,该包具有的所有功能baposter
以及更多功能,并且受到包作者的支持。
\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[a1paper,portrait,fontscale=0.45]{baposter}
%preamble
\usepackage{wrapfig}
\usepackage{lmodern}
\usepackage{mwe} % <- added example-image-a
\usepackage[T1]{fontenc}
%end preamble
\begin{document}
\begin{poster}
{
grid=false,
headerborder=open, % Adds a border around the header of content boxes
colspacing=1em, % Column spacing
bgColorOne=White, % Background color for the gradient on the left side of the poster
bgColorTwo=White, % Background color for the gradient on the right side of the poster
borderColor=BlueViolet, % Border color
headerColorOne=Periwinkle, % Background color for the header in the content boxes (left side)
headerColorTwo=Periwinkle, % Background color for the header in the content boxes (right side)
headerFontColor=White, % Text color for the header text in the content boxes
boxColorOne=White, % Background color of the content boxes
textborder=rounded, %rectangle, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=true, % Set to false for ignoring the left logo in the title and move the title left
headerheight=0.11\textheight, % Height of the header
headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headershade=plain,
headerfont=\Large\textsf, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
}
%
%----------------------------------------------------------------------------------------
% TITLE AND AUTHOR NAME
%----------------------------------------------------------------------------------------
%
{} %%% <- left logo
{\vspace{0.01em}
\textsf
{Modelling Oncolytic Virotherapies: the effect of different non-linear interactions.
}
}
{\sffamily\vspace{0.2em}%\\
my name
\hspace{0.2em}
\small{ email
\hspace{17em}{more info}
}
\vspace{-2em}
}
{\includegraphics[width=2cm]{example-image-a}} %%% <- Right logo
\headerbox{1. Abstract}{name=abstract,column=0,row=0,span=3}{
Paragraph 1
Paragraph 2
Paragraph 3 %I've removed the text blocks here so that its not a wall of text
%but the spacing is the same
} %this is the first line that throws up an error, but not the one from title
\headerbox{\large{2. Biological background}}{name=bio,column=0,below=abstract,span=1}{
\includegraphics[width=\linewidth]{example-image-b}
{\tiny Oncolytic Virotherapy Also Boosts Systemic Immunity, The American Society for Gene and Cell Therapy \cite{russell_peng_2017}}
line of text about onco viruses
\vspace{0.5em}
Talimogene laherparepvec: TVEC, blah blah:
\begin{itemize}
\item Modified type 1 HSV
\item Preferentially infects tumour cells
\item No longer causes cold sores
\end{itemize}
}%the main error here
%I've removed the rest of the poster here
\headerbox{4. Aims}{name=aims,column=1,span=2,below=abstract}{
1. aim 1
\vspace{0.6em}
2. aim 2
\vspace{0.6em}
3. aim 3
} %the main error here
%removed rest of content here too
\end{poster}
\end{document}