3

I want to do this with the crm10 font. How can I do that? I've tried a few fonts but I don't like them.

\documentclass{scrreprt}

\usepackage{fontspec}
\setmainfont{Times New Roman}
\setsansfont{Arial}
\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}
\newfontfamily\greekfontsf[Script=Greek]{Linux Libertine O}
\usepackage{polyglossia}
\setdefaultlanguage{greek}

\begin{document}
\tableofcontents{}

\section{Αυτό είναι ελληνικά.}
{\bfseries Welcome to Greek:} Αυτό είναι ελληνικά

Or Russian: Привет

Or Hebrew: מה הבעיה?
\end{document}
  • cmr10 does not have any a greek text alphabet (it has a subset uppercase only set of Greek for use in math, but no lowercase) the example document is just a copy of the linked question. It is not clear what your question is. – David Carlisle Feb 17 '15 at 18:51
  • If you are using xelatex to compile, then the simplest thing is to select a main font that includes the Unicode ranges you need. In this case the libertine package will get you all these ranges without any further setup.

    If you select a mainfont that does not include the other ranges (e.g., Latin Modern), then you have to manually set up font families for the other languages. But then you will have different fonts for each set of characters that will not necessarily harmonize.

    – musarithmia Feb 17 '15 at 19:00

1 Answers1

5

The CMU fonts are based on Computer Modern (and the CB fonts for Greek):

\documentclass{scrreprt}

\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\newfontfamily{\greekfont}{CMU Serif}
\newfontfamily{\greekfontsf}{CMU Sans Serif}
\usepackage{polyglossia}
\setdefaultlanguage{greek}

\begin{document}
\tableofcontents{}

\section{Αυτό είναι ελληνικά.}
{\bfseries Welcome to Greek:} Αυτό είναι ελληνικά

Or Russian: Привет

%Or Hebrew: מה הבעיה?
\end{document}

There's no support for Hebrew, though.

enter image description here

You can support Hebrew with a different font and using ucharclasses:

\documentclass{scrreprt}

\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\newfontfamily{\greekfont}{CMU Serif}
\newfontfamily{\greekfontsf}{CMU Sans Serif}
\newfontfamily{\hebrewfont}{Linux Libertine O}[Scale=MatchUppercase]

\usepackage{polyglossia}
\setdefaultlanguage{greek}

\usepackage[Latin,Greek,Hebrew,Cyrillic]{ucharclasses}

\setTransitionsFor{Hebrew}{\begingroup\hebrewfont}{\endgroup}

\begin{document}
\tableofcontents{}

\section{Αυτό είναι ελληνικά.}
{\bfseries Welcome to Greek:} Αυτό είναι ελληνικά

Or Russian: Привет

Or Hebrew: מה הבעיה?
\end{document}

enter image description here

egreg
  • 1,121,712
  • To be clear for the OP: There's no Computer Modern support for Hebrew, but you can declare a Hebrew font family (e.g., Libertine or SBL Hebrew). – musarithmia Feb 17 '15 at 19:13