# Adding a dot over greek letter in text mode

I have searched but have not found a solution to the following problem. I am trying to shift the location of a dot accent over a greek letter using the textgreek package. However, the dot is shifted left of the letter. I've seen solutions to solve this problem in math mode, however I would like to use the greek letter in text mode. Any help would be greatly appreciated.

A minimal working example would look like this.

\documentclass[9pt,twocolumn,twoside,lineno]{article}

\usepackage{textgreek}

\begin{document}

I would like this \.{\textgamma}, and not
$\dot{\gamma}$ this.

\end{document}

• 9pt is not a valid document clas setting, FYI. Welcome to the site. Jan 18, 2017 at 11:16

The stackengine package defaults to text mode stacking and can be used here. Note 9pt is not a valid document class setting (valid settings are 10pt, 11pt, and 12pt). The optional argument to \stackon defines the gap between letter and dot.

\documentclass[twocolumn,twoside,lineno]{article}

\usepackage{textgreek,stackengine}

\begin{document}

I would like this \stackon[1pt]{\textgamma}{.}, and not
$\dot{\gamma}$ this.

\end{document}


One could create a general definition \textdot{} as

\documentclass[twocolumn,twoside,lineno]{article}
\usepackage{textgreek,stackengine}
\newcommand\textdot[1]{\stackon[1pt]{\csname text#1\endcsname}{.}}

\begin{document}

I would like this \textdot{gamma}, and not
$\dot{\gamma}$ this.

\textdot{beta}\textdot{Gamma}\textdot{delta}\textdot{epsilon}

\end{document}


Some low level functions:

\documentclass{article}
\usepackage{textgreek}

\DeclareRobustCommand\grdot[1]{%
\leavevmode
\vbox{
\offinterlineskip
\ialign{%
##\cr
\hidewidth\.{}\hidewidth\cr
\noalign{\kern-1ex}
#1\cr
}
}%
}

\begin{document}

I would like this \grdot{\textgamma}, and not
$\dot{\gamma}$ this.

\grdot{\textbeta}\grdot{\textGamma}\grdot{\textdelta}%
\grdot{\textepsilon}

\end{document}


Basically, overset to the Greek letter a dot accent over an empty box, but lowered by 1ex.