Hi,
If I have
==
\begin{align}
a&=b,\\
c&=d
\end{align}
==
in some part of my document, how can I box `a=b'? Boxing `b' only is
evident:
==
\begin{align}
a&=\boxed{b},\\
c&=d
\end{align}
==
but
==
\begin{align}
\boxed{a&=b},\\
c&=d
\end{align}
==
naturally produces an error (this is comprehensible). Any idea?
Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --
Repetitio Mater Memoriae.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkwnZDUACgkQM0LLzLt8MhxXDACfQ1L78AYbFGFoZYiK4U52W1Ki
lRkAn0f5iFbBYGtkeCgaJRTEvJfx+blR
=bZiM
-----END PGP SIGNATURE-----
You cannot as the box hides the &, so you have to resort to cheating
Typeset the box, and pull it backwards, or use the provided macro
\documentclass{memoir}
\usepackage{amsmath,calc}
\makeatletter
\newcommand\Aboxed[1]{
\@Aboxed#1\ENDDNE}
\def\@Aboxed#1\ENDDNE{%
&
\settowidth\@tempdima{$\displaystyle#1{}$}
\setlength\@tempdima{\@tempdima+\fboxsep+\fboxrule}
\kern-\@tempdima
\boxed{#1#2}
}
\makeatother
\begin{document}
\begin{align*}
\Aboxed{A&=B}\\
A&=B\\
&=C
\end{align*}
\end{document}
Lars Madsen <dal...@imf.au.dk> writes:
Nice. It works perfectly. Do you mind if I put this in some TUGboat
article of mine?
Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --
The only stupid question is the one that is not asked.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkwobY0ACgkQM0LLzLt8Mhz3agCePG56RlsX2aHC5YZ/73wGSl7k
kYAAn3WV0Xz4Wdf5dteeZ/60x4bxgbZh
=o38Q
-----END PGP SIGNATURE-----
no problem, could you send me a copy of the article offlist (I might
have some comments for it)
I might add a version of \Aboxed to mathtools
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> writes:
Sure.
> I might add a version of \Aboxed to mathtools
Might be a good idea. :)
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --
The secret of life is not to do what you like, but to like what you do.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkwoeCEACgkQM0LLzLt8Mhye+QCdGntJ9kfaCyOYH37yGytt0dbl
z9gAoJK+gHN4gL+YSsuWK597o94ulC8D
=q8Dl
-----END PGP SIGNATURE-----