Как мне изменить заголовок здесь?

Как мне изменить заголовок здесь?

Я определил некоторые вещи для приложения:

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

Результат:

введите описание изображения здесь

Связанный контент