Using the answer to the question moving the bar on hbar (copy/paste and tweaking the parameters, and replacing mathchar'26
by the shorter mathchar'55
), I was able to create a barred q. Unfortunately, this symbol behaves badly when I use \qbar
as an index.
I use the font package eulervm
:
\documentclass[11pt]{scrartcl}
\usepackage{eulervm}
\usepackage{mathtools}
\makeatletter
\newcommand{\raisemath}[1]{\mathpalette{\raisem@th{#1}}}
\newcommand{\raisem@th}[3]{\raisebox{#1}{$#2#3$}}
\makeatother
\newcommand{\qbar}{\ensuremath{\mathrlap{\raisemath{-3.2}{\hspace*{3.2pt}
{\mathchar'55\mkern-9mu}}}q}}
\begin{document}
{\Huge$\qbar$} \qquad $\qbar$ \qquad $U_{\qbar}$
\end{document}
What code should I use to get the same symbol in both cases? I also noticed that I had to reconfigure the paramters in the definition of \qbar
for this question, presumably there was some interaction with the other packages or options... This is first time I'm attempting to create a symbol in this fashion. If you know of better ways, or can provide me with a resource that explains how to do this in general, that would be great too!
q
's are out.