5

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

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

The result is the following:

enter image description here

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:

enter image description here

3
  • 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". Jan 29, 2015 at 9:27
  • Which operation or relationship does the "slash" symbol denote?
    – Mico
    Jan 29, 2015 at 9:27
  • @Mico slash denote division operator Jan 29, 2015 at 9:42

2 Answers 2

4

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

enter image description here

\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.

0
3

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}

enter image description here

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}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .