Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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