2

First, sorry for my english.

Hi, Im doing my final project in the University and I need some help with this features of my document.

How can I put pair numbers in the right side of the document and odd numbers in the left side of the document, in the numbering?

I want some like this pictures where you can see when I start a new chapter the numbering is in the middle of the page in the bottom.

Pair numbers of numbering are in the left side and Odd numbers of numbering are in the right side.

Note: In the first picture ignore the image with a number twelve, the important of this image is the number 5 and the start of chapter.

Im a newbie in Latex and I dont know what packages I have and I dont care so much. If you say me one package to use I will add that in my project.

enter image description here enter image description here enter image description here

\documentclass{article}

\usepackage[left=3cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
\usepackage{lipsum}
\usepackage{fancyhdr} 
\pagestyle{fancy}
\lhead{} 
\chead{}
\rhead{\textcolor[gray]{0.5}{\textit{\nouppercase \leftmark}}}
\lfoot{}
\cfoot{}
\rfoot{\textcolor[gray]{0.5}{\thepage}}
\renewcommand{\headrulewidth}{0.2pt} 

\fancypagestyle{detailed}{
\fancyhf{} 
\fancyfoot[R]{\textcolor[gray]{0.5}{\thepage}}
\renewcommand{\headrulewidth}{0pt}
}

\usepackage[round]{natbib}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\begin{document}

\chapter{Introducción}

\section{First Section}

\lipsum[1-3]

\section{Second Section}

\lipsum[1-7]

\section{Third Section}

\lipsum[1-6]

\end{document}

I think the problem is here

\usepackage{fancyhdr} 
\pagestyle{fancy}
\lhead{} 
\chead{}
\rhead{\textcolor[gray]{0.5}{\textit{\nouppercase \leftmark}}}
\lfoot{}
\cfoot{}
\rfoot{\textcolor[gray]{0.5}{\thepage}}
\renewcommand{\headrulewidth}{0.2pt} 

And If you compile my code you can see what I want. I want the number one of numbering in the middle of the page because is a new chapter like a the images.

The number two of the numbering should be in the left side and the number three in the last page should be in the right side.

  • 2
    Welcome to TeX.SX!! Please give a full minimal working example that gives a skelton document for what you want. Currently we have to guess what document class, packages, fonts etc you are using and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. Also what "pair numbers" do you want on the left and right hand sides? Are these page numbers? – Andrew Dec 12 '17 at 9:16
  • You can have blank pages, completely empty, but they will need to be numbered. Otherwise, the internal page logic is confused. – Johannes_B Dec 12 '17 at 9:23
  • Possible duplicate of Add a new empty page – Cragfelt Dec 12 '17 at 10:06
  • Please do not ask multiple questions in a single post. – user36296 Dec 12 '17 at 17:57
  • 1
    @J.Cabello That is an image of what you want, not an example of what you tried so far. Please look at this link: minimal working example (MWE). – CarLaTeX Dec 13 '17 at 9:52
2

The article class defaults to one-sided layout, so I recommend you switch to two-sided:

\documentclass[twoside]{article}

However, since you're using \chapter, the article style is inappropriate. I suggest you switch to book (or a more sophisticate book-like class, such as memoir). In the case of book, the twoside option is the default.

I want the number one of numbering in the middle of the page because is a new chapter

The book class automatically puts the page number in the centre at the start of each chapter.

The number two of the numbering should be in the left side and the number three in the last page should be in the right side.

The header and footers need to specify the left and right settings for even and odd pages for double-sided documents:

\fancyhead[LE,RO]{\textcolor[gray]{0.5}{\textit{\nouppercase \leftmark}}}
\fancyfoot[LE,RO]{\textcolor[gray]{0.5}{\thepage}}

Complete MWE:

\documentclass{book}

\usepackage[left=3cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{fancyhdr} 
\pagestyle{fancy}
 \fancyhf{}%
\fancyhead[LE,RO]{\textcolor[gray]{0.5}{\textit{\nouppercase \leftmark}}}
\fancyfoot[LE,RO]{\textcolor[gray]{0.5}{\thepage}}
\renewcommand{\headrulewidth}{0.2pt} 

\fancypagestyle{detailed}{%
 \fancyhf{}%
 \fancyfoot[LE,RO]{\textcolor[gray]{0.5}{\thepage}}%
 \renewcommand{\headrulewidth}{0pt}%
}

\usepackage[round]{natbib}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\begin{document}

\chapter{Introducción}

\section{First Section}

\lipsum[1-3]

\section{Second Section}

\lipsum[1-7]

\section{Third Section}

\lipsum[1-6]

\end{document}

image of first page

image of double-page spread

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.