![长桌上缺少垂直线](https://linux22.com/image/274728/%E9%95%BF%E6%A1%8C%E4%B8%8A%E7%BC%BA%E5%B0%91%E5%9E%82%E7%9B%B4%E7%BA%BF.png)
我看不到右侧的垂直线!我该怎么办?
\documentclass[twoside, 12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\renewcommand{\baselinestretch}{1.5} % Uncomment for 1.5 spacing between lines
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{epstopdf}
\usepackage[swedish]{babel}
\usepackage{natbib}
\usepackage{parskip}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{longtable}
\usepackage{hyperref} % use for hypertext links, including those to external documents and URLs
\renewcommand{\deg}{$^{\circ}$}
\newcommand{\eg}{\emph{e.g. }}
\newcommand{\ie}{\emph{i.e. }}
\newcommand{\Eg}{\emph{E.g. }}
\newcommand{\Ie}{\emph{I.e. }}
\newcommand{\cf}{\emph{c.f. }}
\newcommand{\Cf}{\emph{C.f. }}
\captionsetup{width=.8\textwidth}
\begin{document}
\begin{longtable}{|l|p{80mm}}
\caption[Feasible triples for a highly variable Grid]{Feasible triples for
highly variable Grid, MLMMH.} \label{grid_mlmmh} \\
\hline \multicolumn{1}{|c|}{\textbf{Kommun}} & \multicolumn{1}{c|}{\textbf{Klimatanpassning}} \\ \hline
\endfirsthead
\multicolumn{2}{c}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline \multicolumn{1}{|c|}{\textbf{Kommun}} &
\multicolumn{1}{c|}{\textbf{Klimatanpassning}} \\ \hline
\endhead
\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline
\endfoot
\hline \hline
\endlastfoot
Arboga & \vspace{-5mm}\begin{itemize}
\item daf
\item asdf
\vspace{-5mm}\end{itemize} \\ \hline
Fagersta & \vspace{-5mm}\begin{itemize}
\item ad
\item df
\vspace{-5mm}\end{itemize}.\\ \hline
\end{longtable}
\end{document}
答案1
正如我的评论所说,最好不要使用垂直线。
请比较以下两个表。我使用了您的 MWE 并添加了第二个表。我删除了您的 MWE 中一些与您的问题无关的代码,并进行了一些漂亮的打印...
梅威瑟:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{hyperref}
\begin{document}
\begin{longtable}{|l|p{80mm}|}
\caption[Feasible triples for a highly variable Grid]{Feasible triples for
highly variable Grid, MLMMH.} \label{grid_mlmmh} \\
\hline \multicolumn{1}{|c|}{\textbf{Kommun}} & \multicolumn{1}{c|}{\textbf{Klimatanpassning}} \\ \hline
\endfirsthead
\multicolumn{2}{c}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline \multicolumn{1}{|c|}{\textbf{Kommun}} &
\multicolumn{1}{c|}{\textbf{Klimatanpassning}} \\ \hline
\endhead
\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline
\endfoot
\hline \hline
\endlastfoot
Arboga & \vspace{-5mm}\begin{itemize}
\item daf
\item asdf
\vspace{-5mm}\end{itemize} \\ \hline
Fagersta & \vspace{-5mm}\begin{itemize}
\item ad
\item df
\vspace{-5mm}\end{itemize}.\\ \hline
\end{longtable}
compare with:
\rowcolors[]{2}{white}{blue!15}
\begin{longtable}{lp{80mm}}
\caption[Feasible triples for a highly variable Grid]{Feasible triples for highly variable Grid, MLMMH.}%
\label{tab:test} \\
\toprule
\multicolumn{1}{c}{\textbf{Kommun}} & \multicolumn{1}{c}{\textbf{Klimatanpassning}} \\
\midrule
\endfirsthead
%\multicolumn{2}{c} {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\multicolumn{1}{c}{\textbf{Kommun}} & \multicolumn{1}{c}{\textbf{Klimatanpassning}} \\
\midrule
\endhead
\midrule
\multicolumn{2}{r}{{Continued on next page}} \\
\bottomrule
\endfoot
\bottomrule
\endlastfoot
Arboga & \vspace{-5mm}
\begin{itemize}
\item daf
\item asdf
\vspace{-5mm}\end{itemize}
\\
Fagersta & \vspace{-5mm}
\begin{itemize}
\item ad
\item df
\vspace{-5mm}\end{itemize}.\\
Fagersta & \vspace{-5mm}
\begin{itemize}
\item ad
\item df
\vspace{-5mm}\end{itemize}.\\
Fagersta & \vspace{-5mm}
\begin{itemize}
\item ad
\item df
\vspace{-5mm}\end{itemize}.\\
Fagersta & \vspace{-5mm}
\begin{itemize}
\item ad
\item df
\vspace{-5mm}\end{itemize}.\\
\end{longtable}
\end{document}
答案2
我认为您的 longtable 命令中缺少正确的垂直线说明符 - 请尝试:
\begin{longtable}{|l|p{80mm}|}