# Greek aspiration marks in mathmode

I want to write in math-mode greek letters with aspiration marks. I've found the list of accents in math-mode here, but this list doesn't contain aspiration marks (like, for example, in this letter: ἁ, which is different from ά given by \grave{\alpha}). In addition, I will also need combined accents, such as ἕ or ἆ.

I would prefer a solution that doesn't use any special greek package, just some addition to math-mode.

• you can (probably) switch to text mode for Greek and use $1+ \text{ἕ or ἆ.} + 2$ – David Carlisle Nov 9 '19 at 19:39
• Is there any way of doing this without having any greek package in the preamble? Just by supplementing math-mode with a new type of accent? – wiktoria Nov 9 '19 at 20:51
• You probably want to have a look at the second part of this answer of mine – egreg Nov 9 '19 at 21:10
• @egreg, how to do this for other types of accents? Should I change 60 in \DeclareMathAccent{\rb}{\mathord}{greekletters}{60} to some other number? How to find what the number should be? I've done a quick search but I didn't find the list. – wiktoria Nov 9 '19 at 21:35
• @wiktoria Since I know where to look, I added the whole list. – egreg Nov 9 '19 at 23:36

Improving the code suggested in https://tex.stackexchange.com/a/512735/4427, here is a full list of math accents taken from the Greek font; change the names to your liking.

\documentclass{article}
\usepackage[LGR,T1]{fontenc} % or OT1

\DeclareSymbolFont{greekletters}{LGR}{\familydefault}{m}{n}
% lgrenc.def has
% \DeclareTextAccent{\accdialytika}{LGR}{34} % διαλυτικά (diaeresis/trema)
% \DeclareTextAccent{\acctonos}{LGR}{39} % τόνος/ὀξεῖα tonos/oxia (acute)
% \DeclareTextAccent{\accdasia}{LGR}{60} % δασεῖα spiritus asper (rough breathing)
% \DeclareTextAccent{\accpsili}{LGR}{62} % ψιλή spiritus lenis (smooth breathing)
% \DeclareTextAccent{\accvaria}{LGR}{96} % βαρεῖα (grave)
% \DeclareTextAccent{\accperispomeni}{LGR}{126} % περισπωμένη (circonflex/tilde)
% \DeclareTextAccent{\accdialytikaperispomeni}{LGR}{32} % Cd
% \DeclareTextAccent{\accdasiaperispomeni}{LGR}{64}     % Cr
% \DeclareTextAccent{\accdasiavaria}{LGR}{67}           % Gr
% \DeclareTextAccent{\accdasiaoxia}{LGR}{86}            % Ar
% \DeclareTextAccent{\accpsiliperispomeni}{LGR}{92}     % Cs
% \DeclareTextAccent{\accpsilioxia}{LGR}{94}            % As
% \DeclareTextAccent{\accpsilivaria}{LGR}{95}           % Gs

\DeclareMathAccent{\dialytika}{\mathord}{greekletters}{34}
\DeclareMathAccent{\tonos}{\mathord}{greekletters}{39}
\DeclareMathAccent{\dasia}{\mathord}{greekletters}{60}
\DeclareMathAccent{\psili}{\mathord}{greekletters}{62}
\DeclareMathAccent{\varia}{\mathord}{greekletters}{96}
\DeclareMathAccent{\perispomeni}{\mathord}{greekletters}{126}
\DeclareMathAccent{\dialytikaperispomeni}{\mathord}{greekletters}{32}
\DeclareMathAccent{\dialytikatonos}{\mathord}{greekletters}{35}
\DeclareMathAccent{\dasiaperispomeni}{\mathord}{greekletters}{64}
\DeclareMathAccent{\dasiavaria}{\mathord}{greekletters}{67}
\DeclareMathAccent{\dasiaoxia}{\mathord}{greekletters}{86}
\DeclareMathAccent{\psiliperispomeni}{\mathord}{greekletters}{92}
\DeclareMathAccent{\psilioxia}{\mathord}{greekletters}{94}
\DeclareMathAccent{\psilivaria}{\mathord}{greekletters}{95}

\begin{document}

