4

In the context of a logic book, set using LaTeX/pdftex in Computer Modern, I'm using Greek letters from the standard math symbol alphabet as symbols.

But on a few occasions I want to typeset an ancient Greek word. It looks odd to use a different font (as supplied by default by e.g. the Teubner package). But trying to fake it with the symbol font doesn't lead to good results with accents etc.

Question: is there an easy way of setting up a \textgreek command that can handle the accents/breathings etc. nicely, that spaces letters nicely, AND delivers output that uses an italic Greek font with letters the same shape as (or very close to) the standard symbol font?

4

If you can use LuaLaTeX or XeLaTeX, you can load Computer Modern Unicode Serif. This font has polytonic Greek letters based on Computer Modern and the old cbgreek fonts. In order to get the appropriate shapes for Greek text, instead of math symbols, you select the Script=Greek OpenType feature. The \babelfont command handles this automatically.

\documentclass{article}
\usepackage[paperwidth=11cm]{geometry}
\usepackage[english]{babel}
\usepackage{fontspec}
\usepackage{microtype}

\babelprovide[import]{greek}
\newcommand\textgreek[1]{\foreignlanguage{greek}{#1}}
\newenvironment{greek}%
{\begin{otherlanguage}{greek}}%
{\end{otherlanguage}}

\defaultfontfeatures{Scale = MatchLowercase}

\babelfont{rm}
          [Scale=1.0, Ligatures={Common, TeX}, Language=Default]{Latin Modern Roman}
\babelfont[greek]{rm}
          [Language=Default]{CMU Serif}
\babelfont{sf}
          [Ligatures={Common, TeX}, Language=Default]{Latin Modern Sans}
\babelfont[greek]{sf}
          [Language=Default]{CMU Sans Serif}
\babelfont{tt}
          [Language=Default]{Latin Modern Mono}
\babelfont[greek]{tt}
          [Language=Default]{CMU Typewriter Text}

\begin{document}
\begin{greek}
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν:
\end{greek}
\end{document}

CMU Serif font sample

I added more \babelfont cases and options than strictly necessary, in order to suppress some warning messages.

If you actually want letters shaped like \theta and \lambda, just load CMU Serif with Script=Default rather than Script=Greek. By default, lowercase Greek math symbols are slanted and uppercase ones are upright, so you could also throw in a \slshape if you want. You could also use \varphi and \vartheta in math mode to make that more consistent with Greek text.

And a version compatible with PDFLaTeX if you need one. Note that the UTF-8 input encoding has been the default since April 2018. PDFLaTeX will therefore understand Greek, if you load the LGR font encoding.

\documentclass{article}
\usepackage[LGR, T1]{fontenc}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage[paperwidth=11cm]{geometry}
\usepackage[polutonikogreek, main=english]{babel}
\usepackage{microtype}

\DeclareRobustCommand\textgreek[1]{\foreignlanguage{polutonikogreek}{#1}}
\newenvironment{greek}%
{\begin{otherlanguage}{polutonikogreek}}%
{\end{otherlanguage}}

\begin{document}
\begin{greek}
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν:
\end{greek}
\end{document}

cbgreek font sample

1

Please try with the below code, note that it works in XELaTeX only:

\documentclass{book}
\usepackage{babyloniannum}
\usepackage[polutonikogreek,english]{babel}
\begin{document}
\newfontfamily\greekfont[Script=Greek, Scale=MatchUppercase, Ligatures=TeX]{Old Standard}
\newcommand{\textgreek}[1]{\bgroup\greekfont\emph{#1}\egroup} % 

\textgreek{Ï€Ïότασις}

\end{document}

Output

enter image description here

Using PDFLaTeX

egreg suggested a better way to get in PDFLaTeX, and the codes are:

\documentclass{book}
\usepackage[greek.polutoniko,english]{babel}

\newenvironment{greek}
  {\begin{otherlanguage*}{greek}}
  {\end{otherlanguage*}}

\begin{document}

\begin{greek}
To~u d`e poso~u t`o m'en >esti diwrism'enon, t`o d`e suneqes.
\end{greek}

\end{document}

Output

enter image description here

  • Thanks, but I'm using LaTeX -- and indeed the glyphs here are rather overdecorated compared with standard CM Greek letters. – Peter Smith Oct 14 at 9:31
  • 2
    @PeterSmith XeLaTeX is also LaTeX. I guess you mean you use the pdftex engine. – campa Oct 14 at 9:37
  • Sorry, yes indeed – Peter Smith Oct 14 at 9:39
  • @PeterSmith Refer the updated suggestion... – MadyYuvi Oct 14 at 9:53
  • Yes. That gives a nice Greek output -- but with a significantly different look to the standard standard Greek letters used by the CM symbol font (compare alphas, for example). So it would still look odd in a passage which also contains Greek letters as symbols. – Peter Smith Oct 14 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.