1

When I complile my latex I'm getting all sorts of errors. No matter what I try and change in my code I get several different errors. I've been at this for about a week so I may need help to work this out. Hoping somebody can come help me clean up the table and help make it into a working example for the rest of my tables.

Runaway argument?
{\tablename \ \thetable \ -- \textit {Continued from previous page} \\\ETC.
! File ended while scanning use of \multicolumn.
<inserted text>
            \par
l.21 \input{"KCMPlusUserGuideSource.tex"}

Here is the source text file:

\usepackage{longtable}
\documentclass{article}
\begin{document}
<!--                        
\begin{longtable}{|p{2cm}|p{3cm}|p{2cm}|}
\hline
\caption{A simple longtable example}
\label{hello} \\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} \\
\hline
\endfirsthead
\multicolumn{3}{c}% 
{\tablename\ \thetable\ -- \textit{Continued from previous page}}\\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} \\
\hline
\endhead
\hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
show            & true, false                                               & Whether or not to draw the series. \\ \hline
xaxis           & 'xaxis' or 'x2axis'                                       & Which x axis to use with this series. \\ \hline
yaxis           & 'yaxis' or 'y2axis'                                       & Which y axis to use with this series. \\ \hline
renderer        & \$.jqplot.BarRenderer, \$.jqplot.PieRenderer, \$.jqplot.MeterGaugeRenderer & A class of a renderer which will draw the series. \\ \hline
rendererOptions & {a,b,c...}                                                & Options to pass on to the renderer. \\ \hline
label           & 'label'                                                   & Line label to use in the legend. \\ \hline
showLabel       & true, false                                               & True to show label for this series in the legend. \\ \hline
color           &                                                           & CSS color spec for the series. \\ \hline
lineWidth       & n                                                         & Width of the line in pixels.  \\ \hline
lineJoin        & 'round'                                                   & Canvas lineJoin style between segments of series. \\ \hline
lineCap         & 'round'                                                   & Canvas lineCap style at ends of line. \\ \hline
shadow          & true, false                                               & Whether or not to draw a shadow on the line. \\ \hline
shadowAngle     & n                                                         & Shadow angle in degrees. \\ \hline
shadowOffset    & n                                                         & Shadow offset from line in pixels. \\ \hline
shadowDepth     & n                                                         & Number of times shadow is stroked, each stroke offset shadowOffset from the last. \\ \hline
shadowAlpha     & n                                                         & Alpha channel transparency of shadow.  0 = transparent. \\ \hline
\end{longtable}
-->
\end{document}

This is the pre-amble:

\NeedsTeXFormat{LaTeX2e}

\newcommand{\titleinfo}{Default Title - should be overridden} 
\newcommand{\authorinfo}{The Kildrummy Corporation Limited} 
\newcommand{\releaseinfo}{Release 1.2}
\newcommand{\copyrightinfo}{Copyright \copyright \ \the\year \ The Kildrummy Corporation Limited}
\newcommand{\versioninfo}{Version: 0}

\title{\titleinfo} 
\author{\releaseinfo \\ \\ \authorinfo}

\usepackage[pdftex]{graphicx}
\usepackage{tabulary}
\usepackage{booktabs}
\usepackage{paratype}
\usepackage[titletoc]{appendix}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage{longtable}
\usepackage{graphicx}

\let\oldsection\section 
\renewcommand{\section}{\clearpage\oldsection} 

\setlength{\textwidth}{6.2in}
\addtolength{\voffset}{-5pt}
\addtolength{\hoffset}{-27pt}
\setlength{\marginparwidth}{20pt}
\setlength{\marginparsep}{5pt}

\renewcommand*\rmdefault{ptm}\normalfont\upshape
\renewcommand*\sfdefault{ptm}\normalfont\upshape
\renewcommand*\ttdefault{ptm}\normalfont\upshape

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[RO,LE]{\slshape \rightmark}

\lhead[\fancyplain{}{\footnotesize \titleinfo}]{\fancyplain{}{\footnotesize \titleinfo}}
\rhead[\fancyplain{}{\releaseinfo}]       {\fancyplain{}{\releaseinfo}}
\lfoot[\fancyplain{}{\footnotesize \copyrightinfo}]{\fancyplain{}{\fancyplain{}{\footnotesize \copyrightinfo}}}
\cfoot[\fancyplain{}{}]{\fancyplain{}{}}
\rfoot[\fancyplain{}{\thepage}]{\fancyplain{}{\thepage}}

