LaTeX forum ⇒ Math & Sciencesingle box multiple equations using align

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
ken18
Posts: 9
Joined: Wed Sep 03, 2014 6:20 am

single box multiple equations using align

Postby ken18 » Thu Apr 15, 2021 5:47 am

I use align a lot and have about a dozen equations in one begin/end align set. I'd like to put a single box around three consecutive equations of the dozen. How is that possible? I've found some solutions that come close, but they either have a single box around ALL equations or only one. I know I could break them up into multiple begin/end sequences so I could box an entire sequence, but then I'd lose the nice alignment among all of the equations.

https://tex.stackexchange.com/questions/109900/how-can-i-box-multiple-aligned-equations
https://latex.org/forum/viewtopic.php?t=892
https://latex.org/forum/viewtopic.php?f=46&t=4750&p=18671&hilit=box#p18671

ken18
Posts: 9
Joined: Wed Sep 03, 2014 6:20 am

Postby ken18 » Fri Apr 16, 2021 12:37 am

Here is a minimal example. I'd like a single box around the numbered equations (i.e. last four) but I don't want the comments in the box. Is there any way to do this?

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
L &=  k_1 (\theta_B-\sin \theta_B) && \textsl{$x\!=\!L$; $\theta_B$ unknown} \nonumber \\
-h &= k_1 (1-\cos \theta_B) &&  \textsl{$y\!=\!-h$; $\theta_B$ unknown} \nonumber \\
\frac{-h}{L} &= \frac{1-\cos \theta_B}{\theta_B-\sin \theta_B} && \textsl{solve for $\theta_B$} \\
k_1 &= \frac{L}{\theta_B-\sin \theta_B} && \textsl{compute $k_1$} \\
x &=  k_1 (\theta-\sin \theta) &&  \textsl{} \\
y &=  k_1 (1-\cos \theta) &&  \textsl{} 
\end{align}
\end{document}


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests