我曾尝试添加:
\usepackage[left=2.5cm,top=3cm,right=2.5cm,bottom=2.5cm]{geometry}
但这会出现错误:
! LaTeX Error: Option clash for package geometry.
所以我猜我不能将该包与 baposter 一起使用...查看文档(http://www.brian-amberg.de/uni/poster/baposter/baposter_guide.pdf),我还希望线宽可以解决这个问题:
\begin{poster}{linewidth=0.8}
...但它似乎也没什么作用。
还有其他使用 baposter 设置边距的方法吗?
更新
根据要求,这是 MWE:
\documentclass[a0paper,portrait]{baposter}
\usepackage{lipsum}
%\geometry{left=2.5cm,top=3cm,right=2.5cm,bottom=2.5cm} %sets margins for the whole page
\begin{document}
\begin{poster}{
grid=true,
linewidth=0.8 %doesn't change anything?
}
{}
{Poster Title}
{Poster Authors}
{}
\headerbox{box1}{name=box1,column=0}{
\lipsum[1]
}
\headerbox{box2}{name=box2,column=0,below=box1}{
\lipsum[1]
}
\headerbox{box4}{name=box4,span=2,column=1,row=0}{
\lipsum[1]
}
\headerbox{box5}{name=box5,span=2,column=1,row=0,below=box4}{
\lipsum[3]
}
\end{poster}
\end{document}
答案1
该类baposter
对于制作基于网格的海报布局非常有用。它对于页面大小(最大 A0)非常灵活,内容最多为 6 列。baposter
不在 CTAN 上,但可从此处获取:http://www.brian-amberg.de/uni/poster/。提供了简短但足够的 5 页手册,并且发布了几个示例以指导用户。
设置页边距是baposter
包的一个类选项(参见手册第 3 页)。因此,使用语法是\documentclass[margin=<length>]{baposter}
,其中<length>=
传递给geometry
是 25mm。默认页边距为 15mm。
以下两个示例说明了 margin 选项的用法。左侧的示例将边距设置为 25mm,而右侧的示例将其设置为 125mm。结果输出显示在使用包生成的背景网格上eso-pic
。showframebaposter's
选项(可能也传递给 geometry)用于显示海报边框与背景网格的对比。右侧海报的边距(125mm)明显大于左侧海报的边距(25mm)。我无法解释为什么生成的测量值与eso-pic
设置的边距不一致baposter
,因此这只能说明边距确实是可以使用margin=<length>
class 选项设置的变量。
这是用于制作边距为 125 毫米的海报的代码。请注意,海报背景设置为无,以显示 生成的网格eso-pic
。可以通过注释掉eso-pic
、删除代码周围的逐字注释\background
并在海报选项中更改background=none
为 来恢复彩色背景。background=user
\documentclass[a0paper,portrait,showframe,margin=125mm]{baposter}
%a0 paper = 84.1 x 118.9 cm
%baposter is not on CTAN. Get it from here: http://www.brian-amberg.de/uni/poster/
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{helvet} %choose a sans serif font
\renewcommand{\familydefault}{\sfdefault} % replace the default font
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage{verbatim}
\usepackage[pscoord=true,grid,gridunit=mm,gridBG,gridcolor=green!50, subgridcolor=gray!25]{eso-pic}
\begin{document}
\begin{comment} %to turn on the background change the background option to ``user'' and comment out begin{comment} end{comment}
\background{
\begin{tikzpicture}[remember picture,overlay]%
%the poster background color
\fill[fill=green!50] (current page.north west) rectangle (current page.south east);
%the header
\fill [fill=orange!50] (current page.north west) rectangle ([yshift=-\headerheight] current page.north east);
\end{tikzpicture}
}
\end{comment}
\begin{poster}{
%general options for the poster
grid=false,
columns=3,
colspacing=4.2mm,
headerheight=0.08\textheight,
background=none, %user or none or plain
eyecatcher=true,
%posterbox options
headerborder=closed,
borderColor=blue,
headershape=rectangle,
headershade=plain,
headerColorOne=blue,
% headerColortwo=yellow!42, %is used when the header background is shaded
textborder=rectangle,
boxshade=plain,
boxColorOne=white,
% boxColorTwo=cyan!42,%is used when the text background is shaded
headerFontColor=white,
headerfont=\Large\sf\bf,
linewidth=1pt
}
%Do not change the layout of the following items, although title and author can span multiple lines
%The logo on the left = eyecatcher
{
\includegraphics[height=0.75\headerheight]{example-image-a}
}
%the poster title
{Title}
% the author(s)
{Author}
%The logo on the right
{
\includegraphics[height=0.75\headerheight]{example-image-b}
}
%Poster content
\begin{posterbox}[name=box1,span=1,column=0,row=0]{Box1}
\lipsum[1]
\end{posterbox}
\begin{posterbox}[name=box2,span=1,column=0,below=box1]{Box2}
\lipsum[1]
\end{posterbox}
\begin{posterbox}[name=box3,span=2,column=1,bottomaligned=box2]{Box3}
\lipsum[1]
\end{posterbox}
\end{poster}
\end{document}