I am writing my Bachelorthesis in sharelatex.com and compiling with XeLaTeX. In the following code I want the \tableofcontents \listoffigures and \listoftables to have the pagenumbering in Roman lettering at the top right. However it does not work. The rest of the pages has it. I want it in the style of \fancyhdr. Is there a way to force this? or did I miss anything?
\documentclass[12pt,a4paper,oneside]{article}
\usepackage[top=25mm,bottom=20mm,left=35mm,right=30mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx} % für Grafiken
%\usepackage[]{hyperref}
\usepackage{amsmath}
\usepackage{titlesec}
\usepackage{amssymb}
\usepackage{caption} %Überschriften für Bilder
\captionsetup{font={small,it}}
\usepackage{listings}
\usepackage{color}
\usepackage{times}
\usepackage[numbers,square]{natbib}
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{tabto}
\usepackage{paracol}
\usepackage{tocloft}
\usepackage[onehalfspacing]{setspace}
\usepackage{nomencl}
\usepackage{tabularx}
\usepackage{float} %Position erzwingen
\usepackage{array} %feste Spaltenbreite einstellbar
\usepackage{eurosym}
\usepackage{subcaption}
\usepackage{acronym}
\begin{document}
\begin{titlepage}
\centering
\Huge
Titlepage
\end{titlepage}
\setlength{\parindent}{0em} %keine Einrückung nach Absatz
\pagestyle{fancy}
\fancyhf{}
\setcounter{page}{1}
\fancyhead[R]{\thepage}
%\renewcommand{\headrulewidth}{0.5pt}
\pagenumbering{Roman}
\addcontentsline{toc}{section}{Affidavit}
\section*{Affidavit}
Affidavit
\clearpage %\input{Affidavit}
\tableofcontents
\clearpage
\addcontentsline{toc}{section}{List of Abbreviations}
\section*{List of Abbreviations}
\begin{acronym}[TCP]
\acro{TCP}{Transmission Control Protocol}
\end{acronym}
\clearpage
\listoffigures
\addcontentsline{toc}{section}{List of Figures}
\clearpage
\listoftables
\addcontentsline{toc}{section}{List of Tables}
\clearpage
\fancyhead[L]{\nouppercase{\rightmark}}
\pagenumbering{arabic}
\section{Mainbody}
Text
\clearpage
% \pagenumbering{Roman}
% \fancyhf{}
% \rhead{\thepage}
% \setcounter{page}{6}
% \addcontentsline{toc}{section}{References}\clearpage
% \nocite{*}
% \bibliographystyle{unsrtnat}
% \bibliography{References}
% \clearpage
% \begin{appendix}
% \input{Sections/Appendix}\clearpage
% \end{appendix}
\end{document}
\maketitle
and\tableofcontents
use\thispagestyle{plain}
. You can either disable this feature (\let\thispagestyle=\@gobble
) or redefine plain (see\fancypagestyle{plain}
on pages 7-8).