创建长表时,表行中发生以下冲突。
我需要修复它并使它成为桌子周围完整的框架。
我使用以下代码来制作长表。
\documentclass[a4paper,onesided,12pt]{report}
\usepackage[utf8x]{inputenc} % To use Unicode (e.g. Turkish) characters
\renewcommand{\labelenumi}{(\roman{enumi})}
\usepackage{amsmath, amsthm, amssymb}
% Some extra symbols
\usepackage[bottom]{footmisc}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{algorithm}
\usepackage{algorithmic}
\newlength{\mycolumnwidth}
\setlength{\mycolumnwidth}{\textwidth-9cm-4\tabcolsep}
\begin{document}
\begin{longtable}{|m{9cm}|m{\mycolumnwidth}|}
\caption{Tarık's emergent codes and corresponding themes}\\
\toprule
RELEVANT CODES & THEME \\
\toprule
\endfirsthead
\caption{Tarık's emergent codes and corresponding themes (continued)}\\
\toprule
RELEVANT CODES & THEME \\
\hline
\endhead
Graph representation & \multirow{1}{*}{Interpretation of graph} \\
Graph completion & \\
\midrule
Thinking about quadratic functions & \\
Thinking about quadratic functions in real life
& \multirow{1}{*}{Interpretation of function} \\
Thinking about quadratic functions in physics & \\
\midrule
Finding a satisfactory answer to what question requires
&\multirow{1}{*}{Make sense of model repr.} \\
\midrule
\pagebreak
Looking interaction between his drawn model and given graph
&\multirow{1}{*}{Alignment of model-graph} \\
Finding conflict when matching his graph and his model & \\
\bottomrule
\end{longtable}
\end{document}
答案1
Booktabs
在规则周围添加一些填充,这是水平线和垂直线不相交的原因。如果您希望它们相交,但规则的粗细程度却不相同,则可以使用另一个包(例如boldline
或 )makecell
,或者在 中停用规则的填充booktabs
,并将其部分替换为\extrarowheight
。
我建议使用后一种解决方案的代码。此外,我修改了代码,使两个水平线之间只有一行,这很容易,因为单元格处于段落模式,因此行距正常。
\documentclass[a4paper,onesided,12pt]{report}
%\usepackage{styles/fbe_tez}
\usepackage[utf8]{inputenc} % To use Unicode (e.g. Turkish) characters
\renewcommand{\labelenumi}{(\roman{enumi})}
\usepackage{amsmath, amsthm, amssymb}
% Some extra symbols
\usepackage[bottom]{footmisc}
%\usepackage{cite}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{array, booktabs, longtable, multirow}
\usepackage{subfigure}
\usepackage{algorithm, algorithmic}
\newlength{\mycolumnwidth}
\setlength{\mycolumnwidth}{\dimexpr\textwidth-9cm-4\tabcolsep}
\newcommand*{\nl}{\newline}
\begin{document}
\begingroup\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\extrarowheight}{2pt}
\begin{longtable}{| m{9cm}| >{\arraybackslash\RaggedRight}m{\dimexpr\textwidth-9cm-4\tabcolsep}|}
\caption{Tarık's emergent codes and corresponding themes}\\
\toprule
RELEVANT CODES & THEME \\
\toprule
\endfirsthead
\caption{Tarık's emergent codes and corresponding themes (continued)}\\
\toprule
RELEVANT CODES & THEME \\
\hline
\endhead
Graph representation \nl Graph completion & Interpretation of graph \\
\midrule
Thinking about quadratic functions \nl
Thinking about quadratic functions in real life \nl
Thinking about quadratic functions in physics
& Interpretation of function \\
\midrule
Finding a satisfactory answer to what question requires
& Make sense of model repr. \\
\midrule
\pagebreak
Looking interaction between his drawn model and given graph \nl
Finding conflict when matching his graph and his model
& Alignment of model-graph \\
\bottomrule
\end{longtable}
\endgroup
\end{document}