This question already has an answer here:

I'm compiling my thesis want the initial page numbering to be roman and the following to be arabic. I divide the two sections using \mainmatter and \frontmatter. Any direction will be highly appreciated. Thank you

\usepackage[numbered, framed]{mcode}

    \setlength{\parindent}{0pt}                         % copied from DCSSS04 style file to stop indenting paragraphs (the default)
%    \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}    % copied from DCSSS04 style file, spaces paragraphs and titles
    \setlength{\parskip}{10pt}                          % makes a fixed space between paragraphs

\lhead[\fancyplain{\thepage}{\thepage}]{\fancyplain{\slshape \leftmark}{\slshape \leftmark}}
\rhead[\fancyplain{\slshape \leftmark}{\slshape \leftmark}]{\fancyplain{\thepage}{\thepage}}
\newcommand{\R}{\mathbb{R}} % real line





marked as duplicate by Johannes_B, user36296, barbara beeton, user31729, user13907 Jan 29 '17 at 16:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Welcome to TeX.SX! Your 'document' does not compile since it misses the \documentclass and there are a lot of \include statements for files we don't have access to. – user31729 Jun 22 '16 at 14:56
  • 1
    sorry, I do include \documentclass and my document compiles. I'm not able to get the numbering correctly. I am able to include all the . tex files. – Amaan Ghole Jun 22 '16 at 14:57
  • 6
    @AmaanGhole - You may have misunderstood Christian's comment. We have no doubt that you have a \documentclass instruction in your document and that you are able to include various tex files. The issue is that nobody else can do so and hence that the problem(s) your facing can't be replicated. For sure, please do share with us which document class you use. – Mico Jun 22 '16 at 15:05
  • 2
    The commenters are asking you to provide a MWE. Please edit the code in your post to into a MWE. – Null Jun 22 '16 at 15:12
  • 3
    you might consider switching to the book class. there are a few differences besides the presence of \frontmatter and \mainmatter, in particular the default to twoside (can be overruled by [oneside] as option to \documentclass) and the use of page headers (can be overruled by \pagestyle{plain}), but they shouldn't change the results radically. – barbara beeton Jun 22 '16 at 15:35

Browse other questions tagged or ask your own question.