Hey,
How do I put a background color inside a box. For instance:
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[danish]{babel} % danske overskrifter
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amsmath}
\begin{document}
\framebox[0.95\linewidth]{
\begin{minipage}{0.90\linewidth}
\noindent \underline{\textbf{Geometriske betingelser}}:
\begin{align}
\kappa=\frac{d^{2}\omega}{dx^{2}}, \qquad \epsilon=\frac{d\nu}{dx}
\end{align}
\end{minipage}
}
\end{document}
PS! I hope thisis the right place to ask such a question.
Graphics, Figures & Tables ⇒ color inside a box
NEW: TikZ book now 40% off at Amazon.com for a short time.

color inside a box
That depends on your intent; for instance, you could use \colorbox (from the xcolor package), or a variation on one of the environments provided by the framed package, or some of the methods offered by the empheq package.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
color inside a box
You could use \fcolorbox, for example:
Stefan
Code: Select all
\fcolorbox{black}{yellow}{
\begin{minipage}{0.90\linewidth}
...
\end{minipage}
}
LaTeX.org admin