我怎样才能在没有章节编号的情况下获取 section.subsection 编号?

我怎样才能在没有章节编号的情况下获取 section.subsection 编号?

如何在没有章节编号的情况下获取报告中当前小节的编号?我想要做的是使用包生成如下需求列表enumitem

\documentclass[a4paper, 11pt]{report}

\usepackage{enumitem}

\newlist{requirements}{enumerate}{1}
\setlist[requirements]{label=\textbf{R\thesubsection.\arabic*}}

\begin{document}
\chapter{Requirements}
\section{Functional Requirements}
\subsection{Requirements Category}
Some information about ``requirements category'' goes here.
\begin{requirements}
    \item First Requirement
    \item Second Requirement
\end{requirements}
\subsection{Different Requirements Category}
Foo bar baz. Herpeddy Derpeddy.
\begin{requirements}
    \item This is a first requirement
    \item This is a second requirement
\end{requirements}
\section{Non-functional Requirements}
\subsection{Category}
Category category category.
\begin{requirements}
    \item First NFR
    \item Another NF-Requirement
\end{requirements}
\end{document}

这将生成R1.1.1.1R1.1.1.2, ETC。

我想要的是以下形式的列表R1.1.1R1.1.2,下一小节中的列表为R1.2.1R1.2.2等等。

答案1

改成。\thesubsection\arabic{section}.\arabic{subsection}

相关内容