0

Roman numerals in page numbers are required in the front matter of the thesis. But if I write \frontmatter in the ERT then on some pages the page numbers appear in roman numerals while on the others pages they do not. How can roman numerals in as page numbers be limited only in the front matter?

\batchmode
\makeatletter
\def\input@path{{\/}}
\makeatother
\documentclass[english,openany]{book}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[LGR,T2A,T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{array}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{tipa}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{subscript}
\usepackage{chapterbib}
\doublespacing

\makeatletter


\DeclareRobustCommand{\greektext}{%
\fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}
\DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}
\DeclareFontEncoding{LGR}{}{}
\DeclareTextSymbol{\~}{LGR}{126}
\DeclareRobustCommand{\cyrtext}{%
\fontencoding{T2A}\selectfont\def\encodingdefault{T2A}}
\DeclareRobustCommand{\textcyr}[1]{\leavevmode{\cyrtext #1}}
\AtBeginDocument{\DeclareFontEncoding{T2A}{}{}}

\newcommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
\text{\ifx\math@version\b@ld\bfseries\fi#1}\endgroup\else#1\fi}


\providecommand{\tabularnewline}{\\}

\usepackage{amsmath}
\usepackage[
 headsepline,
 ]{scrlayer-scrpage}
\automark[chapter]{chapter}
\addtokomafont{pagehead}{\small}
\clearpairofpagestyles
\chead{\headmark}
\cfoot*{\pagemark}

\makeatother

\usepackage{babel}
\begin{document}
\begin{frontmatter}
\chapter
\section
\subsection
\end{frontmatter}
\end{document}

I am using \makecontents to make the contents of the chapter. but its does not include the contents of pages in frontmatter how can that be done?

1
  • Your 'MWE' does not compile!
    – user31729
    Commented Jan 2, 2016 at 7:29

1 Answer 1

3

The 'MWE' by the O.P. does not compile -- due to \chapter etc. commands without arguments.

\begin{frontmatter}...\end{frontmatter} is possible but of no use here.

The main culprit is that \frontmatter has no following \mainmatter command.

There are warnings by scrlayer-scrpage etc. about the headheight etc. I don't address this issues.

%\batchmode
%\makeatletter
%\def\input@path{{\/}}
%\makeatother
\documentclass[english,openany]{book}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[LGR,T2A,T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{array}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{tipa}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{subscript}
\usepackage{chapterbib}
\doublespacing

\makeatletter


\DeclareRobustCommand{\greektext}{%
\fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}
\DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}
\DeclareFontEncoding{LGR}{}{}
\DeclareTextSymbol{\~}{LGR}{126}
\DeclareRobustCommand{\cyrtext}{%
\fontencoding{T2A}\selectfont\def\encodingdefault{T2A}}
\DeclareRobustCommand{\textcyr}[1]{\leavevmode{\cyrtext #1}}
\AtBeginDocument{\DeclareFontEncoding{T2A}{}{}}

\newcommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
\text{\ifx\math@version\b@ld\bfseries\fi#1}\endgroup\else#1\fi}


\providecommand{\tabularnewline}{\\}

\usepackage{amsmath}
\usepackage[
 headsepline,
 ]{scrlayer-scrpage}
\automark[chapter]{chapter}
\addtokomafont{pagehead}{\small}
\clearpairofpagestyles
\chead{\headmark}
\cfoot*{\pagemark}

\makeatother

\usepackage{babel}
\usepackage{blindtext}
\begin{document}
\frontmatter
\chapter{Foo}
\section{Foo}
\subsection{Foo}
\mainmatter
\chapter{Foobar}
\blindtext[10]
\end{document}

enter image description here

4
  • I see all the page numbers are coming in roman numerals while I want only that the pages staring form Chapter 1 should not have roman numerals How can that be done?
    – user87834
    Commented Jan 2, 2016 at 7:43
  • @user87834: See the screen shot produced by my code: Chapter 1 Foobar has arabic page numbers, the unnumbered frontmatter one has roman page numbers. If you don't see it, you're doing something totally different and the above 'MWE' is not corresponding!
    – user31729
    Commented Jan 2, 2016 at 7:47
  • 1
    @user87834 Directly above you say it works, so apparently this is a new question? Apart from that, i don't understand the comment. Where is \makecontents defined?
    – Johannes_B
    Commented Jan 2, 2016 at 11:23
  • Okay I will make a new question. This question is in addition to the one I asked before.
    – user87834
    Commented Jan 2, 2016 at 11:32

You must log in to answer this question.

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