Is there a global variable that reflects the current preferred table column's width?Latex: rowcolor in...

If nine coins are tossed, what is the probability that the number of heads is even?

CBP Reminds Travelers to Allow 72 Hours for ESTA. Why?

Did 5.25" floppies undergo a change in magnetic coating?

How to add multiple differently colored borders around a node?

I can't die. Who am I?

Auto Insert date into Notepad

Why does the author believe that the central mass that gas cloud HCN-0.009-0.044 orbits is smaller than our solar system?

Equivalent to "source" in OpenBSD?

When was drinking water recognized as crucial in marathon running?

What to do when being responsible for data protection in your lab, yet advice is ignored?

How do ISS astronauts "get their stripes"?

Does music exist in Panem? And if so, what kinds of music?

What is better: yes / no radio, or simple checkbox?

Is my plan for fixing my water heater leak bad?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Sometimes a banana is just a banana

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

Can you use a beast's innate abilities while polymorphed?

Could quantum mechanics be necessary to analyze some biology scenarios?

How to properly claim credit for peer review?

Is there a German word for “analytics”?

Reason Why Dimensional Travelling Would be Restricted

Is there a frame of reference in which I was born before I was conceived?

Is there a better way to make addon working on both blender 2.80 and 2.79?



Is there a global variable that reflects the current preferred table column's width?


Latex: rowcolor in tabular not respecting table widthHow to center a text in a table?How do I prevent cellcolor from over effect of hlineWhy is my tabular wider than the sum of its columns’ widths?Table with variable-width columns, width decided based on row contenttable spanning only one column width in a multicol documentColumn widths inconsistent?Table Width Issue in {Tabular} & Table Column Width Adjustment Issue in {Tabu}Prevent spreading of words in: Left aligned, automatically wrapped text, in a tableHow to set longtable width to text width so that the text in cell wraps around automatically?













2















I wish to insert a (varwidth) box into a table cell, and I want the size of the box to be limited in width to whatever autosize that column would otherwise have, and for any text that I insert into the box to just wrap at that width.



I was initially hoping to be able to do something like



begin{tabular}{ccc}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
begin{varwidth}{columnwidth}
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
end{varwidth}
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}


Putting my varwidth minipage in the cell where I want to insert the text, but columnwidth seems to only reflect the width of a column with respect to how the pages are finally laid out, not the preferred width of an individual table column. Worse this example further causes the table to overflow past the right margin.



I apologize in advance if my requirements are unclear, but if any one has any specific questions, I will try to address them quickly and clarify the text of this question as appropriate.










share|improve this question

























  • So you know the width of the widest element in one specific column, and you want another element to not exceed this width? Is this an l, c or r column?

    – Werner
    16 hours ago











  • You could use sbox1{hbox{<Largest Column Item >} and then at the place you want to add the item parbox{wdsbox1}{hfil<Your item here>hfill}. Use hfil and hfill for centered item etc.

    – koleygr
    15 hours ago






  • 1





    questions are always clearer if you provide a complete small document showing the problem, normally multiline things are in a p column in which case linewidth is the answer. For l,c,r columns you could do do a two pass solution, or perhaps using tabularx X would meet the need, hard to say...

    – David Carlisle
    14 hours ago











  • @DavidCarlisle I've tried to give a more complete example of what I was hoping to do, but as this doesn't actually do what I want, I'm not sure how helpful it is at describing my intent.

    – Mark
    8 hours ago
















2















I wish to insert a (varwidth) box into a table cell, and I want the size of the box to be limited in width to whatever autosize that column would otherwise have, and for any text that I insert into the box to just wrap at that width.



I was initially hoping to be able to do something like



begin{tabular}{ccc}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
begin{varwidth}{columnwidth}
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
end{varwidth}
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}


Putting my varwidth minipage in the cell where I want to insert the text, but columnwidth seems to only reflect the width of a column with respect to how the pages are finally laid out, not the preferred width of an individual table column. Worse this example further causes the table to overflow past the right margin.



I apologize in advance if my requirements are unclear, but if any one has any specific questions, I will try to address them quickly and clarify the text of this question as appropriate.










