%EC%9D%84%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A0%95%EC%9D%98%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
라텍스 문서를 '볼륨'으로 '분할'할 수 있는 방법이 궁금합니다. 최종 TOC는 다음과 같아야 합니다.
Volume 1 2
1. chapter 1 of volume 1 3
2. chapter 2 of volume 2 15
Volume 2 35
1. chapter 1 of volume 2 36
2. chapter 2 of volume 2 40
다음 코드는 올바른 장 번호를 제공하지만 안타깝게도 해당 부분에도 번호가 매겨져 있습니다.
\documentclass[openright]{scrreprt}
% enforces that chapter numbering restarts after each 'part'
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\usepackage{lipsum}% for dummy text
\begin{document}
\tableofcontents
\part{Volume 1}
\chapter{chapter 1 of volume 1}
\lipsum[1-10]
\chapter{chapter 2 of volume 1}
\lipsum[1-10]
% volume 2 starts with its own chapter numbering
\part{Volume 2}
\chapter{chapter 1 of volume 2}
\lipsum[1-10]
\chapter{chapter 2 of volume 2}
\lipsum[1-10]
\end{document}
결과는 다음과 같습니다.
I. Volume 1 2
1. chapter 1 of volume 1 3
2. chapter 2 of volume 2 15
II. Volume 2 35
1. chapter 1 of volume 2 36
2. chapter 2 of volume 2 40
질문:
- '나'를 어떻게 없애나요? 그리고 'II.' TOC에?
- 이제 각 부분 페이지에는 "부분 I. 1권"이 표시됩니다. "부분 I"을 어떻게 제거할 수 있나요?
- 부품 페이지의 모양을 사용자 정의할 수 있는 방법이 있나요? 각 부분에 대해 아래에 몇 줄의 텍스트를 넣고 싶습니다.
편집하다:
질문 #1에 대한 빠르고 더러운 해결책:
\documentclass[openright]{scrreprt}
% enforces that chapter numbering restarts after each 'part'
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\renewcommand\partname{Volume}
\usepackage{lipsum}% for dummy text
% show chapter & section in TOC, no subsection
\setcounter{tocdepth}{1}
\begin{document}
\tableofcontents
% don't add Volume 1 to TOC
\part*{this is volume 1}
% add manual entry for volume 1
\addcontentsline{toc}{part}{this is volume 1}
\chapter{chapter 1 of volume 1}
\lipsum[1-10]
\section{sdfg}
\end{document}
답변1
\part
다음 으로 대체되는 숫자를 제거하십시오 \addpart
.
\documentclass[openright]{scrreprt}
\usepackage{lipsum}% for dummy text
\begin{document}
\tableofcontents
\addpart{Volume 1}\setcounter{chapter}{0}
\chapter{chapter 1 of volume 1}
\lipsum[1-10]
\chapter{chapter 2 of volume 1}
\lipsum[1-10]
% volume 2 starts with its own chapter numbering
\addpart{Volume 2}\setcounter{chapter}{0}
\chapter{chapter 1 of volume 2}
\lipsum[1-10]
\chapter{chapter 2 of volume 2}
\lipsum[1-10]
\end{document}
이 경우 부품 카운터가 증가하지 않으므로 챕터 카운터를 재설정해야 합니다.
또는 다음 part
으로 대체할 수 있습니다 volume
.
\documentclass[openright]{scrreprt}
% enforces that chapter numbering restarts after each 'part'
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\renewcommand*{\thepart}{\arabic{part}}
\renewcommand*{\partname}{Volume}
\usepackage{lipsum}% for dummy text
\begin{document}
\tableofcontents
\part[Volume]{}
\chapter{chapter 1 of volume 1}
\lipsum[1-10]
\chapter{chapter 2 of volume 1}
\lipsum[1-10]
% volume 2 starts with its own chapter numbering
\part[Volume]{}
\chapter{chapter 1 of volume 2}
\lipsum[1-10]
\chapter{chapter 2 of volume 2}
\lipsum[1-10]
\end{document}
하지만 이 경우에는 목차 1 Volume
대신에 해당 내용이 표시됩니다 .Volume 1
수정된 첫 번째 솔루션을 사용하겠습니다.
\documentclass[openright]{scrreprt}
\usepackage{lipsum}% for dummy text
\newcommand*{\volume}[1][]{% optional argument: additional text
\cleardoublepage\refstepcounter{part}%
\setpartpreamble{#1}% add this preamble below the heading
\addpart{Volume \thepart}
}
\renewcommand*{\thepart}{\arabic{part}}
% enforces that chapter numbering restarts after each 'part'
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\begin{document}
\tableofcontents
\volume[{\begin{abstract}\lipsum[1]\end{abstract}}]% Volume with additional text below heading.
\chapter{chapter 1 of volume 1}
\lipsum[1-10]
\chapter{chapter 2 of volume 1}
\lipsum[1-10]
\volume
\chapter{chapter 1 of volume 2}
\lipsum[1-10]
\chapter{chapter 2 of volume 2}
\lipsum[1-10]
\end{document}
일부 텍스트를 추가하기 위해 부품 머리글이 \setpartpreamble{…}
사용되었습니다. scrguien.pdf
자세한 내용은 KOMA-Script 매뉴얼(현재 버전의 91f페이지)을 참조하세요 .