Skip to content

# Border Around Equation in LATEX

• Last Updated : 17 Mar, 2021

The Latex command to put the border (box) around an equation is as

\fbox or \boxed

Description :

\boxed command draws a box around argument. The argument is in text mode.

Example :

\boxed{sin\frac{x}{2} = \frac{1}{4}}

Output :

Next we can add the desire color to the border as

\color{colorName}

Description :

\color command set color of the font or the border around the box. The argument is the name of the color.

Example :

\color{green}\boxed{\color{black} x + y = 10}

Output :

Lastly let’s see the boxes filled with color through command as

\colorbox{colorName}{text}

Description :

\colorbox command fills the background color of the box with the argument. The argument is the name of the color.

Example :

\colorbox{green}{\color{white}Hello from GeeksForGeeks}

Output:

My Personal Notes arrow_drop_up
Recommended Articles
Page :