1

As some have guessed, there was indeed a \center before the title. As shown in the picture, I changed that to \begin{center} \end{center*} and the rest of the text is now aligned!

I tried to be more explicit regarding the first issue, as explained in the new picture.

enter image description here

Original Post:

My two problems are shown in the picture: I want the math expressions to appear in their "normal" size (i.e. not to fit into the line), but then when I have two expressions they don't get spaced as you can see. Another issue is that that piece of text that I marked with a * should be aligned to the left but instead appears in the center. Is there any way to resolve these issues?

In align* mode, there is no issue, since it would automatically add space between those two integrals, say. However, it is painful to write the text within \text{} and then to break the lines manually.

issues

my TeXnic Center inputs:

\documentclass{article}
\usepackage[a4paper, margin=12mm]{geometry}
\usepackage[document]{ragged2e}
\usepackage{microtype}
\usepackage[fleqn]{mathtools}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{bigints}
\usepackage{physics}
\usepackage{wrapfig}
\usepackage{amsmath, graphics, setspace}
\usepackage{bm}
\usepackage{float}
\usepackage{hyperref}

\everymath{\displaystyle}
\setcounter{page}{1}
\setlength{\jot}{2mm}
\pagenumbering{arabic}

    The community is here to help you with questions about TeX, LaTeX or related typesetting systems.  $\int_{-\infty}^\infty |P_\epsilon (t',\omega)|d\omega = |f(t')| \int_{-\infty}^\infty e^{-\omega^2 \epsilon^2} d\omega = |f(t')|\frac{\sqrt \pi}{\epsilon}$, The community is here to help you with questions about TeX.
And, $\int_{-\infty}^\infty |P_\epsilon (t',\omega)|dt' = e^{-\omega^2 \epsilon^2} \int_{-\infty}^\infty |f(t')| dt'$ The community is here to help you with questions about TeX, LaTeX or related typesetting systems.
5
  • 2
    This is pretty much why inline math is sized smaller. Is there a reason you don't want to use align* and \text? That's what they're designed for. And this made up example doesn't show why you wouldn't. (Also, your made up example is missing \begin{document}.) If you could also cut down the number of packages you're using, that would be helpful in diagnosing your problem. Something is centering your text, instead of the default full-justification.
    – Teepeemm
    Jul 22, 2021 at 23:55
  • 3
    Just adding \begin{document} and \end{document} and processing doesn't produce the result you show. Notice that the first and last lines are centered; that isn't the default behavior. Please update your code to produce what you show; otherwise, it's impossible to guess what is happening to the last line. (The problems with \displaystyle are pretty well covered in the other comment.) Jul 23, 2021 at 0:00
  • 1
    Please edit your question and clarify what you want, e.g., they don't get spaced as you can see what is the spacing you want? And read others' comments first.
    – AboAmmar
    Jul 23, 2021 at 1:12
  • our screenshot strongly suggests that there's a stray \centering directive somewhere in the document that gave rise to the screenshot. Your sample code is but an excerpt from a longer document, right?
    – Mico
    Jul 23, 2021 at 3:44
  • Thank you everyone. Please, take a look at my edited post if you can. By the way, I don't want the math expressions to appear small, which they would if I would let them fit into the line. I don't mind if the line spacings get varied because of large expressions such as integrals, however I don't want expressions very close to each other as exemplified in the picture.
    – dekees
    Jul 23, 2021 at 11:43

1 Answer 1

1

I will interpret "I want the math expressions ... not to fit into the line" to mean that they should be typeset as displayed rather than as inline equations. If this interpretation is correct, you should replace the $...$ expressions with \[...\] expressions. \[ initiates an unnumbered displayed equation, and \] terminates it.

As some of the comments have already pointed out, the wisdom of the instruction \everymath{\displaystyle} is rather questionable. Speaking for myself, the only sensible justification for its use I can think of is in beamer documents. Even then, I'd think twice before I'd use it.

enter image description here

\documentclass{article}
\usepackage[a4paper, margin=12mm]{geometry} % <-- rather narrow margins
\usepackage[document]{ragged2e}
\usepackage{microtype}
\usepackage[fleqn]{mathtools}
\DeclarePairedDelimiter\abs\lvert\rvert % <-- new
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{bigints}
\usepackage{physics}
\usepackage{wrapfig}
\usepackage{%%amsmath, % 'mathtools' automatically loads 'amsmath'
   %%graphics, % don't load both graphicx and graphics
   setspace}
\usepackage{bm}
\usepackage{float} % are you sure you need this package?
\usepackage{xurl}  % for improved handling of URL strings
\usepackage{hyperref}

%%\everymath{\displaystyle} % highly questionable, except maybe in 'beamer' documents
%\setcounter{page}{1}       % that's the default
%\setlength{\jot}{2mm}
%\pagenumbering{arabic}     % that's the default

\begin{document}

The community is here to help you with questions about TeX, LaTeX 
or related typesetting systems.  
\[
\int_{-\infty}^\infty \abs{P_\epsilon (t',\omega)}\,d\omega 
  = \abs{f(t')} \int_{-\infty}^\infty e^{-\omega^2 \epsilon^2} d\omega 
  = |f(t')|\frac{\sqrt \pi}{\epsilon}\,. 
\]    
The community is here to help you with questions about TeX.
And, 
\[
\int_{-\infty}^\infty \abs{P_\epsilon (t',\omega)}\,dt' 
= e^{-\omega^2 \epsilon^2} \int_{-\infty}^\infty \abs{f(t')}\,dt'.
\] 
The community is here to help you with questions about TeX, LaTeX 
or related typesetting systems.
\end{document}
14
  • Additionally, you could use \begin{align} with an \intertext line or two to align the expressions above and below the interstitial text.
    – Davislor
    Jul 23, 2021 at 2:46
  • @Davislor. Good suggestions. Let’s wait and see if the OP declares my interpretation is even valid. :-)
    – Mico
    Jul 23, 2021 at 3:04
  • Thank you both. I have cleaned up my userpackages as suggested. What is the effect of "\DeclarePairedDelimiter\abs\lvert\rvert"? I have added it along with usepackage{mathtools} but haven't noticed any change with respect to the distance between the integrals that I show in the picture. Oh, and I wouldn't like to have every math expression called in a separated line as you suggest, @Mico. That is why I'm using "displaystyle".
    – dekees
    Jul 23, 2021 at 11:49
  • @dekees - If you look closely at the code in my answer, you'll find a macro called \abs used several times. The \DeclarePairedDelimiter instruction in the preamble sets up the macro.
    – Mico
    Jul 23, 2021 at 13:03
  • @dekees - You seem to make an equivalence where there is none: "display style math" and "displayed equation" are not the same, and one does not imply the other. The former refers to the size of the letters and especially the size of operator symbols such as \sum and \int. The latter refers to the math stuff (usually, but not necessarily an equation) being placed -- or "displayed", if you prefer -- on a line by itself. Please check for yourself: running \everymath{\displaystyle} does not convert inline equations into displayed equations.
    – Mico
    Jul 23, 2021 at 13:04

You must log in to answer this question.

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