# To display section names in odd pages and chapter names in even pages outer mode

\usepackage{footnote}
\usepackage{tablefootnote}
\usepackage{scrpage2}

% Settings
\clearscrplain
\ofoot[\pagemark]{\pagemark}
\automark{chapter}
\renewcommand{\chaptermark}[1]%
{\markboth{{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]%
{\markright{{\thesection.\ #1}}}


These are my settings for the header to display chapter names in even pages and section names in odd pages and corresponding page numbers.

The problem is, both the headers and the page number are being displayed in the inside of the page. How to display them at the outer end ?

• Please complete your snippet to a proper complete document showing just the relevant settings. – Gonzalo Medina Aug 1 '15 at 21:41
• – AboAmmar Aug 1 '15 at 21:46

You should use scrlayer-scrpage instead of the obsolete scrpage2. In any case, there's a family of commands

\lehead[left even]{left even}


(and similar with foot instead of head), in which l, c, r stand for left, center, right, respectively, to control the position of the information in the headers. There's also

\ihead[scrplain-inside ]{scrheadings-inside }


where i stands for inner margin and o for outer margin.

In your case, you would simply say something like

\documentclass{scrbook}
\usepackage[a6paper]{geometry}%just for the example
\usepackage{scrpage2}
\usepackage{lipsum}

\clearscrplain
\cfoot[\thepage]{\pagemark}

\begin{document}

\chapter{Test chapter}
\section{Test section}
\lipsum[1-3]

\end{document}


The result:

• @ajayhhh You're welcome. Is it something like that what you were trying to achieve? – Gonzalo Medina Aug 5 '15 at 17:57
• meanwhile, I just changed \ofoot and \ohead to \ifoot and \ihead and it did the trick! Yea and your explained method works too... – ajayhhh Aug 5 '15 at 17:57
• @ajayhhh I see, I used the "o" commands since your question mentioned the outer margin. Don't forget that you can accept the answer, if you consider it helped you to solve the problem, by clicking the checkmark to its left. In case of doubt, please see How do you accept an answer? – Gonzalo Medina Aug 5 '15 at 17:59