GeneralVertical Space Problem in CV

LaTeX specific issues not fitting into one of the other forums of this category.
fxisme
Posts: 1
Joined: Sun Dec 04, 2011 1:49 am

Vertical Space Problem in CV

Post by fxisme »

hi all

i wanted to make a resume in latex so i downloaded a pre-written script and made modifications to it. everything is working fine except that now i have a huge space between the heading of a column and the contents. i have tried vspace but it does something else. i am putting the pictures. somebody please help me out. i am using kile 2.1 in ubuntu.

code of the include file i downloaded:

Code: Select all

% Set of commands used by cv.tex

\usepackage[dvipsnames,usenames]{color}
\usepackage{simplemargins}
\usepackage{graphicx}
\usepackage{setspace}
\setleftmargin{2.0cm}
\setrightmargin{2.0cm}
\settopmargin{2.0cm}
\setbottommargin{1.0cm}
%\renewcommand\familydefault{\sfdefault}


% starting commands
\newfont{\myfonta}{cmr10 at 9pt}
\newfont{\myfontb}{cmr10 at 10pt}
\newfont{\myfontc}{cmr10 at 15pt}
\newfont{\myfontd}{cmr10 at 12pt}

\newcommand{\largeskip}[0]{\vspace{2.5mm}\\}
\newcommand{\shortskip}[0]{\vspace{0.4mm}\\}

