1

I'm writing a big report for my university and i have a few questions for you. Here is the code of my "book" report :

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage{indentfirst}

\geometry{hmargin=2.5cm,vmargin=2.5cm}


\title{-----}
\author{----}

\begin{document}
        \maketitle
    
        \frontmatter
    \chapter{Intro}
    \tableofcontents
     
        \mainmatter
        \chapter{Part1}
        \section{Section1}
        \section{Section2}
    \chapter{Part2}
        \section{Section1}
        \section{Section2}
        
    \backmatter
    \chapter{Conclusion}
    \chapter{Bibliography}
\end{document}

Using the frontmatter, mainmatter and backmatter helps me to avoid some of the parts to have some numbering (for example I do not want "I - Intro" but only "Intro" and it's working fine. That's the only reason I'm using the book template. I always use the report one and it was fine but I couldn't remove the numbering. Is it a good idea to use the book template for this ?

Using the book template brings me some new issues...

First of all I have a little problem with the number of the pages for the frontmatter. I have the roman-style page but I want to use everywhere numerics numbers. I tried to use \pagenumbering{arabic} but it doesn't work. You can see the problem on the next picture.

enter image description here

Then here is my second problem : on the "header" of some pages I have the numbers of the page (still in a roman-style), how can i remove them? I've noticed that i do not have the number of those page on their footer (and that's annoying).

enter image description here

Then my third and last problem : the page style is not the same i have with a "report" template because the titles have the correct margin but not the text. How can I change that ? I've noticed that this is only on the frontmatter and backmatter chapters.

enter image description here

There are a lot of questions because I'm a beginner and I did not find any answers that were working for me, Thanks a lot and have a good day!

5
  • article book and report are generated from the same file, there are very few differences, the \foontmatter/\backmatter are the main difference betwen report and book so if you find those useful it makes sense to use book rather than report. For your glossary alignment it is hard to guess what you did if you show no example document. Apr 27 at 15:21
  • In fact the problem was not with the margin but the itemize style which is invisible wehn I'm using it in the book template. The "-" that should appears is replaced with some whitespace for no reason.
    – Boröom
    Apr 27 at 15:33
  • latex never does anything for no reason, it follows the instructions in the input. If you make a small document with just a glossary that does not appear as you expect, then someone will debug your code. Otherwise it is very hard to help if you just show an image of output from an unseen document. In a glossary I would have expected ASIC to be the item label and appear to the left where you have white space. Apr 27 at 15:40
  • @DavidCarlisle "Latex never does anything for no reason..." My favorite!
    – AndiW
    Apr 27 at 16:52
  • Hmmm.... You use babel, but you don't especify a language. Shoudn't you be using french?
    – palopezv
    Apr 27 at 17:00
0

For the page numbering problem: \frontmatter calls as part of its standard definition \pagenumbering{roman}, and \mainmatter calls \pagenumbering{arabic}. So one way to do it is to redefine those two commands and remove the calls to \pagenumbering.

\documentclass{book}

\makeatletter
\renewcommand\frontmatter{%
    \cleardoublepage
  \@mainmatterfalse}
\renewcommand\mainmatter{%
    \cleardoublepage
  \@mainmattertrue}
\makeatother


\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage{indentfirst}

\geometry{hmargin=2.5cm,vmargin=2.5cm}

\title{-----}
\author{----}

\begin{document}
        \maketitle
    
        \frontmatter
    \chapter{Intro}
    \tableofcontents
     
        \mainmatter
        \chapter{Part1}
        \section{Section1}
        \section{Section2}
    \chapter{Part2}
        \section{Section1}
        \section{Section2}
        
    \backmatter
    \chapter{Conclusion}
    \chapter{Bibliography}
\end{document}

For fine-tuning exactly what goes into headers and footer, one package to use is fancyhdr; though there are also plenty of other ones. (For example, if you want fine-tuning of how the chapter and section titles are type set, you may wish to use the 'titlesec' package, in which case it may be more convenient to use the companion titleps package to do the header/footer instead.)

1
  • Depending on what you want to accomplish specifically, at this point it may be easier to start from the report class and modify. Apr 27 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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