$\dialytika{x}$
$\tonos{x}$
$\dasia{x}$
$\psili{x}$
$\varia{x}$
$\perispomeni{x}$
$\dialytikaperispomeni{x}$
$\dialytikatonos{x}$
$\dasiaperispomeni{x}$
$\dasiavaria{x}$
$\dasiaoxia{x}$
$\psiliperispomeni{x}$
$\psilioxia{x}$
$\psilivaria{x}$

\end{document}


A XeLaTeX solution with \text{} as @DavidCarlisle suggested and with my answer from here:

\documentclass[11pt,oneside]{article}
\usepackage{amsmath}
\usepackage[MnSymbol]{mathspec}
%\usepackage{MnSymbol}
\defaultfontfeatures{Ligatures=TeX}
\setallmainfonts{Linux Libertine O}
\usepackage{polyglossia}
\setmainlanguage{greek}
\setotherlanguage{english}
\setmainfont{Linux Libertine O}
%\newfontfamily\greekfont{Linux Libertine O}

% Definitions of Greek (in math mode)
\def\alpha{α}
\def\alphapneuma{\text{\emph{ἁ}}}
\def\beta{β}
\def\gamma{γ}
\def\delta{δ}
\def\epsilon{ε}
\def\zeta{ζ}
\def\eta{η}
\def\theta{θ}
\def\iota{ι}
\def\kappa{κ}
\def\lambda{λ}
\def\mu{μ}
\def\nu{ν}
\def\xi{ξ}
%\def\ο{o}
\def\pi{π}
\def\rho{ρ}
\def\sigma{σ}
\def\tau{τ}
\def\upsilon{υ}
\def\phi{φ}
\def\varphi{ϕ}
\def\chi{χ}
\def\psi{ψ}
\def\omega{ω}
\def\varsigma{ς}
\def\varrho{ϱ}
\def\vartheta{ϑ}

\def\Alpha{Α}
\def\Beta{Β}
\def\Gamma{Γ}
\def\Delta{Δ}
\def\Epsilon{Ε}
\def\Zeta{Ζ}
\def\Eta{Η}
\def\Theta{Θ}
\def\Iota{Ι}
\def\Kappa{Κ}
\def\Lambda{Λ}
\def\Mu{Μ}
\def\Nu{Ν}
\def\Xi{Ξ}
%\def\Ο{O}
\def\Pi{Π}
\def\Rho{Ρ}
\def\Sigma{Σ}
\def\Tau{Τ}
\def\Upsilon{Υ}
\def\Phi{Φ}
\def\Chi{Χ}
\def\Psi{Ψ}
\def\Omega{Ω}

\begin{document}
\selectlanguage{english}

English text

$\alphapneuma_{\alphapneuma} \beta_{β} \gamma_{γ} \delta_{δ} \epsilon_{ε} \zeta_{ζ} \eta_{η} \theta_{θ} \iota_{ι} \kappa_{κ} \lambda_{λ} \mu_{μ} \nu_{ν} \xi_{ξ} %\ο_{o} \pi_{π} \rho_{ρ} \sigma_{σ} \tau_{τ} \upsilon_{υ} \phi_{φ} \varphi_{ϕ} \chi_{χ} \psi_{ψ} \omega_{ω} \varsigma_{ς} \varrho_{ϱ} \vartheta_{ϑ}$
$\Alpha_{Α} \Beta_{Β} \Gamma_{Γ} \Delta_{Δ} \Epsilon_{Ε} \Zeta_{Ζ} \Eta_{Η} \Theta_{Θ} \Iota_{Ι} \Kappa_{Κ} \Lambda_{Λ} \Mu_{Μ} \Nu_{Ν} \Xi_{Ξ} %\Ο_{O} \Pi_{Π} \Rho_{Ρ} \Sigma_{Σ} \Tau_{Τ} \Upsilon_{Υ} \Phi_{Φ} \Chi_{Χ} \Psi_{Ψ} \Omega_{Ω}$

\selectlanguage{greek}

Ελληνικό κείμενο εδώ ἁ \alphapneuma
\end{document}


I only used \alphapneuma here and this gives: