我可以使用 baposter 类来左对齐文本吗?

我可以使用 baposter 类来左对齐文本吗?

我正在使用 baposter 类制作海报,我希望框中的文本左对齐,并且不会自动连字符。可以吗?我打开了该类baposter,但我不知道如何编辑它。

答案1

\raggedright是的,你可以在盒子里面使用:

\documentclass[a2paper,portrait]{baposter}

\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
\usepackage{booktabs} % Horizontal rules in tables
\usepackage{relsize} % Used for making text smaller in some places

\graphicspath{{figures/}} % Directory in which figures are stored

\definecolor{bordercol}{RGB}{40,40,40} % Border color of content boxes
\definecolor{headercol1}{RGB}{186,215,230} % Background color for the header in the content boxes (left side)
\definecolor{headercol2}{RGB}{80,80,80} % Background color for the header in the content boxes (right side)
\definecolor{headerfontcol}{RGB}{0,0,0} % Text color for the header text in the content boxes
\definecolor{boxcolor}{RGB}{186,215,230} % Background color for the content in the content boxes

\begin{document}

\background{ % Set the background to an image (background.pdf)
\begin{tikzpicture}[remember picture,overlay]
\draw (current page.north west)+(-2em,2em) node[anchor=north west]
{\includegraphics[height=1.1\textheight]{background}};
\end{tikzpicture}
}

\begin{poster}{
grid=false,
borderColor=bordercol, % Border color of content boxes
headerColorOne=headercol1, % Background color for the header in the content boxes (left side)
headerColorTwo=headercol2, % Background color for the header in the content boxes (right side)
headerFontColor=headerfontcol, % Text color for the header text in the content boxes
boxColorOne=boxcolor, % Background color for the content in the content boxes
headershape=roundedright, % Specify the rounded corner in the content box headers
headerfont=\Large\sf\bf, % Font modifiers for the text in the content box headers
textborder=rectangle,
background=user,
headerborder=open, % Change to closed for a line under the content box headers
boxshade=plain
}
{}
%
%----------------------------------------------------------------------------------------
%   TITLE AND AUTHOR NAME
%----------------------------------------------------------------------------------------
%
{\sf\bf Research Title} % Poster title
{\vspace{1em} John Doe\\ % Author names
{\smaller [email protected]}} % Author email addresses
{} % University/lab logo

%----------------------------------------------------------------------------------------
%   INTRODUCTION
%----------------------------------------------------------------------------------------

\headerbox{Introduction}{name=introduction,column=0,row=0}{
\raggedright 
Donec feugiat sagittis \textbf{neque}, nec ultrices risus vestibulum at. Suspendisse enim purus, tempus sed malesuada et, aliquam non nulla. Cras vel tortor justo. Vestibulum viverra purus id risus lacinia quis malesuada lorem mattis. \textbf{Nullam ornare egestas} metus vel posuere. In hac habitasse platea dictumst. In malesuada aliquet nulla, quis iaculis mauris accumsan ac.

\raggedright 
Maecenas placerat hendrerit mollis. Nunc fringilla sollicitudin pulvinar. Vestibulum a odio arcu. \textit{Ut tristique enim ut odio pulvinar non dignissim risus dignissim.} Nullam nibh augue.

}

\end{poster}

\end{document}

(抱歉,没有图片,但是我的鼠标右键功能坏了)。

相关内容