# change delimiter (slash) size in math mode

I use the division sign, together with an underscore and smash:

$\underline{\smash{X/P}}$


The result is the following:

How can I reduce the lower part of the slash, so it does not suppress the horizontal line?

Without the $\smash$ command there is too much padding:

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. A suggestion: Do us a favour and change your username to something more telling than "user1234". – Martin Schröder Jan 29 '15 at 9:27
• Which operation or relationship does the "slash" symbol denote? – Mico Jan 29 '15 at 9:27
• @Mico slash denote division operator – Konstantin Isupov Jan 29 '15 at 9:42

## 2 Answers

You could create a smaller version of the slash symbol. The screenshot below illustrates its look in the second "X over P" expression.

\documentclass{article}
\usepackage{graphicx}
\newcommand\smalldiv{\smash{\raisebox{0.29ex}{\scalebox{0.8}{/}}}}
\begin{document}
$\underline{\smash{X/P}}$
\underline{$X\smalldiv P$}
\end{document}


The optimal adjustment amounts will depend on the font family that's in use.

Here is a work around using ulem package. Adjust 0.55ex in

\setlength{\ULdepth}{0.55ex}  %% adjust this


Code:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[normalem]{ulem}
\setlength{\ULdepth}{0.55ex}  %% adjust this
\begin{document}
\uline{$X/P$}
\end{document}


Or if you really want to reduce the size:

\documentclass[12pt]{article}
\usepackage{graphicx,amsmath}
\newcommand{\mydiv}{\raisebox{0.25ex}{\resizebox{!}{1.4ex}{/}}}
\begin{document}
\underline{$\smash[b]{X\mydiv P}$}
\end{document}