1

I'd like to customize the math symbol "evaluated at". If I use the code:

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\frac{d}{dt} \left( i_{O_L} \Bigr|_{O_G} \right) =
\end{equation*}

\begin{equation*}
\frac{d}{dt} \left( i_{O_L} \Bigg\rvert_{O_G} \right) =
\end{equation*}

\end{document}

In the first case the vertical bar is too small. In the second case the vertical bar grows up in both directions up and down. I'm wondering if it's possible to grow up the bar only below. For example (i want a thin vertical bar, in fugure it is not so thin):

enter image description here


EDIT:

enter image description here

enter image description here

enter image description here

Thank you so much for your time.

  • Your notations look strange.What's evaluated? The derivative or the argument of the differential symbol? – Bernard Jan 24 '19 at 18:34
  • Hello @Bernard see the edit please. I want only the symbol evaluated at like the above one. – Gennaro Arguzzi Jan 24 '19 at 22:47
  • So inside the parentheses? – Bernard Jan 24 '19 at 22:52
  • ...like in the figure. Without parentheses. – Gennaro Arguzzi Jan 24 '19 at 23:00
  • Ps: if there is the option to put the above expression inside paretheses, it would be better. – Gennaro Arguzzi Jan 24 '19 at 23:04
4

Not too sure I've well ubderstood what you want, but I propose this:

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{diffcoeff, array, delarray}

\begin{document}

\begin{equation*}
\diffp*{\begin{array}[t]({@{}c@{\,}|@{\,}c@{}})O_L & \\ & O_T\end{array}}{t}
\end{equation*}

\begin{equation*}
\diffp*{\begin{array}[t]({@{}c@{\,}|@{\,}c@{}})O_L & \\[2ex] & O_T\end{array}}{t}
\end{equation*}

\end{document} 

enter image description here

| improve this answer | |
  • Hi @Bernard, I'm looking for a different style. Please see my figures (with and without d/dt). My vertical bar is long only in the below direction. I want to customize its length. – Gennaro Arguzzi Jan 25 '19 at 5:52
  • I've added another example to show how to modify the length of the vertical rule (downwards). – Bernard Jan 25 '19 at 8:54
  • Excellent solution @Bernard. – Gennaro Arguzzi Jan 25 '19 at 10:18
4

Here's a modification of https://tex.stackexchange.com/a/458265/4427 where the rule only extends from the formula axis down, with a very large amount just for demonstration purposes.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\evalat}[2]{\mathpalette\eval@at{{#1}{#2}}}
\newcommand{\eval@at}[2]{\eval@@at#1#2}
\newcommand{\eval@@at}[3]{%
  #2\,
  {%
   \sbox0{$#1\left|#2\right|$}%
   \vrule height \fontdimen22\textfont2 depth \dimexpr\dp0+5ex\relax
  }_{\,#3}
}
\makeatother

\begin{document}

\[
\evalat{x}{x=5}
\qquad
\evalat{\frac{x+1}{x-1}}{x=2}
\]

\end{document}

enter image description here

Fix the depth by changing the value 5ex to something more sensible. Be advised that delimiters using \left and \right will grow as much in the upper as in the lower direction.

| improve this answer | |
  • 1
    Hi @egreg, thank you very much for your solution. – Gennaro Arguzzi Jan 25 '19 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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