moderncv-如何调整描述列?

moderncv-如何调整描述列?

所以基本上问题就在标题中。我如何调整放置有关我自己的信息的部分的宽度?目前它看起来像这样:

我的简历现在是什么样子的

你看,这个断行看起来很奇怪。我该如何将它延长到一定宽度?或者让它适合一行?

好的,这是产生同样问题的 MWE:

\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[green]{classic}                

% character encoding
\usepackage[utf8x]{inputenc}
\usepackage[croatian]{babel}
\usepackage{ucs}                   % replace by the encoding you are using

% adjust the page margins
\usepackage[scale=0.8]{geometry}
%\setlength{\hintscolumnwidth}{3cm}                     % if you want to change the width of the column with the dates
%\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}}  % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details
%\AtBeginDocument{\recomputelengths}                     % required when changes are made to page layout lengths

% personal data
\firstname{John}
\familyname{Doe}
%\title{Resumé title (optional)}               % optional, remove the line if not wanted
\address{Blabla place 14}{xxxxx Randomcity}    % optional, remove the line if not wanted
\mobile{06548946354}                    % optional, remove the line if not wanted
\phone{2314864464}                      % optional, remove the line if not wanted
%\fax{fax (optional)}                          % optional, remove the line if not wanted
\email{[email protected]}                      % optional, remove the line if not wanted
\homepage{http://www.somepage.com}                % optional, remove the line if not wanted
%\extrainfo{additional information (optional)} % optional, remove the line if not wanted
%\photo[64pt]{picture}                         % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted
%\quote{Some quote (optional)}                 % optional, remove the line if not wanted

% to show numerical labels in the bibliography; only useful if you make citations in your resume
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother

% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}

%\nopagenumbers{}                             % uncomment to suppress automatic page numbering for CVs longer than one page
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle
\section{Datum i mjesto rođenja}
\cventry{14.01.1955.}{Someplace}{Somecountry}{}{}{}


\section{Poznavanje jezika}
\cvlanguage{Hrvatski}{Materinji jezik}{}
\cvlanguage{Engleski}{Aktivan u jeziku i pismu}{}
\cvlanguage{Njemački}{Pasivan u jeziku i pismu}{}

\section{Računalne vještine}
\cvcomputer{Operativni sustavi}{Windows, UNIX(Linux), izvrsno poznavanje rada operativnih sustava}{}{}
\cvcomputer{Programiranje}{Osnove rada u Phythonu}{}{}
\cvcomputer{WEB dizajn}{HTML}{}{}
\cvcomputer{Office paketi}{Znanje rada s Wordom, Excellom, Powerpointom}{}{}
\cvcomputer{Adobe}{Poznavanje rada s Adobe Photoshopom, Illustratorom i InDesignom}{}{}
\cvcomputer{Hardware}{PC, mreže}{}{}

\renewcommand{\listitemsymbol}{-} % change the symbol for lists

\nocite{*}
\bibliographystyle{plain}
\bibliography{publications}       % 'publications' is the name of a BibTeX file

\end{document}

答案1

这是因为\cvcomputer定义的方式。从 cvmodern.cls 来看:

% usage (inside 'computer skills' cvsection environment): \cvcomputer{category}{programs}{category}{programs}
\newcommand*{\cvcomputer}[4]{%
  \cvdoubleitem{#1}{\small#2}{#3}{\small#4}}

那么让我们看看它\cvdoubleitem是如何定义的:

% usage: \cvdoubleitem{subtitle}{text}{subtitle}{text}
\newcommand*{\cvdoubleitem}[4]{%
 \cvline{#1}{\begin{minipage}[t]{\doubleitemmaincolumnwidth}#2\end{minipage}%
 \hfill%
 \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#3}\end{minipage}\hspace*{\separatorcolumnwidth}\begin{minipage}[t]{\doubleitemmaincolumnwidth}#4\end{minipage}}}

虽然我没费心去理解这一切,但minipage看看CTAN 模板告诉我这种类型的条目适合双栏布局,大概是因为作者认为计算机条目不会很长。

模板截图

如果您不想要两列布局,我建议\cvcomputer像这样重新定义:

\renewcommand{\cvcomputer}[2]{\cvline{#1}{\small#2}}

确保从源中删除第三和第四个参数(它们是空的)。您的部分将如下所示:

\renewcommand{\cvcomputer}[2]{\cvline{#1}{\small#2}}
\section{Računalne vještine}
\cvcomputer{Operativni sustavi}{Windows, UNIX(Linux), izvrsno poznavanje rada operativnih sustava}
\cvcomputer{Programiranje}{Osnove rada u Phythonu}
\cvcomputer{WEB dizajn}{HTML}
\cvcomputer{Office paketi}{Znanje rada s Wordom, Excellom, Powerpointom}
\cvcomputer{Adobe}{Poznavanje rada s Adobe Photoshopom, Illustratorom i InDesignom}
\cvcomputer{Hardware}{PC, mreže}

但是,为什么不使用两列布局呢?那么,不要使用重新定义,只需重新排序参数:

\section{Računalne vještine}
\cvcomputer{Operativni sustavi}{Windows, UNIX(Linux), izvrsno poznavanje rada operativnih sustava}{Office paketi}{Znanje rada s Wordom, Excellom, Powerpointom}
\cvcomputer{Programiranje}{Osnove rada u Phythonu}{Adobe}{Poznavanje rada s Adobe Photoshopom, Illustratorom i InDesignom}
\cvcomputer{WEB dizajn}{HTML}{Hardware}{PC, mreže}

答案2

我碰巧在其他地方发现了这个解决方案。我用的是这个\renewcommand

\renewcommand*{\cvcomputer}[3]{%

\cvline{#1}{\begin{minipage}[t]{0.9\maincolumnwidth}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.1\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}}

显然,您的\maincolumnwidth值应该相加为 1。因此,如果您更改一个值,则另一个值也应该更改。使用 0.9 和 0.1 看起来有效。您可以根据自己的喜好进行调整。

您应该能够通过更改\cvcomputer为等将其应用于其他领域\cvlanguage

相关内容