Table column width distribution












1















I got the following table:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{pbox}

title{Skills Matrix}
author{Raphael Fritz}
date{February 2019}

begin{document}

begin{table}[h]
begin{tabularx}{textwidth}{|l|X|X|}
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of newline experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}

end{document}


It looks like this



enter image description here



The second column does not need that much space. The last does need more space. Why are the second and third distributed equally? How can I change that?



And how do I get my table to full width of my paper?










share|improve this question























  • You are asking for equally wide columns by making both X type (that means: the remaining space after regular columns is equally distributed among them). To make your table full paper width, you could reduce the margins.

    – TeXnician
    Feb 22 at 13:12











  • @TeXnician Thank you. The problem is, that When not using X at the second column I can't do this line break.

    – texNewbie
    Feb 22 at 13:14











  • Use e.g. p{4cm}.

    – TeXnician
    Feb 22 at 13:19
















1















I got the following table:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{pbox}

title{Skills Matrix}
author{Raphael Fritz}
date{February 2019}

begin{document}

begin{table}[h]
begin{tabularx}{textwidth}{|l|X|X|}
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of newline experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}

end{document}


It looks like this



enter image description here



The second column does not need that much space. The last does need more space. Why are the second and third distributed equally? How can I change that?



And how do I get my table to full width of my paper?










share|improve this question























  • You are asking for equally wide columns by making both X type (that means: the remaining space after regular columns is equally distributed among them). To make your table full paper width, you could reduce the margins.

    – TeXnician
    Feb 22 at 13:12











  • @TeXnician Thank you. The problem is, that When not using X at the second column I can't do this line break.

    – texNewbie
    Feb 22 at 13:14











  • Use e.g. p{4cm}.

    – TeXnician
    Feb 22 at 13:19














1












1








1








I got the following table:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{pbox}

title{Skills Matrix}
author{Raphael Fritz}
date{February 2019}

begin{document}

begin{table}[h]
begin{tabularx}{textwidth}{|l|X|X|}
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of newline experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}

end{document}


It looks like this



enter image description here



The second column does not need that much space. The last does need more space. Why are the second and third distributed equally? How can I change that?



And how do I get my table to full width of my paper?










share|improve this question














I got the following table:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{pbox}

title{Skills Matrix}
author{Raphael Fritz}
date{February 2019}

begin{document}

begin{table}[h]
begin{tabularx}{textwidth}{|l|X|X|}
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of newline experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}

end{document}


It looks like this



enter image description here



The second column does not need that much space. The last does need more space. Why are the second and third distributed equally? How can I change that?



And how do I get my table to full width of my paper?







tabularx






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 22 at 13:05









texNewbietexNewbie

381129




381129













  • You are asking for equally wide columns by making both X type (that means: the remaining space after regular columns is equally distributed among them). To make your table full paper width, you could reduce the margins.

    – TeXnician
    Feb 22 at 13:12











  • @TeXnician Thank you. The problem is, that When not using X at the second column I can't do this line break.

    – texNewbie
    Feb 22 at 13:14











  • Use e.g. p{4cm}.

    – TeXnician
    Feb 22 at 13:19



















  • You are asking for equally wide columns by making both X type (that means: the remaining space after regular columns is equally distributed among them). To make your table full paper width, you could reduce the margins.

    – TeXnician
    Feb 22 at 13:12











  • @TeXnician Thank you. The problem is, that When not using X at the second column I can't do this line break.

    – texNewbie
    Feb 22 at 13:14











  • Use e.g. p{4cm}.

    – TeXnician
    Feb 22 at 13:19

















You are asking for equally wide columns by making both X type (that means: the remaining space after regular columns is equally distributed among them). To make your table full paper width, you could reduce the margins.

– TeXnician
Feb 22 at 13:12





You are asking for equally wide columns by making both X type (that means: the remaining space after regular columns is equally distributed among them). To make your table full paper width, you could reduce the margins.

– TeXnician
Feb 22 at 13:12













@TeXnician Thank you. The problem is, that When not using X at the second column I can't do this line break.

– texNewbie
Feb 22 at 13:14





@TeXnician Thank you. The problem is, that When not using X at the second column I can't do this line break.

– texNewbie
Feb 22 at 13:14













Use e.g. p{4cm}.

– TeXnician
Feb 22 at 13:19





Use e.g. p{4cm}.

– TeXnician
Feb 22 at 13:19










1 Answer
1






active

oldest

votes


















1














see, if this can help you:



documentclass{article}
usepackage{tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % <--

begin{document}
begin{table}[ht] % <--
begin{tabularx}{textwidth}{|l|>{hsize=0.6hsize}L| % <--
>{hsize=1.4hsize}L|} % <--
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}
end{document}


enter image description here






share|improve this answer





















  • 1





    when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

    – Bernard
    Feb 22 at 14:11











  • @Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

    – Zarko
    Feb 22 at 14:30








  • 1





    I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

    – Bernard
    Feb 22 at 14:44













  • @Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

    – Mico
    Feb 22 at 15:03











  • thank you boths. i correct answer accordingly.

    – Zarko
    Feb 22 at 16:34











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%2f476160%2ftable-column-width-distribution%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














