Graphics, Figures & Tables ⇒ Box / Frame around a list
Box / Frame around a list
Can anyone please tell me how to make a box / frame around a list, the box / frame should have a background color. See attachment!
- Attachments
-
- Untitled.jpg (18.91 KiB) Viewed 13586 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

Box / Frame around a list
How's this?
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage[T1]{fontenc}\usepackage[charter]{mathdesign}\usepackage{eulervm}\usepackage{enumitem}\usepackage{xcolor}\begin{document}\fcolorbox{black}[HTML]{E9F0E9}{\parbox{\textwidth}{%\noindent \textbf{Eksempel.}\begin{enumerate}[nolistsep]\item Input $h$\item Input $g$\item $areal \rightarrow h \cdot g$\item $areal \rightarrow \frac{areal}{2}$\item Output $areal$\end{enumerate}}}\end{document}
Re: Box / Frame around a list
Is there anyway to put a horisontal \hline under the pseudocode, ant then put text under the horisontal line ?
Re: Box / Frame around a list
I don't understand what you're asking for, sorry. What pseudo-code?
Box / Frame around a list
Oh Sorry!
In matematic this is called a pseudocode, describes a algorithm.
I wont a \hline, or a line under this code sow i can write with words what the code do 
In matematic this is called a pseudocode, describes a algorithm.
Code: Select all
Code, edit and compile here:
\begin{enumerate}[nolistsep]\item Input $h$\item Input $g$\item $areal \rightarrow h \cdot g$\item $areal \rightarrow \frac{areal}{2}$\item Output $areal$\end{enumerate}}}

Box / Frame around a list
Inside the colored box, or outside?
Here it is inside:
Here it is inside:
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage[T1]{fontenc}\usepackage[charter]{mathdesign}\usepackage{eulervm}\usepackage{enumitem}\usepackage{xcolor}\begin{document}\fcolorbox{black}[HTML]{E9F0E9}{\parbox{\textwidth}{%\noindent \textbf{Eksempel.}\begin{enumerate}[nolistsep]\item Input $h$\item Input $g$\item $areal \rightarrow h \cdot g$\item $areal \rightarrow \frac{areal}{2}$\item Output $areal$\end{enumerate}\hrulefillText}}\end{document}
Re: Box / Frame around a list
Inside, Thank You 
