如何创建两个具有不同名称的不同附录章节

如何创建两个具有不同名称的不同附录章节

我试图生成两个\begin{appendices}具有不同名称的不同值,其中一个使用数字,另一个使用字母。

我自己也尝试过,但是没有结果。

这是我的 MWE:

\documentclass[a4paper,11pt,fleqn,twoside,openright]{memoir}
\usepackage[danish]{babel}
\usepackage{appendix}

\begin{appendices}

    \chapter{this needs to be called "Appendix A"}
        \label{appA}

    [content of appendix A]

    \chapter{this needs to be called "Appendix B"}
        \label{appB}

    [content of appendix B]

\end{appendices}

\begin{appendices}

    \chapter{this needs to be called "Bilag 1"}
        \label{bil1}

    [content of bilag 1]

    \chapter{this needs to be called "Bilag 2"}
        \label{bil2}

    [content of bilag 2]

\end{appendices}

这只会重置编号,所以现在是 Ap A、Ap B、Ap A、Ap B

是否可以重命名和重新编号两个不同的附录,因此它是 Ap A、Ap B、Bi 1、Bi 2?

答案1

appendices据我所知,该包不存在,但是appendices环境是由该包定义的appendix。这是一个简单的解决方案:

\documentclass[a4paper, 11pt, fleqn, twoside, openright]{memoir}
\usepackage[danish]{babel}
\usepackage{appendix}
\usepackage{lipsum}

\begin{document}

\begin{appendices}

    \chapter{this needs to be called "Appendix A"}
        \label{appA}

    [content of appendix A]

    \chapter{this needs to be called "Appendix B"}
        \label{appB}

    [content of appendix B]

\end{appendices}

\begin{appendices}
\setcounter{chapter}{0}
\renewcommand{\thechapter}{\arabic{chapter}}

    \chapter{this needs to be called "Bilag 1"}
        \label{bil1}

    [content of bilag 1]

    \chapter{this needs to be called "Bilag 2"}
        \label{bil2}

    [content of bilag 2]

\end{appendices}

\end{document}

在此处输入图片描述

答案2

我没有软件包appendices。但是memoir不需要额外的软件包:

\documentclass[a4paper,11pt,fleqn,twoside
  %,openright
  ,openany% <- only for the example
  ]{memoir}
\usepackage[danish]{babel}
\renewcommand{\restoreapp}{}% <- added

\begin{document}

\begin{appendices}
    \renewcommand\appendixname{Appendix}% <- added

    \chapter{this needs to be called Appendix A}
        \label{appA}

    [content of appendix A]

    \chapter{this needs to be called Appendix B}
        \label{appB}

    [content of appendix B]

\end{appendices}

\begin{appendices}

    \chapter{this needs to be called Bilag 1}
        \label{bil1}

    [content of bilag 1]

    \chapter{this needs to be called Bilag 2}
        \label{bil2}

    [content of bilag 2]

\end{appendices}
\end{document}

在此处输入图片描述

相关内容