# How to Write a Dot in Subscript?

I'm trying to write a dot over a subscript - like

    f_{\dot{x}}


My problem is that this comes out looking all wrong. The dot is inside the x, it's just messy. Does anyone know of a way to do this?

P.S I'm doing this because I want to write the euler-lagrange equations in the more compact form

    f_{x}=\dot{f_{\dot{x}}}


so I need a method that will accompany another dot on top of the one in the subscript. Any help would be appreciated.

Edit: Mico answered this below to all who have the same issue! Thanks Mico!

• You can do f^{}_{\dot{x}}, with a dummy superscript. It's unclear what you want to achieve with f_{x}=\dot{f_{\dot{x}}}: can you show an approximate representation or point to some image? May 5, 2017 at 21:20
• Do you load the amsmath package? Please confirm.
– Mico
May 5, 2017 at 21:30
• Thank you all! Mico answered with exactly what I needed below. May 5, 2017 at 21:39

If you change from \dot{f_{\dot{x}}} to \dot{f}_{\dot{x}}, both dots will be placed correctly.

\documentclass{article}
\begin{document}
$f_{x}=\dot{f}_{\dot{x}}$
\end{document}


Addendum: A second MWE, which shows the OP's formula, the improvement suggested above, and a possible further improvement on.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{ccc}
bad & good & best(?) \$1ex] \dot{f_{\dot{x}}} & \dot{f}_{\dot{x}} & \dot{f}^{}_{\!\dot{x}} \end{tabular} \end{document}  • Damn you've beaten me by a split second! :) May 5, 2017 at 21:18 • very good for your work +1. May 5, 2017 at 21:31 • Thank you! Exactly what I was looking for. Much obliged to all who commented! May 5, 2017 at 21:38 You could do something clunky like this: \documentclass{article} \usepackage{amsmath} \newcommand{\mydot}[1]{\raisebox{-0.5ex}{\scriptsize\dot{#1}}} \begin{document} \[ f_{\dot x} \quad f_{\mydot{x}}$
\end{document}