0

I have the following formatting requirements for my page numbering:

  1. For chapter pages, centered on the bottom (half an inch from bottom edge of the paper)
  2. For normal pages, right justified on the top-right corner (half an inch from the top edge and half an inch from the right edge if the paper)

Is there any way to do this with only titlesec?

Edit 1: I am not sure how my code works but here's what I've tried so far. Am I using it properly?

\documentclass[12pt]{report}

\usepackage{titlesec}
\newpagestyle{main}{\sethead{}{}{\thepage}}
\pagestyle{main}

It works fine but what if I want to place the page number on the right corner of the ToC and bibliography too? I feel like I'm not doing it properly.

1
  • Welcome to TeX.SE! What have you tried so far? Please show us your compilable tex code ...
    – Mensch
    Commented Aug 12, 2022 at 15:06

1 Answer 1

0

Use \assignpagestyle{\chapter}{<style name>} to change the page numbering style of a Chapter page.

\begin{filecontents*}{\jobname.bib} %for bibliography
@article{label1,
  title={Any title},
  author={Name},
  journal={Journal},
  volume={1},
  number={1},
  pages={1000},
  year={2022},
  publisher={Publisher}
}
\end{filecontents*}

\documentclass[12pt]{report}

\usepackage[pagestyles]{titlesec} %pagestyles option in necessary
\newpagestyle{main}{%
    \sethead%
        {}{}{\thepage}%
}
\newpagestyle{chap}{%
    \setfoot%
        {}{\thepage}{}%
}

\usepackage{duckuments} %for dummy text

\usepackage{biblatex}
\addbibresource{\jobname.bib}


\begin{document}
\assignpagestyle{\chapter}{main}
\tableofcontents

\pagestyle{main}

\chapter{One}
\assignpagestyle{\chapter}{chap}

\duckument

\chapter{Cite}
\cite{label1}

\duckument

\assignpagestyle{\chapter}{main}
\printbibliography
\end{document}

TOC page:

enter image description here

Bibliography Page:

enter image description here

Note: Always try to provide a minimal working example (MWE). The absence of an MWE discourages answering.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .