我如何更改此处的标题?

我如何更改此处的标题?

我为附录定义了一些内容:

\newcommand{\beginsupplement}{%
    \setcounter{table}{0}
    \renewcommand{\thetable}{S\arabic{table}}%
    \setcounter{figure}{0}
    \renewcommand{\thefigure}{S\arabic{figure}}%
    \addcontentsline{toc}{chapter}{Appendix}
    \renewcommand{\thesection}{\Alph{section}}
}

如果我现在使用 开始附录部分,\beginsupplement我会从上面的部分获取标题。在我的示例中,我获取标题“表格列表”。我在此脚本中模拟了该问题:

\documentclass{scrbook}

\newcommand{\beginsupplement}{%
    \setcounter{table}{0}
    \renewcommand{\thetable}{S\arabic{table}}%
    \setcounter{figure}{0}
    \renewcommand{\thefigure}{S\arabic{figure}}%
    \addcontentsline{toc}{chapter}{Appendix}
    \renewcommand{\thesection}{\Alph{section}}
}

\begin{document}
    \chapter{Tabelle}
    \begin{table}
        \caption[Settings native MS]{Used parameters for native MS}
        \begin{tabular}{ll}\hline
            \textbf{Parameter} & \textbf{Value}\\\hline
            1 & 2\\\hline
        \end{tabular}
        \label{tab:nms}
    \end{table}
\newpage
    \listoftables
    \clearpage
    \beginsupplement
    text
\end{document}

谢谢你的帮助!

答案1

根据所需的结果,您必须添加\markboth{\appendixname}{}\markboth{}{}

例子:

\documentclass[
  captions=tableheading,% <- suggested option
  %numbers=noenddot% <- maybe you want this option
]
{scrbook}
\usepackage{lipsum}% only for dummy text

\usepackage{xpatch}
\makeatletter
\xapptocmd\appendix{%
  \cleardoubleoddpage
%
  \ifdim \@chapterlistsgap>\z@
    \doforeachtocfile{%
      \iftocfeature{\@currext}{chapteratlist}{%
        \addtocontents{\@currext}{\protect\addvspace{\@chapterlistsgap}}%
      }{}%
    }%
  \fi
  \addchaptertocentry{}{\appendixname}%
%
  \markboth{\appendixname}{}% <- added
%
  \renewcommand{\thesection}{\Alph{section}}%
  \setcounter{table}{0}%
  \renewcommand{\thetable}{S\arabic{table}}%
  \setcounter{figure}{0}%
  \renewcommand{\thefigure}{S\arabic{figure}}%
}{}{\PatchFailed}
\makeatother

\begin{document}
\chapter{First chapter}
\section{Tables}
\captionof{table}{First table in this chapter}
\begin{table}
  \caption[Settings native MS]{Used parameters for native MS}\label{tab:nms}
  \begin{tabular}{ll}\hline
      \textbf{Parameter} & \textbf{Value}\\\hline
      1 & 2\\\hline
  \end{tabular}
\end{table}
\lipsum[1-20]

\chapter{Next chapter}
\captionof{table}{Next table}

\listoftables

\appendix
\section{Section in appendix}
\captionof{table}{Appendix figure}
\captionof{table}{Another appendix figure}
\lipsum[21-40]
\end{document}

结果:

在此处输入图片描述

相关内容