1

I am typesetting a book in XeLaTex (TexLive 2012 on Windows) in Sanskrit. I am using the tocloft package for table of contents. I want the font size to be bigger in the TOC, for which I use the following

\renewcommand\cftchapfont{\LARGE\bfseries}
\renewcommand\cftsecfont{\Large}
\renewcommand\cftchappagefont{\LARGE\bfseries}
\renewcommand\cftsecpagefont{\Large}

However, this has the undesired side-effect of making the spacing between section entries non-uniform. The spacing is now different depending on the glyphs above or below the characters. When I remove the above four lines, the spacing is perfectly uniform, but the default font size is too small. Any idea how to increase the font without impacting the spacing?

Here is an MWE.

\documentclass{book}
\usepackage{titlesec} 
\usepackage[titles]{tocloft}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainlanguage{sanskrit}
\setotherlanguage{english}
\setmainfont[Script=Devanagari]{Arial Unicode MS}
\newfontfamily\devanagarifont[Script=Devanagari]{Arial Unicode MS}
\newfontfamily{\englishfont}{Times New Roman}
\newcommand{\devanagarinumeral}[1]{%
  \devanagaridigits{\number\csname c@#1\endcsname}}
\renewcommand\cftchapfont{\LARGE\bfseries}
\renewcommand\cftsecfont{\Large}
\renewcommand\cftchappagefont{\LARGE\bfseries}
\renewcommand\cftsecpagefont{\Large}
\usepackage{hyperref,bookmark}
\hypersetup{colorlinks,linkcolor=blue}
\pagenumbering{arabic}
\renewcommand{\thepage}{\large \devanagarinumeral{page}}
\begin{document}
\tableofcontents
\pagebreak
\chapter[कृत्तद्धितप्रकरणम्]{कृत्तद्धितप्रकरणम्}
\section[जगताम्]{जगताम्}
\section[अध्यात्मरामगङ्गा]{अध्यात्मरामगङ्गा}
\section[भक्तेषु]{भक्तेषु}
\section[मे]{मे}
\section[कथयिष्यामि]{कथयिष्यामि}
\section[ब्रूहि तत्त्वं]{ब्रूहि तत्त्वं}
\section[मया]{मया}
\chapter[धातुप्रकरणम्]{धातुप्रकरणम्}
\section[राज्यदानम्]{राज्यदानम्}
\section[पूर्णेन एकत्वम्]{पूर्णेन एकत्वम्}
\section[साक्षात्कथितं तव]{साक्षात्कथितं तव}
\section[तेऽभिहितम्]{तेऽभिहितम्}
\section[पुरा मम]{पुरा मम}
\section[प्राह]{प्राह}
\section[कश्यपस्य वरो दत्तः]{कश्यपस्य वरो दत्तः}
\end{document}
  • It might have to do with the font that you are using. Have you tried some font other than Arial Unicode MS? – Māris Ozols Nov 6 '13 at 5:35
  • Have tried both Mangal and Sanskrit 2003, the issue arises with them also. – user22209 Nov 6 '13 at 6:16
  • 1
    I think the problem is caused by characters that go below baseline (e.g., the last character in भक्तेषु). You can observe the same effect if you just have section names that alternate between aaa and ggg. There will be a bigger gap under ggg. – Māris Ozols Nov 6 '13 at 6:25
  • Thanks this is helpful, how does one fix the problem though? – user22209 Nov 6 '13 at 6:37
1

You can insert \usepackage{setspace} in the preable and then use something like this:

\begin{spacing}{1.6}
\tableofcontents
\end{spacing}

Alternatively, you can put \renewcommand{\baselinestretch}{1.8} before \tableofcontents. This method was suggested for a similar problem in this post.

  • Works perfectly. Any idea why 1.6 and 1.8 and not any other number? – user22209 Nov 6 '13 at 6:49
  • I just tried different values and these seemed to give the best result. There is no particular deep reason. – Māris Ozols Nov 6 '13 at 13:39

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.