# Typeset indexed function with parameters

I want to typeset something like

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$$f_{A_{n,k}}(\omega)$$

\end{document}


I don't know how to make the argument (\omega) to be typeset (above) somewhere around n and k, as in my writing on the paper. In my compiled pdf it is always after the function index.

Here is example of hand-written expression

vs

Am I wanting too much? Is it standardized in any way?

• First of all: Don't use $$...$$. That's deprecated. Use $...$ instead – user31729 Dec 27 '17 at 10:02

I propose a variant, with \mathrlap from mathtools and some math kerning:

\documentclass[12pt]{article}
\usepackage{mathtools}

\begin{document}

$f_{{}_{\scriptstyle\mathstrut \mathrlap{\mkern -6mu A^{\phantom{1}}_{n,k}}}}\,(ω)$%

\end{document}


The closest to you handwriting seems to be the following:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}
\Large

You have
$f_{A_{n,k}}(\omega)$

You want to
$f_{\rlap{\raisebox{-0.7em}{\scriptstyle A_{n,k}}}}\,(\omega)$

\end{document}


As your notation is unclear for me, the spacing probably needs some corrections. Certainly, then a macro for it may be written.