Highlighting Math Equations in LyX/LaTeX

  • LaTeX
  • Thread starter rynlee
  • Start date
In summary, the conversation discusses different ways to box or highlight a math equation in LyX or LaTeX. The options include using \framebox to box a whole paragraph or \boxed to only box the equation itself. It is suggested to use \boxed for highlighting equations in a text.
  • #1
rynlee
45
0
Hi All,

I was wondering if anyone is familiar with a nice way to box or highlight a math equation in LyX. LaTeX code would work as well.

Thanks,
Darin
 
Physics news on Phys.org
  • #2
I don't know LyX, but since you are happy with LaTeX code...
You can use \framebox to box a whole paragraph, e.g.
Code:
\framebox{\[ E = mc^2. \]}

Or you can use \boxed to box just the equation (i.e. not the numbering etc.)
Code:
\[ \boxed{E = mc^2.} \]

For highlighting equations in a text, I would prefer the latter.
 
  • #3
thanks! I tried that code in just LyX mathematical format and it worked perfectly, just use the \boxed command.

Hopefully this will help anyway else out there that looks for this type of thing.
 

Related to Highlighting Math Equations in LyX/LaTeX

1. How do I highlight math equations in LyX/LaTeX?

To highlight math equations in LyX/LaTeX, you can use the \color command followed by the color you want to use. For example, \color{red} will highlight the equation in red. You can also use the \colorbox command to highlight the background of the equation.

2. Can I highlight only specific parts of a math equation?

Yes, you can use the \color command within the equation to highlight specific parts. For example, if you want to highlight only the numerator of a fraction, you can use \color{red}{\frac{x}{y}} to make the numerator red.

3. How can I change the color of the highlighted math equations?

You can change the color of the highlighted math equations by simply changing the color specified in the \color command. You can also use color names or RGB values to customize the color.

4. Is it possible to highlight math equations in different colors?

Yes, you can use the \color command multiple times within an equation to highlight different parts in different colors. You can also use the \colorbox command to highlight the background in a different color.

5. Can I remove the highlight from a math equation?

Yes, you can simply remove the \color or \colorbox command from the equation to remove the highlight. Alternatively, you can change the color to the default color (usually black) or use the \textcolor{black} command to remove the highlight.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
670
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top