0

I am trying to add the sequence diagrams as figures, which are in seperated file \include{7-appendix}, to the Appendix. They are being added but I am getting Listings as in the image below as heading. Is it possible to remove the word Listings from the heading ?

thesis.text

    \documentclass[
        english,
        11pt,
        twoside,
        a4paper,
        BCOR8.25mm,
        DIV10,
        headsepline,
        footsepline
    ]{scrbook}
    \include{commands}
    \begin{document}

    \selectlanguage{english}
    \frontmatter



    %---------------------------------------------------------------------------
    % Frontpage
    %---------------------------------------------------------------------------
        \input{0-titlepage.tex}

    %---------------------------------------------------------------------------
    % Inhaltsverzeichnis
    %---------------------------------------------------------------------------
        \tableofcontents
        \cleardoublepage

    %---------------------------------------------------------------------------
    % the nromal content
    %---------------------------------------------------------------------------
        \mainmatter
        \pagestyle{fancy}

        \include{1-introduction}    

        \include{6-conclusion}

    %--------------------------------------------------------------------------
        \appendix
        \chapter{Appendix}% 

            \listoffigures

            \listoftables

            \lstlistoflistings


      \begin{figure}[H]
    \centering
  \includegraphics[width=1.0\textwidth, height=450px]{images/trackingService}
    \caption{Sequence diagram scenario of the tracking service component}
    \label{fig2}
\end{figure}


\begin{figure}[H]
    \centering
  \includegraphics[width=1.0\textwidth, height=550px]{images/accessComponent}
    \caption{Sequence diagram scenario of creating the checkbox list and starting the MapActivity}
    \label{fig2}
\end{figure}


        %---------------------------------------------------------------------------

        \printnomenclature

        \bibliographystyle{ieeetr}
        \bibliography{bibliography}

    \printindex

\end{document}

commands.tex

        \usepackage{a4}   
        \usepackage{fancyhdr}
        \usepackage[T1]{fontenc}
        \usepackage[utf8]{inputenc}
        \usepackage{babel} 
        \usepackage{cite}
        \usepackage{float}      
        \usepackage{caption}    
        \usepackage{amssymb}
        \usepackage{textcomp}
        \usepackage{graphicx}
        \usepackage{epsf}
        \usepackage{color}
        \definecolor{gray}{gray}{.75}
        \usepackage[]{geometry}
        \usepackage{makeidx}
        \makeindex 
        \usepackage{cellspace}
        \usepackage{listings}
        \usepackage{subfigure}
    %Abkürzungsverzeichnis
        \usepackage[intoc]{nomencl}
          \let\abbrev\nomenclature
          \renewcommand{\nomname}{Abkürzungsverzeichnis}
          \setlength{\nomlabelwidth}{.25\hsize}
          \renewcommand{\nomlabel}[1]{#1 \dotfill}
          \setlength{\nomitemsep}{-\parsep}
          \makenomenclature

      \newcommand{\abk}[2]{#1\abbrev{#1}{#2}}
        \usepackage{enumitem}
        \setitemize{enumsep=-3pt}
        \setitemize{itemsep=-3pt}

        \usepackage{theorem}
        \newcounter{theorem}
        \newtheorem{definition}[theorem]{Definition}


    \usepackage[bookmarks=true,
                    bookmarksopen=true,
                    bookmarksnumbered=true,
                    colorlinks=true,
                    linkcolor=black                 
                    ]
                   {hyperref}

    \usepackage{cleveref}

    \usepackage[colorinlistoftodos]{todonotes}
    \usepackage{algorithm}
    \usepackage{algorithmic}

    %Zitate
        \newcounter{quotectr}
        \newtheorem{myquote}[quotectr]{Zitat}

%------------------------------------------------------------------------------
%- Layout
%------------------------------------------------------------------------------


        \setcounter{secnumdepth}{2}
        \setcounter{tocdepth}{2}

    %Call this after each chapter to avoid headlines on empty pages
        \newcommand{\chapterfin}{\clearpage{\pagestyle{empty}\cleardoublepage}}
        \newcommand{\sectionfin}{\clearpage{\pagestyle{empty}\cleardoublepage}}





    % Fancyheaders  
        \fancyhf{} % Delete all fields
        %\fancyhead[EL,OR]{\thepage}
        \fancyhead[EL]{\nouppercase{\leftmark}}
        \fancyhead[OR]{\nouppercase{\rightmark}}
        \fancyfoot[EL,OR]{\thepage} 

    % Itemize look and feel
        \renewcommand{\labelitemi}{\rule[+0.9mm]{2.7pt}{2.7pt}}
        \renewcommand{\labelitemii}{--}


        \newcommand{\eigenname}[1]  {{\em #1}}

        \newcommand{\algref}[1]{Algorithmus~\ref{alg:#1}}

        \newcommand{\quoteref}[1]{Zitat~\ref{quote:#1}}

        \renewcommand{\leq}     {\leqslant}
        \renewcommand{\geq}     {\geqslant}
        \renewcommand{\epsilon} {\varepsilon}
        \newcommand{\musec}     {$\mu sec$\xspace}
        \newcommand{\muW}       {$\mu W$\xspace}
        \newcommand{\plusminus} {$\pm $\xspace}
    \hyphenation{name-space}    
    \hyphenation{name-spaces}   
    \hyphenation{ge-samten} 


    \graphicspath{{images/}}

    \renewcommand\bibname{Bibliographie}

  \makeindex

image:

enter image description here

3
  • Please make your example compilable! – user31729 Sep 24 '15 at 18:48
  • @ChristianHupfer: So I have edited my code. Please take a look. The latex template is from my university I think the commands.tex file includs some deprecated but it works for me. – Mr Asker Sep 24 '15 at 19:34
  • Don't use \include in the preamble; for the commands.tex file use \input{commands}. – egreg Sep 25 '15 at 8:58
2

As you said, the template you're using could be improved, or at least tidied up. However, if it's working for you, and the only problem is to remove the word "Listings" from the header, since you are already using fancyhdr you can simply add:

\cleardoublepage %To end \lstlistoflistings
\fancyhead{} %Cleans the header
%\renewcommand{\headrulewidth}{0pt} %Uncomment if you want to remove the header rule, too.

after the \lstlistoflistings command. If you want to restore the previous style after the figure, you have to copy and paste the code inside command.tex:

\fancyhf{} % Delete all fields
%\fancyhead[EL,OR]{\thepage}
\fancyhead[EL]{\nouppercase{\leftmark}}
\fancyhead[OR]{\nouppercase{\rightmark}}
\fancyfoot[EL,OR]{\thepage}

In this case it could be better to define a list of styles, for example:

% Main style definition
\fancypagestyle{myMainStyle}{%
    \fancyhf{} % Delete all fields
    %\fancyhead[EL,OR]{\thepage}
    \fancyhead[EL]{\nouppercase{\leftmark}}
    \fancyhead[OR]{\nouppercase{\rightmark}}
    \fancyfoot[EL,OR]{\thepage}
}

% Other style definition - to remove headers
\fancypagestyle{myOtherStyle}{%
    \fancyhead{} %Cleans the header
    %\renewcommand{\headrulewidth}{0pt} %Uncomment if you want to remove the header rule, too.
}

and switch between them inside the main document using:

...

\lstlistoflistings

\cleardoublepage
\pagestyle{myOtherStyle} %Removes the header

% Figures...

\cleardoublepage
\pagestyle{myMainStyle} %Restores the previous style

...

One final remark: if you want to add non-floating images, you don't need the figure environment, you only need:

{\centering
\includegraphics[width=\textwidth]{...}
\captionof{figure}{Figure caption}
\label{...}
}
2
  • 1
    captionof can mess up the caption numbering. See David Carlisle's answer at tex.stackexchange.com/a/254565/44160 for a fix if you want to mix captionof with "real" captions. – 1010011010 Sep 25 '15 at 9:02
  • @1010011010 This might happen if there are floating figures "near" these non-floating objects, AFAIK. Since the OP seems to add these figure at the very end of the document (before the bibliography), I think that this problem won't happen. Thank you for your suggestion :)! – MarcoG Sep 25 '15 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.