[Tex/LaTex] Margins for even and odd page using the Memoir class

double-sidedmarginsmemoir

I have read a lot of posts about this topic now but still I cannot figure out why the even and odd pages has the same margin. I would like them to have different margins to make Space for the spine of the book. Can you help me?

My code looks like this:

\documentclass[a4paper,11pt]{memoir}
\usepackage[utf8]{inputenc} % Input encoding - Depending on editor
\usepackage{lmodern} % Modern LaTeX font
\usepackage[danish]{babel} % Language package
\usepackage[T1]{fontenc} % Hyphenation
\usepackage{fix-cm} % Fix for cm
\usepackage{graphicx} % To handle pictures
\usepackage{xcolor} % To define colors
\usepackage{tikz} % Graphical tool
\usepackage{mathtools} % To use \eqref
\usepackage{url} % Use of urls in the text
\usepackage{varioref} % Smarter references
\usepackage{calc}% Auto calculate
\usepackage{lipsum} % Debugging text
\usepackage{sansmath,subfig} % Gives a warning because subfig loads caption
\usepackage[backend=bibtex8]{biblatex}
\usepackage{todonotes} % Giver mulighed for kommentarer
\addbibresource{referencer/my-bibliography-file.bib}

\title{Rapport}

\graphicspath{{figures/}} % Image path

\definecolor{ase_blue}{RGB}{10,55,136}

%---------------------------------------------------------------------------%
%-------------------------- PDF - PROPERTIES -------------------------------%
%---------------------------------------------------------------------------%
% Active links
\usepackage[plainpages=false,pdfpagelabels,pageanchor=false]{hyperref}

\hypersetup{pdfauthor={<The authors>}, pdftitle={<The
    title>},pdfsubject={<The subject>}}

%---------------------------------------------------------------------------%
%---------------------------- Caption Font ---------------------------------%
%---------------------------------------------------------------------------%
\DeclareCaptionFont{sansmath}{\sansmath}
\captionsetup{font={small,sf,sansmath}}
\captionsetup[subfloat]{font={small,sf,sansmath}}

%---------------------------------------------------------------------------%
%---------------------------- MARGIN CONTROL -------------------------------%
%---------------------------------------------------------------------------%
\setlrmarginsandblock{3.5cm}{2.5cm}{*}
\setulmarginsandblock{3cm}{*}{1.2}
\checkandfixthelayout[nearest]
\setlength{\evensidemargin}{\oddsidemargin}

