1

I use eqnarray for equations. After using csvreader, the "special" mathematical symbols like "sum" disappear.

The following is the code. The equation before and after csvreader is the same.

    \begin{eqnarray}
0 & = & \sum_{t=1}^{n} (E_{t} - A_{t}) * (1+r)^{-t} + L_{n} (1+r)^{-n} - A_{0}
\end{eqnarray}


\begin{table}[h]
\begin{minipage}{\linewidth}
\renewcommand{\footnoterule}{}
\resizebox{\textwidth}{!}{%
    \csvreader[separator=semicolon, respect and, tabular=|l||*{13}{r|},
table head=\hline& Jan & Feb & Mrz & Apr & Mai & Jun & Jul & Aug & Sep & Okt & Nov & Dez & Summe\\\hline\hline,
late after line=\\\hline]%
{DATA/KVN/kvnmonat.csv}{artikel=\artikel,1=\jan,2=\feb,3=\mrz,4=\apr,5=\mai,6=\jun,7=\jul,8=\aug,9=\sep,10=\okt,11=\nov,12=\dez,Summe=\sum}%
{\artikel&\jan&\feb&\mrz&\apr&\mai&\jun&\jul&\aug&\sep&\okt&\nov&\dez&\sum}%
    }
\caption[Anzahl der bei KVN gebauten Displays]
{\label{tab:kvndisplaykomm} Menge der bei KVN gebauten Displays unterteilt nach Monaten und Display.}
\end{minipage}
\end{table}


\begin{eqnarray}
0 & = & \sum_{t=1}^{n} (E_{t} - A_{t}) * (1+r)^{-t} + L_{n} (1+r)^{-n} - A_{0}
\end{eqnarray}

After Compiling it looks like this:

Before and after csvreader

The Sum-Symbol is missing from now on in the whole document, in all chapters.

Can anyone help me? Thank you!

  • Welcome to TeX.SX! Maybe change Summe=\sum to Summe=\summe and change the table accordingly? – TeXnician Apr 22 '18 at 17:02
  • 1
    Welcome to TeX SX! I use eqnarray for equations. Well, you shouldn't, see Avoid eqnarray. This being said, could you post a full compilable code? – Bernard Apr 22 '18 at 17:02
  • @TeXnician that was great work man! Thank you. Now it works. That was the problem. I wasn´t even aware of my usage of the same variable. Thank you, Sir! – Jonas Müller Apr 22 '18 at 17:08
1

If you have a look at your assignments you will notice that you use \sum:

{artikel=\artikel,1=\jan,2=\feb,3=\mrz,4=\apr,5=\mai,6=\jun,7=\jul,8=\aug,9=\sep,10=\okt,11=\nov,12=\dez,Summe=\sum}

This overwrites the \sum macro with every item read. Hence \sum will not work in math mode (at least not the way you expect it to work).

Changing the variable name will solve the problem.

Just a comment: You should not use eqnarray for equations, because it is obsolete.

  • Yes, for internal reasons, csvsimple does global assignments to the variables; it's better to use uncommon names, for instance with all capital letters. – egreg Apr 22 '18 at 21:37

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.