\documentclass[12pt, thesis]{report}
\usepackage{array}
\usepackage{pdflscape}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{2212}{$-$}
\usepackage[english]{babel}
\usepackage{anysize}
\marginsize{2cm}{2cm}{2cm}{0cm}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{rotating, graphicx}
\usepackage{microtype}
\usepackage{wasysym}
\usepackage[raggedrightboxes]{ragged2e}
\usepackage[table,xcdraw,svgnames]{xcolor}
\definecolor{blue}{RGB}{0,102,204}
\usepackage[font=small,format=plain,labelfont={color=blue,bf},up]{caption}
\graphicspath{ {Figures/} }
\newcolumntype{P}[1]{>{\raggedright}p{#1}}
\usepackage[table,xcdraw]{xcolor}
\usepackage{enumitem}
\setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt} % less gaps in itemize sections
\setenumerate{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
\usepackage[raggedright]{titlesec}
\usepackage{placeins}
\makeatletter
\def\@makechapterhead#1{%
\vspace{20\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\huge\bfseries
% \@chapapp\space % removed
\thechapter
\nobreakspace{}% \par\nobreak\vskip 20\p@ % replaced
\fi
\interlinepenalty\@M
\huge % \Huge % replaced
\bfseries #1\par\nobreak
\vskip 15\p@
}}
\makeatother
\usepackage{lipsum}
\usepackage{multirow}
\titlespacing{\section}{0pt}{10pt plus 4pt minus 2pt}{5pt}
\titlespacing{\subsection}{0pt}{10pt plus 4pt minus 2pt}{5pt}
\titlespacing{\subsubsection}{0pt}{20pt}{3pt}
\usepackage{etoolbox}
\AtBeginEnvironment{tabular}{\small}
\AtBeginEnvironment{longtable}{\small}
\usepackage{tabularx}
\usepackage{setspace}
\setstretch{1.5}
\usepackage{pdfpages}
\usepackage{wrapfig}
\usepackage{textcomp, gensymb}
\usepackage{subcaption}
%\usepackage[paper=portrait,pagesize]{typearea}
\setlength{\headheight}{0cm}
\setlength{\headsep}{0cm}
\setlength{\footskip}{30pt}
\setlength{\parskip}{0.5\parskip}
\setlength{\textfloatsep}{0.5\textfloatsep}
\usepackage{titlesec}
%\newcommand{\sectionbreak}{\clearpage}
\usepackage{tocloft}
\setlength\cftaftertoctitleskip{10pt}
%\setcounter{tocdepth}{3}
%\setcounter{secnumdepth}{3}
\usepackage[backend=biber,style=nature,]{biblatex}
\usepackage{csquotes}
\begin{landscape}
\renewcommand{\arraystretch}{1.0}{
\begin{longtable}{M{2.5cm}M{7.20cm}M{7.25cm}M{7.5cm}}
\caption{Type of debridement techniques. \textit{Adapted from Gray et al. (2011), Vowden (2011).}}
\label{techn}
\hline \hline \textbf{Type} & \textbf{Mode of Action} & \textbf{Advantages} & \textbf{Disadvantages} \\ \hline
\textbf{Surgical} & Removal of necrotic and healthy tissue to achieve a healthy bleeding wound & \tabitem Selective \par \tabitem Appropriate for large wound areas & \tabitem Need to occur in a surgical room \par \tabitem Anaesthetic needed as a painful procedure \par \tabitem Expensive \\ \hline
\textbf{Sharp} & Removal of necrotic tissue just above the limit of healthy tissue using surgical tools like scalpel, scissors and/or forceps & \tabitem Selective and quick \par \tabitem No anaesthetic needed \par \tabitem Can be undertaken in conjunction with other therapies \par \tabitem Can be done as a bedside procedure & \tabitem Does not achieve total debridement \par \tabitem It is based on the ability of the clinicians to recognise different tissues \\ \hline
\textbf{Enzymatic} & Use of exogenous proteolytic enzymes (e.g. collagenase, papain) to break down necrotic tissue & \tabitem Selective technique & \tabitem Slow process, but in conjunction with moisture-retentive dressings, it can increase debriding activity \\ \hline
\textbf{Mechanical} & Can be achieved with different tools and/or equipment. Most common: wet-to-dry gauze dressings. It consists in applying wet gauze to the wound that dries, adhering to the top layer of the wound, pulling it off upon removal & \tabitem Wet-to-dry is not selective \par \tabitem Newer techniques are more selective, faster and relatively pain-free (e.g. monofilament pad) & \tabitem Can be very painful for the patient \par \tabitem High numbers of dressings needed can result in a rather expensive technique \par \tabitem Gauze can leave remnants in the wound that could lead to further inflammation \\ \hline
\textbf{Autolytic} & Use of endogenous proteolytic enzymes to break down necrotic tissue. Requires moist wound environment (via moisture-controlling dressings) & \tabitem Can be used as a pre-debridement technique or for maintenance debridement & \tabitem Slow process, and it could lead to potential infection and maceration \\ \hline
\textbf{Biological} & Use of lab-grown larvae of green bottle fly. They release an enzyme that breaks down both necrotic tissue and bioburden & \tabitem Highly selective and rapid \par \tabitem Larvae release ammonia, increasing wound pH and acting as a preventative measure for further biofilm growth & \tabitem Not suitable for all patients or wounds \par \tabitem Costs are higher than autolytic, but treatment time is shorter \\ \hline
\textbf{Ultrasonic} & Devices deliver ultrasound directly onto the wound bed or via atomised solution & \tabitem Fast and selective \par \tabitem Devices present irrigation systems and different probes to be used on different wound types & \tabitem High cost \par \tabitem Long set up and clean up times \par \tabitem Not commonly available \\ \hline
\end{longtable}
}
\end{landscape}
我收到的错误是:
{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h...
l.198 \hline
\hline \textbf{Type} & \textbf{Mode of Action} & \textbf{Ad...
I expect to see \noalign only after the \cr of
an alignment. Proceed, and I'll ignore this case.
! Misplaced \omit.
\multispan ->\omit
\@multispan
l.198 \hline \hline
\textbf{Type} & \textbf{Mode of Action} & \textbf{Ad...
I expect to see \omit only after tab marks or the \cr of
an alignment. Proceed, and I'll ignore this case.
和
l.198 \hline \hline
\textbf{Type} & \textbf{Mode of Action} & \textbf{Ad...
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.
出现在突出显示的行中。
答案1
如果我猜一个例子:
\documentclass{article}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{array}
\newcolumntype{M}[1]{m{#1}}
\begin{document}
\begin{landscape}
%\begingroup
\renewcommand{\arraystretch}{1.0}
\begin{longtable}[ht]{M{2.5cm}M{7.20cm}M{7.25cm}M{7.5cm}}
\caption{Type of debridement techniques. \textit{Adapted from Gray et al. (2011), Vowden (2011).}}
\label{techn}
\centering
\\ \hline
\textbf{Type} & \textbf{Mode of Action} & \textbf{Advantages} & \textbf{Disadvantages} \\ \hline
\textbf{Surgical} & Removal of necrotic and healthy tissue to achieve a healthy bleeding wound & \begin{itemize}
\item Selective
\item Appropriate for large wound areas
\end{itemize} & \begin{itemize}
\item Need to occur in a surgical room
\item Anaesthetic needed as a painful procedure
\item Expensive
\end{itemize} \\ \hline
\textbf{Sharp} & Removal of necrotic tissue just above the limit of healthy tissue using surgical tools like scalpel, scissors and/or forceps & \begin{itemize}
\item Selective and quick
\item No anaesthetic needed
\item Can be undertaken in conjunction with other therapies
\item Can be done as a bedside procedure
\end{itemize} & \begin{itemize}
\item Does not achieve total debridement
\item It is based on the ability of the clinicians to recognise different tissues
\end{itemize}\\ \hline
\textbf{Enzymatic} & Use of exogenous proteolytic enzymes (e.g. collagenase, papain) to break down necrotic tissue & \begin{itemize}
\item Selective technique
\end{itemize} & \begin{itemize}
\item Slow process, but in conjunction with moisture-retentive dressings, it can increase debriding activity
\end{itemize} \\ \hline
\textbf{Mechanical} & Can be achieved with different tools and/or equipment. Most common: wet-to-dry gauze dressings. It consists in applying wet gauze to the wound that dries, adhering to the top layer of the wound, pulling it off upon removal & \begin{itemize}
\item Wet-to-dry is not selective
\item Newer techniques are more selective, faster and relatively pain-free (e.g. monofilament pad)
\end{itemize} & \begin{itemize}
\item Can be very painful for the patient
\item High numbers of dressings needed can result in a rather expensive technique
\item Gauze can leave remnants in the wound that could lead to further inflammation
\end{itemize} \\ \hline
\textbf{Autolytic} & Use of endogenous proteolytic enzymes to break down necrotic tissue. Requires moist wound environment (via moisture-controlling dressings) & \begin{itemize}
\item Can be used as a pre-debridement technique or for maintenance debridement
\end{itemize} & \begin{itemize}
\item Slow process, and it could lead to potential infection and maceration
\end{itemize} \\ \hline
\textbf{Biological} & Use of lab-grown larvae of green bottle fly. They release an enzyme that breaks down both necrotic tissue and bioburden & \begin{itemize}
\item Highly selective and rapid
\item Larvae release ammonia, increasing wound pH and acting as a preventative measure for further biofilm growth
\end{itemize} & \begin{itemize}
\item Not suitable for all patients or wounds
\item Costs are higher than autolytic, but treatment time is shorter
\end{itemize} \\ \hline
\textbf{Ultrasonic} & Devices deliver ultrasound directly onto the wound bed or via atomised solution & \begin{itemize}
\item Fast and selective
\item Devices present irrigation systems and different probes to be used on different wound types
\end{itemize} & \begin{itemize}
\item High cost
\item Long set up and clean up times
\item Not commonly available
\end{itemize} \\ \hline
\end{longtable}
\end{landscape}
%\endgroup
\end{document}
它会产生错误
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.15 \\ \hline
?
\hline
只有当你滚动浏览此错误时,你才会看到来自(\multispan
)内部定义的虚假错误
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h...
l.15 \\ \hline
?
! Misplaced \omit.
\multispan ->\omit
\@multispan
l.16 \textbf
{Type} & \textbf{Mode of Action} & \textbf{Advantages}...
?
原始错误是由于\centering
该位置仅定义\\
结束居中文本行而不是表格行,因此您可以删除,然后所有错误都会出现:
\documentclass{article}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{array}
\newcolumntype{M}[1]{m{#1}}
\begin{document}
\begin{landscape}
%\begingroup
\renewcommand{\arraystretch}{1.0}
\begin{longtable}[ht]{M{2.5cm}M{7.20cm}M{7.25cm}M{7.5cm}}
\caption{Type of debridement techniques. \textit{Adapted from Gray et al. (2011), Vowden (2011).}}
\label{techn}
%%%%%%%%%%%%%% \centering
\\ \hline
\textbf{Type} & \textbf{Mode of Action} & \textbf{Advantages} & \textbf{Disadvantages} \\ \hline
\textbf{Surgical} & Removal of necrotic and healthy tissue to achieve a healthy bleeding wound & \begin{itemize}
\item Selective
\item Appropriate for large wound areas
\end{itemize} & \begin{itemize}
\item Need to occur in a surgical room
\item Anaesthetic needed as a painful procedure
\item Expensive
\end{itemize} \\ \hline
\textbf{Sharp} & Removal of necrotic tissue just above the limit of healthy tissue using surgical tools like scalpel, scissors and/or forceps & \begin{itemize}
\item Selective and quick
\item No anaesthetic needed
\item Can be undertaken in conjunction with other therapies
\item Can be done as a bedside procedure
\end{itemize} & \begin{itemize}
\item Does not achieve total debridement
\item It is based on the ability of the clinicians to recognise different tissues
\end{itemize}\\ \hline
\textbf{Enzymatic} & Use of exogenous proteolytic enzymes (e.g. collagenase, papain) to break down necrotic tissue & \begin{itemize}
\item Selective technique
\end{itemize} & \begin{itemize}
\item Slow process, but in conjunction with moisture-retentive dressings, it can increase debriding activity
\end{itemize} \\ \hline
\textbf{Mechanical} & Can be achieved with different tools and/or equipment. Most common: wet-to-dry gauze dressings. It consists in applying wet gauze to the wound that dries, adhering to the top layer of the wound, pulling it off upon removal & \begin{itemize}
\item Wet-to-dry is not selective
\item Newer techniques are more selective, faster and relatively pain-free (e.g. monofilament pad)
\end{itemize} & \begin{itemize}
\item Can be very painful for the patient
\item High numbers of dressings needed can result in a rather expensive technique
\item Gauze can leave remnants in the wound that could lead to further inflammation
\end{itemize} \\ \hline
\textbf{Autolytic} & Use of endogenous proteolytic enzymes to break down necrotic tissue. Requires moist wound environment (via moisture-controlling dressings) & \begin{itemize}
\item Can be used as a pre-debridement technique or for maintenance debridement
\end{itemize} & \begin{itemize}
\item Slow process, and it could lead to potential infection and maceration
\end{itemize} \\ \hline
\textbf{Biological} & Use of lab-grown larvae of green bottle fly. They release an enzyme that breaks down both necrotic tissue and bioburden & \begin{itemize}
\item Highly selective and rapid
\item Larvae release ammonia, increasing wound pH and acting as a preventative measure for further biofilm growth
\end{itemize} & \begin{itemize}
\item Not suitable for all patients or wounds
\item Costs are higher than autolytic, but treatment time is shorter
\end{itemize} \\ \hline
\textbf{Ultrasonic} & Devices deliver ultrasound directly onto the wound bed or via atomised solution & \begin{itemize}
\item Fast and selective
\item Devices present irrigation systems and different probes to be used on different wound types
\end{itemize} & \begin{itemize}
\item High cost
\item Long set up and clean up times
\item Not commonly available
\end{itemize} \\ \hline
\end{longtable}
\end{landscape}
%\endgroup
\end{document}