%--------------------------------------------------------------------------%
%------------------------- FRONTPAGE - PROPERTIES -------------------------%
%--------------------------------------------------------------------------%
\usepackage{soul} % Letterspace package
\sodef\an{}{0.05em}{.5em plus.6em}{1em plus.1em minus.1em}
\newcommand\stext[1]{\an{\scshape#1}}
\newcommand{\logoHuge}{\fontsize{0.55cm}{0.8cm}\selectfont}
\newcommand{\SuperHuge}{\fontsize{1.2cm}{1.8cm}\selectfont}

%--------------------------------------------------------------------------%
%------------------------- PAGESTYLE - PROPERTIES -------------------------%
%--------------------------------------------------------------------------%
%\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}

\makepagestyle{ase_report}
\makeevenhead{ase_report}{\small\sffamily\leftmark}{}{}
\makeevenfoot{ase_report}{\small\sffamily\thepage}{}{}
\makeoddhead{ase_report}{}{}{\small\sffamily\leftmark}
\makeoddfoot{ase_report}{}{}{\small\sffamily\thepage}

\makeatletter
\makepsmarks{ase_report}{%
  \renewcommand\chaptermark[1]{%
    \markboth{%
      \ifnum \value{secnumdepth} > 1
      \if@mainmatter % 
      \@chapapp\ \thechapter. \ %
      \fi
      \fi
      ##1}{}}%
  \renewcommand\tocmark{\markboth{\contentsname}{\contentsname}}%
  \renewcommand\lofmark{\markboth{\listfigurename}{\listfigurename}}%
  \renewcommand\lotmark{\markboth{\listtablename}{\listtablename}}%
  \renewcommand\bibmark{\markboth{\bibname}{\bibname}}%
  \renewcommand\indexmark{\markboth{\indexname}{\indexname}}%
  \renewcommand\sectionmark[1]{\markright{##1}}%
  \renewcommand\subsectionmark[1]{\markright{##1}}%
  \renewcommand\subsubsectionmark[1]{\markright{##1}}%
}

\copypagestyle{plain}{ase_report}
\makeoddhead{plain}{}{}{}
\makeoddfoot{plain}{}{}{\small\sffamily\thepage}

\pagestyle{ase_report}
\aliaspagestyle{chapter}{plain}

%--------------------------------------------------------------------------%
%--------------------- HEADING - SECTION ----------------------------------%
%--------------------------------------------------------------------------%
\newcommand{\ruledsec}[1]{%
  \Large\bfseries\sffamily\raggedright #1
  \color{ase_blue}\rule[15pt]{\textwidth}{1.0pt}} % Section with ruler
\setsecheadstyle{\ruledsec} % Define section head style

\setfloatlocations{figure}{htp}
\setfloatlocations{table}{htp}

%--------------------------------------------------------------------------%
%--------------------- HEADING - SUBs-SECTION -----------------------------%
%--------------------------------------------------------------------------%
\addtocounter{secnumdepth}{2} % Depth numbering

\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\Large\bfseries\sffamily\raggedright}

\setsechook{\hangsecnum} % Hang the section number in margin
\setsubsechook{\defaultsecnum} % Don't do this on the subsections
\setsubsubsechook{\defaultsecnum}
\setaftersecskip{5pt} % Default skip between the section and text

%--------------------------------------------------------------------------%
%------------------------- TOC - PROPERTIES -------------------------------%
%--------------------------------------------------------------------------%
\raggedbottomsectiontrue % The page may not be strected on page breaks
\setsecnumdepth{subsubsection} % Set section depth in the TOC
\maxsecnumdepth{subsubsection} % Max of section depth in the TOC
\settocdepth{subsection} % Up to and including subsection

\setlength{\cftbeforechapterskip}{1.0em plus 0.1em minus 0.1em} % Space from chapters
%\chapterprecistoc{Text in TOC}

\addto\captionsenglish{
  \renewcommand*{\cftchaptername}{Chapter{\space}}
  \renewcommand*{\cftfigurename}{Fig.{\space}}
  \renewcommand*{\contentsname}{Table of Contents}
  \renewcommand*{\abstractname}{Abstract}
  \renewcommand*{\listfigurename}{List{\space}of{\space}Figures}
  \renewcommand*{\listtablename}{List{\space}of{\space}Tables}
  \renewcommand*{\appendixtocname}{Appendices}
  \renewcommand*{\appendixpagename}{Appendices}
}

\addto\captionsdanish{
  \renewcommand*{\cftchaptername}{Kapitel\space}
  \renewcommand*{\cftfigurename}{Fig.\space}
  \renewcommand*{\abstractname}{Resumé}
  \renewcommand*{\contentsname}{Indholdsfortegnelse}
  \renewcommand*{\listfigurename}{Liste{\space}af{\space}Figurer}
  \renewcommand*{\listtablename}{Liste{\space}af{\space}Tabeller}
  \renewcommand*{\appendixtocname}{Appendiks}
  \renewcommand*{\appendixpagename}{Appendiks}
}
%--------------------------------------------------------------------------%
%------------------------- CHAPTER STYLE ----------------------------------%
%--------------------------------------------------------------------------%
\makechapterstyle{ase_chapterstyle}{
  \setlength{\beforechapskip}{30pt}
  \setlength{\afterchapskip}{1.5cm}
  \renewcommand*{\printchaptername}{}
  \renewcommand*{\chapnumfont}{\normalfont\sffamily\bfseries\fontsize{60}{0}\selectfont}
  \renewcommand*{\printchapternum}{
    \flushright
    \begin{tikzpicture}
      \draw[fill,color=ase_blue] (0,0) rectangle (2.5cm,2.5cm);
      \draw[color=white] (1.25cm,1.25cm) node { \chapnumfont\thechapter };
    \end{tikzpicture}
  }
  \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries\color{black}}
  \renewcommand*{\printchaptertitle}[1]{%
    \raggedright\chaptitlefont\parbox[t]{\textwidth}{\raggedright##1}}
}

\chapterstyle{ase_chapterstyle}

%--------------------------------------------------------------------------%
%------------------------- USER DEFINED COMMANDS --------------------------%
%--------------------------------------------------------------------------%
% Define some macros
%\setlength{\parindent}{4em} %Paragrafindryk
\setlength{\parskip}{\f@size pt}   %Paragrafnedrykning


\begin{document}
%\includeonly{testing} %If you don't want to compile every time
%--------------------------------------------------------------------------%
%------------------------- FRONT MATTER -----------------------------------%
%--------------------------------------------------------------------------%
\frontmatter
\include{forside} % Include the frontpage

% Page number in roman style
\pagenumbering{roman}
\include{underskrifter}
\clearpage

\addcontentsline{toc}{chapter}{\abstractname}
\include{abstract}
\clearpage

\addcontentsline{toc}{chapter}{\contentsname}
\thispagestyle{empty}
\tableofcontents*

\clearpage

\addcontentsline{toc}{chapter}{\listfigurename}
\thispagestyle{empty}
\listoffigures*
\clearpage

\addcontentsline{toc}{chapter}{\listtablename}
\thispagestyle{empty}
\listoftables*

%--------------------------------------------------------------------------%
%------------------------- MAIN MATTER ------------------------------------%
%--------------------------------------------------------------------------%
\mainmatter
\include{kapitler/1Indledning}
\include{kapitler/2RelateretArbejde}
\include{kapitler/3Indforing}
\include{kapitler/3Indforing}
\include{kapitler/Dybde}
\include{kapitler/Dybde}
\include{kapitler/Dybde}
\include{kapitler/Diskussion}
\include{kapitler/Konklusion}
\include{testside} % Include the chapters
%--------------------------------------------------------------------------%
%------------------------- BACK MATTER ------------------------------------%
%--------------------------------------------------------------------------%

\appendixpage

\appendix
%\addtocontents{toc}{\cftpagenumbersoff{chapter}}
\include{appendiks/appendixA}

\backmatter

\printbibliography

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End:

Best Answer

The following line kills your page setup; I don't know why it is there but comment it out and you are back in business

\setlength{\evensidemargin}{\oddsidemargin}

Please don't put your whole thesis for a question like this. I've commented out everything and put a lipsum content in the main matter which was sufficient to find the problem.

You have \setbinding{<length>} as given in the manual for space (see the manual)