see, if this can help you:



documentclass{article}
usepackage{tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % <--

begin{document}
begin{table}[ht] % <--
begin{tabularx}{textwidth}{|l|>{hsize=0.6hsize}L| % <--
>{hsize=1.4hsize}L|} % <--
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}
end{document}


enter image description here






share|improve this answer





















  • 1





    when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

    – Bernard
    Feb 22 at 14:11











  • @Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

    – Zarko
    Feb 22 at 14:30








  • 1





    I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

    – Bernard
    Feb 22 at 14:44













  • @Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

    – Mico
    Feb 22 at 15:03











  • thank you boths. i correct answer accordingly.

    – Zarko
    Feb 22 at 16:34
















1














see, if this can help you:



documentclass{article}
usepackage{tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % <--

begin{document}
begin{table}[ht] % <--
begin{tabularx}{textwidth}{|l|>{hsize=0.6hsize}L| % <--
>{hsize=1.4hsize}L|} % <--
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}
end{document}


enter image description here






share|improve this answer





















  • 1





    when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

    – Bernard
    Feb 22 at 14:11











  • @Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

    – Zarko
    Feb 22 at 14:30








  • 1





    I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

    – Bernard
    Feb 22 at 14:44













  • @Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

    – Mico
    Feb 22 at 15:03











  • thank you boths. i correct answer accordingly.

    – Zarko
    Feb 22 at 16:34














1












1








1







see, if this can help you:



documentclass{article}
usepackage{tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % <--

begin{document}
begin{table}[ht] % <--
begin{tabularx}{textwidth}{|l|>{hsize=0.6hsize}L| % <--
>{hsize=1.4hsize}L|} % <--
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}
end{document}


enter image description here






share|improve this answer















see, if this can help you:



documentclass{article}
usepackage{tabularx}
newcolumntype{L}{>{raggedrightarraybackslash}X} % <--

begin{document}
begin{table}[ht] % <--
begin{tabularx}{textwidth}{|l|>{hsize=0.6hsize}L| % <--
>{hsize=1.4hsize}L|} % <--
hline
multicolumn{3}{|l|}{textbf{Programming Languages}} \ hline
Skill & Degree of experience footnote{test} & Commentary \ hline
Java & 3 & this is a very long text and it needs much space in here \ hline hline
multicolumn{3}{|l|}{textbf{test titel 2}} \ hline
Skill & Degree of newline experience & Commentary \ hline
end{tabularx}
end{table}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 22 at 16:34

























answered Feb 22 at 13:58









ZarkoZarko

126k867164




126k867164








  • 1





    when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

    – Bernard
    Feb 22 at 14:11











  • @Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

    – Zarko
    Feb 22 at 14:30








  • 1





    I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

    – Bernard
    Feb 22 at 14:44













  • @Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

    – Mico
    Feb 22 at 15:03











  • thank you boths. i correct answer accordingly.

    – Zarko
    Feb 22 at 16:34














  • 1





    when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

    – Bernard
    Feb 22 at 14:11











  • @Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

    – Zarko
    Feb 22 at 14:30








  • 1





    I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

    – Bernard
    Feb 22 at 14:44













  • @Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

    – Mico
    Feb 22 at 15:03











  • thank you boths. i correct answer accordingly.

    – Zarko
    Feb 22 at 16:34








1




1





when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

– Bernard
Feb 22 at 14:11





when using hsize=..., you forgot the sum of the coefficients should be the number of columns; so to obtain the same ratio, they should be 0.6 and 1.4.

– Bernard
Feb 22 at 14:11













@Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

– Zarko
Feb 22 at 14:30







@Bernard, your suggestion works, however, in tabularx documentation this not mentioned. from description: "Make sure that the sum of the widths of all the X columns is unchanged. (In the above example, the new widths still add up to twice the default width, the same as two standard X columns.)" i don't understand that one need to obey the rule noted in your comment. but it might be that i'm wrong.

– Zarko
Feb 22 at 14:30






1




1





I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

– Bernard
Feb 22 at 14:44







I think that what's in the parenthesis explicits the rule: if you have 2 (ordinary) X columns hence 2 hsizes, and If you use hsize=..., you have to ensure the total of coefficients will still make 2 ihsizes in all. At least that's my interpretation.

– Bernard
Feb 22 at 14:44















@Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

– Mico
Feb 22 at 15:03





@Zarko - If the relative widths of the two X columns form the ratio 0.3:0.7, then their hsizes must be 0.6 and 1.4, respectively. The sum of the hsize values must equal the number of columns of type X.

– Mico
Feb 22 at 15:03













thank you boths. i correct answer accordingly.

– Zarko
Feb 22 at 16:34





thank you boths. i correct answer accordingly.

– Zarko
Feb 22 at 16:34


















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%2f476160%2ftable-column-width-distribution%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

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?