share|improve this question

























  • So you know the width of the widest element in one specific column, and you want another element to not exceed this width? Is this an l, c or r column?

    – Werner
    16 hours ago











  • You could use sbox1{hbox{<Largest Column Item >} and then at the place you want to add the item parbox{wdsbox1}{hfil<Your item here>hfill}. Use hfil and hfill for centered item etc.

    – koleygr
    15 hours ago






  • 1





    questions are always clearer if you provide a complete small document showing the problem, normally multiline things are in a p column in which case linewidth is the answer. For l,c,r columns you could do do a two pass solution, or perhaps using tabularx X would meet the need, hard to say...

    – David Carlisle
    14 hours ago











  • @DavidCarlisle I've tried to give a more complete example of what I was hoping to do, but as this doesn't actually do what I want, I'm not sure how helpful it is at describing my intent.

    – Mark
    8 hours ago














2












2








2


1






I wish to insert a (varwidth) box into a table cell, and I want the size of the box to be limited in width to whatever autosize that column would otherwise have, and for any text that I insert into the box to just wrap at that width.



I was initially hoping to be able to do something like



begin{tabular}{ccc}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
begin{varwidth}{columnwidth}
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
end{varwidth}
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}


Putting my varwidth minipage in the cell where I want to insert the text, but columnwidth seems to only reflect the width of a column with respect to how the pages are finally laid out, not the preferred width of an individual table column. Worse this example further causes the table to overflow past the right margin.



I apologize in advance if my requirements are unclear, but if any one has any specific questions, I will try to address them quickly and clarify the text of this question as appropriate.










share|improve this question
















I wish to insert a (varwidth) box into a table cell, and I want the size of the box to be limited in width to whatever autosize that column would otherwise have, and for any text that I insert into the box to just wrap at that width.



I was initially hoping to be able to do something like



begin{tabular}{ccc}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
begin{varwidth}{columnwidth}
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
end{varwidth}
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}


Putting my varwidth minipage in the cell where I want to insert the text, but columnwidth seems to only reflect the width of a column with respect to how the pages are finally laid out, not the preferred width of an individual table column. Worse this example further causes the table to overflow past the right margin.



I apologize in advance if my requirements are unclear, but if any one has any specific questions, I will try to address them quickly and clarify the text of this question as appropriate.







tables width cell column-width






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago







Mark

















asked 16 hours ago









MarkMark

1284




