我如何使用数字制作我的 SI(补充信息)(当前:使用附录包)?

我如何使用数字制作我的 SI(补充信息)(当前:使用附录包)?

我想让我的“附录”作为补充信息 - 但\renewcommand{\appendixname}{Supplementary Information}我不只是重命名它,还希望它被编号:

补充信息1(部分)

补充信息2(部分)

补充信息 2.1(小节)

补充信息 2.2(小节)

我以为这个编号很简单,\renewcommand{\thesection}{\arabic{section}}但是正如你所看到的,这并没有起到作用。

我非常有限,因为我需要使用这种奇怪的格式/文档类,见下文:

[![\documentclass\[preprint,12pt,authoryear\]{elsarticle}

\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{subcaption}
\usepackage{graphicx}

\usepackage{tocbibind} %for appendix/SI numbering
\usepackage\[toc,page\]{appendix} %for appendix/SI numbering

\usepackage{setspace}

\usepackage{afterpage}

\usepackage{rotating}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tabu}
\usepackage{siunitx}


\def\COMP#1{\begin{tabular}{c}#1\end{tabular}}

\usepackage{bm}
\usepackage{mathtools}
\newcommand{\myMatrix}\[1\]{\bm{\mathit{#1}}}

\doublespacing

\journal{x}

\begin{document}

\begin{frontmatter}

\title{A title}
\author{Me}

\begin{keyword}
A keyword
\end{keyword}

\end{frontmatter}




\section{Introduction \label{sec:intro}}

Please find some text here. Find more of my ideas in~\ref{sec:si1}.


\section{Conclusion \label{sec:concl}}
Main text is over.
\renewcommand{\appendixname}{Supplementary Information}

\renewcommand{\thesection}{\arabic{section}}


\appendix

%\section*{Supplementary Information}
\renewcommand{\thefigure}{SI~\arabic{figure}}
\setcounter{figure}{0}
\renewcommand{\thetable}{SI~\arabic{table}}
\setcounter{table}{0}

\section{The first thing in SI
 \label{sec:si1}}
word
\section{The second thing in SI}
another word
\subsection{The first sub-thing in SI}
bla bla
\subsection{The second sub-thing in SI}
bla bla 2


\end{document}][1]][1]
 

这是图片中当前的结果

答案1

你必须改变编号, 不是\appendix命令。下面是您的 MWE 的修改版本,我已将您的所有\[和更改\]为常规[和,]以便它可以使用进行编译pdflatex

% appsiprob.tex  SE 575134

\documentclass[preprint,12pt,authoryear]{elsarticle}

\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{subcaption}
\usepackage{graphicx}

\usepackage{tocbibind} %for appendix/SI numbering
\usepackage[toc,page]{appendix} %for appendix/SI numbering

\usepackage{setspace}

\usepackage{afterpage}

\usepackage{rotating}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tabu}
\usepackage{siunitx}


\def\COMP#1{\begin{tabular}{c}#1\end{tabular}}

\usepackage{bm}
\usepackage{mathtools}
\newcommand{\myMatrix}[1]{\bm{\mathit{#1}}}

\doublespacing

\journal{x}

\begin{document}

\begin{frontmatter}

\title{A title}
\author{Me}

\begin{keyword}
A keyword
\end{keyword}

%\tableofcontents
\end{frontmatter}

\section{Introduction \label{sec:intro}}

Please find some text here. Find more of my ideas in~\ref{sec:si1}.

\section{Conclusion \label{sec:concl}}
Main text is over.
\renewcommand{\appendixname}{Supplementary Information}

%\renewcommand{\thesection}{\arabic{section}}   %%%% not here
\appendix
\renewcommand{\thesection}{Supplementary Information \arabic{section}}    %%%% but here

%\section*{Supplementary Information}
\renewcommand{\thefigure}{SI~\arabic{figure}}
\setcounter{figure}{0}
\renewcommand{\thetable}{SI~\arabic{table}}
\setcounter{table}{0}

\section{The first thing in SI
 \label{sec:si1}}
word
\section{The second thing in SI}
another word
\subsection{The first sub-thing in SI}
bla bla
\subsection{The second sub-thing in SI}
bla bla 2

\end{document}][1]][1]

我没有改变你之后的奇怪的东西,\end{document}因为那会被忽略pdflatex

在此处输入图片描述

相关内容