\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}

Any help appreciated

  • 1
    Please always post a complete document so people can run it and reproduce the problem. (putting longtable in center does nothing useful, although shouldn't make this error) – David Carlisle Feb 23 '15 at 10:09
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. – karlkoeller Feb 23 '15 at 10:22
  • If I add \documentclass etc to the file as posted it runs without error. The error message you show is on line 5, do you really have \documentclass{article} \usepackage{longtable} \begin{document} all on one line? – David Carlisle Feb 23 '15 at 10:27
  • 1
    Replace \multicolumn{3}{c}% {\tablename\ \thetable\ -- \textit{Continued from previous page} with \multicolumn{3}{c}% {\tablename\ \thetable\ -- \textit{Continued from previous page}} – Bernard Feb 23 '15 at 10:28
  • after your edit the posted fragment can not be run at all. Please make examples complete However you have introduced the missing brace that was not in the code you originally posted, which was error free. – David Carlisle Feb 23 '15 at 10:32
2

Your document (after the last edit) has \usepackage and \documentclass in the wrong order and a spurious XML comment syntax <!-- I do not think it made the error message that you posted, which is from a different document.

\documentclass{article}
\usepackage{longtable}

\begin{document}

\begin{longtable}{|p{2cm}|p{3cm}|p{2cm}|}
\hline
\caption{A simple longtable example}
\label{hello} \\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} \\
\hline
\endfirsthead
\multicolumn{3}{c}% 
{\tablename\ \thetable\ -- \textit{Continued from previous page}}\\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} \\
\hline
\endhead
\hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
show            & true, false                                               & Whether or not to draw the series. \\ \hline
xaxis           & 'xaxis' or 'x2axis'                                       & Which x axis to use with this series. \\ \hline
yaxis           & 'yaxis' or 'y2axis'                                       & Which y axis to use with this series. \\ \hline
renderer        & \$.jqplot.BarRenderer, \$.jqplot.PieRenderer, \$.jqplot.MeterGaugeRenderer & A class of a renderer which will draw the series. \\ \hline
rendererOptions & {a,b,c...}                                                & Options to pass on to the renderer. \\ \hline
label           & 'label'                                                   & Line label to use in the legend. \\ \hline
showLabel       & true, false                                               & True to show label for this series in the legend. \\ \hline
color           &                                                           & CSS color spec for the series. \\ \hline
lineWidth       & n                                                         & Width of the line in pixels.  \\ \hline
lineJoin        & 'round'                                                   & Canvas lineJoin style between segments of series. \\ \hline
lineCap         & 'round'                                                   & Canvas lineCap style at ends of line. \\ \hline
shadow          & true, false                                               & Whether or not to draw a shadow on the line. \\ \hline
shadowAngle     & n                                                         & Shadow angle in degrees. \\ \hline
shadowOffset    & n                                                         & Shadow offset from line in pixels. \\ \hline
shadowDepth     & n                                                         & Number of times shadow is stroked, each stroke offset shadowOffset from the last. \\ \hline
shadowAlpha     & n                                                         & Alpha channel transparency of shadow.  0 = transparent. \\ \hline
\end{longtable}

\end{document}
  • This runs without error but 'xaxis' is wrong as it makes two right quotes, probably you want to use \texttt{'xaxis'} to use monospace and straight quotes. – David Carlisle Feb 23 '15 at 10:49
  • This provides another error for me because \documentclass{article}, \usepackage{longtable} and \begin{document} are stated in the "pre-amble". If I take out the tables the document works fine. I am using multi markdown so it is just pure text, and then I needed a more complex table which multi markdown doesn't support. – Paul Lewis Feb 23 '15 at 10:52
  • 1
    @PaulLewis sorry but this is a latex forum, and the above is a complete error free latex document. If you have a markdown processor (I do not know that one) that is generating incorrect latex then really that is a question about that processor and is probably off topic here. – David Carlisle Feb 23 '15 at 10:57
  • This is not only latex forum. This is TeX forum too :) – wipet Feb 23 '15 at 13:10

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.