1284













  • So you know the width of the widest element in one specific column, and you want another element to not exceed this width? Is this an l, c or r column?

    – Werner
    16 hours ago











  • You could use sbox1{hbox{<Largest Column Item >} and then at the place you want to add the item parbox{wdsbox1}{hfil<Your item here>hfill}. Use hfil and hfill for centered item etc.

    – koleygr
    15 hours ago






  • 1





    questions are always clearer if you provide a complete small document showing the problem, normally multiline things are in a p column in which case linewidth is the answer. For l,c,r columns you could do do a two pass solution, or perhaps using tabularx X would meet the need, hard to say...

    – David Carlisle
    14 hours ago











  • @DavidCarlisle I've tried to give a more complete example of what I was hoping to do, but as this doesn't actually do what I want, I'm not sure how helpful it is at describing my intent.

    – Mark
    8 hours ago



















  • So you know the width of the widest element in one specific column, and you want another element to not exceed this width? Is this an l, c or r column?

    – Werner
    16 hours ago











  • You could use sbox1{hbox{<Largest Column Item >} and then at the place you want to add the item parbox{wdsbox1}{hfil<Your item here>hfill}. Use hfil and hfill for centered item etc.

    – koleygr
    15 hours ago






  • 1





    questions are always clearer if you provide a complete small document showing the problem, normally multiline things are in a p column in which case linewidth is the answer. For l,c,r columns you could do do a two pass solution, or perhaps using tabularx X would meet the need, hard to say...

    – David Carlisle
    14 hours ago











  • @DavidCarlisle I've tried to give a more complete example of what I was hoping to do, but as this doesn't actually do what I want, I'm not sure how helpful it is at describing my intent.

    – Mark
    8 hours ago

















So you know the width of the widest element in one specific column, and you want another element to not exceed this width? Is this an l, c or r column?

– Werner
16 hours ago





So you know the width of the widest element in one specific column, and you want another element to not exceed this width? Is this an l, c or r column?

– Werner
16 hours ago













You could use sbox1{hbox{<Largest Column Item >} and then at the place you want to add the item parbox{wdsbox1}{hfil<Your item here>hfill}. Use hfil and hfill for centered item etc.

– koleygr
15 hours ago





You could use sbox1{hbox{<Largest Column Item >} and then at the place you want to add the item parbox{wdsbox1}{hfil<Your item here>hfill}. Use hfil and hfill for centered item etc.

– koleygr
15 hours ago




1




1





questions are always clearer if you provide a complete small document showing the problem, normally multiline things are in a p column in which case linewidth is the answer. For l,c,r columns you could do do a two pass solution, or perhaps using tabularx X would meet the need, hard to say...

– David Carlisle
14 hours ago





questions are always clearer if you provide a complete small document showing the problem, normally multiline things are in a p column in which case linewidth is the answer. For l,c,r columns you could do do a two pass solution, or perhaps using tabularx X would meet the need, hard to say...

– David Carlisle
14 hours ago













@DavidCarlisle I've tried to give a more complete example of what I was hoping to do, but as this doesn't actually do what I want, I'm not sure how helpful it is at describing my intent.

– Mark
8 hours ago





@DavidCarlisle I've tried to give a more complete example of what I was hoping to do, but as this doesn't actually do what I want, I'm not sure how helpful it is at describing my intent.

– Mark
8 hours ago










1 Answer
1






active

oldest

votes


















0














The following is not really automatic as you have to determine the widest entry manually, but might give you something close to what you described:



documentclass{article}
usepackage{calc}
usepackage{ragged2e}
usepackage{array}
newcolumntype{C}[1]{>{Centeringarraybackslashhspace{0pt}}p{#1}}
begin{document}

begin{tabular}{cC{widthof{some other stuff}}c}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}

end{document}





share|improve this answer
























  • Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

    – Mark
    7 hours ago











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%2f477642%2fis-there-a-global-variable-that-reflects-the-current-preferred-table-columns-wi%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









0














The following is not really automatic as you have to determine the widest entry manually, but might give you something close to what you described:



documentclass{article}
usepackage{calc}
usepackage{ragged2e}
usepackage{array}
newcolumntype{C}[1]{>{Centeringarraybackslashhspace{0pt}}p{#1}}
begin{document}

begin{tabular}{cC{widthof{some other stuff}}c}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}

end{document}





share|improve this answer
























  • Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

    – Mark
    7 hours ago
















0














The following is not really automatic as you have to determine the widest entry manually, but might give you something close to what you described:



documentclass{article}
usepackage{calc}
usepackage{ragged2e}
usepackage{array}
newcolumntype{C}[1]{>{Centeringarraybackslashhspace{0pt}}p{#1}}
begin{document}

begin{tabular}{cC{widthof{some other stuff}}c}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}

end{document}





share|improve this answer
























  • Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

    – Mark
    7 hours ago














0












0








0







The following is not really automatic as you have to determine the widest entry manually, but might give you something close to what you described:



documentclass{article}
usepackage{calc}
usepackage{ragged2e}
usepackage{array}
newcolumntype{C}[1]{>{Centeringarraybackslashhspace{0pt}}p{#1}}
begin{document}

begin{tabular}{cC{widthof{some other stuff}}c}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}

end{document}





share|improve this answer













The following is not really automatic as you have to determine the widest entry manually, but might give you something close to what you described:



documentclass{article}
usepackage{calc}
usepackage{ragged2e}
usepackage{array}
newcolumntype{C}[1]{>{Centeringarraybackslashhspace{0pt}}p{#1}}
begin{document}

begin{tabular}{cC{widthof{some other stuff}}c}
Column 1 & Column 2 & Column 3tabularnewline
stuff &
This text should be wrapped to the width of the column
but instead it makes the entire column extremely wide
& stufftabularnewline
some other stuff & some other stuff & some other stufftabularnewline
end{tabular}

end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered 7 hours ago









leandriisleandriis

9,3501530




9,3501530













  • Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

    – Mark
    7 hours ago



















  • Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

    – Mark
    7 hours ago

















Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

– Mark
7 hours ago





Yes... but in fact, if I knew which entry was otherwise the widest, I could just use that width for the varwidth entry itself. I would ideally like a solution that is more reusable, and independent of the entry that happens to have the widest entry.

– Mark
7 hours ago


















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%2f477642%2fis-there-a-global-variable-that-reflects-the-current-preferred-table-columns-wi%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

Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...