Information and discussion about graphics, figures & tables in LaTeX documents.
-
Mila100
- Posts: 1
- Joined: Thu Jul 31, 2014 11:21 pm
Post
by Mila100 »
I am new to Latex and I have tried to create a table but one vertical line is missing
here is the code
Code: Select all
\begin{table*}[t]
\centering
\begin{center}
\begin{tabular}{|r|l|c|c|c|}
\hline &&\multicolumn{3}{c}{\bf Results}\\
\hline\bf Nr.& \bf Features&\bf Strict &\bf Outer &\bf Inner\\ \hline
1&Morphological F.&100.00&100.00&100.00\\
2&1 + Bla &100.00&100.00&100.00\\
3&2 + Blabla&100.00&100.00&100.00\\
4&3 + blablabla&100.00&100.00&100.00\\
5&4 + blablablabla&100.00&100.00&100.00\\
\hline
\end{tabular}
\end{center}
\caption{\label{font-table} Results. }
\label{tab:1}
\end{table*}
The vertical line is missing here in the first raw after Results
And can you tell me how can I delete first two empty cells?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Post
by Johannes_B »
You shouldn't use vertical lines in tabular material. Please have a look at package booktabs.
Code: Select all
\documentclass{article}
\usepackage{booktabs}
\usepackage{blindtext}
\begin{document}
\begin{table*}
\centering
% \begin{center}%JB: Leave that out
\begin{tabular}{|r|l|c|c|c|}
\hline &&\multicolumn{3}{c|}{\bf Results}\\%JB: mind the bar
\hline\bf Nr.& \bf Features&\bf Strict &\bf Outer &\bf Inner\\ \hline
1&Morphological F.&100.00&100.00&100.00\\
2&1 + Bla &100.00&100.00&100.00\\
3&2 + Blabla&100.00&100.00&100.00\\
4&3 + blablabla&100.00&100.00&100.00\\
5&4 + blablablabla&100.00&100.00&100.00\\
\hline
\end{tabular}
% \end{center}
\caption{\label{font-table} Results. }
%JB: Why are you setting the label twice?
\label{tab:1}
\end{table*}
\blindtext
\begin{table}
\centering
\begin{tabular}{rlccc}
\toprule &&\multicolumn{3}{c}{ Results}\\
\cmidrule{3-5}
Nr. & Features & Strict & Outer & Inner\\
\midrule
1 & Morphological F. & 100.00 & 100.00 & 100.00\\
2 & 1 + Bla & 100.00 & 100.00 & 100.00\\
3 & 2 + Blabla & 100.00 & 100.00 & 100.00\\
4 & 3 + blablabla & 100.00 & 100.00 & 100.00\\
5 & 4 + blablablabla & 100.00 & 100.00 & 100.00\\
\bottomrule
\end{tabular}
\caption{Tabular material using booktabs}
\end{table}
\end{document}
BTW:
\bf
is obsolete, use
\bfseries
instead.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.