1

The following minimal example, using csvsimple hangs without any error.

\documentclass[a4paper,11pt]{article}
\usepackage{csvsimple}
\begin{document}
\begin{tabular}{ll}
  a & b\\
  \hline
\csvreader[head to column names,separator=semicolon]{program.csv}{}
          {\titre & \speaker \\}
\end{tabular}
\end{document}

Contents of file program.csv

id;date;start;end;type;salle;titre;description;speaker;docid;extra
111245;2019-10-01;09:00:00;10:00:00;discours;;prof;;this is a title;;

Running pdflatex on the above example I get:

$ pdflatex test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2018-12-01>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size11.clo))
(/usr/share/texmf-dist/tex/latex/csvsimple/csvsimple.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)))
(/usr/share/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/latex/tools/shellesc.sty))
No file test.aux.
)
*
! Emergency stop.
<*> test.tex

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on test.log.

The program hangs at the line with *, at which point I exited the program with Ctrl-D. The log file contains:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex 2019.8.25)  28 SEP 2019 19:01
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2018-12-01>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-dist/tex/latex/csvsimple/csvsimple.sty
Package: csvsimple 2016/07/01 version 1.20 LaTeX CSV file processing

(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks14
\pgfkeys@temptoks=\toks15

(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
\pgfkeys@tmptoks=\toks16
)))
(/usr/share/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count88
)
(/usr/share/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2016/06/07 v0.02a unified shell escape interface for LaTeX
Package shellesc Info: Restricted shell escape enabled on input line 69.
)
\csv@file=\read1
\c@csvinputline=\count89
\c@csvrow=\count90
\c@csvcol=\count91
\csv@out=\write3
)
No file test.aux.
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <10.95> on input line 4.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <8> on input line 4.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <6> on input line 4.
)
*
! Emergency stop.
<*> test.tex

End of file on the terminal!


Here is how much of TeX's memory you used:
 1530 strings out of 492623
 31556 string characters out of 6135669
 93181 words of memory out of 5000000
 5500 multiletter control sequences out of 15000+600000
 6379 words of font info for 23 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 40i,6n,46p,786b,240s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

Any idea what can be the problem?

2

The problem is that one column is called \end, so with head to column names you end up redefining \end. Hence, \end{tabular} doesn't work anymore, and not \end{document} either.

If you rename that column, or specify the macros manually as in the example below, it works fine.

\documentclass[a4paper,11pt]{article}
\usepackage{csvsimple}
\begin{document}
\begin{tabular}{ll}
  a & b\\
  \hline
\csvreader[separator=semicolon]{program.csv}{titre=\titre,speaker=\speaker}
          {\titre & \speaker\\}
\end{tabular}
\end{document}
  • Good catch ⁣ ⁣ ⁣ ⁣ – DG' Sep 28 '19 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.