1

How can I make bottom line with the same size like the top two?

\begin{landscape}
\begin{table}[]
    \centering

    \begin{tabular}{llll}

        \toprule
        \textbf{Criterion}                                                                 & \textbf{Active tags}                                                                      & \textbf{Passive tags}      & \textbf{Semi-passive tags}                                                                         \\ \midrule
        \textbf{Power source}                                                              & Built in reader                                                                    & Provided by the reader          & Battery on tag for chip operations 
        \\
        \textbf{Availability}                                                              & Continuous                                                            & Within the field of the reader         & Within the field of the reader                                                                                      \\
        \textbf{\begin{tabular}[c]{@{}l@{}}Signal strength\\ (Reader to tag)\end{tabular}} & Very low                                                                                      & Very high     &Low                                                                                                 \\
        \textbf{\begin{tabular}[c]{@{}l@{}}Signal strength\\ (Tag to Reader)\end{tabular}} & High                                                                                       & Very low &Low                                                                                                     \\
        \textbf{Operating range}                                                           & \textgreater100m                                                                               & \textless7m        & \textless10m                                                                                  \\
        \textbf{Price}                                                                     & 10--50 \$US                                                                                 & 0.05 US\$    & 10--50 \$US                                                                                           \\
        \textbf {Communication Principle}                                                                     &   \begin{tabular}[c]{@{}l@{}}Neither backscatter nor indu- \\ ctive coupling.
            Tag generates \\ electromagnetic waves on \\
            their own.

        \end{tabular}
        &
        \begin{tabular}[c]{@{}l@{}}Either inductive coupling or \\ backscatter  (Near or Far Field)\end{tabular} &
        \begin{tabular}[c]{@{}l@{}}Backscatter \\ (Far Field)\end{tabular}

    \end{tabular}
    \bottomrule
    \caption{Comparison of active and passive tags \cite{RFIDTables}.}
    \label{ref:table2}
\end{table}
\end{landscape}
  • please post a document that people can test, not just a fragment where anyone helping has to guess needed packages, but \bottomrule should be before \end{tabular} (you presumably got an error message?) – David Carlisle Apr 23 '18 at 23:55
  • @DavidCarlisle I tried but cannot execute code. :( – John988 Apr 23 '18 at 23:56
  • If you get an error message show the error, otherwise hard to guess what you have done wrong. but the fragment posted above can't be run so that makes it harder than it should be to help the table should end ...(Far Field)\end{tabular}\\ \bottomrule \end{tabular} – David Carlisle Apr 24 '18 at 0:00
  • @DavidCarlisle I found a mistake, missing "\\". Thank you – John988 Apr 24 '18 at 0:07
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – samcarter_is_at_topanswers.xyz May 28 '18 at 19:21
2

off-topic:

enter image description here

(red lines shows text borders)

if you make your table code with help of packages tabularx, rotating, makecell and siunitx more simple and shorter, it will become less error prone:

\documentclass{article}
\usepackage{rotating}
\usepackage{booktabs, makecell, tabularx}
\setcellgapes{2pt}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{siunitx}
\usepackage[skip=1ex]{caption}

\begin{document}
    \begin{sidewaystable}
\makegapedcells
    \centering
    \small
    \setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{@{}
                            >{\bfseries}l L L l
                            @{}}
    \toprule
Criterion
    & \textbf{Active tags}
    & \textbf{Passive tags}
    & \textbf{Semi-passive tags}            \\
    \midrule
Power source
    & Built in reader                                                                    & Provided by the reader
    & Battery on tag for chip operations    \\
Availability
    & Continuous                                                            & Within the field of the reader
    & Within the field of the reader        \\
Signal strength (Reader to tag)  
    & Very low
    & Very high
    & Low                                   \\
Signal strength (Tag to Reader)
    & High
    & Very low
    & Low                                   \\
Operating range
    & \SI{>100}{m}
    & \SI{<7}{m}%   
    & \SI{<10}{m}                           \\
Price 
    & 10--50 \$US
    & 0.05 US\$
    & 10--50 \$US                           \\
Communication Principle                                                                     
    & Neither backscatter nor inductive coupling. Tag generates electromagnetic waves on their own.
    & Either inductive coupling or backscatter (Near or Far Field)
    & Backscatter (Far Field)               \\ % here was error
    \bottomrule
\end{tabularx}   
\caption{Comparison of active and passive tags \cite{RFIDTables}.}
\label{ref:table2}
    \end{sidewaystable}
\end{document}
|improve this answer|||||
1

Your code doesn't compile because the outer tabular environment is lacking a final row-terminator ( \\) and because the instruction \bottomrule occurrs after rather than before the final \end{tabular} environment.

I suggest you switch from a tabular to a tabularx environment and set its overall width to \textwidth. Then, use (modified) X columns for the three data columns to allow automatic line-breaking as needed. This change will free you from having to provide lots of explicit line-break instructions via interior tabular environments.

enter image description here

\documentclass{article}
% Choose page size parameters suitably:
\usepackage[margin=1in,letterpaper]{geometry} 
\usepackage[english]{babel} % optional (better hyphenations)
\usepackage{booktabs,rotating,siunitx,tabularx,ragged2e}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}

\begin{document}
\begin{sidewaystable}
\begin{tabularx}{\textwidth}{@{} >{\bfseries}l YYY @{}}
    \toprule
    Criterion 
         & \textbf{Active tags} 
         & \textbf{Passive tags}
         & \textbf{Semi-passive tags} \\
    \midrule
    Power source
         & Built in reader
         & Provided by the reader 
         & Battery on tag for chip operations \\
    \addlinespace
    Availability
         & Continuous
         & Within the field of the reader 
         & Within the field of the reader \\
    \addlinespace
    Signal strength (Reader to tag)
         & Very low & Very high & Low \\
    \addlinespace
    Signal strength (Tag to reader)
         & High & Very low & Low \\
    \addlinespace
    Operating range
         & $>\SI{100}{\meter}$
         & $<\SI{7}{\meter}$ 
         & $<\SI{10}{\meter}$ \\
    \addlinespace
    Price& 10--50 \$US & 0.05 \$US & 10--50 \$US \\
    \addlinespace
    Communication principle
         & Neither backscatter nor inductive coupling. Tags generate electromagnetic 
         waves on their own
         & Either inductive coupling or backscatter (Near or Far Field)
         & Backscatter (Far Field) \\
    \bottomrule
\end{tabularx}
\caption{Comparison of active and passive tags \cite{RFIDTables}.}
\label{ref:table2}
\end{sidewaystable}
\end{document} 
|improve this answer|||||

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.