![编辑](https://linux22.com/image/318248/%E7%BC%96%E8%BE%91.png)
我对此模板有疑问https://www.overleaf.com/latex/templates/a-designer-cv/klstlngczkld#.VecxhPmqp-E
列表不允许有太多单词,否则会断行。我尝试了所有方法,但还是找不到问题所在。
谢谢
附言:我对乳胶不是很有经验。:)
答案1
我刚刚编译了模板,它看起来不错(除了我必须替换图像)。具体哪些列表值得关注?
multicols
末尾环境中的列表每项只能包含一个或两个单词:
如果需要更多,则可以使用更少的列:
\CVItem{Fewer columns}
\begin{multicols}{2}
\begin{compactitem}[\color{RoyalBlue}$\circ$]
\item Now more words will fit
\item because fewer columns
\item means each one is wider
\item and each line is longer.
\end{compactitem}
\end{multicols}
或者multicols
根本没有列表:
\CVItem{Single column}
\begin{compactitem}[\color{RoyalBlue}$\circ$]
\item Now even more words can be fitted per item within the list.
\end{compactitem}
在上下文中显示这一点(尽管在同一个文档中包含如此多的列表变体无疑是一个坏主意):
代码:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LaTeX Template: Designer's CV
%
% Source: http://www.howtotex.com
%
% Feel free to distribute this example, but please keep the referral
% to HowToTeX.com
%
% Date: March 2012
%
% Modified by Lim Lian Tze to support multiple pages using fix provided at
% http://www.howtotex.com/templates/creating-a-designers-cv-in-latex/
% Date: November 2014
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% How to use writeLaTeX:
%
% You edit the source code here on the left, and the preview on the
% right shows you the result within a few seconds.
%
% Bookmark this page and share the URL with your co-authors. They can
% edit at the same time!
%
% You can upload figures, bibliographies, custom classes and
% styles using the files menu.
%
% If you're new to LaTeX, the wikibook is a great place to start:
% http://en.wikibooks.org/wiki/LaTeX
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document properties and packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,12pt,final]{memoir}
% misc
\renewcommand{\familydefault}{bch} % font
\pagestyle{empty} % no pagenumbering
\setlength{\parindent}{0pt} % no paragraph indentation
% required packages (add your own)
\usepackage{flowfram} % column layout
\usepackage[top=1cm,left=1cm,right=1cm,bottom=1cm]{geometry}% margins
\usepackage{graphicx} % figures
\usepackage{url} % URLs
\usepackage[usenames,dvipsnames]{xcolor} % color
\usepackage{multicol} % columns env.
\setlength{\multicolsep}{0pt}
\usepackage{paralist} % compact lists
\usepackage{tikz}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create column layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define length commands
\setlength{\vcolumnsep}{\baselineskip}
\setlength{\columnsep}{\vcolumnsep}
% left frame
\newflowframe{0.2\textwidth}{\textheight}{0pt}{0pt}[left]
\newlength{\LeftMainSep}
\setlength{\LeftMainSep}{0.2\textwidth}
\addtolength{\LeftMainSep}{1\columnsep}
% small static frame for the vertical line
\newstaticframe{1.5pt}{\textheight}{\LeftMainSep}{0pt}
% content of the static frame
\begin{staticcontents}{1}
\hfill
\tikz{%
\draw[loosely dotted,color=RoyalBlue,line width=1.5pt,yshift=0]
(0,0) -- (0,\textheight);}%
\hfill\mbox{}
\end{staticcontents}
% right frame
\addtolength{\LeftMainSep}{1.5pt}
\addtolength{\LeftMainSep}{1\columnsep}
\newflowframe{0.7\textwidth}{\textheight}{\LeftMainSep}{0pt}[main01]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define macros (for convience)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Sep}{\vspace{1.5em}}
\newcommand{\SmallSep}{\vspace{0.5em}}
\newenvironment{AboutMe}
{\ignorespaces\textbf{\color{RoyalBlue} About me}}
{\Sep\ignorespacesafterend}
\newcommand{\CVSection}[1]
{\Large\textbf{#1}\par
\SmallSep\normalsize\normalfont}
\newcommand{\CVItem}[1]
{\textbf{\color{RoyalBlue} #1}}
\begin{document}
\begin{figure}
\hfill
\includegraphics[width=0.6\columnwidth]{cath}
\vspace{-7cm}
\end{figure}
\begin{flushright}\small
Johnathan S. Doe \\
\url{[email protected]} \\
\url{www.website.com} \\
(555) 555-3333
\end{flushright}\normalsize
\framebreak
\Huge\bfseries {\color{RoyalBlue} John Doe} \\
\Large\bfseries Graphics designer \\
\normalsize\normalfont
\begin{AboutMe}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vel bibendum metus. Proin rutrum pharetra molestie. Cras sollicitudin nulla nec leo lobortis in tristique purus pretium. Ut eu felis nulla. Pellentesque condimentum justo ut ligula feugiat nec facilisis tellus ultricies. Nullam sit amet dictum ipsum. Sed lacus neque, hendrerit eu rhoncus nec, pellentesque vitae sem.
\end{AboutMe}
\CVSection{Skills}
\CVItem{Platforms}
\begin{multicols}{3}
\begin{compactitem}[\color{RoyalBlue}$\circ$]
\item Lorem
\item Ipsum
\end{compactitem}
\end{multicols}
\SmallSep
\CVItem{Computer software}
\begin{multicols}{3}
\begin{compactitem}[\color{RoyalBlue}$\circ$]
\item Lorem
\item Ipsum
\item Dolor
\item Sit
\item Amet
\item Consectetur
\item Adipiscing
\item Elit
\item \ldots
\end{compactitem}
\end{multicols}
\SmallSep
\CVItem{Fewer columns}
\begin{multicols}{2}
\begin{compactitem}[\color{RoyalBlue}$\circ$]
\item Now more words will fit
\item because fewer columns
\item means each one is wider
\item and each line is longer.
\end{compactitem}
\end{multicols}
\SmallSep
\CVItem{Single column}
\begin{compactitem}[\color{RoyalBlue}$\circ$]
\item Now even more words can be fitted per item within the list.
\end{compactitem}
\end{document}
编辑
如果我添加showframe
选项geometry
并在列中添加更多文本,则环境中的列宽似乎没有任何问题multicols
:
但是,如果我在 Overleaf 上编译它(将我的 cat 替换为example-image-a
),输出会非常非常不完整:
我猜这是因为我使用的是最新的 TeX Live 发行版,而 Overleaf 不是。也就是说,TeX Live 2013 和 TeX Live 2014 的最终冻结版本在我的计算机上产生了正确的输出。所以也许我对这个问题的看法是错误的。
很明显,这是 Overleaf 某处的一个错误 - 要么是有缺陷的软件包,要么是他们编译过程中的产物。