1
\begin{table}
\begin{center}
\begin{singlespacing}
\scalebox{1}[.75]{
\begin{tabular}{||p{2cm} | p{2cm} | p{1.8cm} | p{3cm} | p{2.5cm} | p{1.7cm} | p{1.7cm} ||}%p{1.7cm}||}
\hline
\hline
Project & Aid & Operating range & Method & Authors & Publication year \\
\hline
\hline
& RFID sensor tags & Limited & GIS, MySQL & \cite{Fernandes14} & 2014\\
\hhline{|~|-|-|-|-|-|}  
Electronic white cane & Ultrasonic sensor & Limited & Logical map construction & \cite{Bhatlawande14} & 2014 \\
\hhline{|~|-|-|-|-|-|}
&& \(\le\)6mts & Radiometric calculations & \cite{Villanueva12} & 2012 \\
\hline
Mechanical & White cane & Limited & Manual & - & - \\
\hhline{|~|-|-|-|-|-|}
& Guide dog & Virtually unlimited & Human interaction & \cite{dog14} & - \\
\hline
& Kinect, White cane & \multirow{2}{*}{\(\le\)5mts} & Harris \& Stephens corner detector, Neural network & \cite{Nadia15}, \cite{Vitor12} & 2015\\
\hhline{|~|-|-|-|-|-|}
& CMOS camera & - & Coarse description & \cite{Mekhalfi15} & 2015 \\
\hhline{|~|-|-|-|-|-|}
& ToF camera & \(\le\)5mts & Depth estimation & \cite{Praveen13} & 2013\\
\hhline{|~|-|-|-|-|-|}
& Multiple cameras/camera array & - & Visual tracking/Parametric elipsoid representation & \cite{Limprasert13} & 2013 \\
\hhline{|~|-|-|-|-|-|}
Based on camera &  & \(\le\)2mts & Canny Edge Detector\cite{Canny86} & \cite{Moreno12} & 2012\\
\hhline{|~|~|-|-|-|-|}
&VGA camera & depends on application & SDK open architecture & \cite{Battaglia12} & 2012\\
\hhline{|~|-|-|-|-|-|}
& Extraocular camera, intraocular retinal prosthesis & - & Intrusive/wireless RF feedback & \cite{Weiland12} & 2012\\
\hhline{|~|-|-|-|-|-|}
& 3D camera & Virtually unlimited & Haptic rendering & \cite{Moustakas07} & 2007\\
\hhline{|~|-|-|-|-|-|}
& Camera & - & Image to sound mapping & \cite{Meijer92} & 1992\\ 
\hhline{|~|-|-|-|-|-|}
& RGB-D camera & - & 2D traversability map & \cite{Lee} & -\\
\hline
\emph{Microsoft Kinect for Xbox 360} & White cane & \multirow{2}{*}{\(\le\)5mts} & Harris \& Stephens corner detector & \cite{Nadia15}, \cite{Vitor12}& 2015\\
& & & Neural network & &\\
\hhline{|~|-|-|-|-|-|}
& RGB sensor, IR sensor & \(\le\)5mts & sonification, Color-Depth segmentation & \cite{Brock13}, \cite{Jose12} & 2013, 2012 \\
\hline
& Ultrasonic sensor & \(\le\)2mts & Ultrasonic echoes time stretching, Acoustic image processing & \cite{Dickstein15}, \cite{Shoval98} & 2015, 1998 \\
\hhline{|~|-|-|-|-|-|}
Signals & Sonar module and IR motion sensor & \(\le\)10mts & Smart signal processing & \cite{Ando08} & 2008 \\
\hline
Information tracking system & GPS, beacons & Virtually unlimited & XML databases & \cite{Cecilio15} & 2015 \\
\hhline{|~|-|-|-|-|-|}
& Webcam, white cane & Virtually unlimited & GIS & \cite{Serrao12} & 2012 \\ \hline \hline
\end{tabular}}
\end{singlespacing}
\label{tab:one}
\caption{\footnotesize{Table 1. State of art}} 
\end{center}
\end{table}

I keep getting the error message "There's no line here to end" When I try to put a label and caption to my table, but it compiles if I take out the last commands like these...

\begin{singlespacing}
\scalebox{1}[.75]{
\begin{tabular}{||p{2cm} | p{2cm} | p{1.8cm} | p{3cm} | p{2.5cm} | p{1.7cm} | p{1.7cm} ||}%p{1.7cm}||}
\hline
\hline
Project & Aid & Operating range & Method & Authors & Publication year \\
\hline
\hline
& RFID sensor tags & Limited & GIS, MySQL & \cite{Fernandes14} & 2014\\
\hhline{|~|-|-|-|-|-|}  
Electronic white cane & Ultrasonic sensor & Limited & Logical map construction & \cite{Bhatlawande14} & 2014 \\
\hhline{|~|-|-|-|-|-|}
&& \(\le\)6mts & Radiometric calculations & \cite{Villanueva12} & 2012 \\
\hline
Mechanical & White cane & Limited & Manual & - & - \\
\hhline{|~|-|-|-|-|-|}
& Guide dog & Virtually unlimited & Human interaction & \cite{dog14} & - \\
\hline
& Kinect, White cane & \multirow{2}{*}{\(\le\)5mts} & Harris \& Stephens corner detector, Neural network & \cite{Nadia15}, \cite{Vitor12} & 2015\\
\hhline{|~|-|-|-|-|-|}
& CMOS camera & - & Coarse description & \cite{Mekhalfi15} & 2015 \\
\hhline{|~|-|-|-|-|-|}
& ToF camera & \(\le\)5mts & Depth estimation & \cite{Praveen13} & 2013\\
\hhline{|~|-|-|-|-|-|}
& Multiple cameras/camera array & - & Visual tracking/Parametric elipsoid representation & \cite{Limprasert13} & 2013 \\
\hhline{|~|-|-|-|-|-|}
Based on camera &  & \(\le\)2mts & Canny Edge Detector\cite{Canny86} & \cite{Moreno12} & 2012\\
\hhline{|~|~|-|-|-|-|}
&VGA camera & depends on application & SDK open architecture & \cite{Battaglia12} & 2012\\
\hhline{|~|-|-|-|-|-|}
& Extraocular camera, intraocular retinal prosthesis & - & Intrusive/wireless RF feedback & \cite{Weiland12} & 2012\\
\hhline{|~|-|-|-|-|-|}
& 3D camera & Virtually unlimited & Haptic rendering & \cite{Moustakas07} & 2007\\
\hhline{|~|-|-|-|-|-|}
& Camera & - & Image to sound mapping & \cite{Meijer92} & 1992\\ 
\hhline{|~|-|-|-|-|-|}
& RGB-D camera & - & 2D traversability map & \cite{Lee} & -\\
\hline
\emph{Microsoft Kinect for Xbox 360} & White cane & \multirow{2}{*}{\(\le\)5mts} & Harris \& Stephens corner detector & \cite{Nadia15}, \cite{Vitor12}& 2015\\
& & & Neural network & &\\
\hhline{|~|-|-|-|-|-|}
& RGB sensor, IR sensor & \(\le\)5mts & sonification, Color-Depth segmentation & \cite{Brock13}, \cite{Jose12} & 2013, 2012 \\
\hline
& Ultrasonic sensor & \(\le\)2mts & Ultrasonic echoes time stretching, Acoustic image processing & \cite{Dickstein15}, \cite{Shoval98} & 2015, 1998 \\
\hhline{|~|-|-|-|-|-|}
Signals & Sonar module and IR motion sensor & \(\le\)10mts & Smart signal processing & \cite{Ando08} & 2008 \\
\hline
Information tracking system & GPS, beacons & Virtually unlimited & XML databases & \cite{Cecilio15} & 2015 \\
\hhline{|~|-|-|-|-|-|}
& Webcam, white cane & Virtually unlimited & GIS & \cite{Serrao12} & 2012 \\ \hline \hline
\end{tabular}}
\end{singlespacing}

Can someone please let me know what am I doing wrong or why I can't put any label/caption on that table when my other tables work correctly...

9
  • 2
    Welcome to TeX.SE. The above codes works perfectly for me with my own preamble. It would be worth if you can update your code by putting the preamble part too, ie, \documentclass line and other `packages' used. Nov 26, 2015 at 6:46
  • One idea might be adding some \hspace{0cm} before \end{…}'s, perhaps this will fool TeX into thinking it has a line though it is empty. Have you tried removing only one of the label and caption to see what is actually causing the problem or if there are two problems related to each of those two?
    – MickG
    Nov 26, 2015 at 6:54
  • you have \\ outside a table between paragraphs, where there is "no line to end" but you need to show an example (small, but complete from \documentclass to \end{document} that demonstrates the error. Nov 26, 2015 at 8:00
  • It is usually undesirable to stretch a table but \scalebox{1}[.75]{ is really bad!!! you are adding an unwanted space at the beginning (as no 5 after the { and then applying different scale factors to the horizontal and vertical so distorting all the text! Your readers will not thank you for that:-) Nov 26, 2015 at 8:03
  • Well it's just the first (and only) thing I could think of @DavidCarlisle. It is certainly better to fix an error. But placing that thing can perhaps help better locate it. Note that I did not have time to inspect the code.
    – MickG
    Nov 26, 2015 at 9:26

1 Answer 1

2

Your given code does not show the error you mentioned but a lot of errors you should avoid.

So I minimalized your given code and added the error you mentioned in your questions title (see line <====== causing the error!!!!).

At last I suggest not to use that lines in your table, please check package booktabs (texdoc booktabs for documentation) to get much more better layouted tables ...

I completed your given code to be compilable with guessing and deleted several lines (already mentioned in the comments to be bad). Please compare the following MWE with your code to find all differences. The important changes are marked with <=======. Please see that the right order for \caption and \label is this one, with your order you will get wrong references. Please see the correct order in my MWE and the correct working reference I added to the MWE.

Because you gave no bib file I deleted the \cite commands and used the key as text for that column of the table. See that I deleted one column not used by your code.

Compiling MWE showing the error you mentioned(!):

\documentclass[10pt]{article}

\usepackage{hhline,multirow}
\usepackage[margin=1cm]{geometry}

\begin{document}

\begin{table}
\centering % <==========================================================
\begin{tabular}{||p{2cm}|p{2cm}|p{1.8cm}|p{3cm}|p{2.5cm}|p{1.7cm}||}
\hline
\hline
Project & Aid & Operating range & Method & Authors & Publication year \\
\hline
\hline
& RFID sensor tags & Limited & GIS, MySQL & Fernandes14 & 2014\\
\hhline{|~|-|-|-|-|-|}  
Electronic white cane & Ultrasonic sensor & Limited & Logical map construction & Bhatlawande14 & 2014 \\
\hhline{|~|-|-|-|-|-|}
% left out several lines, not interesting for problem ...
& Webcam, white cane & Virtually unlimited & GIS & Serrao12 & 2012 \\ 
\hline \hline 
\end{tabular}
\caption{State of art}% <===============================================
\label{tab:one} % <=====================================================
\end{table} \\ % <================================ causing the error!!!!

See table~\ref{tab:one}.
\end{document}

That results in the error you gave in your title of the question ...

If you move the comment sign before \\ or better just delete \\ there the MWE compiles with no errors:

\end{table} 

Now you should be able to get rid of the mentioned errors in your code by your own ...

At last the result I get:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .