Strange csvsimple output when the line starts with an accented character
The code example below produces an undesirable result, where an Omega appears on the 5th line and all data from the 6th line appears glued to the last cell in the 5th line.
Does anyone knows what might be causing this misbehavior?
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
errors csv csvsimple
add a comment |
The code example below produces an undesirable result, where an Omega appears on the 5th line and all data from the 6th line appears glued to the last cell in the 5th line.
Does anyone knows what might be causing this misbehavior?
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
errors csv csvsimple
I don't know exactly why the package does this, but the answer to that can taggedexpansion
,UTF8-sequence
, andfragile
. If you wrap theé
in braces (i.e.{é}
) it works, though :) It seems that the package grabs the first byte ofé
as argument and breaks the UTF8 sequence, ensuing chaos. For instance, if you useaé
it works. So wrapping in braces seems to be the solution.
– Phelype Oleinik
Feb 11 at 21:13
Thanks! Using braces did work. :-) Strange... it seems the problem only happens when the accent happens in the first char.
– LEo
Feb 11 at 21:17
add a comment |
The code example below produces an undesirable result, where an Omega appears on the 5th line and all data from the 6th line appears glued to the last cell in the 5th line.
Does anyone knows what might be causing this misbehavior?
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
errors csv csvsimple
The code example below produces an undesirable result, where an Omega appears on the 5th line and all data from the 6th line appears glued to the last cell in the 5th line.
Does anyone knows what might be causing this misbehavior?
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
errors csv csvsimple
errors csv csvsimple
edited Feb 11 at 22:48
Phelype Oleinik
23.5k54586
23.5k54586
asked Feb 11 at 21:08
LEoLEo
1361
1361
I don't know exactly why the package does this, but the answer to that can taggedexpansion
,UTF8-sequence
, andfragile
. If you wrap theé
in braces (i.e.{é}
) it works, though :) It seems that the package grabs the first byte ofé
as argument and breaks the UTF8 sequence, ensuing chaos. For instance, if you useaé
it works. So wrapping in braces seems to be the solution.
– Phelype Oleinik
Feb 11 at 21:13
Thanks! Using braces did work. :-) Strange... it seems the problem only happens when the accent happens in the first char.
– LEo
Feb 11 at 21:17
add a comment |
I don't know exactly why the package does this, but the answer to that can taggedexpansion
,UTF8-sequence
, andfragile
. If you wrap theé
in braces (i.e.{é}
) it works, though :) It seems that the package grabs the first byte ofé
as argument and breaks the UTF8 sequence, ensuing chaos. For instance, if you useaé
it works. So wrapping in braces seems to be the solution.
– Phelype Oleinik
Feb 11 at 21:13
Thanks! Using braces did work. :-) Strange... it seems the problem only happens when the accent happens in the first char.
– LEo
Feb 11 at 21:17
I don't know exactly why the package does this, but the answer to that can tagged
expansion
, UTF8-sequence
, and fragile
. If you wrap the é
in braces (i.e. {é}
) it works, though :) It seems that the package grabs the first byte of é
as argument and breaks the UTF8 sequence, ensuing chaos. For instance, if you use aé
it works. So wrapping in braces seems to be the solution.– Phelype Oleinik
Feb 11 at 21:13
I don't know exactly why the package does this, but the answer to that can tagged
expansion
, UTF8-sequence
, and fragile
. If you wrap the é
in braces (i.e. {é}
) it works, though :) It seems that the package grabs the first byte of é
as argument and breaks the UTF8 sequence, ensuing chaos. For instance, if you use aé
it works. So wrapping in braces seems to be the solution.– Phelype Oleinik
Feb 11 at 21:13
Thanks! Using braces did work. :-) Strange... it seems the problem only happens when the accent happens in the first char.
– LEo
Feb 11 at 21:17
Thanks! Using braces did work. :-) Strange... it seems the problem only happens when the accent happens in the first char.
– LEo
Feb 11 at 21:17
add a comment |
1 Answer
1
active
oldest
votes
The problem is this bit of code in csvsimple.sty
:
ifcsv@parcsvlinerelax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
here csvline
is the line which was just read and csv@par
is par
. When the read line is é,61550,3,1,V,1,-1
, the test is:
ifcsv@par é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
This will (with pdfTeX, of course) expand é
, which is u8:é
, which then further expands into some gibberish. After a complete expansion of this, the resulting test is basically:
ifcsv@parunhbox <strange bytes>é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
which returns true because csv@par
and unhbox
are the same for if
. Then the code executed is <strange bytes>é,61550,3,1,V,1,-1relax
and you saw what that makes.
The easiest solution is to wrap the é
in braces:
{é},61550,3,1,V,1,-1
so that the test compares csv@par
with {
which will be false and the code will do the right thing.
If for some reason you can't/don't want to change the CSV file, then you can try this patch:
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
It will replace the problematic test with one that will test for par
without expanding things. BEWARE! I don't know if the purpose of that test it to check for par
or something, so this might break more things than fix. Use at your own risk!
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
usepackage{filecontents}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474413%2fstrange-csvsimple-output-when-the-line-starts-with-an-accented-character%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is this bit of code in csvsimple.sty
:
ifcsv@parcsvlinerelax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
here csvline
is the line which was just read and csv@par
is par
. When the read line is é,61550,3,1,V,1,-1
, the test is:
ifcsv@par é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
This will (with pdfTeX, of course) expand é
, which is u8:é
, which then further expands into some gibberish. After a complete expansion of this, the resulting test is basically:
ifcsv@parunhbox <strange bytes>é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
which returns true because csv@par
and unhbox
are the same for if
. Then the code executed is <strange bytes>é,61550,3,1,V,1,-1relax
and you saw what that makes.
The easiest solution is to wrap the é
in braces:
{é},61550,3,1,V,1,-1
so that the test compares csv@par
with {
which will be false and the code will do the right thing.
If for some reason you can't/don't want to change the CSV file, then you can try this patch:
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
It will replace the problematic test with one that will test for par
without expanding things. BEWARE! I don't know if the purpose of that test it to check for par
or something, so this might break more things than fix. Use at your own risk!
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
usepackage{filecontents}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
add a comment |
The problem is this bit of code in csvsimple.sty
:
ifcsv@parcsvlinerelax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
here csvline
is the line which was just read and csv@par
is par
. When the read line is é,61550,3,1,V,1,-1
, the test is:
ifcsv@par é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
This will (with pdfTeX, of course) expand é
, which is u8:é
, which then further expands into some gibberish. After a complete expansion of this, the resulting test is basically:
ifcsv@parunhbox <strange bytes>é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
which returns true because csv@par
and unhbox
are the same for if
. Then the code executed is <strange bytes>é,61550,3,1,V,1,-1relax
and you saw what that makes.
The easiest solution is to wrap the é
in braces:
{é},61550,3,1,V,1,-1
so that the test compares csv@par
with {
which will be false and the code will do the right thing.
If for some reason you can't/don't want to change the CSV file, then you can try this patch:
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
It will replace the problematic test with one that will test for par
without expanding things. BEWARE! I don't know if the purpose of that test it to check for par
or something, so this might break more things than fix. Use at your own risk!
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
usepackage{filecontents}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
add a comment |
The problem is this bit of code in csvsimple.sty
:
ifcsv@parcsvlinerelax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
here csvline
is the line which was just read and csv@par
is par
. When the read line is é,61550,3,1,V,1,-1
, the test is:
ifcsv@par é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
This will (with pdfTeX, of course) expand é
, which is u8:é
, which then further expands into some gibberish. After a complete expansion of this, the resulting test is basically:
ifcsv@parunhbox <strange bytes>é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
which returns true because csv@par
and unhbox
are the same for if
. Then the code executed is <strange bytes>é,61550,3,1,V,1,-1relax
and you saw what that makes.
The easiest solution is to wrap the é
in braces:
{é},61550,3,1,V,1,-1
so that the test compares csv@par
with {
which will be false and the code will do the right thing.
If for some reason you can't/don't want to change the CSV file, then you can try this patch:
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
It will replace the problematic test with one that will test for par
without expanding things. BEWARE! I don't know if the purpose of that test it to check for par
or something, so this might break more things than fix. Use at your own risk!
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
usepackage{filecontents}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
The problem is this bit of code in csvsimple.sty
:
ifcsv@parcsvlinerelax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
here csvline
is the line which was just read and csv@par
is par
. When the read line is é,61550,3,1,V,1,-1
, the test is:
ifcsv@par é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
This will (with pdfTeX, of course) expand é
, which is u8:é
, which then further expands into some gibberish. After a complete expansion of this, the resulting test is basically:
ifcsv@parunhbox <strange bytes>é,61550,3,1,V,1,-1relax%
else%
csv@escanline{csvline}%
% check and decide
csv@opt@checkcolumncount%
fi%
which returns true because csv@par
and unhbox
are the same for if
. Then the code executed is <strange bytes>é,61550,3,1,V,1,-1relax
and you saw what that makes.
The easiest solution is to wrap the é
in braces:
{é},61550,3,1,V,1,-1
so that the test compares csv@par
with {
which will be false and the code will do the right thing.
If for some reason you can't/don't want to change the CSV file, then you can try this patch:
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
It will replace the problematic test with one that will test for par
without expanding things. BEWARE! I don't know if the purpose of that test it to check for par
or something, so this might break more things than fix. Use at your own risk!
documentclass[10pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{csvsimple}
usepackage{booktabs}
defcsv@def@par{par}
makeatletter
patchcmdcsvloop
{ifcsv@par}
{ifxcsv@def@par}
{}{ERROR! Failed to patch}
usepackage{filecontents}
begin{filecontents*}{corpusabg.csv}
word,frequency,phonetic transcription,phone length,syllabic transcription,syllable length,average duration
de,125749,de,2,CV,1,-1
que,116882,ke,2,CV,1,-1
a,102779,a,1,V,1,-1
o,91246,o,1,V,1,-1
e,87868,e,1,V,1,-1
é,61550,3,1,V,1,-1
eu,46558,eW,2,VG,1,-1
do,46538,do,2,CV,1,-1
end{filecontents*}
begin{document}
newcommandmyhead[1]{parbox[t]{4em}{centeringbfseries#1parkern1mm}}
csvreader[no head,column count=6,tabular=rrrrrr,
table head=toprule,
late after first line=\midrule,
table foot=bottomrule
]%
{corpusabg.csv}{}{%
csviffirstrow{myhead{csvcoli} & myhead{csvcolii} & myhead{csvcoliii}
& myhead{csvcoliv} & myhead{csvcolv} & myhead{csvcolvi}
}{csvlinetotablerow}
}
end{document}
answered Feb 11 at 21:52
Phelype OleinikPhelype Oleinik
23.5k54586
23.5k54586
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474413%2fstrange-csvsimple-output-when-the-line-starts-with-an-accented-character%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't know exactly why the package does this, but the answer to that can tagged
expansion
,UTF8-sequence
, andfragile
. If you wrap theé
in braces (i.e.{é}
) it works, though :) It seems that the package grabs the first byte ofé
as argument and breaks the UTF8 sequence, ensuing chaos. For instance, if you useaé
it works. So wrapping in braces seems to be the solution.– Phelype Oleinik
Feb 11 at 21:13
Thanks! Using braces did work. :-) Strange... it seems the problem only happens when the accent happens in the first char.
– LEo
Feb 11 at 21:17