I was about to put together an MWE for testing pgfplotstable when pdflatex gave me the error:
! LaTeX Error: Environment table undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin{table}
I've already loaded all the packages I used in my main document, which displayed a table. I was not able to find the answer to this simple issue, which is probably due to some silly mistake I can not find.
The MWE:
\documentclass{minimal}
\usepackage{booktabs,pgfplotstable}
\begin{document}
\begin{table}
\centering
\begingroup\makeatletter\@makeother\_
\pgfplotstabletypeset[
% columns={index[0],index[1]}
col sep=comma,
columns/Name/.style={string type},
columns/misc/.style={string type},
every head row/.style={
before row={\toprule},
after row={
\midrule
}
},
every last row/.style={after row=\bottomrule},
]{cermaic_chip_capacitors.csv}
\endgroup
\end{table}
\end{document}
minimalclass only defines the absolute minimum that does not generate an error on loading, so it doesn't define tables (or figures, or lists or set up fonts) – David Carlisle Feb 03 '21 at 12:26