GeneralSpanish and CSV Files

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dracheschreck
Posts: 2
Joined: Thu Feb 28, 2013 11:13 pm

Spanish and CSV Files

Post by dracheschreck »

Hi! I'm still learning the ropes and ran into this problem, I ask in this forum because I can't seem to find a solution through other ways:

Trying to compile this code will give me errors. Apparently there is some problem when using babel and package csvsimple.

The error is as follows:

Code: Select all

! Missing \endcsname inserted.
<to be read again>
\protect
l.19 \csvautotabular{data/1.csv}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
Code is as follows:

Code: Select all

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{csvsimple}
\usepackage[spanish,es-noshorthands]{babel}

\begin{document}
\csvautotabular{data/1.csv}
\end{document}
"1.csv" contents are exactly:

Code: Select all

-------
123,321
321,123
-------
Disabling the \csvautotabular line eliminates the error. (Or not including babel).

Any ideas?

Thanks!
Last edited by localghost on Thu Feb 28, 2013 11:28 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Spanish and CSV Files

Post by Juanjo »

The problem seems to come from the redefinition of lowercase Roman numerals made by the spanish option of the babel package. A quick fix is to load babel as follows:

Code: Select all

\usepackage[spanish,es-noshorthands,es-ucroman]{babel}
You may also use the es-lcroman option instead. See p. 4 in the guide of spanish.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
dracheschreck
Posts: 2
Joined: Thu Feb 28, 2013 11:13 pm

Re: Spanish and CSV Files

Post by dracheschreck »

Gracias!

That worked out perfectly :)
Post Reply