TransWikia.com

Foreign-Language support in part, Section, etc

TeX - LaTeX Asked by user242047 on May 17, 2021

I have a document with a lot of different languages, some of which appear in part{}, section{}, etc. blocks. For example, the following MWE:

documentclass[12pt,a4paper,oneside]{scrbook}
setkomafont{sectioning}{rmfamily bfseries}
usepackage{fontspec}
setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
makeatletter
usepackage{csquotes}
usepackage{luacode}
usepackage{polyglossia}
setdefaultlanguage[variant=american]{english}
setotherlanguage[variant=poly]{greek}
usepackage{xstring}
defaultfontfeatures{Mapping=tex-text}
newfontfamilygreekfont[Script=Greek]{SBL Greek}
tracinglostchars=2

makeatother

begin{document}

part{Analysis Part Six: Anestis Logothetis{textemdash}{begin{greek}textsc{Άναστάσεις}end{greek}}}

Some text about {begin{greek}textsc{Άναστάσεις}end{greek}}

end{document}

For me, the word "Άναστάσεις" is properly set by textsc in the body text, but not in the title. If I try language setting in other languages (I have another section title with German) the "Part" name is preceded by "Titlegerman" (indicating that the "end{german} part just got appended to "Title").

Short version of the question: is there a way to have foreign-language words properly typeset in part, chapter, section, etc. blocks? And to appear this way in the TOC?

Additionally, I should point out that Noto Sans doesn’t handle textsc correctly at all for Greek scripts, which is why I’m sticking with SBL Greek here.

Thanks for the help!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP