# [Tex/LaTex] \overset and superscripts

oversetpositioningsuperscripts

Consider this MWE:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
&\overset{0}{\mathcal{D}^{\alpha\beta}}\\
&\overset{0}{\mathcal{D}}^{\alpha\beta}
\end{align}
\end{document}


which gives the following (both wrong!) results: I want the superscripts athe the level of the top of $\mathcal{D}$ (as in the first case), but the overset $0$, must be only over the $\mathcal{D}$, not the superscripts (as in the second line).

How can I do that?

You can do that very simply with \accentset from the accents package. Note it is by default in scriptscriptstyle. You can force scriptstyle, but the documentation of the package warns you can have trouble. In the present example, it seems to work:

\documentclass{article}
\usepackage{amsmath}
\usepackage{accents}

\begin{document}

\begin{align*}
& \accentset{0}{\mathcal{D}}^{0\alpha\beta} \\
& \accentset{\scriptstyle 0}{\mathcal{D}}^{0\alpha\beta}
\end{align*}

\end{document}
{"ft_lang_label":"__label__en","ft_lang_prob":0.74021065,"math_prob":0.88490164,"size":2814,"snap":"2023-14-2023-23","text_gpt3_token_len":956,"char_repetition_ratio":0.12882562,"word_repetition_ratio":0.0053475937,"special_character_ratio":0.31272212,"punctuation_ratio":0.15139443,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9952344,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,2,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-08T16:14:06Z\",\"WARC-Record-ID\":\"<urn:uuid:07ec977c-12cb-4b93-96af-9b688d92a8cc>\",\"Content-Length\":\"24153\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5cee2320-c202-40b8-a798-49ed5235a44a>\",\"WARC-Concurrent-To\":\"<urn:uuid:4f5e29da-5583-4668-8c2b-b8a7c1bde299>\",\"WARC-IP-Address\":\"45.77.5.190\",\"WARC-Target-URI\":\"https://imathworks.com/tex/tex-latex-overset-and-superscripts/\",\"WARC-Payload-Digest\":\"sha1:JTVGXOXWB3XSWG5WT5PF33RTXL7QV667\",\"WARC-Block-Digest\":\"sha1:3DFJGWJB4ZT5KMY5DBODXQWA7IZLPH5Q\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224655027.51_warc_CC-MAIN-20230608135911-20230608165911-00777.warc.gz\"}"}