# csvreader creates empty table, despite no compile error

I have a CSV file composed as shown below (I reported only a small part of it as it is very long). The actual separator I chose to use is '|' (pipe), as the file content might also include comma. Each row is composed of 5 fields.

keyword|type|range of value|m.u.|description
version|uint32_t| current  version |-| version of  the  FGFS  structure  in  use  (check  net_fdm.hxx  for  its  value).  It  is  not  necessary  to  assign  a  value  to  this  field,  it  is  detected  automatically.
padding|uint32_t|none|-| not  used.  Never  assign  a  value.
altitude|double|-|m| altitude  above  sea  level
agl|float|-|m| altitude  above  ground  level
alpha|float|-|rad| angle  of  attack
beta|float|-|rad| side  slip  angle


I want to load this CSV file by way of \csvreader, which I enclosed in environment \xltabular, in order to create a multipage table where the 5° column is allowed to automatically break line (the 5° column is expected to contain long sentences). Here below my MWE.

\documentclass{article}

\usepackage{longtable}
\usepackage{xltabular}
\usepackage{csvsimple}
\usepackage{booktabs}

\begin{document}

\begin{xltabular}{\linewidth}{llrlX}\toprule
\midrule
late after line=\\\midrule,
late after last line=\\\bottomrule,
respect underscore = true,
separator = pipe,]
{./FDMNet.csv}{}{}
\end{xltabular}

\end{document}


Although no compile error is given, the table remains empty.

How do I fix this issue? Any help would be appreciated. Thanks in advance.

• Welcome! Anything in the log? – cfr Feb 8 '18 at 1:23
• Not familiar with the package, but you don't seem to have asked it to actually typeset any information, so it doesn't typeset any - just as you asked. – cfr Feb 8 '18 at 1:27

The syntax is (page 8):

\csvreader[options]{file name}{assignments}{command list}


The problem is that your code doesn't assign or use anything. It loads the table, but it doesn't ask for anything to be typeset. So it isn't.

You can not use any assignments, but if your command list is empty, nothing is done.

If that's corrected, it works except that respect underscore does not agree with tabularx, so you either have to protect your underscores or use a different environment. Since tabularx isn't mentioned in the csvsimple's manual, I guess it is not too surprising if it does not work here.

\begin{filecontents*}{\jobname.csv}
keyword|type|range of value|m.u.|description
version|uint32\_t| current  version |-| version of  the  FGFS  structure  in  use  (check  net_fdm.hxx  for  its  value).  It  is  not  necessary  to  assign  a  value  to  this  field,  it  is  detected  automatically.
padding|uint32\_t|none|-| not  used.  Never  assign  a  value.
altitude|double|-|m| altitude  above  sea  level
agl|float|-|m| altitude  above  ground  level
alpha|float|-|rad| angle  of  attack
beta|float|-|rad| side  slip  angle
\end{filecontents*}

\documentclass{article}
\usepackage{longtable}
\usepackage{xltabular}
\usepackage{csvsimple}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\begin{document}
\begin{xltabular}{\linewidth}{llrlX}\toprule