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.

Nicola Talbot
  • 41,153
J.Cabello
  • 25
  • 4

1 Answers1

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

Nicola Talbot
  • 41,153