How can I create a Table like this in Latex?How to get multiple multirows in a table?How do I prevent...
Is divide-by-zero a security vulnerability?
When to use mean vs median
Are small insurances worth it
Book about a time-travel war fought by computers
Can I solder 12/2 Romex to extend wire 5 ft?
Rationale to prefer local variables over instance variables?
Is there any relevance to Thor getting his hair cut other than comedic value?
Correct physics behind the colors on CD (compact disc)?
Is there a math equivalent to the conditional ternary operator?
Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?
Can the Shape Water Cantrip be used to manipulate blood?
Why won't the strings command stop?
Is there a frame of reference in which I was born before I was conceived?
How can I highlight parts in a screenshot
Levi-Civita symbol: 3D matrix
Can we carry rice to Japan?
Why would the IRS ask for birth certificates or even audit a small tax return?
Why did the Cray-1 have 8 parity bits per word?
I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?
Can a Trickery Domain cleric cast a spell through the Invoke Duplicity clone while inside a Forcecage?
“I had a flat in the centre of town, but I didn’t like living there, so …”
How to kill a localhost:8080
Lock enemy's y-axis when using Vector3.MoveTowards to follow the player
Should we avoid writing fiction about historical events without extensive research?
How can I create a Table like this in Latex?
How to get multiple multirows in a table?How do I prevent cellcolor from over effect of hlineWhat options are there to globally format tables also allowing local overrides?Declaring array of integersVertically aligning fixed height tablesIs there a simple way to create a latex equivalent of this (ms)word table template?Loading data to fill a table from a csv file with multicolumn headerHow to create custom table environment with a possibility for table footnotesHow to create custom table environment with a possibility to merge cellsFit IEEE-754 table in A4 width
How can I create a table like this in Latex?
I have tried but it didn't work. I need also that it is enumerated so that it appears in the List of Tables. It doesn't matter if it is not coloured, as long as the first two rows are bold.
begin{center}
begin{tabular}{ |c|c|c|c|c| }
hline
multicolumn{5}{|c|}{Number of cells per type} \
hline
a& b& c& d& e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabular}
end{center}
tables table-of-contents
New contributor
add a comment |
How can I create a table like this in Latex?
I have tried but it didn't work. I need also that it is enumerated so that it appears in the List of Tables. It doesn't matter if it is not coloured, as long as the first two rows are bold.
begin{center}
begin{tabular}{ |c|c|c|c|c| }
hline
multicolumn{5}{|c|}{Number of cells per type} \
hline
a& b& c& d& e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabular}
end{center}
tables table-of-contents
New contributor
Welcome to TeX.SE. First of all, please try to ask one question per thread. And, please show us what you have tried so far. This is not a do-it-for-me site.
– Raaja
yesterday
begin{center} begin{tabular}{ |c|c|c|c|c| } hline multicolumn{5}{|c|}{Number of cells per type} \ hline a& b& c& d& e\ hline 44 & 39 & 7 & 32 &22 \ hline end{tabular} end{center}
– Federica Benassi
yesterday
1
Please add it in your question and kindly make it compilable.
– Raaja
yesterday
3
I have added it
– Federica Benassi
yesterday
Do you need the first two columns to be narrower than the next three, as appears to be the case in the screenshot you posted? Please advise.
– Mico
yesterday
add a comment |
How can I create a table like this in Latex?
I have tried but it didn't work. I need also that it is enumerated so that it appears in the List of Tables. It doesn't matter if it is not coloured, as long as the first two rows are bold.
begin{center}
begin{tabular}{ |c|c|c|c|c| }
hline
multicolumn{5}{|c|}{Number of cells per type} \
hline
a& b& c& d& e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabular}
end{center}
tables table-of-contents
New contributor
How can I create a table like this in Latex?
I have tried but it didn't work. I need also that it is enumerated so that it appears in the List of Tables. It doesn't matter if it is not coloured, as long as the first two rows are bold.
begin{center}
begin{tabular}{ |c|c|c|c|c| }
hline
multicolumn{5}{|c|}{Number of cells per type} \
hline
a& b& c& d& e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabular}
end{center}
tables table-of-contents
tables table-of-contents
New contributor
New contributor
edited yesterday
Federica Benassi
New contributor
asked yesterday
Federica BenassiFederica Benassi
383
383
New contributor
New contributor
Welcome to TeX.SE. First of all, please try to ask one question per thread. And, please show us what you have tried so far. This is not a do-it-for-me site.
– Raaja
yesterday
begin{center} begin{tabular}{ |c|c|c|c|c| } hline multicolumn{5}{|c|}{Number of cells per type} \ hline a& b& c& d& e\ hline 44 & 39 & 7 & 32 &22 \ hline end{tabular} end{center}
– Federica Benassi
yesterday
1
Please add it in your question and kindly make it compilable.
– Raaja
yesterday
3
I have added it
– Federica Benassi
yesterday
Do you need the first two columns to be narrower than the next three, as appears to be the case in the screenshot you posted? Please advise.
– Mico
yesterday
add a comment |
Welcome to TeX.SE. First of all, please try to ask one question per thread. And, please show us what you have tried so far. This is not a do-it-for-me site.
– Raaja
yesterday
begin{center} begin{tabular}{ |c|c|c|c|c| } hline multicolumn{5}{|c|}{Number of cells per type} \ hline a& b& c& d& e\ hline 44 & 39 & 7 & 32 &22 \ hline end{tabular} end{center}
– Federica Benassi
yesterday
1
Please add it in your question and kindly make it compilable.
– Raaja
yesterday
3
I have added it
– Federica Benassi
yesterday
Do you need the first two columns to be narrower than the next three, as appears to be the case in the screenshot you posted? Please advise.
– Mico
yesterday
Welcome to TeX.SE. First of all, please try to ask one question per thread. And, please show us what you have tried so far. This is not a do-it-for-me site.
– Raaja
yesterday
Welcome to TeX.SE. First of all, please try to ask one question per thread. And, please show us what you have tried so far. This is not a do-it-for-me site.
– Raaja
yesterday
begin{center} begin{tabular}{ |c|c|c|c|c| } hline multicolumn{5}{|c|}{Number of cells per type} \ hline a& b& c& d& e\ hline 44 & 39 & 7 & 32 &22 \ hline end{tabular} end{center}
– Federica Benassi
yesterday
begin{center} begin{tabular}{ |c|c|c|c|c| } hline multicolumn{5}{|c|}{Number of cells per type} \ hline a& b& c& d& e\ hline 44 & 39 & 7 & 32 &22 \ hline end{tabular} end{center}
– Federica Benassi
yesterday
1
1
Please add it in your question and kindly make it compilable.
– Raaja
yesterday
Please add it in your question and kindly make it compilable.
– Raaja
yesterday
3
3
I have added it
– Federica Benassi
yesterday
I have added it
– Federica Benassi
yesterday
Do you need the first two columns to be narrower than the next three, as appears to be the case in the screenshot you posted? Please advise.
– Mico
yesterday
Do you need the first two columns to be narrower than the next three, as appears to be the case in the screenshot you posted? Please advise.
– Mico
yesterday
add a comment |
4 Answers
4
active
oldest
votes
I suggest you to use booktabs
for professional tables.
documentclass[11pt,openright]{book}
usepackage{array}
newcolumntype{C}{>{centeringarraybackslash}X}
renewcommand{arraystretch}{1.2}
usepackage{booktabs}
usepackage{tabularx}
usepackage{caption}
begin{document}
listoftables
chapter{My chapter}
begin{table}[htb]centering
caption{Your tablelabel{tab:yourtab}}
begin{tabularx}{.5linewidth}{ |C|C|C|C|C| }
hline
multicolumn{5}{|c|}{bfseries Number of cells per type} \
hline
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabularx}
end{table}
begin{table}[htb]centering
caption{My suggestionlabel{tab:mytab}}
begin{tabularx}{.5linewidth}{*5C}
toprule
multicolumn{5}{c}{bfseries Number of cells per type} \
midrule
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
midrule
44 & 39 & 7 & 32 &22 \
bottomrule
end{tabularx}
end{table}
end{document}
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
@FedericaBenassi Yes, just put thecaption...
afterend{tabularx}
.
– CarLaTeX
yesterday
add a comment |
Don't mix-and-mismatch visual cues and metaphores: if you employ colored rows, don't employ horizontal rules. And, for sure, you can omit all vertical rules -- they're not needed.
documentclass{article}
usepackage[table,svgnames]{xcolor}
usepackage{array} % for 'extrarowheight' macro
begin{document}
begin{center}
sffamily
setlengthextrarowheight{2pt} % optional
setlengthtabcolsep{9pt} % default: 6pt
begin{tabular}{ ccccc }
%hline
rowcolor{LightBlue} multicolumn{5}{c}{Number of cells per type} \
%hline
rowcolor{LightBlue} a & b & c & d & e\
%hline
44 & 39 & 7 & 32 & 22 \
hline
end{tabular}
end{center}
end{document}
1
Nice remark and a good suggestion (+1).
– Raaja
yesterday
1
Thank you so much!
– Federica Benassi
yesterday
add a comment |
A mix-and-match with colors and using something as a starting point
documentclass[10pt,a4paper]{article}
usepackage[table,xcdraw]{xcolor}
begin{document}
listoftablesnewpage
begin{table}[]
begin{tabular}{!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}}
arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
multicolumn{5}{!{color{cyan}vrule}l!{color{cyan}vrule}}{cellcolor[HTML]{38FFF8}Number of cells per type} \ arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
a & b & c & d & e \ arrayrulecolor{cyan}hline
1 & 2 & 3 & 4 & 5 \ hline
end{tabular}
caption{a}
end{table}
end{document}
to get:
PS: Feel free to play with colors (I right now, do not have the necessary things to find out the colors) and I was lazy enough not to input your numbers (sorry ;-)
)
2
Needless to loadcolortbl
: thetable
option ofxcolor
does it for you.
– Bernard
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
add a comment |
There is also a really handy online tool called Tables Generator.
It lets you input your data (you can even upload it from file), and adapt it WYSIWYG-style. It will then generate the correct LaTeX code for you to copy/paste into you document.
New contributor
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Federica Benassi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477931%2fhow-can-i-create-a-table-like-this-in-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I suggest you to use booktabs
for professional tables.
documentclass[11pt,openright]{book}
usepackage{array}
newcolumntype{C}{>{centeringarraybackslash}X}
renewcommand{arraystretch}{1.2}
usepackage{booktabs}
usepackage{tabularx}
usepackage{caption}
begin{document}
listoftables
chapter{My chapter}
begin{table}[htb]centering
caption{Your tablelabel{tab:yourtab}}
begin{tabularx}{.5linewidth}{ |C|C|C|C|C| }
hline
multicolumn{5}{|c|}{bfseries Number of cells per type} \
hline
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabularx}
end{table}
begin{table}[htb]centering
caption{My suggestionlabel{tab:mytab}}
begin{tabularx}{.5linewidth}{*5C}
toprule
multicolumn{5}{c}{bfseries Number of cells per type} \
midrule
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
midrule
44 & 39 & 7 & 32 &22 \
bottomrule
end{tabularx}
end{table}
end{document}
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
@FedericaBenassi Yes, just put thecaption...
afterend{tabularx}
.
– CarLaTeX
yesterday
add a comment |
I suggest you to use booktabs
for professional tables.
documentclass[11pt,openright]{book}
usepackage{array}
newcolumntype{C}{>{centeringarraybackslash}X}
renewcommand{arraystretch}{1.2}
usepackage{booktabs}
usepackage{tabularx}
usepackage{caption}
begin{document}
listoftables
chapter{My chapter}
begin{table}[htb]centering
caption{Your tablelabel{tab:yourtab}}
begin{tabularx}{.5linewidth}{ |C|C|C|C|C| }
hline
multicolumn{5}{|c|}{bfseries Number of cells per type} \
hline
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabularx}
end{table}
begin{table}[htb]centering
caption{My suggestionlabel{tab:mytab}}
begin{tabularx}{.5linewidth}{*5C}
toprule
multicolumn{5}{c}{bfseries Number of cells per type} \
midrule
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
midrule
44 & 39 & 7 & 32 &22 \
bottomrule
end{tabularx}
end{table}
end{document}
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
@FedericaBenassi Yes, just put thecaption...
afterend{tabularx}
.
– CarLaTeX
yesterday
add a comment |
I suggest you to use booktabs
for professional tables.
documentclass[11pt,openright]{book}
usepackage{array}
newcolumntype{C}{>{centeringarraybackslash}X}
renewcommand{arraystretch}{1.2}
usepackage{booktabs}
usepackage{tabularx}
usepackage{caption}
begin{document}
listoftables
chapter{My chapter}
begin{table}[htb]centering
caption{Your tablelabel{tab:yourtab}}
begin{tabularx}{.5linewidth}{ |C|C|C|C|C| }
hline
multicolumn{5}{|c|}{bfseries Number of cells per type} \
hline
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabularx}
end{table}
begin{table}[htb]centering
caption{My suggestionlabel{tab:mytab}}
begin{tabularx}{.5linewidth}{*5C}
toprule
multicolumn{5}{c}{bfseries Number of cells per type} \
midrule
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
midrule
44 & 39 & 7 & 32 &22 \
bottomrule
end{tabularx}
end{table}
end{document}
I suggest you to use booktabs
for professional tables.
documentclass[11pt,openright]{book}
usepackage{array}
newcolumntype{C}{>{centeringarraybackslash}X}
renewcommand{arraystretch}{1.2}
usepackage{booktabs}
usepackage{tabularx}
usepackage{caption}
begin{document}
listoftables
chapter{My chapter}
begin{table}[htb]centering
caption{Your tablelabel{tab:yourtab}}
begin{tabularx}{.5linewidth}{ |C|C|C|C|C| }
hline
multicolumn{5}{|c|}{bfseries Number of cells per type} \
hline
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
hline
44 & 39 & 7 & 32 &22 \
hline
end{tabularx}
end{table}
begin{table}[htb]centering
caption{My suggestionlabel{tab:mytab}}
begin{tabularx}{.5linewidth}{*5C}
toprule
multicolumn{5}{c}{bfseries Number of cells per type} \
midrule
bfseries a& bfseries b& bfseries c& bfseries d& bfseries e\
midrule
44 & 39 & 7 & 32 &22 \
bottomrule
end{tabularx}
end{table}
end{document}
answered yesterday
CarLaTeXCarLaTeX
32.8k551135
32.8k551135
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
@FedericaBenassi Yes, just put thecaption...
afterend{tabularx}
.
– CarLaTeX
yesterday
add a comment |
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
@FedericaBenassi Yes, just put thecaption...
afterend{tabularx}
.
– CarLaTeX
yesterday
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Thank you! That's exactly what I was thinking about
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
Is there, by any chance, a way to put "Table 1.2: My suggestion" under the table and not above?
– Federica Benassi
yesterday
@FedericaBenassi Yes, just put the
caption...
after end{tabularx}
.– CarLaTeX
yesterday
@FedericaBenassi Yes, just put the
caption...
after end{tabularx}
.– CarLaTeX
yesterday
add a comment |
Don't mix-and-mismatch visual cues and metaphores: if you employ colored rows, don't employ horizontal rules. And, for sure, you can omit all vertical rules -- they're not needed.
documentclass{article}
usepackage[table,svgnames]{xcolor}
usepackage{array} % for 'extrarowheight' macro
begin{document}
begin{center}
sffamily
setlengthextrarowheight{2pt} % optional
setlengthtabcolsep{9pt} % default: 6pt
begin{tabular}{ ccccc }
%hline
rowcolor{LightBlue} multicolumn{5}{c}{Number of cells per type} \
%hline
rowcolor{LightBlue} a & b & c & d & e\
%hline
44 & 39 & 7 & 32 & 22 \
hline
end{tabular}
end{center}
end{document}
1
Nice remark and a good suggestion (+1).
– Raaja
yesterday
1
Thank you so much!
– Federica Benassi
yesterday
add a comment |
Don't mix-and-mismatch visual cues and metaphores: if you employ colored rows, don't employ horizontal rules. And, for sure, you can omit all vertical rules -- they're not needed.
documentclass{article}
usepackage[table,svgnames]{xcolor}
usepackage{array} % for 'extrarowheight' macro
begin{document}
begin{center}
sffamily
setlengthextrarowheight{2pt} % optional
setlengthtabcolsep{9pt} % default: 6pt
begin{tabular}{ ccccc }
%hline
rowcolor{LightBlue} multicolumn{5}{c}{Number of cells per type} \
%hline
rowcolor{LightBlue} a & b & c & d & e\
%hline
44 & 39 & 7 & 32 & 22 \
hline
end{tabular}
end{center}
end{document}
1
Nice remark and a good suggestion (+1).
– Raaja
yesterday
1
Thank you so much!
– Federica Benassi
yesterday
add a comment |
Don't mix-and-mismatch visual cues and metaphores: if you employ colored rows, don't employ horizontal rules. And, for sure, you can omit all vertical rules -- they're not needed.
documentclass{article}
usepackage[table,svgnames]{xcolor}
usepackage{array} % for 'extrarowheight' macro
begin{document}
begin{center}
sffamily
setlengthextrarowheight{2pt} % optional
setlengthtabcolsep{9pt} % default: 6pt
begin{tabular}{ ccccc }
%hline
rowcolor{LightBlue} multicolumn{5}{c}{Number of cells per type} \
%hline
rowcolor{LightBlue} a & b & c & d & e\
%hline
44 & 39 & 7 & 32 & 22 \
hline
end{tabular}
end{center}
end{document}
Don't mix-and-mismatch visual cues and metaphores: if you employ colored rows, don't employ horizontal rules. And, for sure, you can omit all vertical rules -- they're not needed.
documentclass{article}
usepackage[table,svgnames]{xcolor}
usepackage{array} % for 'extrarowheight' macro
begin{document}
begin{center}
sffamily
setlengthextrarowheight{2pt} % optional
setlengthtabcolsep{9pt} % default: 6pt
begin{tabular}{ ccccc }
%hline
rowcolor{LightBlue} multicolumn{5}{c}{Number of cells per type} \
%hline
rowcolor{LightBlue} a & b & c & d & e\
%hline
44 & 39 & 7 & 32 & 22 \
hline
end{tabular}
end{center}
end{document}
answered yesterday
MicoMico
281k31385774
281k31385774
1
Nice remark and a good suggestion (+1).
– Raaja
yesterday
1
Thank you so much!
– Federica Benassi
yesterday
add a comment |
1
Nice remark and a good suggestion (+1).
– Raaja
yesterday
1
Thank you so much!
– Federica Benassi
yesterday
1
1
Nice remark and a good suggestion (+1).
– Raaja
yesterday
Nice remark and a good suggestion (+1).
– Raaja
yesterday
1
1
Thank you so much!
– Federica Benassi
yesterday
Thank you so much!
– Federica Benassi
yesterday
add a comment |
A mix-and-match with colors and using something as a starting point
documentclass[10pt,a4paper]{article}
usepackage[table,xcdraw]{xcolor}
begin{document}
listoftablesnewpage
begin{table}[]
begin{tabular}{!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}}
arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
multicolumn{5}{!{color{cyan}vrule}l!{color{cyan}vrule}}{cellcolor[HTML]{38FFF8}Number of cells per type} \ arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
a & b & c & d & e \ arrayrulecolor{cyan}hline
1 & 2 & 3 & 4 & 5 \ hline
end{tabular}
caption{a}
end{table}
end{document}
to get:
PS: Feel free to play with colors (I right now, do not have the necessary things to find out the colors) and I was lazy enough not to input your numbers (sorry ;-)
)
2
Needless to loadcolortbl
: thetable
option ofxcolor
does it for you.
– Bernard
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
add a comment |
A mix-and-match with colors and using something as a starting point
documentclass[10pt,a4paper]{article}
usepackage[table,xcdraw]{xcolor}
begin{document}
listoftablesnewpage
begin{table}[]
begin{tabular}{!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}}
arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
multicolumn{5}{!{color{cyan}vrule}l!{color{cyan}vrule}}{cellcolor[HTML]{38FFF8}Number of cells per type} \ arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
a & b & c & d & e \ arrayrulecolor{cyan}hline
1 & 2 & 3 & 4 & 5 \ hline
end{tabular}
caption{a}
end{table}
end{document}
to get:
PS: Feel free to play with colors (I right now, do not have the necessary things to find out the colors) and I was lazy enough not to input your numbers (sorry ;-)
)
2
Needless to loadcolortbl
: thetable
option ofxcolor
does it for you.
– Bernard
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
add a comment |
A mix-and-match with colors and using something as a starting point
documentclass[10pt,a4paper]{article}
usepackage[table,xcdraw]{xcolor}
begin{document}
listoftablesnewpage
begin{table}[]
begin{tabular}{!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}}
arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
multicolumn{5}{!{color{cyan}vrule}l!{color{cyan}vrule}}{cellcolor[HTML]{38FFF8}Number of cells per type} \ arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
a & b & c & d & e \ arrayrulecolor{cyan}hline
1 & 2 & 3 & 4 & 5 \ hline
end{tabular}
caption{a}
end{table}
end{document}
to get:
PS: Feel free to play with colors (I right now, do not have the necessary things to find out the colors) and I was lazy enough not to input your numbers (sorry ;-)
)
A mix-and-match with colors and using something as a starting point
documentclass[10pt,a4paper]{article}
usepackage[table,xcdraw]{xcolor}
begin{document}
listoftablesnewpage
begin{table}[]
begin{tabular}{!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}l!{color{cyan}vrule}}
arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
multicolumn{5}{!{color{cyan}vrule}l!{color{cyan}vrule}}{cellcolor[HTML]{38FFF8}Number of cells per type} \ arrayrulecolor{cyan}hline
rowcolor[HTML]{38FFF8}
a & b & c & d & e \ arrayrulecolor{cyan}hline
1 & 2 & 3 & 4 & 5 \ hline
end{tabular}
caption{a}
end{table}
end{document}
to get:
PS: Feel free to play with colors (I right now, do not have the necessary things to find out the colors) and I was lazy enough not to input your numbers (sorry ;-)
)
edited yesterday
answered yesterday
RaajaRaaja
4,45621138
4,45621138
2
Needless to loadcolortbl
: thetable
option ofxcolor
does it for you.
– Bernard
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
add a comment |
2
Needless to loadcolortbl
: thetable
option ofxcolor
does it for you.
– Bernard
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
2
2
Needless to load
colortbl
: the table
option of xcolor
does it for you.– Bernard
yesterday
Needless to load
colortbl
: the table
option of xcolor
does it for you.– Bernard
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
@Bernard Thanks for the remark, updated my answer.
– Raaja
yesterday
add a comment |
There is also a really handy online tool called Tables Generator.
It lets you input your data (you can even upload it from file), and adapt it WYSIWYG-style. It will then generate the correct LaTeX code for you to copy/paste into you document.
New contributor
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
add a comment |
There is also a really handy online tool called Tables Generator.
It lets you input your data (you can even upload it from file), and adapt it WYSIWYG-style. It will then generate the correct LaTeX code for you to copy/paste into you document.
New contributor
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
add a comment |
There is also a really handy online tool called Tables Generator.
It lets you input your data (you can even upload it from file), and adapt it WYSIWYG-style. It will then generate the correct LaTeX code for you to copy/paste into you document.
New contributor
There is also a really handy online tool called Tables Generator.
It lets you input your data (you can even upload it from file), and adapt it WYSIWYG-style. It will then generate the correct LaTeX code for you to copy/paste into you document.
New contributor
edited 19 hours ago
JouleV
4,91111139
4,91111139
New contributor
answered 19 hours ago
sarasara
311
311
New contributor
New contributor
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
add a comment |
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
Simply the best answer here. Instead of fish, gives the rod!
– Sanctus
8 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
@Sanctus - Have you actually looked at the quality of the LaTeX code produced by the tablegenerators.com site?
– Mico
7 hours ago
add a comment |
Federica Benassi is a new contributor. Be nice, and check out our Code of Conduct.
Federica Benassi is a new contributor. Be nice, and check out our Code of Conduct.
Federica Benassi is a new contributor. Be nice, and check out our Code of Conduct.
Federica Benassi is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477931%2fhow-can-i-create-a-table-like-this-in-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to TeX.SE. First of all, please try to ask one question per thread. And, please show us what you have tried so far. This is not a do-it-for-me site.
– Raaja
yesterday
begin{center} begin{tabular}{ |c|c|c|c|c| } hline multicolumn{5}{|c|}{Number of cells per type} \ hline a& b& c& d& e\ hline 44 & 39 & 7 & 32 &22 \ hline end{tabular} end{center}
– Federica Benassi
yesterday
1
Please add it in your question and kindly make it compilable.
– Raaja
yesterday
3
I have added it
– Federica Benassi
yesterday
Do you need the first two columns to be narrower than the next three, as appears to be the case in the screenshot you posted? Please advise.
– Mico
yesterday