I want to automatically add a \, between the upperlimit and the integral sign instead of having to type it mannually every time. I'm using latexocr to snip the equation and copy the latex code from latexocr to my document, if i use \renewcommand to redefine \int, then the syntax would become \int{a}{b}{f} but i want to keep the \int_{a}^{b}{f} format where _ and ^ is used to indicate upper and lower limit. Are there anyway to achieve this or are there any method to configure the default spacing of the original \int command ?


% but i want something like this
% instead of this
  • Welcome to TeX.SE.
    – Mico
    Sep 8 at 6:52
  • And why do you want that? The default spacing looks better IMO.
    – Gaussler
    Sep 8 at 8:28

2 Answers 2


Assuming you really want to do this, it is a job for \RenewDocumentCommand and its embellishment argument type.


% just for comparison




You do use amsmath, don't you?

enter image description here

By the way, the syntax for \int doesn't require braces around the integrand as you seem to believe: they're actually generally unwanted.


You need to employ the Plain-TeX \def directive instead of the LaTeX \renewcommand directive. That said, I would define the new version of \int to take two arguments rather than three, as the version of the \int macro mentioned in the OP's query does nothing special with the third argument.

enter image description here



$\int_a^b s(x)dx$ \quad $\int_{u}^{v} w(x)\,dx$

You must log in to answer this question.

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