LaTex 中 $$$ 的含义是什么?

LaTex 中 $$$ 的含义是什么?

$我想知道我的文档中三元组的含义。

\documentclass[12pt]{article}

\usepackage[letterpaper]{geometry} 
\geometry{top=1.5cm, bottom=2.5cm, left=3cm, right=3cm}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage[usenames]{color}


\begin{document}
\section*{Solucionario}
%\begin{multicols}{2} 
\begin{enumerate}

\item  $\displaystyle \int_{-1}^{2} x^3-2x\:dx $ 
\begin{equation}
$$$
\notag \displaystyle\int_{-1}^{2} x^3\:dx-\displaystyle \int_{-1}^{2} 2x\:dx  \\ \\ \\
\notag \displaystyle \left. \frac{x^4}{4}\right|_{-1}^{2}-\left.\frac{2x^2}{2}\right|_{-1}^{2} \\ \\ \\ 
\notag \displaystyle \left. \frac{x^4}{4}\right|_{-1}^{2}-\left.x^2\right|_{-1}^{2}\\ \\ \\
\left(4-\frac{1}{4}\right)-(4-1)\\ \\ \\
\frac{15}{4}-3 \ = \ \textcolor{red}{\frac{3}{4}}
$$$
\end{equation}

\item $\displaystyle \int_{0}^{1} x^{4/5}\:dx $
\begin{equation}
$$$
\notag \displaystyle \left.\frac{x^{9/5}}{\frac{9}{5}}\right|_{0}^{1} \\ \\ \\
\notag \displaystyle \left.\frac{5x^{9/5}}{9}\right|_{0}^{1} \: = \: \textcolor{red}{\frac{5}{9}}
$$$
\end{equation}

\item $\displaystyle \int_{0}^{1} \frac{4}{t^2+1}\:dt $
\begin{equation}
$$$
\notag 4\displaystyle \int_{0}^{1} \frac{1}{t^2+1}\:dt \\ \\ \\
\notag \left.4 \tan^{-1} t\:\right|_{0}^{1}\\ \\ 
\notag \textcolor{red}{180\: =\:\pi}
$$$
\end{equation}

\end{enumerate}
%\end{multicols}
\end{document}

答案1

这些$$$指令似乎是为了应对和解决代码中嵌入的一些相当可疑的编码实践。 的实例$$$成对出现。 TeX 将每对的第一个实例解释为$$(由前一个环境启动的显示数学模式结束\begin{equation}加上换行符)后跟$(内联数学模式开始)。 TeX 将第二个实例解释为$(内联数学模式结束)后跟$$(换行符后跟显示数学模式开始,稍后由后续指令终止\end{equation})。 这种方法“有效”,但效果并不理想,并且需要使用大量\displaystyle指令,这会使代码变得混乱。

由于您使用的是多行方程,equation因此一开始就不应该使用环境。相反,您应该使用align*以下示例中所示的环境。您还应该删除“ \:”和“ \”间距指令。(用于\,偏移积分的虚拟变量,而不是\:。)

在此处输入图片描述

\documentclass[12pt]{article}

\usepackage[letterpaper]{geometry} 
\geometry{top=1.5cm, bottom=2.5cm, hmargin=3cm}
\usepackage[fleqn]{amsmath}
\usepackage{xcolor}

\begin{document}
\section*{Solucionario}
\begin{enumerate}

\item  $\displaystyle \int_{-1}^{2} x^3-2x\,dx $ 
\begin{align*}
&= \int_{-1}^{2} x^3\,dx-\int_{-1}^{2} 2x\,dx \\
&= \left. \frac{x^4}{4}\right|_{-1}^{2}-\left.\frac{2x^2}{2}\right|_{-1}^{2} \\ 
&= \left. \frac{x^4}{4}\right|_{-1}^{2}-\left.x^2\right|_{-1}^{2}\\ 
&= \left(4-\frac{1}{4}\right)-(4-1)\\
&= \frac{15}{4}-3 = \textcolor{red}{\frac{3}{4}}
\end{align*}

