I'm using pdflatex to create PDF versions of LaTeX equations. My requirement is simply that an equation appear with a bit of whitespace around it, not on a "page".
Some example code
\documentclass{minimal}
\usepackage{amsmath}
\usepackage[paperwidth=\maxdimen,paperheight=\maxdimen]{geometry}
\usepackage[active,tightpage]{preview}
\usepackage{amssymb}
\usepackage{bbm}
\setlength\PreviewBorder{5pt}
\begin{document}
\begin{preview}
$\displaystyle \left[\begin{array}{c|cc}
a & b & c \\ \hline
d & e & f \\
g & h & i
\end{array} \right]$
\end{preview}
\end{document}
I've had no issues save for the fact that the lines specified by the "|" and "\hline" don't appear. I assume this has something to do with the document class or environments I'm using since the lines appear properly in typical document classes such as "article".
The spacing between matrix elements also differs from the typical case, although this I can deal with.
Ideally I'd like the equation to appear just as it would as a display style equation in a typical document, but I'll settle for the lines showing up.
Any ideas on changes I can make to the code to remedy this issue?
I'd appreciate any assistance.


minimaldocument class? It should never be used for real production work. Please note that the often-repeated request for Minimum Working Examples does not entail using theminimaldocument class... – Mico Mar 15 '17 at 18:29