1

I wanted to modify the margins of my LaTeX document. Here's the commande I wrote:

% Margins
\renewcommand{\baselinestretch}{1.5}
\setmarginsrb{4.5cm}{2.5cm}{3.5cm}{2.5cm}{0pt}{0pt}{0pt}{0pt}

\begin{document}

I set "0pt" to the last 4 parameters because I didn't want to change their values from default.

The command seems to work when I compile, but I have an error:

The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

Also it created a new page at the beginning of my document with "4.5cm2.5cm3.5cm2.5cm0pt0pt0pt0pt".

Code: http://pastebin.com/X6d7jFPe

How can I fix that?

2
  • Please help us to help you and add 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 compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jun 12, 2014 at 9:49
  • 1
    Your code is not compilable. Please improve and minimize it. Some notes: Load hyperref last, don't load packages (array) twice, don't use vmargin but geometry, use xcolor instead of color or use none, as eso-pic loads the former.
    – LaRiFaRi
    Jun 12, 2014 at 10:47

1 Answer 1

2

See also an answer concerning the use of the package vmargin

% arara: pdflatex 

\documentclass[a4paper,11pt]{article}
\usepackage{vmargin} % needed for the command \setmarginsrb (I would recommend geometry here)
\usepackage{graphicx}
\usepackage{array,multirow,makecell} % removed second call of array
\usepackage{fix-cm}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\usepackage{amsmath} % I recommend mathtools here (not needed in your example)
\usepackage{eso-pic} % loads xcolor
\usepackage{fancyhdr}
%\usepackage{color} % xcolor is newer
\usepackage{hyperref} % in most cases to be loaded last

\pagestyle{fancyplain} \chead{}\lhead{\textit{The Creative Workers}} \rhead{\emph{\textit{FPSDesigner}}}
\pagenumbering{arabic}     

% Margins
\renewcommand{\baselinestretch}{1.5}
\setmarginsrb{4.5cm}{2.5cm}{3.5cm}{2.5cm}{0pt}{0pt}{0pt}{0pt}

\begin{document}     
    \thispagestyle{empty}     
    \vspace*{2cm}     
    \begin{center}
            test
    \end{center}
\end{document}

You must log in to answer this question.

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