Math & ScienceEquations in Fbox

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Equations in Fbox

Post by dmuthu_cse »

Hello friends,

I am using book class, with amsmath package to write some of my equations.

And also using fbox, for creating box for my equations.

But, when I use fbox for equations, compiler is saying that $ is mandatory.

Adding "$" to my equation makes it slanting.But I dont want that..

The resulting equation in fbox, should be normal as other text.. Please do help me in this issue..
I have added the code below..

Code: Select all

\documentclass[11pt,a4paper,english]{book}
\usepackage{babel,amsmath}
\begin{document}
\begin{center}
    \fbox{ $ \displaystyle N = \frac{A \times E}{L_{n} \times CU \times LLF}$}
\end{center}
\end{document}
Thanks in advance..

Regards,
Muthu.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Equations in Fbox

Post by Stefan Kottwitz »

Hi Muthu,
dmuthu_cse wrote:
when I use fbox for equations, compiler is saying that $ is mandatory.
the math mode is required. You could use \boxed inside an equation environment:

Code: Select all

\begin{equation*}
    \boxed{N = \frac{A \times E}{L_{n} \times CU \times LLF}}
\end{equation*}
dmuthu_cse wrote:
Adding "$" to my equation makes it slanting.But I dont want that..
The resulting equation in fbox, should be normal as other text..
Slanted or italic math symbols are commonly used to distinguish it from normal text. If you really want to change that, you could use for instance \mathrm:

Code: Select all

\begin{equation*}
    \boxed{\mathrm{N = \frac{A \times E}{L_{n} \times CU \times LLF}}}
\end{equation*}
Stefan
LaTeX.org admin
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Re: Equations in Fbox

Post by dmuthu_cse »

Dear Stefan,

Thanks for your quick response..

It's correctly solving my problem.

Regards,
Muthu :lol:
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Equations in Fbox

Post by localghost »

Just for the record. In case you want to emphasize whole equation systems, take a look at the empheq package.


Best regards
Thorsten
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Re: Equations in Fbox

Post by dmuthu_cse »

Thank you Thorsten..

It's nice to hear from you..

Regards,
Muthu
Post Reply