7

Is there any way to drill down into the code that defines, for example, to fix the kerning of the diacritics? It's worse in ebgaramond; it's not very much better in computer modern.

\documentclass{standalone}

\usepackage{ebgaramond}
\usepackage[greek]{babel}

\begin{document}

\textgreek{Ἄνθρωπε, οὐκ οἶδα ὃ λέγεις.}

\end{document}

enter image description here

1
  • 3
    with lualatex it is better (then without \textgreek). Feb 4 at 10:34

2 Answers 2

12

The character in question is U+1F0C GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA and we find, in lgrenc.dfu,

\DeclareUnicodeCharacter{1F0C}{\ensuregreek{\accpsilioxia\textAlpha}}        % Ἄ

and in lgrenc.def we see

\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textAlpha}{>'A}

Thus the character translates directly in the combination >'A. In the Greek fonts, >' is a ligature and some fonts may provide a kerning between this character and the letter A (which is used to transliterate the Greek Alpha). For instance, if I remove the call to ebgaramond, the tracing by TeX shows

....\LGR/cmr/m/n/10 ^ (ligature >')
....\kern-0.83313
....\LGR/cmr/m/n/10 A

But when ebgaramond is used the same combination produces

....\LGR/EBGaramond-OsF/regular/n/10 ^ (ligature >')
....\LGR/EBGaramond-OsF/regular/n/10 A

No kerning. Can we add it in this case? Yes, we can.

\documentclass{article}

\usepackage{ebgaramond}
\usepackage[greek]{babel}

\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textAlpha}{>'\kern-0.15em A}


\begin{document}

\textgreek{Ἄνθρωπε, οὐκ οἶδα ὃ λέγεις.}

\end{document}

enter image description here

You'll need to fix other composite commands, I believe, but the idea is the same.

1
  • Definitely the letter of the question. Thanks.
    – commonhare
    Feb 4 at 15:08
7

No need to drill down to anything. As @UlrikeFischer has already suggested in a comment, if you are willing and able to do so, by all means consider switching to either LuaLaTeX or XeLaTeX, and don't use \textgreek wrappers.

enter image description here

% !TEX TS-program = xelatex  %% or 'lualatex'
\documentclass[border=2pt]{standalone}
\usepackage{ebgaramond}
\usepackage[greek]{babel}
\begin{document}
Ἄνθρωπε, οὐκ οἶδα ὃ λέγεις.
\end{document}
1
  • 2
    Up-voted because the spirit is right, and I probably will switch to XeLaTeX.
    – commonhare
    Feb 4 at 15:09

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.