I have recently learned from questions like

Unwanted Space Between Vertical Bar and Math Operator

that we should write

\lvert \sin(x) \rvert

instead of

| \sin(x) |

for denoting the absolute value of a quantity. However, the visual appearance of the latter approach does not seem to be perfect:




\lvert \sin(x) \rvert


Comparing |sin(x)| and \lvert \sin(x) \rvert

When comparing with the space between ")" and "|" the former has too much space between "|" and "s", while the latter seems to have slightly too little space between "|" and "s". In other words, the sin(x) term does not appear to be set in the centre of the two vertical bars in either case.

  1. How can the appearance be improved?
  2. Is there any good reason why it shouldn't be changed?
  • The latter is correct. What you see is from the design of the (). If you set \fboxsep=0pt and then do \boxed{)} you'll see that ) it self leaves space after it. Noone else have complained about it.
    – daleif
    Commented May 6, 2022 at 10:09
  • For all we know the answer to question 2 might be "Knuth insist on backward compatibility" like the descender in italic 7
    – user202729
    Commented May 6, 2022 at 14:50
  • @daleif Thank you, interesting! Why have space in the individual characters instead of leaving all space decisions to the typesetting side of things? Commented May 6, 2022 at 20:59


You must log in to answer this question.

Browse other questions tagged .