我的 longtable 中有两条神秘的线,尽管我看过其他有关垂直线问题的问题,但我还没有找到任何解决方案。我可以看到它是由 DTLforeach 生成的,但我无法解决它。
梅威瑟:
\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}
/最柔软
答案1
看https://tex.stackexchange.com/a/42637/3929
您可能需要像这样重写它
\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}