Possible Duplicate:
How can I draw a dot under a symbol in math mode?
I'm looking for the equivalent of the \textvbaraccent command for the math mode.
Possible Duplicate:
How can I draw a dot under a symbol in math mode?
I'm looking for the equivalent of the \textvbaraccent command for the math mode.
With the same approach as in https://tex.stackexchange.com/a/38907/4427
\usepackage[T3,T1]{fontenc}
\DeclareSymbolFont{tipa}{T3}{cmr}{m}{n}
\DeclareMathAccent{\vbar}{\mathalpha}{tipa}{156}
\begin{document}
$\vbar{x}$
\end{document}
One has to consult the tipa package font tables to find out the right code. A useful package is fonttable:
\documentclass{article}
\usepackage{fonttable}
\begin{document}
\xfonttable{T3}{cmr}{m}{n}
\end{document}
However, the file t3enc.def has the entry
\DeclareTextCommand\textvbaraccent{T3}[1]%
{\tipaupperaccent{156}{#1}} % Vertical Bar Accent
that tells the number to use.
In general, this approach is superior to the use of \text{\textvbaraccent{$x$}} that doesn't place the accent taking care correctly of the slant as can be seen in the following picture (left my definition, right the result of \text)
