von Grummelgast » Di 22. Jun 2021, 18:02
Ich würde eher zu \ooalign greifen. Das ist ein beliebtes Mittel zum tricksen. Siehe auch Abschnitt 11.3 in symbols-a4. Ein erster Ansatz, der für normale Breiten (und normale Größe!) halbwegs ordentlich funktioniert, für große Breiten aber nicht:
\documentclass{article}
\usepackage{xcolor}
\newcommand*{\specialwidehat}[1]{%
\ooalign{$\stackrel{\scriptscriptstyle(}{\mathstrut}$\hfil$\stackrel{\scriptscriptstyle)}{\mathstrut}$\cr$\widehat{#1}$\cr}%
}
\begin{document}
$\widehat{UOA}$ \par\bigskip $\specialwidehat{UOA}$
\bigskip
$\widehat{UOAUOA}$ \par\bigskip $\specialwidehat{UOAUOA}$
\bigskip
$\widehat{O}$ \par\bigskip $\specialwidehat{O}$
\end{document}
Achso, \specialwidehat funktioniert in dieser Form auch ohne $…$ darum herum, weil es explizit den Mathemodus setzt (weil \ooalign sein Argument sonst im Textmodus setzt).
Ich würde eher zu [tt]\ooalign[/tt] greifen. Das ist ein beliebtes Mittel zum tricksen. Siehe auch Abschnitt 11.3 in [doc]symbols-a4[/doc]. Ein erster Ansatz, der für normale Breiten (und normale Größe!) halbwegs ordentlich funktioniert, für große Breiten aber nicht: [code]\documentclass{article}
\usepackage{xcolor}
\newcommand*{\specialwidehat}[1]{%
\ooalign{$\stackrel{\scriptscriptstyle(}{\mathstrut}$\hfil$\stackrel{\scriptscriptstyle)}{\mathstrut}$\cr$\widehat{#1}$\cr}%
}
\begin{document}
$\widehat{UOA}$ \par\bigskip $\specialwidehat{UOA}$
\bigskip
$\widehat{UOAUOA}$ \par\bigskip $\specialwidehat{UOAUOA}$
\bigskip
$\widehat{O}$ \par\bigskip $\specialwidehat{O}$
\end{document}[/code]
Achso, [tt]\specialwidehat[/tt] funktioniert in dieser Form auch ohne [tt]$…$[/tt] darum herum, weil es explizit den Mathemodus setzt (weil [tt]\ooalign[/tt] sein Argument sonst im Textmodus setzt).