KOMA-Script 书中章节/参考书目/索引标题之间的差异

KOMA-Script 书中章节/参考书目/索引标题之间的差异

我正在使用 KOMA-Script Book,当涉及到页面顶部和文本底部之间的距离时,标题之间存在奇怪的差异。

我使用 LyX,因此索引和参考书目标题是自动生成的。章节标题是手动输入的。

参考书目标题与章节标题相关,但索引标题却偏离了:

章节标题和索引标题不一致

笔记:添加红线以帮助说明差异。

有没有什么方法可以具体调整索引标题,以使其与其他标题保持一致?

我检查了我的序言,其中没有任何内容可能导致此问题。

提前感谢您提供的任何帮助。

更新:下面是一个最小工作示例。请注意,由于该文档是在 LyX 中创建的,因此其中包含特定于 LyX 的代码:

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrbook
\begin_preamble
%% Paragraphs
\usepackage{parskip}
\setlength{\parskip}{3mm plus1mm minus1mm}

%% Links
\usepackage{hyperref}
\usepackage{xcolor}
\definecolor{Muted}{rgb}{0.200, 0.200, 0.200}
\hypersetup{
    pdfnewwindow=true,      % links in new PDF window
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor= Muted,          % color of internal links (change box color with linkbordercolor)
    citecolor= Muted,        % color of links to bibliography
    filecolor= Muted,      % color of file links
    urlcolor= Muted           % color of external links
}

%% Footnotes
\usepackage{perpage}
\MakePerPage{footnote}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
  \ensuremath{%
    \ifcase#1% 0
    \or % 1
      {\dagger }
    \or % 2
      \ddagger
    \or % 3  
      \dagger\dagger
    \or % 4   
      \ddagger\ddagger
    \or % 5
      \dagger\dagger\dagger
    \or % 6
      \ddagger\ddagger\ddagger
    \else % >= 7
      \@ctrerr  
    \fi
  }%   
}   
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
  \myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
  \myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
        \textsuperscript{\thefootnotemark}~%
}

%% Bibliography
\usepackage[super,sort&compress]{natbib}
\setcitestyle{citesep={, }}

%% Fonts
\usepackage{fontspec}
\setmainfont[
BoldFont={Kaiti TC Bold},
ItalicFont={Baskerville Italic},
BoldItalicFont={Baskerville Bold Italic}
] {Kaiti TC}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "Kaiti SC"
\font_sans "default" "Kaiti SC"
\font_typewriter "default" "Baskerville"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts true
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 12
\spacing single
\use_hyperref true
\pdf_title "Dao De Jing"
\pdf_author "Laozi, Firstname Lastname"
\pdf_subject "Chinese philosophy"
\pdf_keywords "philosophy, non-duality, nonduality, Chinese"
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize custom
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\paperwidth 6in
\paperheight 9in
\leftmargin 0.8in
\topmargin 0.8in
\rightmargin 0.6in
\bottommargin 0.8in
\headheight 0.1in
\headsep 0.3in
\footskip 0.3in
\secnumdepth -2
\tocdepth 0
\paragraph_separation indent
\paragraph_indentation 0pt
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Title
Title
\end_layout

\begin_layout Author

\size small
Author
\end_layout

\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout

%% add spacing above the Index entry in the TOC
\end_layout

\begin_layout Plain Layout


\backslash
addtocontents{toc}{
\backslash
vspace{20pt}}
\end_layout

\end_inset


\end_layout

\begin_layout Chapter
Introduction
\end_layout

\begin_layout Part
Part 1
\end_layout

\begin_layout Chapter*
Chapter 1
\end_layout

\begin_layout Standard
This is text with an index entry at the end.
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
index entry
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
addtocontents{toc}{
\backslash
vspace{18pt}}
\end_layout

\end_inset


\end_layout

\begin_layout Chapter
Glossary
\end_layout

\begin_layout Labeling
\labelwidthstring 00.00.0000

\family typewriter
\series bold
example 
\family default
\series default
This is example text.
\end_layout

\begin_layout Standard
\begin_inset Newpage newpage
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
raggedright
\end_layout

\begin_layout Plain Layout


\backslash
addcontentsline{toc}{chapter}{Bibliography} %% show in TOC
\end_layout

\end_inset


\end_layout

\begin_layout Bibliography
\begin_inset CommandInset bibitem
LatexCommand bibitem
label "1"
key "Item-1"

\end_inset

Bibliography item 1
\end_layout

\begin_layout Standard
\begin_inset CommandInset index_print
LatexCommand printindex
type "idx"

\end_inset


\end_layout

\end_body
\end_document

我通过 LyX 中的 XeTeX 生成了一个 .pdf,但它确实导致了我提到的相同问题。

此外,以下是同一文件的 .tex 导出版本:

%% LyX 2.2.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,english]{scrbook}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Kaiti SC}
\setsansfont[Mapping=tex-text]{Kaiti SC}
\setmonofont{Baskerville}
\usepackage[paperwidth=6in,paperheight=9in]{geometry}
\geometry{verbose,tmargin=0.8in,bmargin=0.8in,lmargin=0.8in,rmargin=0.6in,headheight=0.1in,headsep=0.3in,footskip=0.3in}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{0}
\setlength{\parindent}{0pt}
\usepackage{makeidx}
\makeindex
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}
\hypersetup{pdftitle={Dao De Jing},
 pdfauthor={Laozi, Firstname Lastname},
 pdfsubject={Chinese philosophy},
 pdfkeywords={philosophy, non-duality, nonduality, Chinese}}

\makeatletter
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%% Paragraphs
\usepackage{parskip}
\setlength{\parskip}{3mm plus1mm minus1mm}

