새 섹션 다음에 단락 번호를 계속 매깁니다.

새 섹션 다음에 단락 번호를 계속 매깁니다.

섹션별로 새로 정의된 단락 수로 변경된 단락 수 없이 섹션별로 나누어진 문서의 단락 수를 계산해야 합니다. 이 예가 방금 설명한 내용을 더 잘 설명할 수 있기를 바랍니다. 저는 lyx를 사용하고 있습니다. 해당 유형의 문서를 만들 수 있는 모든 솔루션이 허용됩니다.

  1. 첫 번째 섹션

    첫 번째 단락 1개

    2번째 문단

  2. 첫 번째 섹션

    3 세 번째 단락

    4번째 문단

해당 코드를 작성했지만 단락이 여전히 번호를 재설정했습니다. 여기에 시도해 보겠습니다.

여기에 이미지 설명을 입력하세요

여기에 이미지 설명을 입력하세요

답변1

여기에 이미지 설명을 입력하세요

\documentclass{article}

\usepackage{remreset}
\makeatletter
\@removefromreset{subsection}{section}
\renewcommand\thesubsection{\arabic{subsection}}
\makeatother

\begin{document}

\section{aaa}
\subsection{}
xxxx
\subsection{}
xxxx
\section{bbb}
\subsection{}
xxxx
\subsection{}
xxxx

\end{document}

또는....

여기에 이미지 설명을 입력하세요

\documentclass{article}

\usepackage{enumitem}
\begin{document}

\section{aaa}

\begin{enumerate}
\item xxxx
\item xxxx
\end{enumerate}

\section{bbb}

\begin{enumerate}[resume]

\item xxxx
\item xxxx
\end{enumerate}

\end{document}

관련 정보