3

I get the following error:

Package array Error: Illegal pream-token (\renewcommand): `c' used \renewcommand

When I run my minimum working example:

\documentclass{article}

\usepackage{hyperref}
% The hy­per­ref pack­age is used to han­dle cross-ref­er­enc­ing com­mands in LATEX to pro­duce hy­per­text links in the doc­u­ment.

\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}
5

You're not supposed to have a tabular inside the longtable, the column specification should be added directly to the longtable.

\documentclass{article}

\usepackage{hyperref}
% The hy­per­ref pack­age is used to han­dle cross-ref­er­enc­ing com­mands in LATEX to pro­duce hy­per­text links in the doc­u­ment.

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.