having problems with greek characters in a table using csvsimple
For pdflatex
you can map the ν character in the input to $\nu$
using \newunicodecharacter
. However, csvsimple
does not allow macros in header lines because the header values are used to create keys to refer to the corresponding columns. A workaround for that is to disable the code that creates the keys.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{csvsimple}
\usepackage{newunicodechar}
% map ν in input to macro
\newunicodechar{ν}{$\nu$}
\makeatletter
% switch off csvsimple column name macros
\def\set@csv@head{\relax}
\makeatother
\begin{document}
\csvautotabular{book2.csv}
\end{document}
Result:
If you don't want to define the character mapping yourself then you can use the alphabeta
package - note however that the characters look a bit different.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{csvsimple}
\usepackage{alphabeta}
\makeatletter
% switch off csvsimple column name macros
\def\set@csv@head{\relax}
\makeatother
\begin{document}
\csvautotabular{book2.csv}
\end{document}
Probably a font problem; with Gentium and xelatex
seems to work:
\documentclass{article}
\usepackage{fontspec}
\usepackage[greek, italian, english]{babel}
\setmainfont[Mapping=tex-text]{Gentium}
\usepackage{amsmath}
\usepackage{csvsimple}
\begin{document}
\csvautotabular{Book2.csv}
\end{document}
Gives