LaTeX forum ⇒ Text FormattingChange font in TOC

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
schwarz
Posts: 4
Joined: Mon Oct 24, 2016 3:49 pm

Change font in TOC

Postby schwarz » Tue Mar 07, 2017 11:10 pm

Hallo,

my scrbook is divided in two parts with same content. The first part is written in Sütterlin, the second one in latin font. Is there the possibility to change the font in the TOC? I know this is not a normal case and would only be a nice-to-have.

Another question: What parameter do I have to change for bigger characters in Sütterlin (see line 5)? Are there also bold letters?

Thanks for your help

Regards,
schwarz

  1. \documentclass[12pt,% Schriftgröße
  2. pdftex, % benutze PDFLaTeX
  3. ]{scrbook}
  4.  
  5. \usepackage{suetterl}
  6. \DeclareFontShape{T1}{suetterl}{m}{n}{<->s*[0.8]suet14}{\fontdimen5\font=0.5\fontdimen6\font}
  7. % see <!-- m --><a class="postlink" href="http://www.mrunix.de/forums/showthread.php?73448-Schriftart-f%FCr-das-ganze-Dokument">http://www.mrunix.de/forums/showthread. ... e-Dokument</a><!-- m -->
  8. \usepackage[T1]{fontenc}% europäischer Zeichensatz
  9. \usepackage[latin1]{inputenc}% Zeichenkodierung
  10. \usepackage[german,ngerman]{babel}% neue deutsche Rechtschreibung, wichtig für Umlaute und Trennungsregeln
  11.  
  12. \newcommand{\inhalt}{%
  13. Das ist mein Text, einmal in Sütterlin und einmal in lateinischer Schrift.
  14. }
  15.  
  16. \begin{document}
  17.  
  18. \tableofcontents
  19.  
  20. {\selectlanguage{german} % alte deutsche Rechtschreibung für Sütterlin
  21. \setkomafont{disposition}{\suetterlin}
  22. \suetterlin
  23. \addpart{Die Abschrift in Sütterlin}
  24. \inhalt
  25. }
  26. \addpart{Die Abschrift in lateinischer Schrift}
  27. \inhalt
  28.  
  29. \end{document}

Tags:

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

Postby Johannes_B » Wed Mar 08, 2017 6:59 pm

To be honest, i would ask this questin on a german forum like goLaTeX or a Q&A site like TeXwelt.

The KOMA-script experts are there, and more people than on an english speaking site that actually knw Sütterlin.
You can (should) crosslink the posts, so that somebody here can find a solution on a german site.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8208
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Mar 08, 2017 10:13 pm

You insert add a font command to the table of contents by using \addtocontents at that place in the document.

Take a look at this example, compile two times:

  1. \documentclass{article}
  2. \begin{document}
  3. \tableofcontents
  4. \section{One}
  5. \addtocontents{toc}{\itshape}
  6. \section{Two}
  7. \end{document}


Stefan
Site admin

schwarz
Posts: 4
Joined: Mon Oct 24, 2016 3:49 pm

Postby schwarz » Sat Mar 11, 2017 7:16 pm

Thanks,

now I got it. I had to use the alpha-packet tocstyle, here is my solution. The only problem is that the spaces between the dots are smaller, so they end earlier than the dots of the normal font. Like this:
  1. Content1 (in suetterlin)..... 3
  2. Content2 (in normal font). . . . . . 7

I think it occurs because there is no \bfseries in suetterlin. If anybody has a solution it would be great, but I could also live with it.

  1. \documentclass[12pt,% Schriftgröße
  2. pdftex, % benutze PDFLaTeX
  3. ]{scrbook}
  4. \usepackage{suetterl}
  5. \DeclareFontShape{T1}{suetterl}{m}{n}{<->s*[1.0]suet14}{\fontdimen5\font=0.5\fontdimen6\font}
  6. % see <!-- m --><a class="postlink" href="http://www.mrunix.de/forums/showthread.php?73448-Schriftart-f%FCr-das-ganze-Dokument">http://www.mrunix.de/forums/showthread. ... e-Dokument</a><!-- m -->
  7. \usepackage[T1]{fontenc}% europäischer Zeichensatz
  8. \usepackage[latin1]{inputenc}% Zeichenkodierung
  9. \usepackage[german,ngerman]{babel}% neue deutsche Rechtschreibung, wichtig für Umlaute und Trennungsregeln
  10.  
  11. \usepackage{tocstyle}
  12.  
  13. \newcommand{\inhalt}{%
  14. Das ist mein Text, einmal in Sütterlin und einmal in lateinischer Schrift.
  15. }
  16.  
  17. \begin{document}
  18.  
  19. \tableofcontents
  20.  
  21. {\selectlanguage{german} % alte deutsche Rechtschreibung für Sütterlin
  22. \setkomafont{disposition}{\suetterlin}
  23. \addtocontents{toc}{\suetterlin}
  24. \suetterlin
  25. \addpart{Die Abschrift in Sütterlin}
  26. \inhalt
  27. }
  28. \addtocontents{toc}{\usekomafont{disposition}}
  29. \addpart{Die Abschrift in lateinischer Schrift}
  30. \inhalt
  31.  
  32. \end{document}


In my original document I had to replace the line where I set back the original style because of an error with \let in *.toc:
  1. %\addtocontents{toc}{\usekomafont{disposition}}
  2. \addtocontents{toc}{\sffamily \bfseries}


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 12 guests