![장 번호를 제거하고 섹션 번호를 유지합니다.](https://rvso.com/image/330741/%EC%9E%A5%20%EB%B2%88%ED%98%B8%EB%A5%BC%20%EC%A0%9C%EA%B1%B0%ED%95%98%EA%B3%A0%20%EC%84%B9%EC%85%98%20%EB%B2%88%ED%98%B8%EB%A5%BC%20%EC%9C%A0%EC%A7%80%ED%95%A9%EB%8B%88%EB%8B%A4..png)
Chapter #
각 챕터( ) 앞에 있는 챕터 번호를 없애고 동시에 섹션 번호를 유지하는 방법을 모르겠습니다 . 그래서 다음과 같은 것이 필요합니다.
챕터 이름
1.1 첫 번째 섹션
1.2 두 번째 섹션
그리고 사진에 번호 매기기가 좀 이상하네요. 지금은 사진 2.1이 있습니다(사진은 섹션 2에 있으므로). 사진 1, 사진 2 등과 같은 일반적인 번호 매기기를 원합니다.
도와주셔서 감사합니다!
답변1
가장 쉬운 방법은 \thechapter
아무 것도 설정하지 않는 것입니다(예: ) . 하지만 이렇게 하면 후행이 {}
남고 장 제목이 계속 표시됩니다 (또는 ).\thesection
.
Chapter
\chaptername
연속적인 그림 번호를 얻으려면 그림 카운터를 챕터 재설정 목록에서 제거해야 합니다. 즉, 를 사용하십시오 \counterwithout{figure}{chapter}
. 그 다음에.
질문이 좀 불분명해서 \@makechapterhead
지금은 바꾸지 않습니다.
\documentclass{book}
\usepackage{chngcntr}%
\renewcommand{\thechapter}{}%
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}%
\counterwithout{figure}{chapter}
\begin{document}
\tableofcontents
\listoffigures
\chapter{First chapter}
\section{First section}
\begin{figure}
\caption{Dummy figure}
\end{figure}
\chapter{Second chapter}
\section{First section in 2nd chapter}
\begin{figure}
\caption{Another dummy figure}
\end{figure}
\end{document}
답변2
다음은 이를 수행하는 방법입니다 titlesec
(비록 최신 버전에 문제가 있는 것 같지만 이전 버전의 titlesec에서는 정확히 이런 방식으로 수행하지 않았을 것입니다).
\documentclass{book}
\usepackage[utf8]{inputenc} \usepackage{titlesec}
\titleformat{\chapter}[block]{\bfseries\Huge}{}{0em}{}
\titleformat{\section}[hang]{\bfseries\Large}{}{1em}{\thesection\enspace}
\begin{document}
\tableofcontents
\listoffigures
\chapter{First chapter}
\section{First section}
\begin{figure}
\caption{Dummy figure}
\end{figure}
\end{document}