如何设置小说文档类中的缩进长度?

如何设置小说文档类中的缩进长度?

我用小说软件包用于排版小说以供印刷,我对网格排版的漂亮、干净的输出感到非常满意。感谢@rallg 创建了这个软件包!

但是,标准缩进对于我的目的来说太大了。我阅读了所有文件和整个 HTML 文档,但找不到如何设置缩进量的方法。我尝试添加\setlength\parindent{10pt}序言,但这没有效果。我是不是忽略了什么?首先是否可以更改此设置?

这是我的文档代码,其中包含我正在使用的设置和一些示例文本。提前感谢您的回答。

% !TeX TS-program = lualatex
% !TeX encoding = UTF-8
%
% EXAMPLE OF NOVEL DOCUMENT CLASS
% Uses mostly default layout.
% IF YOU COMPILE THIS DOCUMENT: Be sure that this file, and its generated PDF,
%   have read/write permissions for any user. If they don't, then
%   compile will fail at the point where files are written.
\documentclass{novel} % v. 1.81b.
\SetTitle{Test Title}
\SetSubtitle{Test Subtitle}
\SetAuthor{Test Author}
\SetPDFX[CGATSTR001]{X-1a:2001}
\setotherlanguage{latin} % requires package hyphen-latin for best results.
\SetFontSize{12pt}
\setlength\parindent{10pt}
\SetChapterStartStyle{empty}
\SetChapterStartHeight{6}
%\SetChapterFont[Numbers=Lining,Scale=1.8]{\parentfont}
%\SetSubchFont[Numbers=Lining,Scale=1.4]{\parentfont}
\SetMargins{1.5cm}{2.2cm}{1.5cm}{1.5cm}
\SetHeadFootStyle{2}
\begin{document}
\frontmatter

% i. Half-Title page:
\thispagestyle{empty}
\vspace*{6\nbs}
\hfill\charscale[1.8]{\textbf{This is}}\par
\vspace{\nbs}
\hfill\charscale[2.4]{\textbf{\color{gray}the Test Title}}\par
\clearpage

% ii. Blank page:
\thispagestyle{empty}
\null
\clearpage

% iii. Full Title page:
% \thispagestyle{empty}
\vspace*{5\nbs}
\begin{center}
\charscale[2]{\textbf{This is}}\par
\vspace{2\nbs}
\charscale[3]{\textbf{\color{gray}the Test Title}}\par
\vspace{1.5\nbs}
\charscale[1.6]{This is the Test Subtitle}\par
\vspace{4\nbs}
\ChapterDeco[6]{\decoglyph{n9548}}
\vspace{4\nbs}
{\addfontfeature{Scale=3}\theAuthor}
\vfill
{\addfontfeature{Scale=1.25} Nonexistent Publications\\
Anytown • Anyplace • Anywhere}\par

\end{center}
\clearpage


% iv. Copyright page:
\thispagestyle{empty}
\begin{center}
\itshape{
\null
\vfill
\textsc{Test Title}\par
Copyright ©2023 Test Author.\par % Whichever year, copyright holder.
All Rights Reserved.\par % Usually no need to be elaborate.
\null
This is a work of fiction.\\
All persons and events are\\
from the author's imagination.\\
Resemblance to any real person,\\
living or dead, is coincidental.\par % Or similar language.
\null
ISBN 0-12345678-9\par % Whatever it is. No barcode, just number.
\null

Independently Published by Test Author,\par % Publisher is you, not the print/distribution service.
Anytown, Anystate USA\par % Publisher's location.
www.example.com/dhardcase/publications/\par % Contact for publisher or author.
\null
Publisher's Cataloging-In-Publication Data\\
available upon request.\par
% Fiction often does not need catalog data.
} % end itshape
\end{center}
\clearpage

% v. Epigraph, Dedication, Table of Contents, or repeated Half-Title.
% In this case, an Epigraph:
\thispagestyle{empty}
\vspace*{7\nbs}
\begin{adjustwidth}{5em}{5em}
\noindent Here would be the Epigraph

\hfill---\textit{Author of the Epigraph}\par
\end{adjustwidth}
\cleartorecto % here, inserts blank, so mainmatter begins recto

% Now to begin your story:
\mainmatter

% Chapter One:

\begin{ChapterStart}
\ChapterTitle{Prolog}
\vspace*{2\nbs}
\ChapterTitle{1} %
\end{ChapterStart}

The first sentence is not indented. Should be this way.

This is the first sentence of the second paragraph. It is indented, which is fine, but I would like to have a smaller indentation. How can I change this setting?
\end{document}

答案1

novel.cls尝试真的很难阻止你玩弄各种“文本长度”(包括\parindent)。有两种具体方法可以做到这一点:

  1. novel.cls\gsetlength\parindent{1.5em}在里面调用\AtEndPreamble(实际上所有的文本长度都设置在那里);所以\parindent序言中的任何更改都将被覆盖。
  2. novel.cls 恢复 \parindent每次都设置为默认值\end{ChapterStart}

如果你真的想要更改默认值,您需要提供新的\parindent \begin{document}也可以通过设置长度来绕过恢复\normalparindent。因此,尝试在之后立即插入\begin{document}

\begin{document}
%%%% Add the following two lines to change the default parindent
\gsetlength\parindent{10pt}
\gsetlength\normalparindent\parindent
%%%% end changes
\frontmatter

相关内容