%% Links
\usepackage{hyperref}
\usepackage{xcolor}
\definecolor{Muted}{rgb}{0.200, 0.200, 0.200}
\hypersetup{
    pdfnewwindow=true,      % links in new PDF window
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor= Muted,          % color of internal links (change box color with linkbordercolor)
    citecolor= Muted,        % color of links to bibliography
    filecolor= Muted,      % color of file links
    urlcolor= Muted           % color of external links
}

%% Footnotes
\usepackage{perpage}
\MakePerPage{footnote}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
  \ensuremath{%
    \ifcase#1% 0
    \or % 1
      {\dagger }
    \or % 2
      \ddagger
    \or % 3  
      \dagger\dagger
    \or % 4   
      \ddagger\ddagger
    \or % 5
      \dagger\dagger\dagger
    \or % 6
      \ddagger\ddagger\ddagger
    \else % >= 7
      \@ctrerr  
    \fi
  }%   
}   
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
  \myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
  \myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
        \textsuperscript{\thefootnotemark}~%
}

%% Bibliography
\usepackage[super,sort&compress]{natbib}
\setcitestyle{citesep={, }}

%% Fonts
\usepackage{fontspec}
\setmainfont[
BoldFont={Kaiti TC Bold},
ItalicFont={Baskerville Italic},
BoldItalicFont={Baskerville Bold Italic}
] {Kaiti TC}

\makeatother

\usepackage{xunicode}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\begin{document}

\title{Title}

\author{{\small{}Author}}

\maketitle
\tableofcontents{}

%% add spacing above the Index entry in the TOC
\addtocontents{toc}{\vspace{20pt}}

\chapter{Introduction}

\part{Part 1}

\chapter*{Chapter 1}

This is text with an index entry at the end.\index{index entry}

\addtocontents{toc}{\vspace{18pt}}

\chapter{Glossary}
\begin{labeling}{00.00.0000}
\item [{\texttt{\textbf{example}}}] This is example text.
\end{labeling}
\newpage{}

\raggedright
\addcontentsline{toc}{chapter}{Bibliography} %% show in TOC
\begin{thebibliography}{1}
\bibitem[1]{Item-1}Bibliography item 1
\end{thebibliography}
\printindex{}
\end{document}

答案1

如果你将 添加\usepackage{idxlayout}到序言中,“索引”标题将以与其他章节相同的方式定位

在此处输入图片描述

%% LyX 2.2.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,english]{scrbook}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Kaiti SC}
\setsansfont[Mapping=tex-text]{Kaiti SC}
\setmonofont{Baskerville}
\usepackage[paperwidth=6in,paperheight=9in]{geometry}
\geometry{verbose,tmargin=0.8in,bmargin=0.8in,lmargin=0.8in,rmargin=0.6in,headheight=0.1in,headsep=0.3in,footskip=0.3in}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{0}
\setlength{\parindent}{0pt}
\usepackage{makeidx}
\makeindex
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}
\hypersetup{pdftitle={Dao De Jing},
 pdfauthor={Laozi, Firstname Lastname},
 pdfsubject={Chinese philosophy},
 pdfkeywords={philosophy, non-duality, nonduality, Chinese}}

\makeatletter
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%% Paragraphs
\usepackage{parskip}
\setlength{\parskip}{3mm plus1mm minus1mm}

%% Links
\usepackage{hyperref}
\usepackage{xcolor}
\definecolor{Muted}{rgb}{0.200, 0.200, 0.200}
\hypersetup{
    pdfnewwindow=true,      % links in new PDF window
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor= Muted,          % color of internal links (change box color with linkbordercolor)
    citecolor= Muted,        % color of links to bibliography
    filecolor= Muted,      % color of file links
    urlcolor= Muted           % color of external links
}

%% Footnotes
\usepackage{perpage}
\MakePerPage{footnote}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
  \ensuremath{%
    \ifcase#1% 0
    \or % 1
      {\dagger }
    \or % 2
      \ddagger
    \or % 3  
      \dagger\dagger
    \or % 4   
      \ddagger\ddagger
    \or % 5
      \dagger\dagger\dagger
    \or % 6
      \ddagger\ddagger\ddagger
    \else % >= 7
      \@ctrerr  
    \fi
  }%   
}   
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
  \myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
  \myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
        \textsuperscript{\thefootnotemark}~%
}

%% Bibliography
\usepackage[super,sort&compress]{natbib}
\setcitestyle{citesep={, }}

%% Fonts
\usepackage{fontspec}
\setmainfont[
BoldFont={Kaiti TC Bold},
ItalicFont={Baskerville Italic},
BoldItalicFont={Baskerville Bold Italic}
] {Kaiti TC}

\makeatother

\usepackage{xunicode}
\usepackage{polyglossia}
\setdefaultlanguage{english}

\usepackage{idxlayout}
\begin{document}

\title{Title}

\author{{\small{}Author}}

\maketitle
\tableofcontents{}

%% add spacing above the Index entry in the TOC
\addtocontents{toc}{\vspace{20pt}}

\chapter{Introduction}

\part{Part 1}

\chapter*{Chapter 1}

This is text with an index entry at the end.\index{index entry}

\addtocontents{toc}{\vspace{18pt}}

\chapter{Glossary}
\begin{labeling}{00.00.0000}
\item [{\texttt{\textbf{example}}}] This is example text.
\end{labeling}
\newpage{}

\raggedright
\addcontentsline{toc}{chapter}{Bibliography} %% show in TOC
\begin{thebibliography}{1}
\bibitem[1]{Item-1}Bibliography item 1
\end{thebibliography}
\printindex{}
\end{document}

相关内容