# How to write this expression?

How can I write the vertical line in this expression? It is as tall as the before relation.

• Are answers to this question what you're after? Aug 8, 2018 at 13:57

You can do

\documentclass{article}
\begin{document}
$$4\pi\epsilon^{2}\frac{d\tilde{G}}{dR}\biggr|_{R=\epsilon}.$$
\end{document}


Some more details on the use of \bigl ... can be found in this post.

You can use the esdiff package, for a simpler typing of derivatives (partial or not) of any order in Leibniz notation. For derivatives evaluated at some point, you have a \diff*command with 3 arguments, the function, the variable and the evaluation point, but it uses a pair of parentheses. If you want a single vertical line, you have to do it by hand. Here is an example of both:

\documentclass{article}
\usepackage{mathtools}
\usepackage{esdiff}

\begin{document}

$4\pi\varepsilon ^2\diff*{\widetilde{G}}{R}{R = \varepsilon }$%

$4\pi\varepsilon ^2\diff{\widetilde{G}}{R}\biggm\vert_{R = \varepsilon }$%

\end{document}


If you prefer to have the same image you inserted with the same symbols, you can also use my code (with slanted operator "d" or vertical mode for "d")

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{times}
\usepackage{newtxtext,newtxmath}
\usepackage{fancybox}
\usepackage{xcolor}
\begin{document}
$\colorbox{gray!20}{4\pi\varepsilon^2\dfrac{d\tilde{G}}{dR}\biggr|_{R=\varepsilon}.}$

$\colorbox{gray!20}{4\pi\varepsilon^2\dfrac{\mathrm{d}\tilde{G}}{\mathrm{d}R}\biggr|_{R=\varepsilon}.}$

\end{document}

• @Sebatiano: Nicely done within a colored box. However don't forget that "derivation" is an operation and so the symbol "d" in that case needs to be an operator - meaning being upright.
– user151328
Aug 8, 2018 at 21:20
• Thank you very much for your compliments. I have not positioned the "d" in an upright position because in Italy (you could see many pantries on the net) the "d" is positioned in an inclined position. Thank you very much. Now I have added the "d" as a vertical position. Aug 8, 2018 at 21:25
• @Sebatiano: ... you say they do operators in "italics"? ... What a word game though :-) As far as I was taught, operators should be upright, independent from which country they come along ... Maybe I was taught wrong or it is just a matter of "personal style"
– user151328
Aug 8, 2018 at 21:32
• I could see you now provide the "operator" version. +1 though!!!
– user151328
Aug 8, 2018 at 21:34
• @JürgenG Look here to pag. 5: dm.unibo.it/~barozzi/MI2/PDF/MI2-Cap.8.pdf. It is only an example. Aug 8, 2018 at 21:35