我对 LaTeX 还比较陌生,正在写一篇文章。我想制作两个具有独立编号的列表,列表项之间也有很多文本。期望的最终结果是:
此 MWE 的代码为:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage[inline]{enumitem}
\usepackage{chngcntr}
\setcounter{secnumdepth}{3}
\newlist{costbalance}{enumerate}
\setlist{costabalance}[label=(\arabic*)]
\title{Main Tile}
\author{N.A}
\begin{document}
\maketitle
\section{Section A}
\subsection{Section A.1}
Text
\subsubsection{Section A.1.1}
Beggining of First list
\begin{enumerate*}[label=(\arabic*)]
\item:
\end{enumerate*}
\begin{equation}
A + B= C
\end{equation}
\subsubsection{Section A.1.2}
Resuming of first list
\begin{enumerate*}[resume*]
\item:
\end{enumerate*}
\begin{equation}
B + C = D
\end{equation}
\begin{costbalance}
\item:
\end{costbalance}
Beggining of second list (1):
\begin{equation}
D - E = C
\end{equation}
\end{document}
答案1
虽然这两个列表的用途不明确,但您可以使用定义的列表costbalance
,稍后可以恢复。此外,您可以定义第二个列表,secondlist
在以下 MWE 中调用。这两个列表的格式基本相同,但它们的编号是独立的。
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage[inline]{enumitem}
\usepackage{chngcntr}
\setcounter{secnumdepth}{3}
\newlist{costbalance}{enumerate*}{1}
\setlist[costbalance]{label=(\arabic*)}
\newlist{secondlist}{enumerate*}{1}
\setlist[secondlist]{label=(\arabic*)}
\begin{document}
\section{Section A}
\subsection{Section A.1}
Text
\subsubsection{Section A.1.1}
Begining of First list
\begin{costbalance}
\item:
\end{costbalance}
\begin{equation}
A + B= C
\end{equation}
\subsubsection{Section A.1.2}
Resuming of first list
\begin{costbalance}[resume*]
\item:
\end{costbalance}
\begin{equation}
B + C = D
\end{equation}
Begining of second list
\begin{secondlist}
\item:
\end{secondlist}
\begin{equation}
D - E = C
\end{equation}
Resuming the second list:
\begin{secondlist}[resume]
\item:
\end{secondlist}
\end{document}