1

I want to decrease the left, size, top and right margin in the following code. I also want to increase the horizontal line lengths after every section. How can I do that?

\documentclass[a4paper,10pt]{article}

%\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}

%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec}                   %for loading fonts
\usepackage{xunicode,xltxtra,url,parskip}   %other packages for formatting
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
%\usepackage[big]{layaureo}                 %better formatting of the A4 page
% an alternative to Layaureo can be 
\usepackage{fullpage}
\addtolength{\voffset}{-1.3cm}

\usepackage{supertabular}               %for Grades
\usepackage{titlesec}                   %custom \section

%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

%FONTS
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}
%%% modified for Karol Kozioł for ShareLaTeX use
\setmainfont[
SmallCapsFont = Fontin-SmallCaps.otf,
BoldFont = Fontin-Bold.otf,
ItalicFont = Fontin-Italic.otf
]
{Fontin.otf}
%%%

\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
%Tweak a bit the top margin
%\addtolength{\voffset}{-1.3cm}

%Italian hyphenation for the word: ''corporations''
\hyphenation{im-pre-se}

\usepackage[absolute]{textpos}

\textblockorigin{2mm}{0.65\paperheight}
\setlength{\parindent}{0pt}

%--------------------BEGIN DOCUMENT----------------------
\begin{document}

%WATERMARK TEST [**not part of a CV**]---------------
%\font\wm=''Baskerville:color=787878'' at 8pt
%\font\wmweb=''Baskerville:color=FF1493'' at 8pt
%{\wm 
%   \begin{textblock}{1}(0,0)
%       \rotatebox{-90}{\parbox{500mm}{
%           Typeset by Alessandro Plasmati with \XeTeX\  \today\ for 
%           {\wmweb \href{http://www.aleplasmati.comuv.com}{aleplasmati.comuv.com}}
%       }
%   }
%   \end{textblock}
%}

\pagestyle{empty} % non-numbered pages

\font\fb=''[cmr10]'' %for use with \LaTeX command

%--------------------TITLE-------------
\par{\centering
        {\Huge \textsc{xxxx}  \textsc{xxxxx}
    }\bigskip\par}

%--------------------SECTIONS-----------------------------------
%Section: Personal Data
\section{Personal Data}

\begin{tabular}{rl}
    \textsc{Place and Date of Birth:} 
xxxxxxxxxxxxx
\end{tabular}

%Section: Education
\section{Education}
\begin{tabular}{rl} 
xxxxxxxxxxxxx
\end{tabular}


\end{document}
2
  • Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it).
    – jub0bs
    Dec 9, 2013 at 22:39
  • 1
    What's wrong with using \usepackage[margin=1in]{goemetry} (or what you current have, but commented out)?
    – Werner
    Dec 10, 2013 at 2:51

1 Answer 1

5

Had the same problem/question from using the same template (see https://www.sharelatex.com/templates/cv-or-resume/professional-cv)

Keep this line commented out to avoid a clash between the layaureo package and the geometry package:

%\usepackage[big]{layaureo}                 %better formatting of the A4 page

And include this line:

\usepackage[margin=0.5in]{geometry}

At which point you will find that the horizontal line created by \linerule in this \titleformat statement increases the length of the line to extend to the new margins:

\titleformat{\section}[display]
{\Large\scshape\raggedright}{}{0pt}{}[\titlerule] 

You must log in to answer this question.

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