Better margins in tabular's cells containing math-mode












2















I have this code



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


It produces this:





As you can see, the margins in the cells are way too small. We can even say it's non existent, so it's really hard to see the brackets ([)



How can I increase the margins?










share|improve this question

























  • Have a look at tex.stackexchange.com/a/159260/156344.

    – JouleV
    Mar 15 at 14:26
















2















I have this code



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


It produces this:





As you can see, the margins in the cells are way too small. We can even say it's non existent, so it's really hard to see the brackets ([)



How can I increase the margins?










share|improve this question

























  • Have a look at tex.stackexchange.com/a/159260/156344.

    – JouleV
    Mar 15 at 14:26














2












2








2


1






I have this code



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


It produces this:





As you can see, the margins in the cells are way too small. We can even say it's non existent, so it's really hard to see the brackets ([)



How can I increase the margins?










share|improve this question
















I have this code



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


It produces this:





As you can see, the margins in the cells are way too small. We can even say it's non existent, so it's really hard to see the brackets ([)



How can I increase the margins?







tables math-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 15 at 14:28







Vinccool96

















asked Mar 15 at 14:15









Vinccool96Vinccool96

36210




36210













  • Have a look at tex.stackexchange.com/a/159260/156344.

    – JouleV
    Mar 15 at 14:26



















  • Have a look at tex.stackexchange.com/a/159260/156344.

    – JouleV
    Mar 15 at 14:26

















Have a look at tex.stackexchange.com/a/159260/156344.

– JouleV
Mar 15 at 14:26





Have a look at tex.stackexchange.com/a/159260/156344.

– JouleV
Mar 15 at 14:26










2 Answers
2






active

oldest

votes


















2














In this case a simple arraystretch redefinition suffices.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}
begin{document}
begin{table}[htp]
renewcommandarraystretch{1.3}
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here



ORIGINAL APPROACH



I just added a >{} directive to a column that adds a strut that has been padded by 2pt above and below. Requires array package for the >-directive functionality, and stackengine to pad the strut by 2pt.



However, the OP noted that this approach combined with the multirow causes the first column to not be vertically centered.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{array,multirow,stackengine}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|>{addstackgap[2pt]{strut}}l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer


























  • The "Material costs" and "Labor costs" aren't centered anymore.

    – Vinccool96
    Mar 15 at 14:38











  • @Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

    – Steven B. Segletes
    Mar 15 at 14:41











  • @Vinccool96 See revision

    – Steven B. Segletes
    Mar 15 at 14:44



















2














Another possibility with cellspace, which defines a minimal vertical padding for cells in columns with specifier prefixed with the letter S (or C if you load siunitx):



documentclass[utf8]{article}
usepackage{multirow}
usepackage{amsmath}
usepackage{cellspace}
setlength{cellspacetoplimit}{4pt}
setlength{cellspacebottomlimit}{3pt}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|>{$}Sc<{$}|>{$}Sc<{$}|}
hline
& text{Weighting} & text{Cost ($)} \ hline
multirow{5}{*}[-12pt]{Material costs} & 0 & [10000, infty[ \ cline{2-3}
& 1.25 & [7500, 10000[ \ cline{2-3}
& 2.5 & [5000, 7500[ \ cline{2-3}
& 3.75 & [2500, 5000[ \ cline{2-3}
& 5 & [0,2500[ \ hline
multirow{5}{*}[-12pt]{Labor costs} & 0 & [40000, infty[ \ cline{2-3}
& 1.25 & [30000, 40000[ \ cline{2-3}
& 2.5 & [20000, 30000[ \ cline{2-3}
& 3.75 & [10000, 20000[ \ cline{2-3}
& 5 & [0,10000[ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer


























  • Another clipboard manager accident… Fixed. Thank you so much!

    – Bernard
    Mar 15 at 18:01











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479640%2fbetter-margins-in-tabulars-cells-containing-math-mode%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














In this case a simple arraystretch redefinition suffices.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}
begin{document}
begin{table}[htp]
renewcommandarraystretch{1.3}
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here



ORIGINAL APPROACH



I just added a >{} directive to a column that adds a strut that has been padded by 2pt above and below. Requires array package for the >-directive functionality, and stackengine to pad the strut by 2pt.



However, the OP noted that this approach combined with the multirow causes the first column to not be vertically centered.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{array,multirow,stackengine}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|>{addstackgap[2pt]{strut}}l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer


























  • The "Material costs" and "Labor costs" aren't centered anymore.

    – Vinccool96
    Mar 15 at 14:38











  • @Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

    – Steven B. Segletes
    Mar 15 at 14:41











  • @Vinccool96 See revision

    – Steven B. Segletes
    Mar 15 at 14:44
















2














In this case a simple arraystretch redefinition suffices.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}
begin{document}
begin{table}[htp]
renewcommandarraystretch{1.3}
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here



ORIGINAL APPROACH



I just added a >{} directive to a column that adds a strut that has been padded by 2pt above and below. Requires array package for the >-directive functionality, and stackengine to pad the strut by 2pt.



However, the OP noted that this approach combined with the multirow causes the first column to not be vertically centered.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{array,multirow,stackengine}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|>{addstackgap[2pt]{strut}}l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer


























  • The "Material costs" and "Labor costs" aren't centered anymore.

    – Vinccool96
    Mar 15 at 14:38











  • @Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

    – Steven B. Segletes
    Mar 15 at 14:41











  • @Vinccool96 See revision

    – Steven B. Segletes
    Mar 15 at 14:44














2












2








2







In this case a simple arraystretch redefinition suffices.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}
begin{document}
begin{table}[htp]
renewcommandarraystretch{1.3}
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here



ORIGINAL APPROACH



I just added a >{} directive to a column that adds a strut that has been padded by 2pt above and below. Requires array package for the >-directive functionality, and stackengine to pad the strut by 2pt.



However, the OP noted that this approach combined with the multirow causes the first column to not be vertically centered.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{array,multirow,stackengine}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|>{addstackgap[2pt]{strut}}l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer















In this case a simple arraystretch redefinition suffices.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{multirow}
begin{document}
begin{table}[htp]
renewcommandarraystretch{1.3}
centering
begin{tabular}{|l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here



ORIGINAL APPROACH



I just added a >{} directive to a column that adds a strut that has been padded by 2pt above and below. Requires array package for the >-directive functionality, and stackengine to pad the strut by 2pt.



However, the OP noted that this approach combined with the multirow causes the first column to not be vertically centered.



% !TeX encoding = UTF-8

documentclass[utf8]{article}
usepackage{array,multirow,stackengine}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|>{addstackgap[2pt]{strut}}l|c|c|}
hline
& Weighting & Cost ($) \ hline
multirow{5}{*}{Material costs} & 0 & $[10000,,infty[$ \ cline{2-3}
& 1.25 & $[7500,,10000[$ \ cline{2-3}
& 2.5 & $[5000,,7500[$ \ cline{2-3}
& 3.75 & $[2500,,5000[$ \ cline{2-3}
& 5 & $[0,2500[$ \ hline
multirow{5}{*}{Labor costs} & 0 & $[40000,,infty[$ \ cline{2-3}
& 1.25 & $[30000,,40000[$ \ cline{2-3}
& 2.5 & $[20000,,30000[$ \ cline{2-3}
& 3.75 & $[10000,,20000[$ \ cline{2-3}
& 5 & $[0,10000[$ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 15 at 14:58









Vinccool96

36210




36210










answered Mar 15 at 14:31









Steven B. SegletesSteven B. Segletes

159k9204412




159k9204412













  • The "Material costs" and "Labor costs" aren't centered anymore.

    – Vinccool96
    Mar 15 at 14:38











  • @Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

    – Steven B. Segletes
    Mar 15 at 14:41











  • @Vinccool96 See revision

    – Steven B. Segletes
    Mar 15 at 14:44



















  • The "Material costs" and "Labor costs" aren't centered anymore.

    – Vinccool96
    Mar 15 at 14:38











  • @Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

    – Steven B. Segletes
    Mar 15 at 14:41











  • @Vinccool96 See revision

    – Steven B. Segletes
    Mar 15 at 14:44

















The "Material costs" and "Labor costs" aren't centered anymore.

– Vinccool96
Mar 15 at 14:38





The "Material costs" and "Labor costs" aren't centered anymore.

– Vinccool96
Mar 15 at 14:38













@Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

– Steven B. Segletes
Mar 15 at 14:41





@Vinccool96 You are right. Let me think on this one (I don't use a lot of multirow)

– Steven B. Segletes
Mar 15 at 14:41













@Vinccool96 See revision

– Steven B. Segletes
Mar 15 at 14:44





@Vinccool96 See revision

– Steven B. Segletes
Mar 15 at 14:44











2














Another possibility with cellspace, which defines a minimal vertical padding for cells in columns with specifier prefixed with the letter S (or C if you load siunitx):



documentclass[utf8]{article}
usepackage{multirow}
usepackage{amsmath}
usepackage{cellspace}
setlength{cellspacetoplimit}{4pt}
setlength{cellspacebottomlimit}{3pt}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|>{$}Sc<{$}|>{$}Sc<{$}|}
hline
& text{Weighting} & text{Cost ($)} \ hline
multirow{5}{*}[-12pt]{Material costs} & 0 & [10000, infty[ \ cline{2-3}
& 1.25 & [7500, 10000[ \ cline{2-3}
& 2.5 & [5000, 7500[ \ cline{2-3}
& 3.75 & [2500, 5000[ \ cline{2-3}
& 5 & [0,2500[ \ hline
multirow{5}{*}[-12pt]{Labor costs} & 0 & [40000, infty[ \ cline{2-3}
& 1.25 & [30000, 40000[ \ cline{2-3}
& 2.5 & [20000, 30000[ \ cline{2-3}
& 3.75 & [10000, 20000[ \ cline{2-3}
& 5 & [0,10000[ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer


























  • Another clipboard manager accident… Fixed. Thank you so much!

    – Bernard
    Mar 15 at 18:01
















2














Another possibility with cellspace, which defines a minimal vertical padding for cells in columns with specifier prefixed with the letter S (or C if you load siunitx):



documentclass[utf8]{article}
usepackage{multirow}
usepackage{amsmath}
usepackage{cellspace}
setlength{cellspacetoplimit}{4pt}
setlength{cellspacebottomlimit}{3pt}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|>{$}Sc<{$}|>{$}Sc<{$}|}
hline
& text{Weighting} & text{Cost ($)} \ hline
multirow{5}{*}[-12pt]{Material costs} & 0 & [10000, infty[ \ cline{2-3}
& 1.25 & [7500, 10000[ \ cline{2-3}
& 2.5 & [5000, 7500[ \ cline{2-3}
& 3.75 & [2500, 5000[ \ cline{2-3}
& 5 & [0,2500[ \ hline
multirow{5}{*}[-12pt]{Labor costs} & 0 & [40000, infty[ \ cline{2-3}
& 1.25 & [30000, 40000[ \ cline{2-3}
& 2.5 & [20000, 30000[ \ cline{2-3}
& 3.75 & [10000, 20000[ \ cline{2-3}
& 5 & [0,10000[ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer


























  • Another clipboard manager accident… Fixed. Thank you so much!

    – Bernard
    Mar 15 at 18:01














2












2








2







Another possibility with cellspace, which defines a minimal vertical padding for cells in columns with specifier prefixed with the letter S (or C if you load siunitx):



documentclass[utf8]{article}
usepackage{multirow}
usepackage{amsmath}
usepackage{cellspace}
setlength{cellspacetoplimit}{4pt}
setlength{cellspacebottomlimit}{3pt}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|>{$}Sc<{$}|>{$}Sc<{$}|}
hline
& text{Weighting} & text{Cost ($)} \ hline
multirow{5}{*}[-12pt]{Material costs} & 0 & [10000, infty[ \ cline{2-3}
& 1.25 & [7500, 10000[ \ cline{2-3}
& 2.5 & [5000, 7500[ \ cline{2-3}
& 3.75 & [2500, 5000[ \ cline{2-3}
& 5 & [0,2500[ \ hline
multirow{5}{*}[-12pt]{Labor costs} & 0 & [40000, infty[ \ cline{2-3}
& 1.25 & [30000, 40000[ \ cline{2-3}
& 2.5 & [20000, 30000[ \ cline{2-3}
& 3.75 & [10000, 20000[ \ cline{2-3}
& 5 & [0,10000[ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here






share|improve this answer















Another possibility with cellspace, which defines a minimal vertical padding for cells in columns with specifier prefixed with the letter S (or C if you load siunitx):



documentclass[utf8]{article}
usepackage{multirow}
usepackage{amsmath}
usepackage{cellspace}
setlength{cellspacetoplimit}{4pt}
setlength{cellspacebottomlimit}{3pt}

begin{document}
begin{table}[htp]
centering
begin{tabular}{|l|>{$}Sc<{$}|>{$}Sc<{$}|}
hline
& text{Weighting} & text{Cost ($)} \ hline
multirow{5}{*}[-12pt]{Material costs} & 0 & [10000, infty[ \ cline{2-3}
& 1.25 & [7500, 10000[ \ cline{2-3}
& 2.5 & [5000, 7500[ \ cline{2-3}
& 3.75 & [2500, 5000[ \ cline{2-3}
& 5 & [0,2500[ \ hline
multirow{5}{*}[-12pt]{Labor costs} & 0 & [40000, infty[ \ cline{2-3}
& 1.25 & [30000, 40000[ \ cline{2-3}
& 2.5 & [20000, 30000[ \ cline{2-3}
& 3.75 & [10000, 20000[ \ cline{2-3}
& 5 & [0,10000[ \
hline
end{tabular}
caption{Scale for the cost of the project}
label{tab:project_cost}
end{table}

end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 15 at 18:00

























answered Mar 15 at 17:40









BernardBernard

174k776206




174k776206













  • Another clipboard manager accident… Fixed. Thank you so much!

    – Bernard
    Mar 15 at 18:01



















  • Another clipboard manager accident… Fixed. Thank you so much!

    – Bernard
    Mar 15 at 18:01

















Another clipboard manager accident… Fixed. Thank you so much!

– Bernard
Mar 15 at 18:01





Another clipboard manager accident… Fixed. Thank you so much!

– Bernard
Mar 15 at 18:01


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479640%2fbetter-margins-in-tabulars-cells-containing-math-mode%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?