1

I'm using KOMA-Script Book and there is a strange discrepancy between titles when it comes to the distance between the top of the page and the bottom of the text.

I'm using LyX and so the Index and Bibliography titles are auto-generated. The Chapter title is entered manually.

The Bibliography title is okay in relation to the Chapter titles, but the Index title is way off:

Discrepancy between chapter title and index title

Note: Red line added to help illustrate the difference.

Is there any way to shift the Index title specifically, so that it aligns with the others?

I checked my preamble and there's nothing in it that should be causing this issue.

Thank you ahead of time for any help you can provide.

Update: Below is a minimum working example. Note that because the document was created in LyX, there is LyX-specific code in it:

#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, Skye Morrigan"
\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

I generate a .pdf through XeTeX in LyX and it does result in the same problem as I had mentioned.

Additionally, here is a .tex export of the same file:

%% 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, Skye Morrigan},
 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}
  • 4
    Would you mind making a minimal example showing this behavior. Best if you can make it in a single file, then export into LaTeX and c/p here. – PhilipPirrip May 1 '17 at 2:34
  • This happens if packages like titlesec or tocbibind or titletoc or ... are loaded. There is definitely a reason for this. – Johannes_B May 1 '17 at 5:03
  • Maybe this is also just caused by the g and p in the second picture needing more space, but it's hard to tell without a MWE. – TeXnician May 1 '17 at 6:58
  • My project is 80+ chapters, so I'm going to have to slim it down. I'll get back to you with a MWE. – J.D. May 1 '17 at 19:00
  • MWE added. If you add it to a text file, add the .lyx extension, then generate a .pdf through XeTeX in LyX, it should reproduce the problem. It does reliably on my machine with LyX ver. 2.2.1. – J.D. May 1 '17 at 19:22
2

If you add the \usepackage{idxlayout} to your preamble, the title of "Index" will be positioned in the same way the other chapters are

enter image description here

%% 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, Skye Morrigan},
 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}
  • Thank you very much! I put that on my original file and it worked like a charm. :) – J.D. May 1 '17 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.