TOC with monospaced oldstyle numbers

I'm using oldstyle numbers in my thesis and noticed that the pagenumbers in the table of contents are not providing a straight left line. The following image shows this behaviour for the numbers from a section with 11 subsections.

TOC with monospaced oldstyle numbers

In the case of the KOMA-Script classes, the numbers of chapters (or sections in scrartcl) can be modified by adding the Numbers=Monospaced font feature to the sectionentrypagenumber. However, this is not supported (as far as I know) for the lower level sectioning.

How can I get monospaced oldstyle numbers in the TOC?

\documentclass[a5paper,DIV=9]{scrartcl}  \addtokomafont{disposition}{\rmfamily}  \usepackage{fontspec} \setmainfont{Latin Modern Roman}[Numbers=OldStyle]  \usepackage{lipsum} \begin{document}   \tableofcontents    \section{a}   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \section{a}   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \section{a}   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \section{a}   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \subsection{a}   \lipsum   \subsection{a}   \lipsum  \end{document} 


You can temporarily reset the main font for the table of contents:



\setmainfont{Latin Modern Roman}[Numbers=OldStyle]

% the following just for testing
\newfontfamily{\msf}{Latin Modern Roman}[Numbers={OldStyle,Monospaced}]


\setmainfont{Latin Modern Roman}[

Numbers should now be not monospaced:


{\msf 1234567890}



TOC with monospaced oldstyle numbers

You see from the test that the figures in the top line after the table of contents are not monospaced, while they are in the bottom line.

Category: table of contents Time: 2016-07-28 Views: 1

Related post

  • Character clash in ToC with long chapter numbers 2014-11-22

    I need to change \thechapter into something that spans several characters. Doing so mixes up characters in my customized table of contents (as well as the ordinary ToC). Here's an example: Here's an MWE: \documentclass{book} \usepackage{titlesec} \us

  • Alignment of TOC with exotic numbering 2015-07-15

    While answering this question : French section numbering using bis, ter, etc, I realized that when you add (using \addcontentsline) some content to ToC with "non conventionnal numbering" (in my case 2 bis, 2 ter, etc), the title of the section i

  • Oldstyle numbers with Charter font 2011-12-15

    I'm using the Charter font using the following package: \usepackage[charter]{mathdesign} I want to have oldstyle (lowercase) numbers in conjunction with this package. I've seen this question but it refers to CM and palatino only. Any way of getting o

  • Adobe Caslon Pro, XeLaTeX, fontspec - how to change the "dollar" symbol that's used with oldstyle numbers 2013-03-13

    I am using XeLaTeX with Adobe Caslon Pro, and I would like to have oldstyle numbers. But when I use the option Numbers=OldStyle in fontspec, my dollar sign changes from a full-height S with two lines through it to a tiny s with only one line through

  • Oldstyle numbers in body, newstyle numbers in section headings 2011-10-18

    I'm using the eco package to get oldstyle numbers in my manuscript, but I'm trying to get the section numbers (in the mainmatter and the table of contents as well) to be "newstyle numbers" (ie. lining figures) and having a tough time with it. Ca

  • How to turn off oldstyle numbers 2011-03-21

    There are lots of sets of instructions for using oldstyle numbers (e.g. Utilizing oldstyle figures without resorting to \oldstylenums) but what might I do to turn them off completely? The detailed story is that I'm using the Kurier font and hyperref

  • TOC with pagestyle empty in memoir 2011-08-05

    I'm using the memoir class for a thesis, and want no page numbering of the front matter including the TOC. Have followed the answer to Table of contents with page style empty which does remove the page numbering of the first page of the TOC. My TOC i

  • Is there a version of the Arial or Tahoma font with monospaced digits and spaces? 2011-08-26

    The digits in the Arial font supplied with Windows are monospaced, in that they each take up the same horizontal space, but they seem to have neglected to provide a "monospaced" version of the space character. This means that you can't format a

  • Is there a way to do a numbered recommendation list in InDesign with the recommendation numbers right justified? 2013-01-08

    I'd like to get some output that looks like this: Lorem ipsum blah blah blah blah blah blah blah.... Recommendation: Put the thingamajigger in the doodlewhatsit. (RANDOM-248) Recommendation: Doodlewhatsit inserts into the thingamajobber. (RANDOM-249)

  • Copy oldstyle numbers from pdf (Minion Pro) 2013-08-01

    I can't get LuaLaTeX (0.76.0-2013061707, current TeXLive) to produce a pdf with copyable (in adobe reader) oldstyle numbers with the Minion Pro font. I tried the method here, but I get the error that font has been accessed already, changing it is for

  • OldStyle Numbers in Body Text Only-Lining Numbers Otherwise 2013-09-13

    My main font numbers are set to OldStyle. How can I set Lining numbers for: Titles (chapter, section, subsection, &c...), Beginning of enumeration, Page number, and Footnote numbers (but not footnote itself)? MWE: \documentclass{article} \usepackage{

  • Is it possible to remove specific section page number in TOC without losing page numbers for its subsections? 2013-10-28

    \documentclass[twoside,onecolumn,11pt,reqno, a4paper]{amsart} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{graphicx} \makeatletter \def\@tocline#1#2#3#4#5#6#7{\relax \ifnum #1>\[email protected] % then omit

  • remove leading "part" number in toc with titletoc 2014-11-07

    Is there a way to display part names, but not numbers in ToC with titletoc? simply removing \thecontentslabel seems easy enough for chapter, section etc, but not part. Background: I used the starred variant (\part*{foo}) but as I also would like some

  • Fast OS/filesystems/utilities to work with very large numbers of files 2011-06-13

    I work (create, read, copy, delete, count the number of) with millions of files under Windows XP (and NTFS). Are there any other filesystems or OS better optimized for dealing with millions of files? Can you provide any suggestions on how I can signi

  • Center parts in toc with tocloft 2012-08-16

    I'm trying to create a toc in a large Latex document which uses the KOMA script. In the toc I would like to center the parts and remove all other components (pagenumber, partnumber). I use tocloft (a hard requirement for other reasons). While I manag

  • Multiple TOC with MediaWiki using section headings in single page 2012-09-27

    I'm running my own installation of MediaWiki, which has been great! I haven't been able to find the answer to this small problem in any post, how to, etc. Here's the setup: Article TOC (limited to showing only H1 and H2) ==H1== ===H2=== ====H3==== ==

  • How to replace the "Go‎ ‎to‎‎ ToC" with an image in this file? 2012-12-29

    In the following code, how can I replace the "Go‎ ‎to‎‎ ToC" with in the output pdf? \documentclass{article} \usepackage[top]{background} \usepackage{lipsum} \pagestyle{empty} \usepackage[]{hyperref} \usepackage{blindtext} ‎\SetBgContents{\hyper

  • How do I list all installed packages with specific version numbers? 2013-09-19

    I would like to list all the installed packages, with specific version numbers on my system. I checked out dpkg --get-selections (How to list all installed packages?) but it doesn't show me what I need. For example: $ dpkg --get-selections apache2 ap

  • Getting Started with Ruby, III: Numbers and Logic 2013-09-30

    Getting Started with Ruby Getting Started with Ruby Getting Started with Ruby, II: Strings and Things Getting Started with Ruby, III: Numbers and Logic GSwR IV: Going Loopy Over Arrays and Hashes GSwR V: Methods to the Madness GSwR VI: Stay Classy wi

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 1.369 (s). 13 q(s)