![在 LaTeX 方程式中对齐和指定字体大小](https://linux22.com/image/477953/%E5%9C%A8%20LaTeX%20%E6%96%B9%E7%A8%8B%E5%BC%8F%E4%B8%AD%E5%AF%B9%E9%BD%90%E5%92%8C%E6%8C%87%E5%AE%9A%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F.png)
我在 tex 文件中指定了 3 个方程,
对齐环境中每个方程式内容的字体大小似乎不同。此外,并非所有方程式都以相同的方式对齐。有没有办法为所有方程式指定相同的字体大小并以美观的方式对齐?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{makecell}
\title{Table}
\author{xx }
\date{May 2019}
\begin{document}
\vspace{1cm}
\large \textbf{1-D equation:}\\
\begin{align*}
\large{ \hspace{2cm}\frac{\partial A}{\partial t} = 2\frac{\partial A}{\partial x}}
\end{align*}
\large \textbf{Equation 2:}\\
\vspace{1cm}
\small{ \textbf{Number = 2}}\\
\begin{align*}
\large{ X = CS = \frac{R}{8}\Delta G}
\end{align*}
\vspace{0.5cm}
\large \textbf{Equation 3}\\
\vspace{0.5cm}
\small{ \textbf{Movement}}\\
\begin{align*}
\Large{\hspace{3cm}D_{q} = \frac{\big(\frac{CS}{40}\big)^2.5}{1256}}
\end{align*}
\end{document}
编辑:根据评论中的建议进行更改后更新了代码。字体大小问题现已解决。问题出在文本和方程的对齐上。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{makecell}
\title{Table}
\author{xx }
\date{May 2019}
\begin{document}
\vspace{1cm}
\large \textbf{1-D equation:}\\
\begin{align*}
{\large \hspace{2cm}\frac{\partial A}{\partial t} = 2\frac{\partial A}{\partial x}}
\end{align*}
{\large \textbf{Equation 2:}}\\
\vspace{1cm}
{\small \textbf{Number = 2}}\\
\begin{align*}
\large X = CS = \frac{R}{8}\Delta G
\end{align*}
\vspace{0.5cm}
{\large \textbf{Equation 3}}\\
\vspace{0.5cm}
{\small \textbf{Movement}}\\
\begin{align*}
{\large\hspace{3cm}D_{q} = \frac{\big(\frac{CS}{40}\big)^2.5}{1256}}
\end{align*}
\end{document}
答案1
您应该全局调整字体大小,例如通过文档类选项。标题最好使用标准命令来保持一致的样式和间距。您需要发出命令\maketitle
才能打印标题和作者。
\documentclass[12pt]{article}
\usepackage{mathptmx}
\usepackage{amsmath}
\title{Table}
\author{xx}
\date{May 2019}
\begin{document}
\maketitle
\section*{1-D equation:}
\begin{equation*}
\frac{\partial A}{\partial t} = 2\frac{\partial A}{\partial x}
\end{equation*}
\section*{Equation 2:}
\subsection*{Number = 2}
\begin{equation*}
X = CS = \frac{R}{8}\Delta G
\end{equation*}
\section*{Equation 3:}
\subsection*{Movement}
\begin{equation*}
D_{q} = \frac{\bigl(\frac{CS}{40}\bigr)^2.5}{1256}
\end{equation*}
\end{document}