# How to write like I'm in display-math mode?

when I compile:\subsection{subsection 1} $$\int x^2 dx$$ i get this large nice shaped integral sign but i do not want this integral to appear neither individually nor at the middle of the page. if ı use \subsection{subsection 1} \int x^2 dx ı get a small, non pretty looking integral sign which ruins the appearance of the page. how can ı solve this issue?

• What exactly are you trying to get? Please clarify what constitutes "an ugly shaped integral". – Mico Sep 23 '20 at 11:44
• a small integral sign the one you would get in: \subsection{this is a subsection} $\int x^2 dx$ – Enes Senel Sep 23 '20 at 11:47
• It is impossible to guess what your question is. what does "ugly" mean? All we know so far is that you have used some markup that you have not shown and you do not like the character. You could use a different font but you have not said what font you are using. Please include a small complete document that shows the issue, and say how you want it to change. (possibly not related but  is not supported latex syntax) – David Carlisle Sep 23 '20 at 11:56
• A full size \int would never fit in the running text (as in $\int$) without messing up line spacing. Thus text mode math uses the small version of the symbol this is normal. If the expression becomes complicated typeset it displayed instead. – daleif Sep 23 '20 at 11:59
• @EnesSenel It is helpful if you provide MWE of your code or an image which should show your requirement, please look into tex.meta.stackexchange.com/questions/430/text-building-blocks about MWE... – MadyYuvi Sep 23 '20 at 12:00

My hunch is that you want is $\displaystyle\int$, to produce a full-size integral symbol while in inline math mode. However, as @Bernard has noted in a comment, you may also be interested in \medint\int of the nccmath package. The symbols produced by \medint\int and \displaystyle\int are shown in the following screenshot, along with the default inline-math integral symbol.
Do be aware, though, that the large size of the displaymath-style integral symbol will surely wreck the appearance of the paragraph in which the symbol occurs -- unless something like doublespacing is in effect, in which case the appearance of the paragraph is beyond repair from the outset and the occurrence of $\displaystyle\int$ will inflict only minimal further typographic damage.
\documentclass{article}
$\int h(x)\,dx \quad \medint\int h(x)\,dx \quad \displaystyle\int h(x)\,dx$

• A compromise would be adding the \medint command from nccmath – Bernard Sep 23 '20 at 12:56
• @Bernard - Many thanks for this suggestion! I've updated my answer to incorporate \medint\int as a possible solution to the OP's typesetting objective. – Mico Sep 23 '20 at 13:07