# Big symbol "|" in latex

I need to use | with the mean of "such that". It's in an expression with fraction and so I need to have a big |. I've tried to use \displaystyle before | but it doesn't work. Putting \left before | work, but Texstudio give an error because there isn't any \right. What can I do?

• you can always size it with an wxplicit size. \bigg might be appropriate. Jun 20, 2018 at 18:26
• Please accept an answer if you have found a solution. By the way, I would recommend zyy's answer, as this will scale with the content!
– nox
Jun 20, 2018 at 19:12

You could do the following

$$\left. \frac{\partial f \left( x , y \right)}{\partial x} \right|_{x = 0}$$


This will yield

• What's the purpose of writing f \left( x , y \right) instead of, say, f(x,y)? Put differently, why make (La)TeX insert whitespace between f and (?
– Mico
Jun 20, 2018 at 20:45
• @Mico LaTeX just recognize \left( \right) as occupying more space, I kind of have the habit of using \left( \right) instead of ( ) for all situation so that my document is more consistent.
– zyy
Jun 20, 2018 at 21:08
• "...so that my document is more consistent." You know what Ralph Waldo Emerson had to say about consistency, right? If not, here goes: "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. He may as well concern himself with his shadow on the wall." (excerpt from an essay, entitled "Self-Reliance") Ouch! :-)
– Mico
Jun 22, 2018 at 8:14
• In case you're still not convinced that using \left and \right for the sake of consistency is maybe not all that great an idea, do check out the posting Is it ever bad to use \left and \right?
– Mico
Jun 23, 2018 at 17:33
• @Mico Yeah, that makes sense.
– zyy
Jun 28, 2018 at 14:47

I find the ‘middle’ commands look better for this:

\documentclass{article}

\usepackage{mathtools}

\begin{document}
$\left.\frac{\partial f(x, y)}{\partial x}\right| f(t) = t^2 + 1$%
$\frac{\partial f( x, y)}{\partial x}\biggm| f(t) = t^2 + 1$%

\end{document}


If you want only a left delimiter but not a right one, you can use \left| \right. (with a dot).

Using a specific package called diffcoeff (https://ctan.mirror.garr.it/mirrors/ctan/macros/latex/contrib/diffcoeff/diffcoeff.pdf) you can obtain the same result. It is not a classic command but it is very simple to understand. The \diffdef{pvrule}{op-symbol=\partial} is a macro for to write a partial symbol.

\documentclass[a4paper,12pt]{article}
\usepackage{diffcoeff}
\diffdef{pvrule}{op-symbol=\partial}

\begin{document}
$\diff.pvrule.{f(x,y)}x[x=0]$
\end{document}


You can use a similar code for the function of one variable using the character $d$: see the macro op-symbol=d.
\documentclass[a4paper,12pt]{article}
$\diff.pvrule.{(x^2+3x)}x[x=1]=5$