LaTeX forum ⇒ Math & ScienceDraw a box around two aligned equations

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
bsb233
Posts: 5
Joined: Thu Nov 27, 2008 11:31 pm

Draw a box around two aligned equations

Postby bsb233 » Sat Mar 21, 2009 8:42 pm

Dear Community,

I am using the amsmath package, and am working in its align environment, viz

  1. \begin{align*}
  2. H_T^0(G,Z) &= Z/|G|Z \\ \\
  3. H_T^1(G,Z) &= 0.
  4. \end{align*}


I wish to draw a box around both of these equations - i have tried \boxed{...}, which doesn't seem to work for arrays, and looked at the amsmath manual, which makes no mention of this.

Any comments would be welcome,

Barinder

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sat Mar 21, 2009 9:12 pm

Take a look at the empheq package from the mh bundle.


Best regards and welcome to the board
Thorsten¹
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

bsb233
Posts: 5
Joined: Thu Nov 27, 2008 11:31 pm

Postby bsb233 » Sat Mar 21, 2009 10:23 pm

Hi localghost,

Thanks for your reply. I've got hold of the mh package, but TeXnicCenter requires empheq.sty, and I only have empheq.dtx.

How can I generate the sty file from the dtx file? I'm still rather new to LaTeX.

Many thanks,

Barinder

User avatar
Stefan Kottwitz
Site Admin
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sun Mar 22, 2009 2:00 am

Hi Barinder,

have a look into the dtx file, there are instructions at the beginning:
  1. % Unpacking:
  2. % (a) If empheq.ins is present:
  3. % tex empheq.ins
  4. % (b) Without empheq.ins:
  5. % tex empheq.dtx
  6. % (c) If you insist on using LaTeX
  7. % latex \let\install=y\input{empheq.dtx}
  8. % (quote the arguments according to the demands of your shell)


Stefan
Site admin

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sun Mar 22, 2009 9:26 am

bsb233 wrote:[...] I've got hold of the mh package, but TeXnicCenter requires empheq.sty, and I only have empheq.dtx.

How can I generate the sty file from the dtx file? I'm still rather new to LaTeX. [...]

It's much easier to install the package (or bundle respectively) with the package manager of your LaTeX distribution. You don't have to generate it manually. If you want to do so, see the post of Stefan.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests