How can I get three diacritics on the same Greek letter?

You can use the character combination already provided in the font:

\documentclass{article}
\usepackage[greek.polytoniko,english]{babel}

%\usepackage{fonttable}

\DeclareRobustCommand{\combinedaccent}[2]{%
  \leavevmode\vbox{\offinterlineskip
    \ialign{\hfil##\hfil\cr
      \char#1\relax\cr
      \noalign{\vskip -1ex}
      \noalign{\vskip 0.1ex}
      #2\cr
    }%
  }%
}
\newcommand{\lb}[1]{\combinedaccent{96}{\={#1}}}   % barys
\newcommand{\lo}[1]{\combinedaccent{39}{\={#1}}}   % oxys
\newcommand{\lob}[1]{\combinedaccent{126}{\={#1}}} % oxybareia
\newcommand{\ld}[1]{\combinedaccent{60}{\={#1}}}   % dasia
\newcommand{\ldb}[1]{\combinedaccent{67}{\={#1}}}  % dasia barys
\newcommand{\ldo}[1]{\combinedaccent{86}{\={#1}}}  % dasia oxys
\newcommand{\ldob}[1]{\combinedaccent{64}{\={#1}}} % dasia oxybareia
\newcommand{\lp}[1]{\combinedaccent{62}{\={#1}}}   % psilon
\newcommand{\lpb}[1]{\combinedaccent{95}{\={#1}}}  % psilon barys
\newcommand{\lpo}[1]{\combinedaccent{94}{\={#1}}}  % psilon oxys
\newcommand{\lpop}[1]{\combinedaccent{92}{\={#1}}} % psilon oxybareia

\begin{document}

\textgreek{\lb{a}\lo{a}\lob{a}\ld{a}\ldb{a}\ldo{a}\ldob{a}\lp{a}\lpb{a}\lpo{a}\lpop{a}}

\end{document}

enter image description here


The teubner package defines a more comprehensive set of macros for combined accents, compared with @egreg's answer. Here's Table 4 from the documentation (teubner-doc.pdf):

enter image description here

Tags:

Greek

Accents