同时出现文本和数学表达式问题

同时出现文本和数学表达式问题

正如一些人猜测的那样,标题前确实有一个 \center。如图所示,我将其更改为 \begin{center} \end{center*},其余文本现在已对齐!

我试图更清楚地解释第一个问题,正如新图片中所解释的那样。

在此处输入图片描述

原始帖子:

图片显示了我的两个问题:我希望数学表达式以“正常”大小显示(即不适合一行),但当我有两个表达式时,它们不会像您看到的那样留出空间。另一个问题是,我用 * 标记的那段文本应该左对齐,但却出现在中间。有什么方法可以解决这些问题吗?

在 align* 模式下,不会出现任何问题,因为它会自动在两个积分之间添加空格。但是,在 \text{} 中写入文本然后手动换行会很麻烦。

问题

我的 TeXnic 中心输入:

\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.

答案1

我将“我希望数学表达式……不适合行”解释为它们应该排版为显示而不是内联方程。如果这个解释是正确的,你应该用表达式替换$...$表达式\[...\]\[启动一个未编号的显示方程,然后\]终止它。

正如一些评论已经指出的那样,该指令的智慧\everymath{\displaystyle}之处在于颇受质疑就我个人而言,我能想到的唯一合理使用方法是在beamer文档中。即便如此,我也会三思而后行,不会使用它。

在此处输入图片描述

\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}

相关内容