Math & ScienceInserting an equation on a framebox

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
turbomac
Posts: 34
Joined: Sat Oct 10, 2009 9:38 pm

Inserting an equation on a framebox

Post by turbomac »

Hello everyone!!

A teacher asked me to write one of his papers in LaTeX. The document is almost ready, but I have a problem when I try to insert an equation on a framebox. I just can't get it.

I can't provide MWE because Kile can't compile the document, but the following code is the one I'm using.

Code: Select all

...
\framebox[\textwidth][l]{Lorem ipsum...

$$ x = 1$$

lorem ipsum...

}

...
The error is: "Missing $ inserted.}". Do I need any special package to do this?

Any suggestion?
Thanks in advance
Turbo
Last edited by turbomac on Fri Mar 25, 2011 4:34 am, edited 1 time in total.

Recommended reading 2024:

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

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

turbomac
Posts: 34
Joined: Sat Oct 10, 2009 9:38 pm

Inserting an equation on a framebox

Post by turbomac »

I found a solution:

Code: Select all

\framebox[\textwidth][l]{
\begin{minipage}{\textwidth}
Lorem ipsum
$$ x=1$$
Lorem ipsum

\end{minipage}
}
Thanks :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inserting an equation on a framebox

Post by localghost »

This syntax for a displayed equation should not be used. See also l2tabu.


Thorsten
Post Reply