附录的正确格式

附录的正确格式

以下章节、附录和参考文献

\section{Conclusion}
something

\appendix
\section{Appendix: My Title}
my appendix


\bibliographystyle{plain}
\bibliography{bibs}

有这样的布局

在此处输入图片描述

我猜附录格式不正确。此外,我想在附录中放一个表格。应该是

Appendix A
Table 4. Shows the detailed information about results.

\begin{table} [b]
\centering  
\caption{Details}
\label{sys-spec}
\begin{tabular}{ |p{1.4cm}|p{6.2cm}| }
    \hline
       A  &   B
    \hline
       C  &   D
    \hline
\end{tabular}
\end{table}

答案1

这是一个基于重新定义部分的答案的方法这里

\documentclass[margins=0.5cm]{article}
\usepackage{filecontents}
\begin{filecontents*}{bibs.bib}
@article{test,
  title={An article},
  year=2019,
  author={Me Only},
  journal={A journal}
}

@article{testB,
  title={An other article},
  year=2018,
  author={Me Again},
  journal={Another journal}
}
\end{filecontents*}
\makeatletter
\newcounter{mysection}
\renewcommand\themysection{\Alph{mysection}}
\let\oldsection\section

\def\appendix{%
\let\thesection\themysection
\def\section{%
\@ifstar{\@Starred}{\@nonStarred}%
}
\def\@Starred{%
\@ifnextchar[%
{\GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}\@StarredWith}%
{\@StarredWithout}%
}     
\def\@StarredWith[##1]##2{%
\oldsection*[##1]{##2}%
}
\def\@StarredWithout##1{
\oldsection*{##1}%
}
\def\@nonStarred{%
\@ifnextchar[%
{\@nonStarredWith}%
{\@nonStarredWithout}%
}
\def\@nonStarredWith[##1]##2{%
\refstepcounter{mysection}%
\oldsection*[Appendix\space\themysection: ##1]{Appendix\space\themysection:\protect\\##2}%
\addcontentsline{toc}{section}{Appendix\space\themysection: ##1}
}
\def\@nonStarredWithout##1{%
\refstepcounter{mysection}
\oldsection*{Appendix\space\themysection:\protect\\##1}%
\addcontentsline{toc}{section}{Appendix\space\themysection: ##1}
}
}
\makeatother

\author{Someone}
\title{Some title}

\begin{document}

%\maketitle

\tableofcontents


\section{Conclusion}

something

\appendix

\section{My Title}
my Appendix \thesection{}, starts the appendix\ldots

\section*{A starred section}
with some content

\section{Another section}
my Appendix \thesection{} is about\ldots 

\subsection{A subsection}

with some text

\nocite{*}
\bibliographystyle{plain}
\bibliography{bibs}
\end{document}

输出:

在此处输入图片描述

相关内容