1

While writing my curriculum I have faced a problem where the content goes beyond defined margins. The margins are represented by the lines in this image:

Margins

(the black border to the right is my PDF viewer out of bounds).

I have already double checked if there is nothing defining it's width as \textwidth or something like that possibly causing it to invade out of page margins, but there wasn't. What can be possibly happening to make content go beyond page margins?

Full code: github.com/(...)/cv.tex

1
  • Welcome to TeX.SX! Please help us to help you and reduce your document to a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see short code.
    – Symbol 1
    Mar 31, 2015 at 7:50

2 Answers 2

3

You need

\newenvironment{aside}{%
\noindent               %% added
\begin{minipage}[t]{0.25\textwidth}%
\begin{flushright}
}{%
\end{flushright}%
\end{minipage}%
}

\newenvironment{main}{%
\noindent
\begin{minipage}[t]{\dimexpr0.75\textwidth-1pt-2em\relax}%   %% modified
}{%
\end{minipage}%
}

and

\end{aside}%    %% % here is badly needed
%
\hspace{1em}\vrule width1pt\hspace{1em}%  % leave no spaces in between and width1pt make life easier.
\begin{main}%

Full code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[inline]{enumitem}
\usepackage[a4paper,margin=1in,showframe]{geometry}   %% remove showframe
\usepackage{svg}

\newcommand{\sectiontitle}[1]{\section*{\uppercase{#1}} \hrule \vspace{1em}}
\newcommand{\formationentry}[4]{%
    \noindent \textbf{#1} \hfill
    \colorbox{black}{%
        \parbox[c][1em]{8em}{%
            \hfill \color{white} #2%
        }
    } \par
    \noindent \textit{#3}\par
    \normalsize
    \vspace{1em}
}
\newcommand{\experienceentry}[4]{%
    \noindent \textbf{#1} \hfill
    \colorbox{black}{%
        \parbox[c][1em]{8em}{%
            \hfill \color{white} #2%
        }%
    } \par
    \noindent \textit{#3} \par
    \noindent \hangindent=1.5em \hangafter=0 \small #4 \par
    \normalsize%
    \vspace{1em}%
}
\newcommand{\contactentry}[2]{%
    \parbox{\textwidth}{\hfill #2 \includesvg[height=1em]{#1}}%
}
\newcommand{\languageentry}[2]{%
    \parbox{\textwidth}{\hfill \textbf{#1}\hspace{1em}#2}%
}

\newenvironment{aside}{%
\noindent
\begin{minipage}[t]{0.25\textwidth}%
\begin{flushright}
}{%
\end{flushright}%
\end{minipage}%
}
\newenvironment{main}{%
\noindent
\begin{minipage}[t]{\dimexpr0.75\textwidth-1pt-2em\relax}%
}{%
\end{minipage}%
}

\begin{document}
\fontfamily{lmss} \selectfont

\title{Ranieri Althoff -- Résumé}

\Huge \hfill \textbf{Ranieri Althoff}
\normalsize \par
\vspace{3em}
\pagenumbering{gobble}

\noindent
\begin{aside}
\section*{Contact}
\contactentry{email}{[email protected]}
\contactentry{github}{ranisalt}
\contactentry{twitter}{ranisalt}


\section*{Languages}
\languageentry{Portuguese}{native}
\languageentry{English}{fluent}


\section*{Programming}
\center
\subsection*{\small some thousand lines}
\begin{itemize*}
\item{Python}
\item{PHP}
\item{Shell}
\end{itemize*}

\subsection*{\small just a thousand lines}
\begin{itemize*}
\item{C++}
\item{Coffeescript}
\item{Java}
\item{Javascript}
\end{itemize*}

\subsection*{\small just started learning}
\begin{itemize*}
\item{Haskell}
\item{\LaTeX}
\item{Lua}
\item{Prolog}
\item{Ruby}
\end{itemize*}


\section*{Tools}
\subsection*{\small databases}
\begin{itemize*}
\item{MongoDB}
\item{MySQL}
\item{PostgreSQL}
\item{Redis}
\item{SQLite}
\end{itemize*}

\subsection*{\small frameworks}
\begin{itemize*}
\item{CodeIgniter}
\item{Flask}
\item{Laravel}
\item{Rails}
\end{itemize*}

\subsection*{\small version control}
\begin{itemize*}
\item{Git}
\item{Mercurial}
\end{itemize*}

\subsection*{\small web servers}
\begin{itemize*}
\item{Nginx}
\item{uWSGI}
\end{itemize*}
\end{aside}%
%
\hspace{1em}\vrule\hspace{1em}%
\begin{main}%
\sectiontitle{Academic Formation}
\formationentry{Bachelor in Computer Science}{2013 - now}{Federal University
of Santa Catarina (UFSC)}

\formationentry{Technician in Information Technology}{2010 - 2012}{Federal
Catarinense Institute (IFC)}


\sectiontitle{Professional Experience}
\experienceentry{Scholarship}{4/2014 - now}{Tutorial Education Program (PET) at
UFSC}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam a turpis
nisi. Cras velit tortor, congue eget eleifend non, pellentesque ut eros.
Integer commodo arcu quis orci congue, eget suscipit nulla pulvinar.
Phasellus bibendum tellus sed sapien nullam.}

\experienceentry{Internship}{6/2011 - 11/2012}{LabMat(i)\textsuperscript{2} at
IFC}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam a turpis
nisi. Cras velit tortor, congue eget eleifend non, pellentesque ut eros.
Integer commodo arcu quis orci congue, eget suscipit nulla pulvinar.
Phasellus bibendum tellus sed sapien nullam.}


\sectiontitle{Skills and Interests}


\sectiontitle{Additional Information}


\end{main}%
\end{document}

enter image description here

You had many spurious spaces in your \newcommands and I have added may % signs, please find the difference to locate them.

4
  • I think there is no need to \noindent in main envir definition
    – touhami
    Mar 31, 2015 at 8:37
  • @touhami Just being defensive. :-)
    – user11232
    Mar 31, 2015 at 8:40
  • This makes the trick. Any reason to have lots of %? Is this some kind of escape symbol?
    – ranieri
    Mar 31, 2015 at 18:34
  • @ranisalt Please see: What is the use of percent signs (%) at the end of lines?
    – user11232
    Mar 31, 2015 at 21:41
1

You have

parindent+0.25\textwidth+1em+\space+1em+\space+0.75\textwidth=\textwidth+parndent+2em+2\space > textwidth

Try redifine your environment like this

Edit: thanks to Harish Kumar's answer i add \ignorespaces

    \newenvironment{aside}{\noindent
\begin{minipage}[t]{0.25\textwidth}
\begin{flushright}
}{
\end{flushright}
\end{minipage}\ignorespaces
}
\newenvironment{main}{
\begin{minipage}[t]{\dimexpr.75\textwidth-3em\relax}
}{
\end{minipage}
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .