# Box Drawing

• Feb 24th 2010, 07:17 AM
tarheelborn
Box Drawing
Do any of you know how to draw a box around a paragraph that contains both text and mathematical expressions using Lyx? Thanks!
• Mar 18th 2010, 03:28 PM
wonderboy1953
Latex actually wants to do that for you. Let's say you want to put a box around the number 100. Then you would type $\boxed{100}$.

By studying the tutorial and posted answers to other posted questions, you can adapt my answer. (put your cursor on the box around the 100 to see how I did it).
• Mar 22nd 2010, 01:14 PM
tarheelborn
This works pretty well if what you want to enclose is short and doesn't involve multiple lines. Even then, you have to manually format the spaces. I was looking for a nice way to enclose a theorem (including both math AND text) in a box. Thanks for your help.
• Mar 29th 2010, 02:51 PM
wonderboy1953
Sample
Can you post a sample of whatever it is that's giving you the difficulty?
• Mar 30th 2010, 01:19 AM
Opalg
Quote:

Originally Posted by tarheelborn
This works pretty well if what you want to enclose is short and doesn't involve multiple lines. Even then, you have to manually format the spaces. I was looking for a nice way to enclose a theorem (including both math AND text) in a box. Thanks for your help.

$\boxed{\parbox{6cm}{\textsc{Theorem.} \itshape If x>0 then x^3>0.\\ But if x<0 then x^3<0.}}$

The snag with using \parbox, however, is that you have to assign the width of the box manually.
• Mar 30th 2010, 11:51 AM
tarheelborn
I would like to include all of the following in one box:

Proof 1: (By induction on n). When n-1 we see that F_{1}=2+1=F_{3}-1 so the formula holds for this base case. We will now assume that F_{1}+F_{2}+\cdots+F_{k}=F_{k+2}-1=F_{k+2}-1 for some k\geq1 and we will use this assumption to show that F_{1}+F_{2}+\cdots+F_{k+1}=F_{k+3}-1. Well, F_{1}+F_{2}+\cdots+F_{k+1} as claimed. Thus, by the Principle of Mathematical Induction, this theorem is true for all n\geq1.█

Note: I am using Lyx. Thanks for your help!
• Apr 1st 2010, 03:13 PM
wonderboy1953
Thought
I've tried some testing with LaTex; apparently it's too much for LaTex to handle all at once (I got an error for the image being too large) and you might have to break it down unless someone can come up with another way.
• Apr 10th 2010, 11:48 AM
wonderboy1953
Is this another way?
Suppose you shrink down what you have into a thumbnail size and then try to box it (a pdf might be involved here). Have you tried that?