4

How I am trying to put a label above a variable omega. That works well but I cant find a better way to have the sub- and superscripts belonging to omega itself without a gap. using the superscripts on stackrel itself places them way to high

\documentclass[]{scrreprt}

\usepackage{eurosym,bm,amsmath}     % Mathematische Notationen
\usepackage{scalerel}

\begin{document}

$\stackrel{\scaleto{f}{5pt}}{\omega}{}^{(i)}_{kl}$

\end{document}

enter image description here

4

Something like this?

enter image description here

Note the use of \, (thinspace) to nudge the "f" superscript to the right, to improve its centering above the \omega character.

\documentclass{scrreprt}
\usepackage{amsmath}  % for \smash[t]{...} macro
\usepackage{scalerel} % for \stackrel macro
\begin{document}
$\smash[t]{\stackrel{\,\scaleto{f}{5pt}}{\omega}}^{(i)}_{kl}$
\end{document}

Addendum to address the OP's follow-up question: Since the macro \lstmw will only be encountered in math mode, I'd define it as follows:

\newcommand{\lstmw}[3]{%
    \smash[t]{\stackrel{\scaleto{#2}{5pt}}{#1}}^{(i)}_{#3}}

and write $\lstmw{\omega}{\,f}{kl}$ in the body of the document.

In fact, to make the superscript term (here: f) look a little bit less skinny and brittle, I'd define the macro as follows:

\newcommand{\lstmw}[3]{%
    \smash[t]{\stackrel{\scaleto{\scriptscriptstyle #2}{5pt}}{#1}}^{(i)}_{#3}}

This "works" because TeX's math glyphs are optically sized, rather than just linearly scaled versions of the "standard size" glyphs.

  • 1
    thanks yeah thats exactly what i was hoping for :) – Quastiat Sep 13 '19 at 19:39
  • 1
    I am quite new to designing my own commands, but wouldn't i create one out of this like the following: \newcommand{\lstmw}[3]{$\smash[t]{\,\stackrel{\scaleto{ #2 }{5pt}}{ #1 }}^{(i)}_{ #3 }$} ? Using that in math mode gets me running into missing } errors... – Quastiat Sep 13 '19 at 19:51
  • @Quastiat - Please see the addendum I just posted. – Mico Sep 13 '19 at 20:03
  • 1
    thanks again that works just as expected, scaleto causes some issues with some letters but thats fine for me :) – Quastiat Sep 13 '19 at 20:57
3

The accentset command is another possibility. By default, the accent letter is in scriptscriptstyle, but you might be interested in having it in \scriptstyle:

\documentclass{scrreprt}

\usepackage{accents}

\begin{document}

$ \accentset{\mkern2mu\scriptstyle f}{\omega}^{(i)}_{kl}\qquad \accentset{\mkern1mu f}{\omega}^{(i)}_{kl}$

\end{document} 

enter image description here

  • thanks for the input the works as well! – Quastiat Sep 13 '19 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.