我收到以下错误:
Package array Error: Illegal pream-token (\renewcommand): `c' used \renewcommand
当我运行最小工作示例时:
\documentclass{article}
\usepackage{hyperref}
% The hyperref package is used to handle cross-referencing commands in LATEX to produce hypertext links in the document.
\usepackage[margin=0.5in]{geometry}
\usepackage{array}
\usepackage{lscape}
% For pages in landscade mode
\usepackage{longtable}
% For tables stretching over multiple pages
\begin{document}
\begin{landscape}
\begin{longtable}
\small
\centering
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|>{}m{2in} |>{}m{3.5in} | >{}m{0.8in}| >{}m{0.3in} |>{}m{0.7in} | } \hline
\textbf{Author(s)} & \textbf{Title} & \textbf{Type} & \textbf{Year} & \textbf{Cited-by} \\ \hline
F.M. Cardullo, A.V. Ercole, J.A. Houck, L.C. Kelly &
{A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &
techreport &
2012 &
~ \\ \hline
\end{tabular}
\end{longtable}
\end{landscape}
\end{document}
答案1
您不应该tabular
在里面有一个longtable
,列规范应该直接添加到中longtable
。
\documentclass{article}
\usepackage{hyperref}
% The hyperref package is used to handle cross-referencing commands in LATEX to produce hypertext links in the document.
\usepackage[margin=0.5in]{geometry}
\usepackage{array}
\usepackage{lscape}
% For pages in landscade mode
\usepackage{longtable}
% For tables stretching over multiple pages
\begin{document}
\begin{landscape}
\small
\centering
\renewcommand{\arraystretch}{1.2}
\begin{longtable}{|>{}m{2in} |>{}m{3.5in} | >{}m{0.8in}| >{}m{0.3in} |>{}m{0.7in} | }
\hline
\textbf{Author(s)} & \textbf{Title} & \textbf{Type} & \textbf{Year} & \textbf{Cited-by} \\ \hline
F.M. Cardullo, A.V. Ercole, J.A. Houck, L.C. Kelly &
{A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &
techreport &
2012 &
~ \\ \hline
\end{longtable}
\end{landscape}
\end{document}