I am using the following table and in between Deliverable and Projected Deadline there is no vertical line and I cannot get to the bottom of it. I am using the tabularx package here.
\begin{tabularx}{\linewidth}{|X|X|X|}
\hline
\rowcolor[HTML]{C0C0C0}
\textbf{Deliverable} & \textbf{Projected Deadline} & \textbf{Final Deadline} \\ \hline
Project Proposal & 26th October 2016 & 28th October 2016 \\ \hline
Literature and Technology Survey & 18th November 2016 & 25th November 2016 \\ \hline
Demonstration of Progress & 6th February 2017 & 20th February 2017 \\ \hline
Completed Project & 21st April 2017 & 5th May 2017\\ \hline
\caption{Deliverables}
\label{tbl:Deliverables}
\end{tabularx}
A lot of what I found on Google brought up errors in using multirows, but I am not using them here is that's worth mentioning.
It also occurs in the below table in the top left hand corner before Platform.
\begin{tabularx}{\linewidth}{|X|X|}
\hline
\rowcolor[HTML]{C0C0C0}
\textbf{Platform} & \textbf{Programming Languages} \\ \hline
Android & Java \\ \hline
iOS & Objective-C \\ \hline
Symbian & C++ \\ \hline
BlackBerry & Java \\ \hline
Bada & C++ \\ \hline
Windows Phone & C\# \\ \hline
\caption{Table showing platform’s programming languages (Holzinger, Slany and Treitler, 2012)\cite{Holzinger2012}.}
\label{tbl:Platform Programming Languages}
\end{tabularx}
Any suggestions?
Related
For some reason my code is not reproducing the table I wanted in the document. Only a bold line shows up but no cells or text. What am I doing wrong?
\documentclass[12pt,oneside,final]{article}
%\doctype{Thesis}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{layout}
\usepackage[algo2e, ruled, vlined]{algorithm2e}
\usepackage{tabularray}
\usepackage{makecell}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{rotating}
\usepackage{tabularx}
\begin{table}[]
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|}
\hline
Date & Luis Lacalle Pou & Date & Alberto Fernandez \\ \hline
May 21 & \begin{tabular}[c]{#{}l#{}}Announces the return to in-person classes strategy... \\ “We are taking this decision because we are convinced that the risk is minimal. We wouldn’t be doing it otherwise”(Infobae, 2020)\end{tabular} & April 25 & Announcement of the extension of the lockdown... (Casa Rosada, 2020a) \\ \hline
June 25 & Press conference speech... (CED Uruguay, 2020) & June 20 & Speech during Argentina’s Flag Day... (Casa Rosada, 2020b) \\ \hline
July 12 & Lacalle Pou justified ... (Lacalle Pou, 2020a) & July 18 & Press conference along with Buenos Aires’ ... (Casa Rosada, 2020c) \\ \hline
July 22 & Press conference ... (Lacalle Pou, 2020b) & July 31 & Speech directed to ... (Casa Rosada, 2020d) \\ \hline
September 22 & \begin{tabular}[c]{#{}l#{}}Speech for the General Assembly in the UN. “Our country’s answer to the pandemic (...) \\ (Lacalle Pou, 2020c)\end{tabular} & August 28 & \begin{tabular}[c]{#{}l#{}}Announcement of the extension of the quarantine restrictions. \\ “It has been almost 100 days ... . (Casa Rosada, 2020e)\end{tabular} \\ \hline
\end{tabular}%
}
\end{table}
\end{document}
This is how it looks in my LaTeX doc .
And this is how I would like it to look
This is how it looks in my LaTeX doc .
And this is how I would like it to look
That's not a bold line, that literarily is your table ... just scaled down sooooooo much by \resizebox that you can't see it. That's one of the many reasons you should never use \resizebox for elements which contain text. Other reasons are suboptimal choice of letter shapes and a ransom letter appearance to the final document with all the different font sizes.
Other problems:
\begin{document} is missing
By using l columns for your table and then even wrapping the verrrrrrrrrrrry long lines into additional tables with c columns, you are very efficiently telling latex to never ever break lines in your table. Instead you could use a column of fixed with, or - easier - use the tabularray package with an X column which will automatically calculate the width
no floating specifier like [htbp] is given
\documentclass[12pt,oneside,final]{article}
%\doctype{Thesis}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{layout}
\usepackage[algo2e, ruled, vlined]{algorithm2e}
\usepackage{tabularray}
\usepackage{makecell}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{tabularray}
\usepackage{geometry}
%\geometry{hmargin=1cm}
\begin{document}
\begin{table}[htbp]
%\resizebox{\textwidth}{!}{%
\begin{tblr}{|l|X[l]|l|X[l]|}
\hline
Date & Luis Lacalle Pou & Date & Alberto Fernandez \\ \hline
May 21 & Announces the return to in-person classes strategy... “We are taking this decision because we are convinced that the risk is minimal. We wouldn’t be doing it otherwise”(Infobae, 2020) & April 25 & Announcement of the extension of the lockdown... (Casa Rosada, 2020a) \\ \hline
June 25 & Press conference speech... (CED Uruguay, 2020) & June 20 & Speech during Argentina’s Flag Day... (Casa Rosada, 2020b) \\ \hline
July 12 & Lacalle Pou justified ... (Lacalle Pou, 2020a) & July 18 & Press conference along with Buenos Aires’ ... (Casa Rosada, 2020c) \\ \hline
July 22 & Press conference ... (Lacalle Pou, 2020b) & July 31 & Speech directed to ... (Casa Rosada, 2020d) \\ \hline
September 22 & Speech for the General Assembly in the UN. “Our country’s answer to the pandemic (...) (Lacalle Pou, 2020c) & August 28 & Announcement of the extension of the quarantine restrictions. “It has been almost 100 days ... . (Casa Rosada, 2020e) \\ \hline
\end{tblr}%
%}
\end{table}
\end{document}
I am learning Latex and have a frustrating issue using overleaf. It's fairly simple I have this table:
\begin{table}[b]
\caption{This is an example table.}
\centering
\begin{tabular}{cccc}
\hline
Year & Maximum Temperature (°C) & Semibalanus balanoides & Mytilus edulis \\
\hline
2003 & 14.8 & 67.1 & 172.83\\
2004 & 14.5 & 68.73 & 62.83\\
2005 & 15.1 & 21.67 & 22.25\\
2006 & 15.9 & 189.92 & 16.2\\
2007 & 14.7 & 9.83 & 32.25\\
2008 & 15.7 & 23.92 & 35.33\\
2011 & 15.8 & 66.5 & 20.17\\
2012 & 16.8 & 76.92 & 12.42\\
2013 & 15.8 & 6.18 & 32.58\\
2014 & 16.2 & 18.75 & 15.42\\
2015 & 15.9 & 69.82 & 20.92\\
2016 & 16.6 & 7.58 & 3.92\\
\hline
\end{tabular}
\label{tab:1}
\end{table}
I get a nice-looking table. However adding one more row like this:
\begin{table}[b]
\caption{This is an example table.}
\centering
\begin{tabular}{cccc}
\hline
Year & Maximum Temperature (°C) & Semibalanus balanoides & Mytilus edulis \\
\hline
2003 & 14.8 & 67.1 & 172.83\\
2004 & 14.5 & 68.73 & 62.83\\
2005 & 15.1 & 21.67 & 22.25\\
2006 & 15.9 & 189.92 & 16.2\\
2007 & 14.7 & 9.83 & 32.25\\
2008 & 15.7 & 23.92 & 35.33\\
2011 & 15.8 & 66.5 & 20.17\\
2012 & 16.8 & 76.92 & 12.42\\
2013 & 15.8 & 6.18 & 32.58\\
2014 & 16.2 & 18.75 & 15.42\\
2015 & 15.9 & 69.82 & 20.92\\
2016 & 16.6 & 7.58 & 3.92\\
2017 & 15 & 11.67 & 18.25\\
\hline
\end{tabular}
\label{tab:1}
\end{table}
I get nothing compiled at all?
I suggest to use the siunitx package, which will nicely align all the numbers for you
to give latex more freedom to find the best possible place, use [htbp] as floating specifier instead of restricting it to only the bottom of the page.
\documentclass{article}
\usepackage{siunitx}
\usepackage{booktabs}
\begin{document}
\begin{table}[htbp]
\caption{This is an example table.}
\centering
\begin{tabular}{
#{}
S[table-format=4.0]
S[table-format=2.1]
S[table-format=3.2]
S[table-format=3.2]
#{}
}
\toprule
{Year} & {Maximum Temperature (°C)} & {Semibalanus balanoides} & {Mytilus edulis} \\
\midrule
2003 & 14.8 & 67.1 & 172.83\\
2004 & 14.5 & 68.73 & 62.83\\
2005 & 15.1 & 21.67 & 22.25\\
2006 & 15.9 & 189.92 & 16.2\\
2007 & 14.7 & 9.83 & 32.25\\
2008 & 15.7 & 23.92 & 35.33\\
2011 & 15.8 & 66.5 & 20.17\\
2012 & 16.8 & 76.92 & 12.42\\
2013 & 15.8 & 6.18 & 32.58\\
2014 & 16.2 & 18.75 & 15.42\\
2015 & 15.9 & 69.82 & 20.92\\
2016 & 16.6 & 7.58 & 3.92\\
2017 & 15 & 11.67 & 18.25\\
\bottomrule
\end{tabular}
\label{tab:1}
\end{table}
\end{document}
I have created a table in Latex and it has stopped displaying it but I need it to work on the document I am currently working on. When I input into a new document, it works again. I am getting the following errors:
LaTex error: Illegal character in array arg. Overfull \Hbox (56.47151pt too wide) in paragraph at lines at lines 70--98
Error alignment tab has been changed to \cr.
It does not work either when I include the array package. I am using the following packages:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{url}
\usepackage[round]{natbib}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{float}
\usepackage{amsmath}
\usepackage[toc,page]{appendix}
\begin{table}[h!]
\begin{center}
\caption{A comparison between Rwanda and The Gambia}
\begin{tabular}{l|s|r|m}
\textbf{Variable} &
\textbf{Specific Variable} &
\textbf{Rwanda} &
\textbf{Gambia} &
\hline \hline
\textit{Size} & Surface area (sq. km) & 26,340 & 11,300 \\
& Population (total) & 12,208,407 & 2,100,568 \\
\hline
\textit{Economy} & GDP growth (annual \%) & 6.1 & 4.6 \\
& GDP per capita & 720 & 680 \\
\hline
\textit{Education} & Literacy rate (gender parity index) & 1.029 & 0.851 \\
& School enrolment (primary \% gross) & 133.425 & 97.115 \\
& School enrolment (secondary \% gross) & 32.988 & 57.096 \\
& School enrolment (tertiary \% gross) & 6.695 & 3.094 \\
\hline
\textit{Health and Survival} & Life expectancy at birth (total years) & 67.129 & 61.193 \\
\hline
\textit{Politics} & Political Elections & 4 & 8 \\
& Freedom Rights Score & Not Free & Not Free \\
\hline
\textit{Gender Equality} & Gender equality rating & 4.5 & 3.5 \\
& The Global Gender Gap Report& 121 & 6 \\
\hline
\textit{Aid Rates} & Net ODA received per capita & 100.373 & 128.356 \\
& Net official development assistance & 37.3 & 46.8 \\
\end{tabular}
\end{center}
\end{table}
Concerning the first problem, "Illegal character in array arg", it is indeed cause by by an unrecognised argument to tabular.
Legal arguments are supposed to describe column types and are c (centered), l (left aligned), r (right aligned), p{width} (top aligned paragraph) and | to describe an intercolumn rule for the most common ones. There are packages that add extra column types, but in your code \begin{tabular}{l|s|r|m} 's' is unknown and do not correspond to a valid column type. 'm' exists to specify a middle aligned paragraph in the 'array' package; it would require the insertion of the package and an extra argument with the desired width of the paragraph. Just change 's' and 'm' wih legal parameters and all is OK. There are many documentation available that describe valid column types.
The second message says that you specify an array with four columns but the fist line contains 5 entries:
\textbf{Variable} &
\textbf{Specific Variable} &
\textbf{Rwanda} &
\textbf{Gambia} &
the fifth one is an empty entry following the ampersand after 'Gambia'. Replace it with an end-of-line to suppress the problem.
Here is a corrected version.
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{url}
\usepackage[round]{natbib}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{float}
\usepackage{amsmath}
\usepackage[toc,page]{appendix}
\begin{document}
\begin{table}[h!]
\begin{center}
\caption{A comparison between Rwanda and The Gambia}
\begin{tabular}{l|c|r|c}
\textbf{Variable} &
\textbf{Specific Variable} &
\textbf{Rwanda} &
\textbf{Gambia} \\
\hline \hline
\textit{Size} & Surface area (sq. km) & 26,340 & 11,300 \\
& Population (total) & 12,208,407 & 2,100,568 \\
\hline
\textit{Economy} & GDP growth (annual \%) & 6.1 & 4.6 \\
& GDP per capita & 720 & 680 \\
\hline
\textit{Education} & Literacy rate (gender parity index) & 1.029 & 0.851 \\
& School enrolment (primary \% gross) & 133.425 & 97.115 \\
& School enrolment (secondary \% gross) & 32.988 & 57.096 \\
& School enrolment (tertiary \% gross) & 6.695 & 3.094 \\
\hline
\textit{Health and Survival} & Life expectancy at birth (total years) & 67.129 & 61.193 \\
\hline
\textit{Politics} & Political Elections & 4 & 8 \\
& Freedom Rights Score & Not Free & Not Free \\
\hline
\textit{Gender Equality} & Gender equality rating & 4.5 & 3.5 \\
& The Global Gender Gap Report& 121 & 6 \\
\hline
\textit{Aid Rates} & Net ODA received per capita & 100.373 & 128.356 \\
& Net official development assistance & 37.3 & 46.8 \\
\end{tabular}
\end{center}
\end{table}
\end{document}
I am writing a tabel in latex in landscape style.
my code is this one:
\begin{landscape}
\begin{table}
\begin{tabularx}{\textwidth}{|p{2.5cm}|p{3cm}|p{3cm}|p{3cm}|p{3cm}|p{3cm}|p{3cm}|}
\hline
\rowcolor[HTML]{C0C0C0}
& \textbf{IEEE} & \textbf{CODATA} & \textbf{ACM} & \textbf{Springer Verlag} & \textbf{ELSEVIER} & \textbf{IOS PRESS} \\
\hline
Journal & Journal Transactions on Knowledge and Data Engineering & Data Science Journal & Journal of Data and Information Quality & International Journal of Data Science & Computional Statistics and Data Analysis & Data Science Journal \\
\hline
Organisation bzw. Verlag & Organisation & Organisation & Organisation & Verlag & Verlag & Verlag \\
\hline
Mitglieder bzw. Mitarbeiter & 400.000 Mitglieder & - & 78.000 Mitglieder & 15.323 (2016) Mitarbeiter & 30.500 (2011) Mitarbeiter & - \\
\hline
Editoren & Editor-in-Chief Xuemin Lin Editors-in-Chief Lei Chen & Editor-in-Chief Sarah Callaghan & - & Editor-in-Chief Longbing Cao & Co-Editors A.M. Colubi E.J. Kontoghiorghes B.U. Park & Editors-in-Chief Michel Dumontier Tobias Kuhn \\
\hline
Links & \url{http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=69} & \url{https://datascience.codata.org/} & \url{https://dl.acm.org/citation.cfm?id=J1191} & \url{http://www.springer.com/computer/database+management+\%26+information+retrieval/journal/41060} & \url{https://www.journals.elsevier.com/computational-statistics-and-data-analysis/} & \url{https://www.iospress.nl/journal/data-science/} \\
\hline
Erstausgabe Jahr & 1989 & 2002 & 2009 & 2016 & 1983 & 2017 \\
\hline
\end{tabularx}
\caption{Übersicht der Konkurrenten}
\end{table}
\end{landscape}
My problem is, when i compile my .tex file, the lines are not pulled through the end.
Here is a picture:
I really appreciate any answers!
well i fixed it by editing the table.
I now use
\begin{tabularx}{24cm}{|X|X|X|X|X|X|X|}
I simple want to combine some cells in a row of a table in Latex. For instance,
I tried to compile the following table:
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{3}{|c|}{Team sheet} \\
\hline
Goalkeeper & GK & Paul Robinson \\ \hline
\multirow{4}{*}{Defenders} & LB & Lucus Radebe \\
& DC & Michael Duberry \\
& DC & Dominic Matteo \\
& RB & Didier Domi \\ \hline
\multirow{3}{*}{Midfielders} & MC & David Batty \\
& MC & Eirik Bakke \\
& MC & Jody Morris \\ \hline
Forward & FW & Jamie McMaster \\ \hline
\multirow{2}{*}{Strikers} & ST & Alan Smith \\
& ST & Mark Viduka \\
\hline
\end{tabular}
Then I get the error:
! Undefined control sequence.
<recently read> \multirow
l.821 \multirow
Does anyone have an idea what I am doing wrong? Do I need a special package? Interestingly enough, the multicolumn command is working! Weird.
How about trying
\usepackage{multirow}
?
Multirow is not a defined command. This is because of the structure of tables in LaTeX: line by line. You can use the \cline command to make sure that horizontal lines between rows do not separate the first column, but the label "Defenders" would still be at the top of the cell.
It seems that the multirow package (which comes with the complete MikTeX distribution) addresses this issue.
See also:
Manual of the multirow package
Small tutorial on multirow
EDIT: You don't want to combine cells in a row, as you have wrote, but you want to combine cells in one column. Simply write empty cells:
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{3}{|c|}{Team sheet} \\
\hline
Goalkeeper & GK & Paul Robinson \\ \hline
Defenders & LB & Lucus Radebe \\
& DC & Michael Duberry \\
& DC & Dominic Matteo \\
& RB & Didier Domi \\ \hline
Midfielders & MC & David Batty \\
& MC & Eirik Bakke \\
& MC & Jody Morris \\ \hline
Forward & FW & Jamie McMaster \\ \hline
Strikers & ST & Alan Smith \\
& ST & Mark Viduka \\
\hline
\end{tabular}