This seems to be a dummy one but I haven't found anything that works good for me.

I'm working in an article and I need to get an underlined expression, like this enter image description here

I mean REALLY CLOSE, but, so far, the available options such as \underlying{x} or \underset{_}{x} haven't worked so good because it left a huge vertical space. I need it to be real close of x. Any ideas?

Thanks in advance.


A \underline seems to work great:

enter image description here

If there is still too much space with you can draw your own \rule and tweak the placement as desired:

enter image description here




\newcommand{\ru}[1]{\raisebox{\BaselineAdjust}{$\substack{\textstyle #1\\[\YShiftContent]\rule[\YShiftRule]{\widthof{#1}}{\LineWidth}}$}}

\[ \int_{R_1} f_x (\ux \mid C_1)\dd \ux \]
or using \verb|\ru| macro:
\[ \int_{R_1} f_x (\ru{x} \mid C_1)\dd \ru{x} \]
| improve this answer | |

If you need an underline symbol that's shorter than what's produced by \underline, you could turn to the ushort package and its \ushort macro. The first line below uses the \ushort macro, the second the \underline macro.

enter image description here

\newcommand{\dee}{\operatorname{d\!}{}} % "differential" operator
% see http://tex.stackexchange.com/a/178948/5001
\setlength\textwidth{2in} % just for this example
\[ \int_{R_1} f_x (\ushort{x} \mid C_1)\dee \ushort{x} \]
\[ \int_{R_1} f_x (\underline{x} \mid C_1)\dee \underline{x} \]
| improve this answer | |

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.