latex - 在进行数组时,有没有办法在 Latex 中用插入数字的单词来标记方程式?
问题描述
在进行数组时,有没有办法在 Latex 中用插入数字的单词来标记方程式?
我想说明我的方程式列表中每一行的原因。
解决方案
我有一个临时解决方案,您可以在每行旁边添加文本。
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
Basic way to add text to each line.
\begin{align}
x &= 4^{2} - 1 && \text{given}\\
&= 16 - 1 && \text{exponent}\\
&= 15 && \\ % line without text
&= 15 && \text{subtraction}
\end{align}
Better way when removing numbers.
\begin{align*}
x &= 4^{2} - 1 && \text{given}\\
&= 16 - 1 && \text{exponent}\\
&= 15 && \\
&= 15 && \text{subtraction}
\end{align*}
Below, this example put less space between equation and text, and parenthesis.
\begin{alignat}{2}
x &= 4^{2} - 1 && \qquad\text{(given)}\\
&= 16 - 1 && \qquad\text{(exponent)}\\
&= 15 && \\
&= 15 && \qquad\text{(subtraction)}
\end{alignat}
\end{document}
推荐阅读
- azure - 在触发器 ADF 中发送参数
- php - 通过 aws ses 从 symfony 邮件程序发送电子邮件时出错
- ruby - Sinatra 应用程序中的“Rake 无法加载此类文件”错误
- android - Recyclerview滚动滞后
- ms-access - 表显示“错误”记录,但查询返回“正确”数据?
- javascript - 如何比较多个数组对象并过滤匹配的数据
- c# - 如何在 Visual Studio 中检测 IF 条件中的赋值而不是相等运算符?
- json - CSV文件对象到Angular中的JSON
- html - HTML未链接到CSS文件django
- google-api - “已超过未经验证使用的每日限制。继续使用需要注册。” 使用 Drive API 托管视频时