% small caps
\newcommand{\smcp}[1]{\sc{\myfonta{#1}}}
\renewcommand{\textsc}[1]{\smcp{#1}}

\newcommand{\header}[3]{
\hspace{0cm}
\begin{tabular}{p{11cm}p{6cm}}
{\raggedright {\headline {#1}}
\\\vspace*{2mm}
\headline{#2}} 
& 
\raggedleft{#3}
\end{tabular}}


\newcommand{\blocktitle}[1]{
\parbox{\textwidth}{
	\vspace{2mm}
	\noindent
	\textcolor{MidnightBlue}{
{\myfontd {#1}
	\vspace*{1mm}
	\hrule}
	\vspace*{3mm}
	\noindent
} } }

\newcommand{\headline}[1]{{\myfontc{#1}}}
\newcommand{\setmainfont}[0]{\myfontb}

%%%%%%

\newenvironment{resumeblock}[1]{\blocktitle{#1}\begin{tabular}{p{4cm}p{13cm}}}{\end{tabular}}
\newcommand{\resumeitem}[2]{\noindent\raggedright{\textsc{#1}} & #2}

\newenvironment{objectiveblock}[1]{\blocktitle{#1}}
%%%%%%

\newcommand{\interest}[2]{
\includegraphics[height=12pt]{#1}
~\raisebox{1mm}{#2}}

%%%%%%

\newenvironment{interestsblock}[1]
{\blocktitle{#1}\begin{tabular}{p{10cm}p{10cm}}}
{\end{tabular}}

\setlength{\parindent}{0mm}
\pagestyle{empty}

the place where my code is going wrong

Code: Select all

...
\resumeitem{Languages}{Fluent in English, Mandarin}
\end{resumeblock}

\vspace{3mm}
\begin{resumeblock}{Professional experience} 
[PROBLEM OCCURS HERE]
\resumeitem{Since Jun 2009}{Text Here \textbf{Text Here} ,
\vspace{-2mm}
\begin{spacing}{0}
\begin{itemize}
\setlength{\itemsep}{0mm}
\renewcommand{\labelitemi}{$-$}
\myfonta{\item{Text Here }
\item{Text Here}
\item{Text Here}}
\end{itemize}
\end{spacing}} 
\largeskip
there is no problem with 3 such items in this block, but any more and i get a huge gap like this.
vertical-space.png
vertical-space.png (27.71 KiB) Viewed 9818 times
thank you very much in advance :D
Last edited by localghost on Sun Dec 04, 2011 10:29 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Vertical Space Problem in CV

Post by Stefan Kottwitz »

Hi,

please post a small compilable example instead of some code pieces. So we could test it, see the problem and fix it. You posted a good amount of code, but next time please make that compilable. I show what I mean:

Code: Select all

\documentclass{article}
% Set of commands used by cv.tex
\usepackage[dvipsnames,usenames]{color}
%\usepackage{simplemargins}
\usepackage{graphicx}
\usepackage{setspace}
%\setleftmargin{2.0cm}
%\setrightmargin{2.0cm}
%\settopmargin{2.0cm}
%\setbottommargin{1.0cm}
%\renewcommand\familydefault{\sfdefault}

% starting commands
\newfont{\myfonta}{cmr10 at 9pt}
\newfont{\myfontb}{cmr10 at 10pt}
\newfont{\myfontc}{cmr10 at 15pt}
\newfont{\myfontd}{cmr10 at 12pt}

\newcommand{\largeskip}[0]{\vspace{2.5mm}\\}
\newcommand{\shortskip}[0]{\vspace{0.4mm}\\}

% small caps
\newcommand{\smcp}[1]{\sc{\myfonta{#1}}}
\renewcommand{\textsc}[1]{\smcp{#1}}

\newcommand{\header}[3]{
\hspace{0cm}
\begin{tabular}{p{11cm}p{6cm}}
{\raggedright {\headline {#1}}
\\\vspace*{2mm}
\headline{#2}}
&
\raggedleft{#3}
\end{tabular}}

\newcommand{\blocktitle}[1]{
\parbox{\textwidth}{
   \vspace{2mm}
   \noindent
   \textcolor{MidnightBlue}{
{\myfontd {#1}
   \vspace*{1mm}
   \hrule}
   \vspace*{3mm}
   \noindent
} } }

\newcommand{\headline}[1]{{\myfontc{#1}}}
\newcommand{\setmainfont}[0]{\myfontb}

%%%%%%

\newenvironment{resumeblock}[1]{\blocktitle{#1}\begin{tabular}{p{4cm}p{13cm}}}{\end{tabular}}
\newcommand{\resumeitem}[2]{\noindent\raggedright{\textsc{#1}} & #2}

\newenvironment{objectiveblock}[1]{\blocktitle{#1}}
%%%%%%

\newcommand{\interest}[2]{
\includegraphics[height=12pt]{#1}
~\raisebox{1mm}{#2}}

%%%%%%

\newenvironment{interestsblock}[1]
{\blocktitle{#1}\begin{tabular}{p{10cm}p{10cm}}}
{\end{tabular}}

\setlength{\parindent}{0mm}
\pagestyle{empty}
\begin{document}
\begin{resumeblock}{Knowledge} 
\resumeitem{Languages}{Fluent in English, Mandarin}
\end{resumeblock}

\vspace{3mm}
\begin{resumeblock}{Professional experience}
%[PROBLEM OCCURS HERE]
\resumeitem{Since Jun 2009}{Text Here \textbf{Text Here} ,
\vspace{-2mm}
\begin{spacing}{0}
\begin{itemize}
\setlength{\itemsep}{0mm}
\renewcommand{\labelitemi}{$-$}
\myfonta{\item{Text Here }
\item{Text Here}
\item{Text Here}}
\end{itemize}
\end{spacing}}
\largeskip
\end{resumeblock}
\end{document}
This is your code, I commented something out, and added something to make it compilable. Every reader who wants to help and to test it, would have to do it himself, so somebody might read and go without answering. If you post a compilable version, the chance of getting a solution is higher.

Even now, the problem is not clear, since it cannot be reproduced. The cause is somewhere else in your code. A complete example would have shown it. See:
cv.png
cv.png (15.06 KiB) Viewed 9816 times
There's no gap. So, please provide some more information.

Stefan
LaTeX.org admin
John123
Posts: 6
Joined: Tue Apr 10, 2012 8:32 pm

Re: Vertical Space Problem in CV

Post by John123 »

Hi there,

I am experiencing the same issue. Although I do not know how to fix the issue, I am able to understand the origin of the problem .

If a section of the CV is too long (\resumeblock) and cannot be contained in the same page, the entire portion will be moved to the next page (say page 2), creating a huge blank space in page 1.

Has anyone find a way to work around this problem? Thanks a lot
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Vertical Space Problem in CV

Post by Stefan Kottwitz »

Hi John,
John123 wrote:Although I do not know how to fix the issue, I am able to understand the origin of the problem.
great! Why don't you post a Infominimal working example which shows the problem in the output?
John123 wrote:Has anyone find a way to work around this problem?
As you could see above, the problem could not be reproduced. Your description told a way how it could be produced by you. But not for us readers. We don't even know the document class you or the original poster used. So, yes, I know ways around such problems, but your case is not clear. Perhaps post a Infominimal working example.

Regarding your resume block: a {tabular} environment cannot contain a page break. It could be fixed by using {tabbing} or a multi-page tabular environment such as longtable.

Stefan
LaTeX.org admin
John123
Posts: 6
Joined: Tue Apr 10, 2012 8:32 pm

Vertical Space Problem in CV

Post by John123 »

Thank you for your quick response Stephan, here are a compilable portion of the code and the Packages calling file as well:

Code: Select all

\documentclass[a4paper,12pt]{article}

\include{cv-commands}

\begin{document}

\setmainfont

\header
{\textbf{\LARGE{Jacques Cousteau}}}
%{R\&D Software engineer}
{\footnotesize {{Address: 1443 Random Avenue, Apt  312\\ Seattle, WA  USA}\\
\footnotesize {Email: \textcolor{Blue}{JacquesCousteau@email.com}}\\
\footnotesize {Phone: {(222) 333 4444}}}
\bigskip 

{\color{blue}\framebox{\color{black}\begin{minipage}[c]{0.96\textwidth}
 \normalsize\textbf{\newline
 French naval officer, explorer, ecologist, filmmaker, innovator, scientist, photographer, author and researcher who studied the sea and all forms of life in water. He co-developed the Aqua-Lung, pioneered marine conservation and was a member of the Académie française. He was also known as "le Commandant Cousteau" or "Captain Cousteau".\vspace{1.2mm}}
\end{minipage}}}

\bigskip
}

\begin{resumeblock}{\bf{EDUCATION}}

\resumeitem{\bf PhD}{\small{\textbf{University of Phoenix }}, Civil Engineering, Phoenix, USA, 2011}
\newline {Cousteau was born on 11 June 1910, in Saint-André-de-Cubzac, Gironde, France to Daniel and Élisabeth Cousteau. He had one brother, Pierre-Antoine. Cousteau completed his preparatory studies at the prestigious Collège Stanislas in Paris. }
\newline{In 1930, he entered the École Navale and graduated as a gunnery officer. After an automobile accident cut short his career in naval aviation, Cousteau indulged his interest in the sea.} 
\largeskip

\resumeitem{\bf MS}{\small{\textbf{Georgia Institute of Technology}}, Software Engineering, Atlanta, USA, 2005\newline Course work: In Toulon, where he was serving on the Condorcet, Cousteau carried out his first underwater experiments, thanks to his friend Philippe Tailliez who in 1936 lent him some Fernez underwater goggles, predecessors of modern diving masks.[2] Cousteau also belonged to the information service of the French Navy, and was sent on missions to Shanghai and Japan (1935–1938) and in the USSR (1939). }
\largeskip

\resumeitem{\bf MS}{\small{\textbf{Berkley}}, Petroleum Engineering, Berkley, USA, 2003\newline His sons took part in the adventures of the Calypso. In 1991, one year after his wife Simone's death from cancer, he married Francine Triplet. They already had a daughter Diane Cousteau (born 1980) and a son Pierre-Yves Cousteau (born 1982), born during Cousteau's marriage to his first wife.}
\largeskip


\end{resumeblock}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{resumeblock}{\bf RESEARCH AND TEACHING EXPERIENCE}

\resumeitem{Jan 20012 - Present}{\small{\textbf{Researcher}} \newline
                 Department of  Aerospace Engineering, UCI} \newline 
		  {The years of World War II were decisive for the history of diving. After the armistice of 1940, the family of Simone and Jacques-Yves Cousteau took refuge in Megève, where he became a friend of the Ichac family who also lived there. Jacques-Yves Cousteau and Marcel Ichac shared the same desire to reveal to the general public unknown and inaccessible places}
\largeskip

\resumeitem{Sep 2004 - Nov 2008}{\small{\textbf{Assistant}} \newline
                 Department of Psychology, Stanford} \newline
		  {In 1943, they made the film Épaves (Shipwrecks), in which they used two of the very first Aqua-Lung prototypes. These prototypes were made in Boulogne-Billancourt by the Air Liquide company, following instructions from Cousteau and Émile Gagnan.When making Épaves, Cousteau could not find the necessary blank reels of movie film, but had to buy hundreds of small still camera film reels the same width, intended for a make of child's camera, and cemented them together to make long reels}

\end{resumeblock}
\end{document}


Now the package calling file is :

Code: Select all

% Set of commands used by cv.tex

\usepackage[dvipsnames,usenames]{color}
\usepackage{simplemargins}
\usepackage{graphicx}
\usepackage{amssymb,amsmath}
\usepackage{framed}
\usepackage{xcolor}
\usepackage{fancybox}
%\usepackage{framed}
\setleftmargin{2.0cm}
\setrightmargin{2.0cm}
\settopmargin{1.8cm}
\setbottommargin{0cm}
%\renewcommand\familydefault{\sfdefault}


% starting commands
\newfont{\myfonta}{cmr10 at 9pt}
\newfont{\myfontb}{cmr10 at 10pt}
\newfont{\myfontc}{cmr10 at 15pt}
\newfont{\myfontd}{cmr10 at 12pt}

\newcommand{\largeskip}[0]{\vspace{2.5mm}\\}
\newcommand{\shortskip}[0]{\vspace{0.4mm}\\}

% small caps
\newcommand{\smcp}[1]{\sc{\myfonta{#1}}}
\renewcommand{\textsc}[1]{\smcp{#1}}

\newcommand{\header}[3]{
\hspace{0cm}
\begin{tabular}{p{11cm}p{6cm}}
{\raggedright {\headline {#1}}
\\\vspace*{2mm}
\headline{#2}} 
& 
\raggedleft{#3}
\end{tabular}}


\newcommand{\blocktitle}[1]{
\parbox{\textwidth}{
	\vspace{2mm}
	\noindent
	\textcolor{Blue}{
{\myfontd {#1}
	\vspace*{1mm}
	\hrule}
	\vspace*{3mm}
	\noindent
} } }

\newcommand{\headline}[1]{{\myfontc{#1}}}
\newcommand{\setmainfont}[0]{\myfontb}

%%%%%%

\newenvironment{resumeblock}[1]{\blocktitle{#1}\begin{tabular}{p{4cm}p{13cm}}}{\end{tabular}}
\newcommand{\resumeitem}[2]{\noindent\raggedright{\textsc{#1}} & #2}

%%%%%%

\newcommand{\interest}[2]{
\includegraphics[height=12pt]{#1}
~\raisebox{1mm}{#2}}

%%%%%%

\newenvironment{interestsblock}[1]
{\blocktitle{#1}\begin{tabular}{p{10cm}p{10cm}}}
{\end{tabular}}

\setlength{\parindent}{0mm}
\pagestyle{empty}

Many thanks for your help, I hope you will be able to spot the issue and find the workaround !
John123
Posts: 6
Joined: Tue Apr 10, 2012 8:32 pm

Re: Vertical Space Problem in CV

Post by John123 »

Anyone with any suggestions? Cheers
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Vertical Space Problem in CV

Post by Stefan Kottwitz »

Did you try compiling this code? If yes, did it show your problem? If not, try...

Even if I fix all of the errors, there's no vertical space problem as described. How should we be able to help you to fix that? Perhaps try again: post a compilable example which shows the problem. The way it always works is hacking down a copy of your original document, if desired replace text by dummy text in the reduced copy.

Stefan
LaTeX.org admin
John123
Posts: 6
Joined: Tue Apr 10, 2012 8:32 pm

Re: Vertical Space Problem in CV

Post by John123 »

Hi Stefan and thank you for your input.

"Even if I fix all the errors", which errors are you talking about?

I don't understand your suggestion of reposting a compilable example (post # 5 is precisely that) There are no errors when compiling, and the portion of code that I previously posted precisely illustrates the "gap" problem.

Could you post your output please? I don't understand why you didn't obtain any gap. Maybe you have made some modifications to the code I posted.

Thanks a lot
John123
Posts: 6
Joined: Tue Apr 10, 2012 8:32 pm

Re: Vertical Space Problem in CV

Post by John123 »

This probem is still unresolved, so if anyone has a suggestion or is able to compile the code I posted without the "huge gap issue", please let us have your opinion. Thank you again
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Vertical Space Problem in CV

Post by Stefan Kottwitz »

The package simplemargins is not part of TeX distribution and not even listed on CTAN. So no chance for us to verify the problem if you don't attach it. Well, you probably don't know. I guess you use a package which is between 10 and 20 years old and very outdated. Just look inside, there must be a date.

If I remove

Code: Select all

\usepackage{simplemargins}
\setleftmargin{2.0cm}
\setrightmargin{2.0cm}
\settopmargin{1.8cm}
\setbottommargin{0cm}
and replace it by

Code: Select all

\usepackage[left=2cm,right=2cm,top=1.8cm,bottom=0cm]{geometry}
the problem doesn't occur.

Stefan
LaTeX.org admin
Post Reply