0

I have two mysterious lines in my longtable and even tho I have seen other questions regarding problems with vertical lines, I have not found any solution to my problem yet. I can see that it´s produced by DTLforeach but I can´t solve it.

MWE:

\documentclass{article}

\usepackage[utf8]{inputenc} \usepackage[swedish]{babel} \usepackage[T1]{fontenc}

\usepackage[table, dvipsnames]{xcolor}

\usepackage{datatool} \usepackage{longtable}

\newcommand{\ProcessN}{}

\UseRawInputEncoding \DTLsetseparator{;} \DTLrawmap{§}{\S}

\begin{filecontents}{processer.csv} Behandling;Punktnotation process;Processnamn B;2.8.3;IT B;3.1.1;Administration B;3.1.1;Administration B;3.1.3.1;Testsite \end{filecontents}

\begin{document}

\begin{longtable}{|p{1.5cm}|p{12.5cm}|}\hline% \rowcolor{YellowOrange}% \textbf{Process}&\textbf{Namn på process} \% \hline% \endhead% \hline \multicolumn{2}{r}{\textit{Tabellen fortsätter på nästa sida}} \% \endfoot% \endlastfoot%

\DTLloadrawdb{processer}{processer.csv}% \DTLforeach*[\DTLiseq{\Behandling}{B}\and\not\DTLiseq{\PunktnotationP}{\ProcessN}]{processer}% {\Processnamn=Processnamn,% \Behandling=Behandling,% \PunktnotationP=Punktnotation process}{\PunktnotationP&\Processnamn\\hline% \global\let\ProcessN\PunktnotationP}% \end{longtable}

\end{document}

THe output it produces and the problem shown: enter image description here

/Softest

Softest
  • 77

1 Answers1

0

See https://tex.stackexchange.com/a/42637/3929

You'll probably need to rewrite it like this

\documentclass{article}

\usepackage[utf8]{inputenc} \usepackage[swedish]{babel} \usepackage[T1]{fontenc}

\usepackage[table, dvipsnames]{xcolor}

\usepackage{datatool} \usepackage{longtable}

\newcommand{\ProcessN}{}

\UseRawInputEncoding \DTLsetseparator{;} \DTLrawmap{§}{\S}

\begin{filecontents}{processer.csv} Behandling;Punktnotation process;Processnamn B;2.8.3;IT B;3.1.1;Administration B;3.1.1;Administration B;3.1.3.1;Testsite \end{filecontents}

\begin{document}

\begin{longtable}{|p{1.5cm}|p{12.5cm}|}\hline% \rowcolor{YellowOrange}% \textbf{Process}&\textbf{Namn på process} \% \hline% \endhead% \hline \multicolumn{2}{r}{\textit{Tabellen fortsätter på nästa sida}} \% \endfoot% \hline \endlastfoot% \DTLloadrawdb{processer}{processer.csv}% \DTLforeach*[\DTLiseq{\Behandling}{B}\and\not\DTLiseq{\PunktnotationP}{\ProcessN}]{processer}% {\Processnamn=Processnamn,% \Behandling=Behandling,% \PunktnotationP=Punktnotation process}{% \DTLiffirstrow{}{\\hline}% \PunktnotationP&\Processnamn% \global\let\ProcessN\PunktnotationP}% \end{longtable}

\end{document}

daleif
  • 54,450