Math & ScienceIntegral with extra symbol under it

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Integral with extra symbol under it

Post by Cham »

I need to write an integral with its usual limits, but with an extra symbol just under it.

Take that standard integral for example :

Code: Select all

\int_A^B f(x) \, dx
How can I tell LaTeX to add the text line "path 1" (in small font) just under the integral sign, without changing the limits "A" and "B" ? The text line should be centered with the integral sign.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Integral with extra symbol under it

Post by cgnieder »

Two possibilities:

Code: Select all

\documentclass{article}
\usepackage[intlimits]{mathtools}
\begin{document}

\[\underset{\text{path 1}}{\int_A^B} f(x) \, dx\]

\[\int_{\substack{A \\\text{path 1}}}^B f(x) \, dx\]

\[\int_{\mathclap{\substack{A \\\text{path 1}}}}^B f(x) \, dx\]

\end{document}
Have a look at mathmode for further information.
site moderator & package author
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Integral with extra symbol under it

Post by Cham »

Thanks for the answer.

The problem with this solution is that the limits ("A" and "B") are now under and above the integral sign. I would like to leave them in their default position (on the right).

EDIT : Doh ! I just found the solution ! :roll:

Thanks for your help. Case is solved ! :)
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Integral with extra symbol under it

Post by cgnieder »

That's because of the intlimits option to mathtools. You really should take a look at mathmode.

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\begin{document}

\[\underset{\text{path 1}}{\int_A^B} f(x) \, dx\]

\end{document}
Regards
site moderator & package author
Post Reply