I'm writing a (kind of) book, with several chapters. Maybe it's not the right choice, but I'm using the subfile package to create a main.tex file and a "custom style" using the mystyle package. I've trouble with the page number behavior. What I want is: TOC and introduction sections without any header nor page numbers, all the other chapters with "normal" page numbers. Here are my files:


\documentclass[12pt, openright, twoside, a4paper]{report}
\usepackage{mystyle} %/Users/.../texmf/tex/latex/misc/mystyle.sty

... other chapters


... some stuffs
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. \ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. \ #1}{}}
\fancyhead[RO,LE]{{\bfseries \leftmark}\\\rightmark}
\renewcommand{\headrulewidth}{0.5pt}% filet en haut de page
\addtolength{\headheight}{0.5pt}    % espace pour le filet
\renewcommand{\footrulewidth}{0.5pt}  % filet en bas
...other stuffs

and the introduction file:

\pagenumbering{gobble} % Remove page numbers (and reset to 1) (http://tex.stackexchange.com/questions/54333/no-page-numbering)
\chapter*{Introduction} % Major section
... some text

And it doesn't work. Well, page headers and decorations are just fine, but page numbers appear nowhere! I really don't understand what happens here. I though that for each "call" of a ChX file, the style mystyle file was re-read. Is it the case? Any ideas? Thanks!

  • What happens if you remove the \pagenumbering{gobble} % Remove page numbers (and reset to 1)? Mar 6 '17 at 18:47
  • Please don't write ...some stuffs in the package code ... it is not compilable and requires us to remove it
    – user31729
    Mar 6 '17 at 18:49
  • @Ulrike Fisher If I do that, page number appear everywhere
    – ariel67
    Mar 6 '17 at 19:02
  • 1
    @ Christian Hupfer Sorry... I'll remember for the next time
    – ariel67
    Mar 6 '17 at 19:03
  • So you know now why they disappear. Try out \pagenumbering{arabic} at the point where they should appear (this will reset the number to 1, if you don't want this, you should redefine only \thepage, or define a special page style). Mar 6 '17 at 19:12

Your Answer

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

Browse other questions tagged or ask your own question.