Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm currently doing the thesis report and I cant seem to get the numbering to work as well as the along with some other stuff.

What I want is Abstract(eng) Abstract(swe) and Acknowledgments to all be on the right side, with roman numbering. I can accomplish this with

\newpage
\thispagestyle{empty}
\mbox{}
\newpage

but I wanna use \cleardoublepage, which is not working, between the chapters as well.

Another thing I want is the numbering in the toc to be roman as well, but it isn't. I also want the abstract to show in the toc with the roman page number ref but they all show up with arabic number page 1.

\documentclass[a4paper]{report}

\usepackage[english,swedish]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage[table]{xcolor}
\usepackage{lscape}
\usepackage[hidelinks]{hyperref}
\usepackage[cp1252]{inputenc}
\usepackage{cite}
\usepackage{appendix}
\parindent 0pt

\begin{document}

\pagenumbering{roman}

\chapter*{Abstract}
\input{abseng}
\pagenumbering{plain}
\cleardoublepage                    % not working

\chapter*{Sammanfattning}
\input{abssve}
\pagenumbering{plain}
\cleardoublepage

\chapter*{Acknowledgment}
\input{ack}
\pagenumbering{plain}
\cleardoublepage

\tableofcontents
\addtocontents{toc}{~\hfill\textbf{Page}\par}       % Add page above numbers

\addcontentsline{toc}{chapter}{Abstract}            % Add to toc ?
\addcontentsline{toc}{chapter}{Sammanfattning}
\addcontentsline{toc}{chapter}{Acknowledgments}
\addcontentsline{toc}{chapter}{Contents}

\pagenumbering{arabic}
\cleardoublepage                                     %<-- not working
\include{Introduction}

%\include{other chapters}

\bibliographystyle{unsrt}       % (uses file "plain.bst")
\bibliography{myrefs}

\listoffigures[toc]

\begin{appendix}
\include{appendix}

\end{document}
share|improve this question
6  
cleardoublepage only works in a double sided layout, so adding twoside to your class options should fix that part. –  ArTourter Apr 17 '12 at 10:37
1  
You should indeed write a separate answer instead of editing your answer into the question. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation. –  lockstep Apr 17 '12 at 15:34
    
Although I am saying no to the helpful question, I find the information beneficial. However the problem for me is where does this code go? What is the OS and WORD generation for this code? Is it 2003, 2007 or 2010? I would need this information prior to trying to fix my problems which seem the same as this post. If I can manage to get the roman numerals and alpha numeric values to work in my doctoral proposal I would be thrilled. Right now it is a major frustration. So if this code is applicable to OS 2007 and MS Word 2010, great! Now how would it be applied, to become affective? –  user14358 May 8 '12 at 13:27

2 Answers 2

up vote 9 down vote accepted

As I said in my comment, \cleardoublepage only works in a double sided layout, so adding twoside to your class options should fix that part.

However you problems are not all fixed by this. The other issue is that\pagenumbering{plain} is not a valid counter scheme. What you probably meant is \pagenumbering{arabic}.

Once these two changes are done, your document will compile but it will still not behave the way you probably want it to.

The effects of you changing your numbering scheme after every chapter is that the page counter is reset every time you call \pagenumbering{}, but in your document, \cleardoublepage is always used after resetting your page numbers. calling \cleardoublepage before changing your numbering schemes, should make it behave properly.

EDIT:

The easiest way to have empty pages really empty with a non KOMA class is to use the emptypage package. If you use the new KOMA scrreprt class you get access to the \cleardoubleempty command which does the same thing (as well as \cleardoubleplain and \cleardoublestandard depending on the pagestyle you want to have).

Regarding the table of content, you need to reshuffle your document a bit and put the \addccontentsline{}{}{} just below the corresponding \chapter*{} call. And the one for "Contents" just below the \tableofcontents calls. However you will then have to move the

\addtocontents{toc}{~\hfill\textbf{Page}\par}

to the beginning of your document (just after \begin{document} works) so that it does not appear between two contents lines.

share|improve this answer
    
Maybe he meant \pagelayout{plain} instead of \pagenumbering{plain}? –  Martin Scharrer Apr 17 '12 at 11:14
    
Ya thats what i meant, copypasted wrong :( sorry, the twoside works fine so it solves the cleardoublepage problem. The reason for \pagelayout{plain} so the number would show as I used begin{abstract} but changed to chapter because of the title being small. Anyways i used \thispagestyle{empty} for the empty page as i dont want number on the empty pages, and i get that now. Another thing is about showing in the toc the abstract page in roman numbers. Abstract iii ... Introduction 9 –  Mamed Apr 17 '12 at 12:12
    
@Mamed thanks for the clarifications, see the edited answer –  ArTourter Apr 17 '12 at 14:05

It works now, thanks for all the help, I will add the full code below for others in the future.

\documentclass[twoside,a4paper]{report}
...same...
\usepackage{emptypage}


\begin{document}

\addtocontents{toc}{~\hfill\textbf{Page}\par}  < optional to add page above the numbers
\addcontentsline{toc}{chapter}{Abstract}       < Add <this> title to contents
\pagenumbering{roman}\setcounter{page}{3}      
\chapter*{Abstract}
\input{abseng}
\cleardoublepage

\addcontentsline{toc}{chapter}{Sammanfattning}
\chapter*{Sammanfattning}

\input{abssve}
\cleardoublepage

\addcontentsline{toc}{chapter}{Acknowledgments}
\chapter*{Acknowledgment}
\selectlanguage{english}             < needed as the "Contents" changed to swedish
\input{ack}
\cleardoublepage

\tableofcontents                     < here before: "add & clear" or else arabic numbers
\addcontentsline{toc}{chapter}{Contents}
\cleardoublepage

\pagenumbering{arabic}%\setcounter{page}{9}

\include{Introduction}

It gives

Contents                       
                               Page
Abstract                       iii
Sammanfattning                  v
Acknowledgments                vii
Contents                       ix
Introduction                    1
etc
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.