Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have code similar to this:

\[
x / \sqrt{\frac{a}{b}}
\]

I.e. the first part (x) is normal height while the second part is tall. How do I get the / to be stretched vertically to match the second part?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Depending on the spacing surrounding the symbol, you could use one of the \big, \Big, \bigg, or \Bigg commands or their friends for relation symbols \bigm, \Bigm, \biggm, or \Biggm:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
x \Biggm/ \sqrt{\frac{a}{b}}
\]

\[
x \Bigm/ \sqrt{a/b}
\]

\[
x \Bigg/ \sqrt{\frac{a}{b}}
\]

\[
x \Big/ \sqrt{a/b}
\]

\end{document}
share|improve this answer

You could use something like this that automatically re sizes the slant and handles different sizes on both sides of the slant:

\documentclass{article}
\usepackage{amsmath}

\newcommand*{\nfrac}[2]{#1\left/\vphantom{#1}#2\right.}
\begin{document}


\[
\nfrac{x}{\sqrt{\frac{a}{b}}}
\]

\[
\nfrac{\sqrt{\frac{a}{b}}}{x}
\]

\[
\nfrac{x}{\sqrt{a/b}}
\]

\[
\nfrac{\sqrt{a/b}}{x}
\]

\end{document}

The \phantom handles the case where the numerator is taller than the denominator.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.