从附录标题中删除标题

从附录标题中删除标题

我正在尝试将序列图作为图片添加到附录中,这些图片位于单独的文件中\include{7-appendix}。它们正在添加,但我得到的Listings标题如下图所示。是否可以Listings从标题中删除该词?

论文正文

    \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}

命令.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

图像:

在此处输入图片描述

答案1

正如您所说,您使用的模板可以改进,或者至少可以整理一下。但是,如果它对您有用,并且唯一的问题是从标题中删除“Listings”一词,因为您已经在使用,您fancyhdr可以简单地添加:

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

命令之后\lstlistoflistings。如果想在图形之后恢复以前的样式,则必须复制并粘贴里面的代码command.tex

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

在这种情况下,最好定义一个样式列表,例如:

% 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.
}

并使用以下命令在主文档中切换它们:

...

\lstlistoflistings

\cleardoublepage
\pagestyle{myOtherStyle} %Removes the header

% Figures...

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

...

最后说明一下:如果您想添加非浮动图像,则不需要环境figure,只需要:

{\centering
\includegraphics[width=\textwidth]{...}
\captionof{figure}{Figure caption}
\label{...}
}

相关内容