1

I have set up the acknowledgement part as follows:

\section*{Acknowledgements}
Thanks Mum.

But then, the header is missing, except the line at the top is appeared. As I want to make it standardized with the rest of the part of my document, I need to, by any means, include the header. When I search in the latex code or setting, there is no such like \usepackage{fancyhdr} is used. I used a template found somewhere actually, and my question is how to add such a header.

EDIT:

I found, perhaps, the part that configures the header. Nevertheless, I don't know how to customize it in order for it to affect on the newly added acknowledgement part as well. The part is as below(options.tex):

\usepackage[automark]{scrpage2}
\usepackage{ifthen}

\pagestyle{scrheadings}
%\automark[chapter]{section}
\clearscrheadfoot
\ohead{\pagemark}
\ihead{\headmark}

\renewcommand*{\chapterpagestyle}{scrheadings}

\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000

In main latex code:

\documentclass[%
12pt,
oneside,
halfparskip+,           
headsepline,            
titlepage,          
liststotoc,         
pointlessnumbers,   
bibtotoc
]
{scrreprt}

\usepackage[T1]{fontenc}
\usepackage{pseudocode}
\usepackage[utf8]{inputenc}
\usepackage{abstract}
\input{options.tex}

\setlength{\headheight}{1.5\baselineskip} 

\listfiles

\newcommand{\emphprolog}[1]{\texttt{#1}}

\newcommand{\TODO}[1]{\textcolor{red}{\texttt{TODO: #1}}\\} 
\newcommand{\QUESTION}[1]{\textcolor{blue}{\texttt{Question: #1}}\\} 

\newcommand{\DONE}[1]{} 

\renewcommand{\emph}[1]{\textit{#1}}

\begin{document}
\setcounter{secnumdepth}{8}
\setcounter{tocdepth}{8}

\ifpdfoutput{
    \DeclareGraphicsExtensions{.pdf,.jpg,.png}
    \newcommand{\imgscale}{0.7}
} {
    \DeclareGraphicsExtensions{.eps}
    \newcommand{\imgscale}{0.2}
}

\input{prefix/titlepage.tex}
\input{prefix/abstract}
\input{prefix/acknowledgements}
\pagenumbering{roman}

%\maintoc                       
\tableofcontents
\newpage
\listoftables                   
%\lstlistoflistings
\newpage
\listoffigures  
\clearpage      
\input{appendix/apprev}
\clearpage  
\pagenumbering{arabic}


\input{chapter/introduction}
\input{chapter/stateoftheart}
\input{chapter/approach}
\input{chapter/results}
\input{appendix/appendix}
\clearpage

\end{document}
4
  • Try to make your example code complete (i.e. with \begin{document}, some section, your Acknowledgement and \end{document} so we can find out what exactly is going on.
    – yo'
    Commented Mar 19, 2012 at 9:51
  • 1
    You clearly have a lot of information hidden in other files. Try to make it minimal (non)-working) example, I mean: remove everything that can be removed so that the resulting ONE .tex file can be translated by latex without need of other your files and the error still appears. Maybe you will find what causes the problem yourself when you make the example as simple as possible.
    – yo'
    Commented Mar 19, 2012 at 10:44
  • 2
    If you use \addsec{} instead of \section*{}, the header should appear. check the scrguide for details about what \addsec does
    – Martin H
    Commented Mar 19, 2012 at 11:27
  • @Martin H: Thanks for your suggestion. It still doesn't appear after trying using \addsec{}.
    – alfa_80
    Commented Mar 19, 2012 at 12:18

1 Answer 1

5

You're typesetting the "Acknowledgements" as an unnumbered \section, although scrreprts highest-level sectioning command is \chapter. Also, scrreprt by default uses oneside, and \addsec (KOMA-Scripts alternative to \section*), doesn't update the header in oneside mode (although \addchap, the alternative to \chapter*, would). Solution: Manually update the header by using \markright{Acknowledgements}.

\documentclass{scrreprt}

\usepackage[automark]{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\ohead{\pagemark}
\ihead{\headmark}
\renewcommand*{\chapterpagestyle}{scrheadings}

\usepackage{lipsum}

\begin{document}

\addsec{Acknowledgements}
\markright{Acknowledgements}

\lipsum[1]

\end{document}

enter image description here

1
  • Your solution is really handy and great..Thanks a lot for the fix!
    – alfa_80
    Commented Apr 1, 2012 at 10:02

You must log in to answer this question.

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