LaTeX forum ⇒ Text FormattingLining figures in ToC

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Lining figures in ToC

Postby AleCes » Tue Apr 15, 2014 6:46 pm

Hello everybody, I normally use Text Figures in the body text, but since ToC entries are all caps, I need chapter numbers to be Lining Figures. How can I do that? Can tocloft help me achieve that?

  1. \documentclass{book}
  2. \usepackage{fontspec}
  3. \setmainfont[Mapping=tex-text, Numbers=OldStyle]{Latin Modern Roman}
  4.  
  5. \begin{document}
  6.  
  7. \tableofcontents
  8.  
  9. \chapter{Introduction}
  10.  
  11. \section{blah}
  12.  
  13. \chapter{Conclusion}
  14.  
  15. \section{blah}
  16.  
  17. \end{document}


Thanks!

User avatar
Johannes_B
Site Moderator
Posts: 4100
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Apr 15, 2014 8:36 pm

Simply like this?

  1. \documentclass{book}
  2. \usepackage{fontspec}
  3. \setmainfont[Mapping=tex-text, %Numbers=OldStyle
  4. ]{Latin Modern Roman}
  5.  
  6. \begin{document}
  7.  
  8. \tableofcontents
  9. \addfontfeatures{Numbers=OldStyle}
  10.  
  11. \chapter{123678 Introduction}
  12. 1234567890
  13. \section{blah}
  14. \chapter{Conclusion}
  15. \section{blah}
  16. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Postby AleCes » Wed Apr 16, 2014 4:07 pm

Thanks Johannes_B, but you see, I'm rather picky about that: I want lining figures as chapter numbers (because titles are all caps), but text figures in page numbers.

Is it possible to get that?


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 1 guest