This question has been posted several times but...

I'm looking for a consistent implementation of the evaluation symbol:

  • Evaluation bar as delimeter: <...>|
  • Auto-size to its enclosing expression: \left<...>\right

What I'm not looking for is:

  • Evaluation bar as relation: <...>\mid
  • Manual-size to its enclosing expression: <...>bigg|
  • A whole macro!

Now, the problem is that \rvert does not auto-size, whereas \left. inserts extra spacing.

Perfect would be something of the form \left_ telling latex to enclose the expression here while inserting no delimiter from the left at all, no matter wether visible or invisible.

Do you have an idea how to implement the evaluation bar?
(Not just circumventing the problem!)

As an example consider:

y(a)&=\frac12 x^2|_a\\
y(a)&=\frac12 x^2\rvert_a\\
y(a)&=\left.\frac12 x^2\right|_a
  • '\left.<stuff>\right\rvert_{<more stuff>}`
    – user10274
    Commented Dec 10, 2014 at 21:51
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Commented Dec 10, 2014 at 21:53
  • @MarcvanDongen: That is bad as it does not avoid the missing delimiter but inserts an invisible delimiter. Commented Dec 10, 2014 at 22:01
  • 2
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – cfr
    Commented Dec 10, 2014 at 22:04
  • @Freeze_S I am not sure you understand: it's your duty to make LaTeX aware of the delimiters, not the other way around (unfortunately...).
    – user10274
    Commented Dec 10, 2014 at 22:06

2 Answers 2


Here is a macro that does auto scaling, but also allows you to manually specify a size if so desired. You can also specif a prefix for the limits if so desired as in the last example on the first group:

enter image description here


  • The manually specified size example as just illustrate the possibilities in the size that you can select. I am not suggesting that all those sizes are appropriate for the given fraction.




% http://tex.stackexchange.com/questions/38868/big-parenthesis-in-an-equation
% http://tex.stackexchange.com/questions/6794/about-big-parenthesis-larger-than-bigg

\NewDocumentCommand{\Eval}{O{} o m m m}{%
    % #1 = prefix to be added to each limit of evaluation (ex "x=").
    % #2 = optional size specification to be applied (defaults to \left \right pair)
    %          \big \Big \bigg \Bigg \vast \Vast \vastt \Vastt
    % #3 = expression being evaluated
    % #4 = lower limit of evaluation
    % #5 = upper limit of evaluation


Automatically sized:
    \Eval{x^2}{0}{5} \quad
    \Eval{\frac{1}{x}}{0}{5} \quad
Manually sized
    \Eval[][\big]{\frac{1}{x}}{0}{5}    \quad
    \Eval[][\Big]{\frac{1}{x}}{0}{5}    \quad
    \Eval[][\bigg]{\frac{1}{x}}{0}{5}   \quad
    \Eval[][\Bigg]{\frac{1}{x}}{0}{5}   \quad
    \Eval[][\vast]{\frac{1}{x}}{0}{5}   \quad
    \Eval[][\Vast]{\frac{1}{x}}{0}{5}   \quad
    \Eval[][\vastt]{\frac{1}{x}}{0}{5}  \quad
  • Aaah, but for mathjax? (I'm using it mostly for SE.) Commented Dec 10, 2014 at 23:03
  • @Freeze_S I'm afraid that mathjax is off-topic for this site...
    – cfr
    Commented Dec 10, 2014 at 23:17
  • @Freeze_S if you want to re-implement this solution in MathJax, let me know. Commented Dec 13, 2014 at 14:18

An application of the macros in https://tex.stackexchange.com/a/136767/4427


      \egreg_paired_delimiter_expand:nnnn {#2}{#3}{##3}{#4}
      \egreg_paired_delimiter_fixed:nnnnn {##2}{#2}{#3}{##3}{#4}
\cs_new_protected:Npn \egreg_paired_delimiter_expand:nnnn #1 #2 #3 #4
 {% Fix the spacing issue with \left and \right (D. Arsenau, P. Stephani and H. Oberdiek)
   \str_if_eq:nnT { . } { #1 } { \kern-\nulldelimiterspace }
   \group_insert_after:N \c_group_end_token
   \tl_if_empty:nF {#4} { \c_math_subscript_token {#4} }
\cs_new_protected:Npn \egreg_paired_delimiter_fixed:nnnnn #1 #2 #3 #4 #5
  \str_if_eq:nnF {.} { #2 } { \mathopen{#1#2} }
  \tl_if_empty:nF {#5} { \c_math_subscript_token {#5} }

%% the final optional argument to \xDeclarePairedDelimiter
%% is a subscript to the right fence


The optional argument to \eval is for choosing manually a size; \eval* is like using \left and \right. The second argument is the point of evaluation.

enter image description here

  • Aah, but isn't a macro kind of overshot? Commented Dec 10, 2014 at 23:27
  • 2
    @Freeze_S Why? To the contrary, it guarantees uniformity!
    – egreg
    Commented Dec 10, 2014 at 23:28
  • True, but isn't there a simpler way e.g. sth. like \left_ instead of \left. inserting no delimiter at all? Commented Dec 11, 2014 at 9:43

You must log in to answer this question.

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