24

I would like to draw a frame around one equation to point it out. I used

\fbox{...} 

but it didn't work out. Here is a minimal example where I tried it. Any package suggestions?

\documentclass[
    german,
    paper=a4,
    ]{scrbook}              %KOMA-
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel} 

\usepackage[babel,german=guillemets]{csquotes}
\usepackage[T1]{fontenc}    
\usepackage{amsmath}

\begin{document}

\begin{align}
Nu_\text{m}        &= \frac{\alpha_m \, L}{\lambda}    \text{ \quad .} \\ 
Nu_\text{m}        &= \frac{\alpha_m \, L}{\lambda}    \text{ \quad .}
\end{align}

\end{document}
2

1 Answer 1

31

The \Aboxed command from mathtools package does what you want.

MWE

\documentclass[
    german,
    paper=a4,
    ]{scrbook}              %KOMA-
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel} 

\usepackage[babel,german=guillemets]{csquotes}
\usepackage[T1]{fontenc}    
\usepackage{amsmath,mathtools}

\begin{document}

\begin{align}
\Aboxed{Nu_\text{m}        &= \frac{\alpha_m \, L}{\lambda}    \text{ \quad .}} \\ 
\Aboxed{Nu_\text{m}        &= \frac{\alpha_m \, L}{\lambda}    \text{ \quad .}}
\end{align}

\end{document}

Output

enter image description here

3
  • Is there a way to increase padding in \Aboxed?
    – NickG
    Commented Apr 24, 2021 at 0:13
  • 1
    Use \setlength{\fboxsep}{5pt} and \setlength{\fboxrule}{0.4pt} in the preamble to change the padding and width of the rule in \Aboxed{}
    – ASarkar
    Commented Apr 17, 2023 at 15:58
  • When boxing only a portion of a line, this adds a lot of margin before (left of) the box. Is there a way to remove this? Commented Jan 29 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .