更改章节参考缩写

更改章节参考缩写

我有以下示例

\documentclass[a4paper]{book} 
\usepackage{booktabs} % lines
\usepackage[super]{nth}

\begin{document}
  \tableofcontents % Table of contents 

  \chapter{This is a Chapter}
    \section{And this a Section}

  \chapter{Another Chapter}
    \section{And another Section}

  \appendix
  \chapter{This is the Appendix}
    Here 5 useful thing that (probably) you didn't know

  \chapter*{List of Symbols}
    Here a list of symbols
    \begin{table}[ht]
      \centering
      \begin{tabular}{cp{0.7\textwidth}}
            \toprule[2pt]
            
            Symbol & Description \\
            
            \midrule
            
            $\mathcal{A}$ & \nth{1} letter of the latin alphabet \\ 
            $\mathcal{B}$ & \nth{2} letter of the latin alphabet \\ 
            $\mathcal{C}$ & \nth{3} letter of the latin alphabet \\ 
            $\mathcal{D}$ & \nth{4} letter of the latin alphabet \\
            
            \bottomrule[2pt]
      \end{tabular}%
      \caption{Description of the symbols}
      \label{table:symbols}
   \end{table}

\end{document}

返回下面的目录: 目录

以及以下符号列表: 符号列表

问题:

  1. 为什么符号列表章节未包含在目录中?是否需要一些命令/包才能完成此操作?
  2. 我怎样才能将符号表中的标题更改为“S.1”而不是“A.1”(我更喜欢自动方式,因为实际上那里有很多表格)
  3. 如何删除目录中“这是附录”前面的“A”

提前致谢!

答案1

(1)要将未编号(带星号)的章节添加到目录中,请使用

\addcontentsline{toc}{chapter}{This is the Appendix}

(2)要删除目录中某一章节的章节号,请为其加星标并使用配方 (1)。

\chapter*{List of Symbols}
\addcontentsline{toc}{chapter}{List of Symbols}

A

(3)要更改表格的编号样式,您可以重新定义表格的计数器。它将从此处应用到所有表格。

\renewcommand{\thetable}{S.\arabic{table}} % added <<<<<

b

\documentclass[a4paper]{book} 
\usepackage{booktabs} % lines
\usepackage[super]{nth}

\begin{document}
\tableofcontents % Table of contents 

\chapter{This is a Chapter}
\section{And this a Section}

\chapter{Another Chapter}
\section{And another Section}

\appendix
\chapter*{This is the Appendix} %changed <<<<<<<<<<<<<
\addcontentsline{toc}{chapter}{This is the Appendix} % added <<<<<

Here 5 useful thing that (probably) you didn't know

\chapter*{List of Symbols} % changed
\addcontentsline{toc}{chapter}{List of Symbols} % added <<<<<

\renewcommand{\thetable}{S.\arabic{table}} % added <<<<<

Here a list of symbols

\begin{table}[ht]
\centering
    \begin{tabular}{cp{0.7\textwidth}}
        \toprule[2pt]   
        Symbol & Description \\ 
        \midrule    
        $\mathcal{A}$ & \nth{1} letter of the latin alphabet \\ 
        $\mathcal{B}$ & \nth{2} letter of the latin alphabet \\ 
        $\mathcal{C}$ & \nth{3} letter of the latin alphabet \\ 
        $\mathcal{D}$ & \nth{4} letter of the latin alphabet \\ 
        \bottomrule[2pt]
    \end{tabular}%
\caption{Description of the symbols 1}
\label{table:symbols}
\end{table}

\begin{table}[ht]
\centering
    \begin{tabular}{cp{0.7\textwidth}}
        \toprule[2pt]
        Symbol & Description \\
        \midrule
        $\mathcal{A}$ & \nth{1} letter of the latin alphabet \\ 
        $\mathcal{B}$ & \nth{2} letter of the latin alphabet \\ 
        $\mathcal{C}$ & \nth{3} letter of the latin alphabet \\ 
        $\mathcal{D}$ & \nth{4} letter of the latin alphabet \\
        \bottomrule[2pt]
    \end{tabular}%
\caption{Description of the symbols 2}
\label{table:symbolsi}
\end{table}

\begin{table}[ht]
\centering
    \begin{tabular}{cp{0.7\textwidth}}
        \toprule[2pt]
        Symbol & Description \\
        \midrule
        $\mathcal{A}$ & \nth{1} letter of the latin alphabet \\ 
        $\mathcal{B}$ & \nth{2} letter of the latin alphabet \\ 
        $\mathcal{C}$ & \nth{3} letter of the latin alphabet \\ 
        $\mathcal{D}$ & \nth{4} letter of the latin alphabet \\
        \bottomrule[2pt]
    \end{tabular}%
\caption{Description of the symbols 3}
\label{table:symbolsii}
\end{table} 
    
\end{document}

相关内容