\item $\displaystyle \int_{0}^{1} x^{4/5}\,dx $
\begin{align*}
&= \left.\frac{x^{9/5}}{9/5}\right|_{0}^{1} \\
&= \left.\frac{5}{9}x^{9/5}\right|_{0}^{1} = 
   \textcolor{red}{\frac{5}{9}}
\end{align*}

\item $\displaystyle \int_{0}^{1} \frac{4}{t^2+1}\,dt $
\begin{align*}
&= 4\int_{0}^{1} \frac{1}{t^2+1}\,dt \\
&= \left.4 \tan^{-1} t\:\right|_{0}^{1}\\
&= \textcolor{red}{180}=\textcolor{red}{\pi}
\end{align*}

\end{enumerate}
\end{document}

附录:这是修复代码的另一种尝试;请注意使用顶部对齐的aligned环境来统一与每个相关的多行方程\item。如果您需要在环境内允许分页符,我建议您在序言中aligned添加指令。\allowdisplaybreaks

在此处输入图片描述

\documentclass[12pt]{article}
\usepackage[letterpaper]{geometry}
  \geometry{top=1.5cm, bottom=2.5cm, hmargin=3cm}
\usepackage{amsmath}
\usepackage{xcolor}


\begin{document}
\section*{Solucionario}
\begin{enumerate}

\item  $\!\begin{aligned}[t]
&\int_{-1}^2 (x^3-2x)\,dx \\
&\quad= \int_{-1}^2 x^3\,dx -\int_{-1}^2 2x\,dx \\
&\quad= \frac{x^4}{4} \,\bigg\vert_{-1}^2
         -\frac{2x^2}{2} \,\bigg\vert_{-1}^2 \\
&\quad= \frac{1}{4}\,x^4 \,\big\vert_{-1}^2
         -x^2 \,\big\vert_{-1}^2\\
&\quad= \frac{1}{4}(16-1)-(4-1)\\[1ex]
&\quad= \frac{15}{4}-3 = \textcolor{red}{\frac{3}{4}}
\end{aligned}$

\item $\!\begin{aligned}[t]
&\int_0^1 x^{4/5}\,dx \\
&\quad= \frac{x^{9/5}}{9/5} \,\bigg\vert_0^1 \\
&\quad= \frac{5}{9}\,x^{9/5} \,\big\vert_0^1 =
   \textcolor{red}{\frac{5}{9}}
\end{aligned}$

\item $\!\begin{aligned}[t] 
&\int_0^1 \frac{4}{t^2+1}\,dt \\
&\quad= 4 \int_0^1 \frac{1}{t^2+1}\,dt \\
&\quad= 4 \tan^{-1} t \,\big\vert_0^1\\
&\quad= 4\,\frac{\pi}{4}=\textcolor{red}{\pi} = 180^\circ
\end{aligned}$

\end{enumerate}
\end{document}

答案2

这个标记完全是错误的,应该删除,但要回答它的含义

\begin{equation}
$$$
\notag \displaystyle\int_{-1}^{2} x^3\:dx-\displaystyle \int_{-1}^{2} 2x\:dx  \\ \\ \\
\notag \displaystyle \left. \frac{x^4}{4}\right|_{-1}^{2}-\left.\frac{2x^2}{2}\right|_{-1}^{2} \\ \\ \\ 
\notag \displaystyle \left. \frac{x^4}{4}\right|_{-1}^{2}-\left.x^2\right|_{-1}^{2}\\ \\ \\
\left(4-\frac{1}{4}\right)-(4-1)\\ \\ \\
\frac{15}{4}-3 \ = \ \textcolor{red}{\frac{3}{4}}
$$$
\end{equation}

\begin{equation}启动乳胶环境然后$$开始显示数学。

然后,您便可以获得$$以空显示结束显示数学运算的结果,但会添加垂直空间。

然后你就有了$开始内联数学,这就是为什么你需要\displaystyle到处都有。

然后你就$结束了内联数学,

然后,您将$$开始另一项显示数学运算,添加垂直空间。

然后,您需要\end{equation}关闭空的显示数学,添加更多虚假的垂直空间并关闭乳胶环境。

相关内容