How to remove additional spaces in table in latex [duplicate]
This question already has an answer here:
Removing extra space after itemize environment in longtable in memoir
3 answers
I am using the following code to generate a table.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-{$newline$}
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
&
0%{$newline$}
-{$newline$}
-{$newline$}
&
100%{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
end{tabular}
label{table1}
end{table}
end{document}
However, as shown in the figure below there are empty spaces (highlighted in yellow). I am just wondering if there is a way to remove those extra lines from the table?
I am happy to provide any other details if needed :)
tables
New contributor
marked as duplicate by Henri Menke, Stefan Pinnow, flav, Andrew Swann, dexteritas Jan 17 at 7:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
show 1 more comment
This question already has an answer here:
Removing extra space after itemize environment in longtable in memoir
3 answers
I am using the following code to generate a table.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-{$newline$}
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
&
0%{$newline$}
-{$newline$}
-{$newline$}
&
100%{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
end{tabular}
label{table1}
end{table}
end{document}
However, as shown in the figure below there are empty spaces (highlighted in yellow). I am just wondering if there is a way to remove those extra lines from the table?
I am happy to provide any other details if needed :)
tables
New contributor
marked as duplicate by Henri Menke, Stefan Pinnow, flav, Andrew Swann, dexteritas Jan 17 at 7:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Can you please provide us with a compilable document? When I compile your table with preambledocumentclass[12pt]{article} usepackage{amssymb}
I do not get such large spaces,
– marmot
Jan 17 at 5:05
@marmot I am using the following document classdocumentclass[acmsmall]{acmart}
– Emi
Jan 17 at 5:27
Please add this (as well asbegin{document}
andend{document}
) to your above code such that people have a complete example to play with.
– marmot
Jan 17 at 5:29
@marmot Sure, I will add those details. By the way I am getting the same output in the following documentclasses as well;documentclass[smallextended]{svjour3}
anddocumentclass[jou,apacite]{apa6}
– Emi
Jan 17 at 5:33
OK, thanks! I have another question (not that I could immediately answer it). Do you want the check marks and - be vertically aligned, i.e. at the same height, as the bullets ofitemize
? You might want to use e.g. this answer instead of itemize, this would also solve the vertical space problem.
– marmot
Jan 17 at 5:36
|
show 1 more comment
This question already has an answer here:
Removing extra space after itemize environment in longtable in memoir
3 answers
I am using the following code to generate a table.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-{$newline$}
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
&
0%{$newline$}
-{$newline$}
-{$newline$}
&
100%{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
end{tabular}
label{table1}
end{table}
end{document}
However, as shown in the figure below there are empty spaces (highlighted in yellow). I am just wondering if there is a way to remove those extra lines from the table?
I am happy to provide any other details if needed :)
tables
New contributor
This question already has an answer here:
Removing extra space after itemize environment in longtable in memoir
3 answers
I am using the following code to generate a table.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-{$newline$}
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
&
0%{$newline$}
-{$newline$}
-{$newline$}
&
100%{$newline$}
checkmark{$newline$}
checkmark{$newline$}
\
hline
end{tabular}
label{table1}
end{table}
end{document}
However, as shown in the figure below there are empty spaces (highlighted in yellow). I am just wondering if there is a way to remove those extra lines from the table?
I am happy to provide any other details if needed :)
This question already has an answer here:
Removing extra space after itemize environment in longtable in memoir
3 answers
tables
tables
New contributor
New contributor
edited Jan 17 at 19:56
ShreevatsaR
27.3k87199
27.3k87199
New contributor
asked Jan 17 at 4:58
EmiEmi
425
425
New contributor
New contributor
marked as duplicate by Henri Menke, Stefan Pinnow, flav, Andrew Swann, dexteritas Jan 17 at 7:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Henri Menke, Stefan Pinnow, flav, Andrew Swann, dexteritas Jan 17 at 7:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Can you please provide us with a compilable document? When I compile your table with preambledocumentclass[12pt]{article} usepackage{amssymb}
I do not get such large spaces,
– marmot
Jan 17 at 5:05
@marmot I am using the following document classdocumentclass[acmsmall]{acmart}
– Emi
Jan 17 at 5:27
Please add this (as well asbegin{document}
andend{document}
) to your above code such that people have a complete example to play with.
– marmot
Jan 17 at 5:29
@marmot Sure, I will add those details. By the way I am getting the same output in the following documentclasses as well;documentclass[smallextended]{svjour3}
anddocumentclass[jou,apacite]{apa6}
– Emi
Jan 17 at 5:33
OK, thanks! I have another question (not that I could immediately answer it). Do you want the check marks and - be vertically aligned, i.e. at the same height, as the bullets ofitemize
? You might want to use e.g. this answer instead of itemize, this would also solve the vertical space problem.
– marmot
Jan 17 at 5:36
|
show 1 more comment
Can you please provide us with a compilable document? When I compile your table with preambledocumentclass[12pt]{article} usepackage{amssymb}
I do not get such large spaces,
– marmot
Jan 17 at 5:05
@marmot I am using the following document classdocumentclass[acmsmall]{acmart}
– Emi
Jan 17 at 5:27
Please add this (as well asbegin{document}
andend{document}
) to your above code such that people have a complete example to play with.
– marmot
Jan 17 at 5:29
@marmot Sure, I will add those details. By the way I am getting the same output in the following documentclasses as well;documentclass[smallextended]{svjour3}
anddocumentclass[jou,apacite]{apa6}
– Emi
Jan 17 at 5:33
OK, thanks! I have another question (not that I could immediately answer it). Do you want the check marks and - be vertically aligned, i.e. at the same height, as the bullets ofitemize
? You might want to use e.g. this answer instead of itemize, this would also solve the vertical space problem.
– marmot
Jan 17 at 5:36
Can you please provide us with a compilable document? When I compile your table with preamble
documentclass[12pt]{article} usepackage{amssymb}
I do not get such large spaces,– marmot
Jan 17 at 5:05
Can you please provide us with a compilable document? When I compile your table with preamble
documentclass[12pt]{article} usepackage{amssymb}
I do not get such large spaces,– marmot
Jan 17 at 5:05
@marmot I am using the following document class
documentclass[acmsmall]{acmart}
– Emi
Jan 17 at 5:27
@marmot I am using the following document class
documentclass[acmsmall]{acmart}
– Emi
Jan 17 at 5:27
Please add this (as well as
begin{document}
and end{document}
) to your above code such that people have a complete example to play with.– marmot
Jan 17 at 5:29
Please add this (as well as
begin{document}
and end{document}
) to your above code such that people have a complete example to play with.– marmot
Jan 17 at 5:29
@marmot Sure, I will add those details. By the way I am getting the same output in the following documentclasses as well;
documentclass[smallextended]{svjour3}
and documentclass[jou,apacite]{apa6}
– Emi
Jan 17 at 5:33
@marmot Sure, I will add those details. By the way I am getting the same output in the following documentclasses as well;
documentclass[smallextended]{svjour3}
and documentclass[jou,apacite]{apa6}
– Emi
Jan 17 at 5:33
OK, thanks! I have another question (not that I could immediately answer it). Do you want the check marks and - be vertically aligned, i.e. at the same height, as the bullets of
itemize
? You might want to use e.g. this answer instead of itemize, this would also solve the vertical space problem.– marmot
Jan 17 at 5:36
OK, thanks! I have another question (not that I could immediately answer it). Do you want the check marks and - be vertically aligned, i.e. at the same height, as the bullets of
itemize
? You might want to use e.g. this answer instead of itemize, this would also solve the vertical space problem.– marmot
Jan 17 at 5:36
|
show 1 more comment
2 Answers
2
active
oldest
votes
Put vspace*{-baselineskip}
after each itemize and remove the last {$newline$}
of each column.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
0%{$newline$}
-{$newline$}
-
&
100%{$newline$}
checkmark{$newline$}
checkmark
\
hline
end{tabular}
label{table1}
end{table}
end{document}
Here is a proposal how to format this table in a bit more appealing manner.
documentclass[acmsmall]{acmart}
usepackage{booktabs}
begin{document}
begin{table}[!t]
caption{Some text}
centering
begin{tabular}{@{}lcc@{}}
toprule
textbf{Some text} & textbf{Some text} & textbf{Some text} \
midrule
textbf{Some text:} & 43% & 57% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text} & 25% & 75% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text:} & 0% & 100% \
Some text & --- & checkmark \
Some text & --- & checkmark \
bottomrule
end{tabular}
label{table1}
end{table}
end{document}
add a comment |
Two suggestions:
Encase each
itemize
environment in a top-alignedminipage
environmentomit the final
{$newline$}
directive in each group
Optional: remove the instruction renewcommand{arraystretch}{1.3}
and add setlengthextrarowheight{2pt}
.
documentclass[acmsmall]{acmart}
usepackage{array}
%usepackage{enumitem}
%setlist[itemize]{nosep}
begin{document}
begin{table}[!t]
%renewcommand{arraystretch}{1.3}
setlengthextrarowheight{2pt}
caption{Some text}
label{table1}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text}
\ hline
%% 1st group
textbf{Some text:} & 43% & 57% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 2nd group
textbf{Some text} & 25% & 75%\
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 3rd group
textbf{Some text:} & 0% & 100% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
end{itemize}
end{minipage}
&
--{$newline$}
--%{$newline$}
&
checkmark{$newline$}
checkmark%{$newline$}
\ hline
end{tabular}
end{table}
end{document}
1
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Put vspace*{-baselineskip}
after each itemize and remove the last {$newline$}
of each column.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
0%{$newline$}
-{$newline$}
-
&
100%{$newline$}
checkmark{$newline$}
checkmark
\
hline
end{tabular}
label{table1}
end{table}
end{document}
Here is a proposal how to format this table in a bit more appealing manner.
documentclass[acmsmall]{acmart}
usepackage{booktabs}
begin{document}
begin{table}[!t]
caption{Some text}
centering
begin{tabular}{@{}lcc@{}}
toprule
textbf{Some text} & textbf{Some text} & textbf{Some text} \
midrule
textbf{Some text:} & 43% & 57% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text} & 25% & 75% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text:} & 0% & 100% \
Some text & --- & checkmark \
Some text & --- & checkmark \
bottomrule
end{tabular}
label{table1}
end{table}
end{document}
add a comment |
Put vspace*{-baselineskip}
after each itemize and remove the last {$newline$}
of each column.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
0%{$newline$}
-{$newline$}
-
&
100%{$newline$}
checkmark{$newline$}
checkmark
\
hline
end{tabular}
label{table1}
end{table}
end{document}
Here is a proposal how to format this table in a bit more appealing manner.
documentclass[acmsmall]{acmart}
usepackage{booktabs}
begin{document}
begin{table}[!t]
caption{Some text}
centering
begin{tabular}{@{}lcc@{}}
toprule
textbf{Some text} & textbf{Some text} & textbf{Some text} \
midrule
textbf{Some text:} & 43% & 57% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text} & 25% & 75% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text:} & 0% & 100% \
Some text & --- & checkmark \
Some text & --- & checkmark \
bottomrule
end{tabular}
label{table1}
end{table}
end{document}
add a comment |
Put vspace*{-baselineskip}
after each itemize and remove the last {$newline$}
of each column.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
0%{$newline$}
-{$newline$}
-
&
100%{$newline$}
checkmark{$newline$}
checkmark
\
hline
end{tabular}
label{table1}
end{table}
end{document}
Here is a proposal how to format this table in a bit more appealing manner.
documentclass[acmsmall]{acmart}
usepackage{booktabs}
begin{document}
begin{table}[!t]
caption{Some text}
centering
begin{tabular}{@{}lcc@{}}
toprule
textbf{Some text} & textbf{Some text} & textbf{Some text} \
midrule
textbf{Some text:} & 43% & 57% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text} & 25% & 75% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text:} & 0% & 100% \
Some text & --- & checkmark \
Some text & --- & checkmark \
bottomrule
end{tabular}
label{table1}
end{table}
end{document}
Put vspace*{-baselineskip}
after each itemize and remove the last {$newline$}
of each column.
documentclass[acmsmall]{acmart}
begin{document}
begin{table}[!t]
renewcommand{arraystretch}{1.3}
caption{Some text}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text} \
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
43%{$newline$}
checkmark{$newline$}
-{$newline$}
-
&
57%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
25%{$newline$}
checkmark{$newline$}
-{$newline$}
-{$newline$}
-
&
75%{$newline$}
-{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark
\
hline
textbf{Some text:}
begin{itemize}
item Some text
item Some text
end{itemize}
vspace*{-baselineskip}
&
0%{$newline$}
-{$newline$}
-
&
100%{$newline$}
checkmark{$newline$}
checkmark
\
hline
end{tabular}
label{table1}
end{table}
end{document}
Here is a proposal how to format this table in a bit more appealing manner.
documentclass[acmsmall]{acmart}
usepackage{booktabs}
begin{document}
begin{table}[!t]
caption{Some text}
centering
begin{tabular}{@{}lcc@{}}
toprule
textbf{Some text} & textbf{Some text} & textbf{Some text} \
midrule
textbf{Some text:} & 43% & 57% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text} & 25% & 75% \
Some text & checkmark & --- \
Some text & --- & checkmark \
Some text & --- & checkmark \
Some text & --- & checkmark \
addlinespace
textbf{Some text:} & 0% & 100% \
Some text & --- & checkmark \
Some text & --- & checkmark \
bottomrule
end{tabular}
label{table1}
end{table}
end{document}
edited Jan 17 at 5:52
answered Jan 17 at 5:44
Henri MenkeHenri Menke
71.4k8158266
71.4k8158266
add a comment |
add a comment |
Two suggestions:
Encase each
itemize
environment in a top-alignedminipage
environmentomit the final
{$newline$}
directive in each group
Optional: remove the instruction renewcommand{arraystretch}{1.3}
and add setlengthextrarowheight{2pt}
.
documentclass[acmsmall]{acmart}
usepackage{array}
%usepackage{enumitem}
%setlist[itemize]{nosep}
begin{document}
begin{table}[!t]
%renewcommand{arraystretch}{1.3}
setlengthextrarowheight{2pt}
caption{Some text}
label{table1}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text}
\ hline
%% 1st group
textbf{Some text:} & 43% & 57% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 2nd group
textbf{Some text} & 25% & 75%\
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 3rd group
textbf{Some text:} & 0% & 100% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
end{itemize}
end{minipage}
&
--{$newline$}
--%{$newline$}
&
checkmark{$newline$}
checkmark%{$newline$}
\ hline
end{tabular}
end{table}
end{document}
1
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
add a comment |
Two suggestions:
Encase each
itemize
environment in a top-alignedminipage
environmentomit the final
{$newline$}
directive in each group
Optional: remove the instruction renewcommand{arraystretch}{1.3}
and add setlengthextrarowheight{2pt}
.
documentclass[acmsmall]{acmart}
usepackage{array}
%usepackage{enumitem}
%setlist[itemize]{nosep}
begin{document}
begin{table}[!t]
%renewcommand{arraystretch}{1.3}
setlengthextrarowheight{2pt}
caption{Some text}
label{table1}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text}
\ hline
%% 1st group
textbf{Some text:} & 43% & 57% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 2nd group
textbf{Some text} & 25% & 75%\
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 3rd group
textbf{Some text:} & 0% & 100% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
end{itemize}
end{minipage}
&
--{$newline$}
--%{$newline$}
&
checkmark{$newline$}
checkmark%{$newline$}
\ hline
end{tabular}
end{table}
end{document}
1
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
add a comment |
Two suggestions:
Encase each
itemize
environment in a top-alignedminipage
environmentomit the final
{$newline$}
directive in each group
Optional: remove the instruction renewcommand{arraystretch}{1.3}
and add setlengthextrarowheight{2pt}
.
documentclass[acmsmall]{acmart}
usepackage{array}
%usepackage{enumitem}
%setlist[itemize]{nosep}
begin{document}
begin{table}[!t]
%renewcommand{arraystretch}{1.3}
setlengthextrarowheight{2pt}
caption{Some text}
label{table1}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text}
\ hline
%% 1st group
textbf{Some text:} & 43% & 57% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 2nd group
textbf{Some text} & 25% & 75%\
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 3rd group
textbf{Some text:} & 0% & 100% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
end{itemize}
end{minipage}
&
--{$newline$}
--%{$newline$}
&
checkmark{$newline$}
checkmark%{$newline$}
\ hline
end{tabular}
end{table}
end{document}
Two suggestions:
Encase each
itemize
environment in a top-alignedminipage
environmentomit the final
{$newline$}
directive in each group
Optional: remove the instruction renewcommand{arraystretch}{1.3}
and add setlengthextrarowheight{2pt}
.
documentclass[acmsmall]{acmart}
usepackage{array}
%usepackage{enumitem}
%setlist[itemize]{nosep}
begin{document}
begin{table}[!t]
%renewcommand{arraystretch}{1.3}
setlengthextrarowheight{2pt}
caption{Some text}
label{table1}
centering
begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|}
hline
textbf{Some text} & textbf{Some text} & textbf{Some text}
\ hline
%% 1st group
textbf{Some text:} & 43% & 57% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 2nd group
textbf{Some text} & 25% & 75%\
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
item Some text
item Some text
end{itemize}
end{minipage}
&
checkmark{$newline$}
--{$newline$}
--{$newline$}
--%{$newline$}
&
--{$newline$}
checkmark{$newline$}
checkmark{$newline$}
checkmark%{$newline$}
\ hline
%% 3rd group
textbf{Some text:} & 0% & 100% \
begin{minipage}[t]{hsize}
begin{itemize}
item Some text
item Some text
end{itemize}
end{minipage}
&
--{$newline$}
--%{$newline$}
&
checkmark{$newline$}
checkmark%{$newline$}
\ hline
end{tabular}
end{table}
end{document}
answered Jan 17 at 5:56
MicoMico
275k30373761
275k30373761
1
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
add a comment |
1
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
1
1
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
Nice answer. I really like it. Thank you. :)
– Emi
Jan 17 at 6:21
add a comment |
Can you please provide us with a compilable document? When I compile your table with preamble
documentclass[12pt]{article} usepackage{amssymb}
I do not get such large spaces,– marmot
Jan 17 at 5:05
@marmot I am using the following document class
documentclass[acmsmall]{acmart}
– Emi
Jan 17 at 5:27
Please add this (as well as
begin{document}
andend{document}
) to your above code such that people have a complete example to play with.– marmot
Jan 17 at 5:29
@marmot Sure, I will add those details. By the way I am getting the same output in the following documentclasses as well;
documentclass[smallextended]{svjour3}
anddocumentclass[jou,apacite]{apa6}
– Emi
Jan 17 at 5:33
OK, thanks! I have another question (not that I could immediately answer it). Do you want the check marks and - be vertically aligned, i.e. at the same height, as the bullets of
itemize
? You might want to use e.g. this answer instead of itemize, this would also solve the vertical space problem.– marmot
Jan 17 at 5:36