\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\title{Removed text for Stack exchange Post}
\author{Cameron Eggart}
\date{Fall 2021}
\begin{document}
\maketitle
\section*{Problem 1}
Removed text for Stack Exchange Post
\begin{align*}
\text{Removed text for Stack Exchange Post}
\end{align*}
\clearpage
\section*{Problem 2}
Removed text for Stack Exchange Post \\
\\
Calculating Normal and Axial Forces using (1.7) and (1.8) pg 22. \\
Note: $\theta = 0$ because plate is flat
\begin{align*}
N'&=-\int_0^1\left[(4*10^4(x-1)^2+5.4*10^4)cos(0)+(288x^{-0.2}sin(0))\right]ds_u \\
+\int_0^1\left[(2*10^4(x-1)^2+1.73*10^5)cos(0)-(735x^{-0.2}sin(0))\right]ds_l \\
\boxed{N' = 112333\text{ N}}\text{ (wolfram alpha)} \\
A'&=\int_0^1\left[-(4*10^4(x-1)^2+ 5.4*10^4)sin(0)+(288x^{-0.2}cos(0))\right]ds_u \\
+\int_0^1\left[(2*10^4(x-1)^2+1.73*0^5)sin(10)+(735x^{-0.2}cos(0))\right]ds_l \\
\boxed{A' = 1279\text{ N}} \text{ (wolfram alpha)} \\
\end{align*}
Calculate Lift and Drag using (1.1) and (1.2) pg 20
\begin{align*}
L = 112333*cos(10)-1279*sin(10) \\
\boxed{L = 110404.31\text{ N}} \\
D = 112333*sin(10)+1279*cos(10) \\
\boxed{D = 20765.99\text{ N}}
\end{align*}
\clearpage
\section*{Problem 3}
Removed text for Stack Exchange Post
\end{document}
我是第一次使用 LaTeX,因此如果您发现任何其他明显的问题,我将非常感激您就如何格式化我的文本提供的任何一般反馈。感谢您的时间,卡梅伦
--------------------------------------建议1:---------------------------
我将 \begin{align*} 中 \text{} 的前两行移出了对齐部分。见图片:
--------------------------------------建议2:---------------------------
更新代码以包含完整文档。
答案1
评论太长了。正如@David Carlisle 指出的那样,您的元素太宽,并且拒绝&
页面外部的内容。事实上,由于您的环境的第二行没有对齐字符align
,因此它被视为您已经写入<your second line> & \\
(如果我错了,请纠正我)。因此,第三行被视为相同(即<your third line> & \\
),它在对齐字符上对齐&
。因此,第一行和第四行的左侧也在对齐字符上右对齐,而这些行的右侧在对齐字符上左对齐。
这里有一个建议,可以尝试改进您的代码。我猜想没有对齐字符 ( &
) 的行是您想要居中的行。因此,我摆脱了环境align
,并将长方程式与multlined
环境分开,让其他方程式自然地与gather
环境居中。最后,考虑到方程式的长度,“应该”对齐的方程式在视觉上或多或少是对齐的。
\documentclass{article}
%\usepackage{amsmath} % Not necessary since it is loaded by mathtools as pointed out in the comments
\usepackage{mathtools}
\begin{document}
Calculating Normal and Axial Forces using (1.7) and (1.8) pg 22.
Note: $\theta = 0$ because plate is flat.
\begin{gather*}
\begin{multlined}
N' = -\int_0^1\left[(4\cdot10^4(x-1)^2+5.4\cdot10^4)\cos(0)+(288x^{-0.2}\sin(0))\right]ds_u\\
+ \int_0^1\left[(2\cdot10^4(x-1)^2+1.73\cdot10^5)\cos(0)-(735x^{-0.2}\sin(0))\right]ds_l
\end{multlined}\\
\boxed{N' = 112333\text{ N}}\text{ (wolfram alpha)}\\
\begin{multlined}
A' = \int_0^1\left[-(4\cdot10^4(x-1)^2+ 5.4\cdot10^4)\sin(0)+(288x^{-0.2}\cos(0))\right]ds_u\\
+ \int_0^1\left[(2\cdot10^4(x-1)^2+1.73\cdot0^5)\sin(10)+(735x^{-0.2}\cos(0))\right]ds_l
\end{multlined}\\
\boxed{A' = 1279\text{ N}} \text{ (wolfram alpha)}
\end{gather*}
Calculate Lift and Drag using (1.1) and (1.2) pg 20
\begin{gather*}
L = 112333\cdot\cos(10)-1279\cdot\sin(10)\\
\boxed{L = 110404.31\text{ N}}\\
D = 112333\cdot\sin(10)+1279\cdot\cos(10)\\
\boxed{D = 20765.99\text{ N}}
\end{gather*}
\end{document}