I am using pgfplotstabletypeset for multiple tables in a project, this code imports the data correctly. However, the first column of the head row always gets these odd letter combination and I am not able to change the style of the first column. The following code is used:
%first making some test .csv%
\begin{filecontents*}{scientists.csv}
name,surname,age
Albert,Einstein,133
Marie,Curie,145
Thomas,Edison,165
\end{filecontents*}
%end of test file
This .csv file is used by pfgplotstable to type set the table
%my code
\documentclass{customized_book}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\begin{document}
\begin{table}
\centering
\pgfplotstabletypeset[col sep=comma, string type,
every head row/.style={before row=\toprule, after row=\midrule},
every last row/.style={after row=\bottomrule},
columns/name/.style={column type=r}
]{scientists.csv}
\end{table}
\end{document}
The document class a customized version of the book.cls and provided as template by my university. The class currently loads the following packages:
\RequirePackage[T1]{fontenc} % T1 font encoding for PDFs
\RequirePackage{lmodern} % extended font definition
\RequirePackage{amsmath,amssymb,amsthm} % most important math stuff
\RequirePackage{a4wide} % make better use of A4 paper
\RequirePackage{fancyhdr} % custom headers and footers
\RequirePackage{fncychap} % custom chapter titles
\RequirePackage{graphicx} % graphics
\RequirePackage{color} % color
\RequirePackage{booktabs} % extra tabular commands
\RequirePackage[format=plain]{caption} % improved caption format
\RequirePackage{nomencl} % cool nomenclature listing
\RequirePackage{makeidx} % create your index
\RequirePackage[printonlyused]{acronym}
\RequirePackage{ifthen} % if-then commands (used in maketitle)
\RequirePackage{eso-pic} % picture in back/forground (used in cover)
\RequirePackage{relsize} % \textlarger, \textsmaller etc
\RequirePackage{enumitem} % enables removal of itemseparation
\RequirePackage{subcaption}
\RequirePackage{tabularx} % textwrapping in tables
\RequirePackage{comment}
\RequirePackage{hyperref} % add url to bibliography
\RequirePackage{rotating}
\RequirePackage{tikz}
\RequirePackage{array}
\RequirePackage{booktabs}
\RequirePackage{multirow}
\RequirePackage{adjustbox}
\RequirePackage{pgfplotstable}
\RequirePackage{chngpage}
\RequirePackage{hyperref}
\RequirePackage{csvsimple}
\RequirePackage{colortbl}
The compilation returns the following table:
As can be seen, the first column has not been aligned to the right and there are some funky symbols added to the first column of the first row. These symbols remain, even if I completely clear this cell in the csv. What could this be? Given that the problem repeats for every single table that I use \pgfplotstabletypeset
for, I think it is not a syntax error, but some funky combo of packages that misses the correct start of the .csv file.
\documentclass{customized_book}
?