## 编译环境 操作系统 * [x]Windows 7/8/10 * [ ] macOS * [ ] Linux `若需勾选,请把[ ]改成[x]` Tex发行版 * [x]TexLive 2020 * [ ] MikTeX `版本号` * [ ] CTeX `若需勾选,请把[ ]改成[x]` ## 我的问题 在此输入你遇到的问题...![](https://wenda.latexstudio.net/data/attach/201003/3rT5119g.png) 如图,这一段公式我打了\\强制换行,但是pdf的输出结果没反应,这是为什么呢?代码如下: ```c \documentclass{article}%article,book,report,letter \title{hhh}%文档编辑标题 \author{student}%文档编辑作者 \date{\today}%文档编辑时间 \begin{document}%文件类 \maketitle%输出本文标题 1. (a) $$ \nabla \left( fg \right) =\left( \frac{\partial \left( fg \right)}{\partial x_1},\frac{\partial \left( fg \right)}{\partial x_2},...,\frac{\partial \left( fg \right)}{\partial x_n} \right) \\ \nabla \left( fg \right) =\left( g\frac{\partial f}{\partial x_1}+f\frac{\partial g}{\partial x_1},g\frac{\partial f}{\partial x_2}+f\frac{\partial g}{\partial x_2},...,g\frac{\partial f}{\partial x_n}+f\frac{\partial g}{\partial x_n} \right) \\ \nabla \left( \frac{f}{g} \right) =\left( \frac{\partial \left( \frac{f}{g} \right)}{\partial x_1},\frac{\partial \left( \frac{f}{g} \right)}{\partial x_2},...,\frac{\partial \left( \frac{f}{g} \right)}{\partial x_n} \right) \\ \nabla \left( \frac{f}{g} \right) =\left( \frac{\frac{\partial f}{\partial x_1}g-\frac{\partial g}{\partial x_1}f}{g^2},\frac{\frac{\partial f}{\partial x_2}g-\frac{\partial g}{\partial x_2}f}{g^2},...,\frac{\frac{\partial f}{\partial x_n}g-\frac{\partial g}{\partial x_n}f}{g^2} \right) $$ (b) $ \nabla \cdot \left( f\nabla g \right) =\nabla f\cdot \nabla g+f\varDelta g \\ \nabla \cdot \left( f\nabla g \right) =\left( \frac{\partial}{\partial x_1},\frac{\partial}{\partial x_2},...,\frac{\partial}{\partial x_n} \right) \cdot \left( f\frac{\partial g}{\partial x_1},f\frac{\partial g}{\partial x_2},...,f\frac{\partial g}{\partial x_n} \right) \\ =\frac{\partial}{\partial x_1}f\frac{\partial g}{\partial x_1}+\frac{\partial}{\partial x_2}f\frac{\partial g}{\partial x_2}+...+\frac{\partial}{\partial x_n}f\frac{\partial g}{\partial x_n}\\=\frac{\partial f}{\partial x_1}\frac{\partial g}{\partial x_1}+f\frac{\partial ^2g}{\partial x_{1}^{2}}+\frac{\partial f}{\partial x_2}\frac{\partial g}{\partial x_2}+f\frac{\partial ^2g}{\partial x_{2}^{2}}+...+\frac{\partial f}{\partial x_n}\frac{\partial g}{\partial x_n}+f\frac{\partial ^2g}{\partial x_{n}^{2}}\\=\frac{\partial f}{\partial x_1}\frac{\partial g}{\partial x_1}+\frac{\partial f}{\partial x_2}\frac{\partial g}{\partial x_2}+...+\frac{\partial f}{\partial x_n}\frac{\partial g}{\partial x_n}+f\frac{\partial ^2g}{\partial x_{1}^{2}}+f\frac{\partial ^2g}{\partial x_{2}^{2}}+...+f\frac{\partial ^2g}{\partial x_{n}^{2}} \\=\nabla f\cdot \nabla g+f\varDelta g$ \end{document} ```

1 回答1

5
数学环境中不允许有空行(分段),行间公式无法用\\命令手动换行,排版多行公式需要用其他环境,如align,gather环境。 align环境将公式用&进行分割并对齐,会给每个公式进行编号,可以用\notag去掉某一行的编号。如果不需要按等号对齐,只需罗列公式的话,gather会是一个很好用的环境。 ```c \documentclass{article}%article,book,report,letter \usepackage{amsmath} \title{hhh}%文档编辑标题 \author{student}%文档编辑作者 \date{\today}%文档编辑时间 \begin{document}%文件类 \maketitle%输出本文标题 \begin{gather} \nabla \left( fg \right) =\left( \frac{\partial \left( fg \right)}{\partial x_1},\frac{\partial \left( fg \right)}{\partial x_2},...,\frac{\partial \left( fg \right)}{\partial x_n} \right) \notag \\ \nabla \left( fg \right) =\left( g\frac{\partial f}{\partial x_1}+f\frac{\partial g}{\partial x_1},g\frac{\partial f}{\partial x_2}+f\frac{\partial g}{\partial x_2},...,g\frac{\partial f}{\partial x_n}+f\frac{\partial g}{\partial x_n} \right) \notag \\ \nabla \left( \frac{f}{g} \right) =\left( \frac{\partial \left( \frac{f}{g} \right)}{\partial x_1},\frac{\partial \left( \frac{f}{g} \right)}{\partial x_2},...,\frac{\partial \left( \frac{f}{g} \right)}{\partial x_n} \right) \notag \\ \nabla \left( \frac{f}{g} \right) =\left( \frac{\frac{\partial f}{\partial x_1}g-\frac{\partial g}{\partial x_1}f}{g^2},\frac{\frac{\partial f}{\partial x_2}g-\frac{\partial g}{\partial x_2}f}{g^2},...,\frac{\frac{\partial f}{\partial x_n}g-\frac{\partial g}{\partial x_n}f}{g^2} \right) \notag \end{gather} \end{document} ```
  • 我明白了!谢谢您!! – 岩岫杳冥 2020-10-05 01:23 回复

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。