섹션 계층 복제 및 수정

섹션 계층 복제 및 수정

준비 중인 대규모 논문 스타일 문서에는 이전에 준비된 작업의 삽입으로 처리되는 특정 부분(라텍스 계층 \part{})이 있습니다. 여기에는 섹션(장 건너뛰기)을 사용하여 부품 내의 계층적 분할에 더 적합한 기사 또는 초록이 포함될 수 있습니다. 주로 이는 근본적으로 다른 장 형식을 사용하는 "X장"을 피하기 위한 것입니다.

복사(아마도 newcommand)한 후 섹션 번호만 포함하도록 섹션 명령을 다시 정의하여 장 접두사 ex를 포함하지 않는 \papersection{}이라는 라텍스 명령을 호출할 수 있도록 하고 싶습니다. ( 1. 소개. )

완전성을 기하기 위해 가능하다면 \papersection*{}에 해당하는 형식과 계층 구조를 공유하고 싶습니다.

\documentclass{report}
%\usepackage{chngcntr}
%\counterwithin{figure}{section}
\begin{document}
\part{(First Part)}
\section{Intro}
     Since this part is for a research paper - the article class would be more appropriate but the report class has been used for the rest of the document as numbering hierarchy such as 1.1 is desired.

     Would rather be using \papersection{Intro} so that all my sections do not include the repetitive and unnecessary 1.x

\end{document}

또는 (이것이 제가 선호하는 접근 방식입니다) \begin{x} ... \end{x} 환경 명령을 실행하여 사용 중인 \documentclass 템플릿을 임시로 재정의할 수 있습니까? 이러한 맥락에서 비부닛, 표, 그림, 방정식 등과 같은 중첩된 환경과 호환되어야 합니다.

\documentclass{report}
\begin{document}
\part{(First Part)}
\begin{PaperEnvironment}% open up an environment that refers to the article class

\section{Intro}
    Can I change documentclass templates mid stream?  If so, I don't have to redefine section anymore...

\end{PaperEnvironment}
\end{document}

보고서 템플릿을 기반으로 하는 사용자 정의 cls 파일을 사용하여 문서를 준비 중입니다. 지금은 회고록, 책, scrreport 등으로 전환할 수 없습니다.

답변1

하위 문서를 별도로 컴파일하고 컴파일된 파일을 pdfpages. 이것이 옵션이 아닌 경우 paper환경 시작 부분에서 섹션을 조판할 때 장 번호를 제거하고 끝 부분에서 복원하는 새 환경을 정의할 수 있습니다. .\section\thesection

어쨌든 숫자가 없기 때문에 별표 표시된 섹션 명령에 대해 무엇을 의미하는지 잘 모르겠습니다.

\documentclass{report}
\usepackage{kantlipsum}
\makeatletter
\newenvironment{paper}{%
  \global\let\oldthesection\thesection
  \renewcommand{\thesection}{\@arabic\c@section}%
}{%
  \global\let\thesection\oldthesection}
\makeatother
\begin{document}
\chapter{Chapter First}
\kant[1]
\section{Kant}
\kant[2]
\section{Kant Again}
\kant[3]
\chapter{Chapter Second}
\kant[4]
\part{(First Part)}
\begin{paper}
\section{Intro}
     Since this part is for a research paper - the article class would be more appropriate but the report class has been used for the rest of the document as numbering hierarchy such as 1.1 is desired.

     Would rather be using \section{Intro} so that all my sections do not include the repetitive and unnecessary 1.x
\end{paper}
\part{Second Part}
\chapter{More Kant}
\kant[5]
\section{Kant Keeps Going}
\kant[6]
\end{document}

변형 섹션 형식

관련 정보