%20%E3%82%92%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F.png)
LaTeX ドキュメントを「ボリューム」に「分割」するにはどうしたらよいか知りたいです。最終的な 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
質問:
- TOC の「I.」と「II.」を削除するにはどうすればよいですか?
- 各パート ページには現在「パート 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{…}
KOMA スクリプト マニュアル (現在のバージョンの 91 ページ以降) を参照してください。scrguien.pdf