此代码块输出正确:
{\includegraphics[height=4em]{logo.png}}
{\bf\textsc{Title}\vspace{0.5em}}
{\textsc{\{ \ names \} \hspace{12pt} }}
{\includegraphics[height=4em]{logo.png}}
但是第 4 行出现错误,说它无法识别 4em,并且插入了“pt”。如何修复这个问题?
以下是我的其余代码,包括我使用的软件包:
\documentclass[landscape,a0paper,fontscale=0.285]{baposter} % Adjust the font scale/size here
\usepackage{graphicx} % Required for including images
\graphicspath{{figures/}} % Directory in which figures are stored
\usepackage{amsmath} % For typesetting math
\usepackage{amssymb} % Adds new symbols to be used in math mode
\usepackage{booktabs} % Top and bottom rules for tables
\usepackage{enumitem} % Used to reduce itemize/enumerate spacing
\usepackage{palatino} % Use the Palatino font
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
\usepackage{multicol} % Required for multiple columns
\setlength{\columnsep}{1.5em} % Slightly increase the space between columns
\setlength{\columnseprule}{0mm} % No horizontal rule between columns
\usepackage{tikz} % Required for flow chart
\usetikzlibrary{shapes,arrows} % Tikz libraries required for the flow chart in the template
\newcommand{\compresslist}{ % Define a command to reduce spacing within itemize/enumerate environments, this is used right after \begin{itemize} or \begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}
\definecolor{lightblue}{rgb}{0.145,0.6666,1} % Defines the color used for content box headers
\begin{document}
\begin{poster}
{
headerborder=closed, % 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=lightblue, % Border color
headerColorOne=black, % Background color for the header in the content boxes (left side)
headerColorTwo=lightblue, % 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=roundedleft, % 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.1\textheight, % Height of the header
headershape=roundedright, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headerfont=\Large\bf\textsc, % 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
}
{\includegraphics[height=4em]{example-image}}
{\bf\textsc{Title}\vspace{0.5em}}
{\textsc{\ Names \ \hspace{12pt} }}
{\includegraphics[height=4em]{example-image}}
\headerbox{Introduction}{name=introduction,column=0, row=0}{
Filler text.
}
\headerbox{Models}{name=models,column=2,row=0, bottomaligned=bottom}{
More filler text.
}
\end{poster}
\end{document}
答案1
在白色背景上工作时要小心白色,因为并不总是容易看到东西在哪里,所以我设置了 headerFontColor=red 以便在工作时看到它们,从而忽略我的红色,我已将你的重置为白色。
@PhelypeOleinik 对我的改动做了更好的解释,所以我再次修改了我的措辞
我收到一条错误消息 pgf 错误:没有已知的名为 bottomse 的形状。
它与第二列底部定义有关,因此用 Phelype 的话来说“另一个错误是 bottomaligned 的值应该是另一个框的名称,例如 bottomaligned=introduction”
然而我只是删除了它,所以我的版本就完成了。
笔记我唯一真正的改变是加强标题定义,以便顺序中没有浮动的空格。
正如 Phelype 解释的那样,您发布的文档由于有两行空白而无法编译。
附言有一个残留警告,Snakes
您通常可以忽略它。但是,要检查您是否会受到影响或认为您需要对 baposter 进行更改,请参阅
baposter.cls - \usetikzlibrary{snakes} 的问题
\documentclass[landscape,a0paper,fontscale=0.285]{baposter} % Adjust the font scale/size here
\usepackage{graphicx} % Required for including images
\graphicspath{{figures/}} % Directory in which figures are stored
\usepackage{amsmath} % For typesetting math
\usepackage{amssymb} % Adds new symbols to be used in math mode
\usepackage{booktabs} % Top and bottom rules for tables
\usepackage{enumitem} % Used to reduce itemize/enumerate spacing
\usepackage{palatino} % Use the Palatino font
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
\usepackage{multicol} % Required for multiple columns
\setlength{\columnsep}{1.5em} % Slightly increase the space between columns
\setlength{\columnseprule}{0mm} % No horizontal rule between columns
\usepackage{tikz} % Required for flow chart
\usetikzlibrary{shapes,arrows} % Tikz libraries required for the flow chart in the template
\newcommand{\compresslist}{ % Define a command to reduce spacing within itemize/enumerate environments, this is used right after \begin{itemize} or \begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}
\definecolor{lightblue}{rgb}{0.145,0.6666,1} % Defines the color used for content box headers
\begin{document}
\begin{poster}
{
headerborder=closed, % 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=lightblue, % Border color
headerColorOne=black, % Background color for the header in the content boxes (left side)
headerColorTwo=lightblue, % 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=roundedleft, % 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.1\textheight, % Height of the header
headershape=roundedright, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headerfont=\Large\bf\textsc, % 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
} % Keep the following header lines close without blank space
{\includegraphics[height=4em]{example-image}} % Left logo
{\bf\textsc{Title}\vspace{0.5em}} % Top Title line
{\textsc{\ Names \ \hspace{12pt}}} % Lower Title Line
{\includegraphics[height=4em]{example-image}} % Right logo
\headerbox{Introduction}{name=introduction,column=0, row=0}{
Filler text.
}
\headerbox{Models}{name=models,column=2,row=0}{
More filler text.
}
\end{poster}
\end{document}