I have decided to have some infoboxes in my thesis paper, and after some searching and tweaking, I came up with the code below. While I get results, the execution still terminates with an "Misplaced \noalign {" error, which I am not sure where it originates from.
Would appreciate any help on the matter! (Btw any tips on how to make the infobox better is also warmly welcome)
Code: Select all
\documentclass[11pt,a4paper,twoside]{article}
% skipped the most likely unrelated preamble..
% to fix underfull hbox & overfull vbox
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty=10000
\vfuzz \hfuzz
\raggedbottom
% info-boxes
\definecolor{MyGray}{rgb}{0.95,0.95,0.95}
\makeatletter\newenvironment{graybox}{%
\begin{center}
\begin{lrbox}{\@tempboxa}\begin{minipage}{0.8\textwidth}}{\end{minipage}\end{lrbox}%
\colorbox{MyGray}{\usebox{\@tempboxa}}
\end{center}
}\makeatother
Code: Select all
\begin{graybox}
\begin{tabular}[h]{l}
\textbf{Parameters used} \\ \hline
\parbox{0.9\textwidth}{%
\begin{singlespace}
\begin{description}
\item[P\textsubscript{sig}] some long text
\item[P\textsubscript{f}] some long text
\item[P\textsubscript{tot}] some long text
\item[P\textsubscript{rel}] some long text \\ \hline
\item[n\textsubscript{sig}] some long text
\item[$\bar{P}$] some long text
\end{description}
\end{singlespace}
}
\end{tabular}
\end{graybox}