Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

So basically the question is in the title. How can I adjust the width of the part where I put info about myself? Currently it looks like this:

What my cv looks like now

You see how there is weird looking break. How can I extend it so that it expands to certain width? Or so that it fits in one line?

Ok, here's the MWE that's producing the same problem:

\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{john.doe@some.something.com}                      % 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}
share|improve this question
1  
Please add a minimal working example (MWE) that enables us to reproduce your problem. –  doncherry Oct 11 '11 at 19:36

2 Answers 2

up vote 5 down vote accepted

This is because of the way \cvcomputer is defined. From cvmodern.cls:

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

So let's see how \cvdoubleitem is defined:

% 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}}}

While I didn't bother to understand all of this, the minipages and a look at the CTAN template tells me that this type of entry is geared toward a two-column layout, presumably because the author assumed computer entries won't be very long.

screenshot from the template

If you don't want the two-column layout, I recommend redefining \cvcomputer like this:

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

Make sure you remove the third and fourth arguments, which are empty, from your source. Your section would be like this:

\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}

BUT, why not make use of the two-column layout? Then, don't use the redefinition and just reorder the arguments:

\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}

share|improve this answer
    
This worked, but now the \cvlanguage column is messed up :\ –  dingo_d Oct 11 '11 at 20:22
    
Does my updated answer help? –  doncherry Oct 11 '11 at 20:28
    
Ok this works perfectly :D Thank you ^^ –  dingo_d Oct 11 '11 at 20:31

I just so happened to find this solution posted elsewhere. I used this \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}}}

Apparently your \maincolumnwidth values should add up to one. So if you change one value you should change the other. Using 0.9 and 0.1 looks like it worked. You can tweak it to your own tastes.

You should be able to apply this to other fields as well by changing \cvcomputer to \cvlanguage etc.

share|improve this answer
    
This is giving me error: File ended while scanning use of \@argdef :\ –  dingo_d Oct 11 '11 at 20:19
    
Perhaps I lost something when I copied and pasted the code. Here I made it a bit more explicit where the linebreak goes. Also, I inserted this inside the document body right before the section containing \cvcomputer. –  LordStryker Oct 11 '11 at 20:25
    
Thanks for helping I'll see how I can use this :) –  dingo_d Oct 11 '11 at 20:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.