Set column width











up vote
0
down vote

favorite












Hi I have the following table. Is there a way to set the width of the column. I want to minimize the column width so that it could fit my journal template.



documentclass{article}
usepackage{amsmath}
usepackage{tabular}

begin{document}
begin{table}[ht!]
caption{Sensitivity Analysis of the Parameters in the Inventory model}
label{tab:my tab}
begin{tabular}{|lcc{1cm}||cccccc|}
hline
multirow{3}{*}{Parameters}&
multirow{3}{*}{Values}&
multirow{3}{*}{% Change}&
multicolumn{6}{|c|}{Change in}\ cline{4-9}
&&&$T$&$t_1$&$TVC$&$S$&$P$&$Q$ \ hline
end{tabular}
end{document}









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Do not write text between $...$. If you want italicized use textit{...}. And to set the width of a column you have to use p{1cm}, not c{1cm}.
    – Phelype Oleinik
    Jun 30 at 19:35










  • @PhelypeOleinik sorry i have edited that. so do you mean that the command should be begin{tabular}{|p{1cm}p{1cm}p{1cm}||cccccc|} ?
    – shahrina ismail
    Jun 30 at 20:02






  • 1




    If you want to make the first three columns with 1 cm wide, yes. But LaTeX builds tables so that the width of the column is adjusted to the contents of the table. It would help if you showed us the journal template so that we can make it fit the margins. Meanwhile you can take a look at this thread to find some methods to reduce the size of tables.
    – Phelype Oleinik
    Jun 30 at 20:09















up vote
0
down vote

favorite












Hi I have the following table. Is there a way to set the width of the column. I want to minimize the column width so that it could fit my journal template.



documentclass{article}
usepackage{amsmath}
usepackage{tabular}

begin{document}
begin{table}[ht!]
caption{Sensitivity Analysis of the Parameters in the Inventory model}
label{tab:my tab}
begin{tabular}{|lcc{1cm}||cccccc|}
hline
multirow{3}{*}{Parameters}&
multirow{3}{*}{Values}&
multirow{3}{*}{% Change}&
multicolumn{6}{|c|}{Change in}\ cline{4-9}
&&&$T$&$t_1$&$TVC$&$S$&$P$&$Q$ \ hline
end{tabular}
end{document}









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Do not write text between $...$. If you want italicized use textit{...}. And to set the width of a column you have to use p{1cm}, not c{1cm}.
    – Phelype Oleinik
    Jun 30 at 19:35










  • @PhelypeOleinik sorry i have edited that. so do you mean that the command should be begin{tabular}{|p{1cm}p{1cm}p{1cm}||cccccc|} ?
    – shahrina ismail
    Jun 30 at 20:02






  • 1




    If you want to make the first three columns with 1 cm wide, yes. But LaTeX builds tables so that the width of the column is adjusted to the contents of the table. It would help if you showed us the journal template so that we can make it fit the margins. Meanwhile you can take a look at this thread to find some methods to reduce the size of tables.
    – Phelype Oleinik
    Jun 30 at 20:09













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Hi I have the following table. Is there a way to set the width of the column. I want to minimize the column width so that it could fit my journal template.



documentclass{article}
usepackage{amsmath}
usepackage{tabular}

begin{document}
begin{table}[ht!]
caption{Sensitivity Analysis of the Parameters in the Inventory model}
label{tab:my tab}
begin{tabular}{|lcc{1cm}||cccccc|}
hline
multirow{3}{*}{Parameters}&
multirow{3}{*}{Values}&
multirow{3}{*}{% Change}&
multicolumn{6}{|c|}{Change in}\ cline{4-9}
&&&$T$&$t_1$&$TVC$&$S$&$P$&$Q$ \ hline
end{tabular}
end{document}









share|improve this question















Hi I have the following table. Is there a way to set the width of the column. I want to minimize the column width so that it could fit my journal template.



documentclass{article}
usepackage{amsmath}
usepackage{tabular}

begin{document}
begin{table}[ht!]
caption{Sensitivity Analysis of the Parameters in the Inventory model}
label{tab:my tab}
begin{tabular}{|lcc{1cm}||cccccc|}
hline
multirow{3}{*}{Parameters}&
multirow{3}{*}{Values}&
multirow{3}{*}{% Change}&
multicolumn{6}{|c|}{Change in}\ cline{4-9}
&&&$T$&$t_1$&$TVC$&$S$&$P$&$Q$ \ hline
end{tabular}
end{document}






tables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 30 at 19:59

























asked Jun 30 at 19:27









shahrina ismail

576214




576214





bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Do not write text between $...$. If you want italicized use textit{...}. And to set the width of a column you have to use p{1cm}, not c{1cm}.
    – Phelype Oleinik
    Jun 30 at 19:35










  • @PhelypeOleinik sorry i have edited that. so do you mean that the command should be begin{tabular}{|p{1cm}p{1cm}p{1cm}||cccccc|} ?
    – shahrina ismail
    Jun 30 at 20:02






  • 1




    If you want to make the first three columns with 1 cm wide, yes. But LaTeX builds tables so that the width of the column is adjusted to the contents of the table. It would help if you showed us the journal template so that we can make it fit the margins. Meanwhile you can take a look at this thread to find some methods to reduce the size of tables.
    – Phelype Oleinik
    Jun 30 at 20:09


















  • Do not write text between $...$. If you want italicized use textit{...}. And to set the width of a column you have to use p{1cm}, not c{1cm}.
    – Phelype Oleinik
    Jun 30 at 19:35










  • @PhelypeOleinik sorry i have edited that. so do you mean that the command should be begin{tabular}{|p{1cm}p{1cm}p{1cm}||cccccc|} ?
    – shahrina ismail
    Jun 30 at 20:02






  • 1




    If you want to make the first three columns with 1 cm wide, yes. But LaTeX builds tables so that the width of the column is adjusted to the contents of the table. It would help if you showed us the journal template so that we can make it fit the margins. Meanwhile you can take a look at this thread to find some methods to reduce the size of tables.
    – Phelype Oleinik
    Jun 30 at 20:09
















Do not write text between $...$. If you want italicized use textit{...}. And to set the width of a column you have to use p{1cm}, not c{1cm}.
– Phelype Oleinik
Jun 30 at 19:35




Do not write text between $...$. If you want italicized use textit{...}. And to set the width of a column you have to use p{1cm}, not c{1cm}.
– Phelype Oleinik
Jun 30 at 19:35












@PhelypeOleinik sorry i have edited that. so do you mean that the command should be begin{tabular}{|p{1cm}p{1cm}p{1cm}||cccccc|} ?
– shahrina ismail
Jun 30 at 20:02




@PhelypeOleinik sorry i have edited that. so do you mean that the command should be begin{tabular}{|p{1cm}p{1cm}p{1cm}||cccccc|} ?
– shahrina ismail
Jun 30 at 20:02




1




1




If you want to make the first three columns with 1 cm wide, yes. But LaTeX builds tables so that the width of the column is adjusted to the contents of the table. It would help if you showed us the journal template so that we can make it fit the margins. Meanwhile you can take a look at this thread to find some methods to reduce the size of tables.
– Phelype Oleinik
Jun 30 at 20:09




If you want to make the first three columns with 1 cm wide, yes. But LaTeX builds tables so that the width of the column is adjusted to the contents of the table. It would help if you showed us the journal template so that we can make it fit the margins. Meanwhile you can take a look at this thread to find some methods to reduce the size of tables.
– Phelype Oleinik
Jun 30 at 20:09










1 Answer
1






active

oldest

votes

















up vote
0
down vote














  • i suspect, that your document has two columns

  • prescribe column width, which is smaller than width of cells content can lead to new problems (you can't always relay on hyphenation)


  • a solution can be use tabular* with prescibe table width equal column width, set tabcolsep to 3pt and use @{extracolsep{fill}}:



    documentclass[twocolumn]{article} % <---
    usepackage{amsmath}
    usepackage{multirow} % <---

    %---------------- show page layout. don't use in a real document!
    usepackage{showframe}
    renewcommandShowFrameLinethickness{0.15pt}
    renewcommand*ShowFrameColor{color{red}}
    %---------------------------------------------------------------%
    usepackage{lipsum}

    begin{document}
    lipsum[1]
    begin{table}[htb]
    small % <---
    setlengthtabcolsep{3pt} % <---
    caption{Sensitivity Analysis of the Parameters in the Inventory model}
    label{tab:my tab}
    begin{tabular*}{linewidth}{@{extracolsep{fill}} % <---
    |lcc||cc cc cc|}
    hline
    multirow{2}{*}{textit{Parameters}} &
    multirow{2}{*}{textit{Values}} &
    multirow{2}{*}{textit{% Change}} &
    multicolumn{6}{c|}{Change in} \ cline{4-9}
    & & & $T$ & $t_1$ & $TVC$ & $S$ & $P$ & $Q$ \ hline
    end{tabular*}
    end{table}
    lipsum[2-8]
    end{document}



which gives:



enter image description here



(red lines indicate text borders)






share|improve this answer























    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',
    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%2f438704%2fset-column-width%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








    up vote
    0
    down vote














    • i suspect, that your document has two columns

    • prescribe column width, which is smaller than width of cells content can lead to new problems (you can't always relay on hyphenation)


    • a solution can be use tabular* with prescibe table width equal column width, set tabcolsep to 3pt and use @{extracolsep{fill}}:



      documentclass[twocolumn]{article} % <---
      usepackage{amsmath}
      usepackage{multirow} % <---

      %---------------- show page layout. don't use in a real document!
      usepackage{showframe}
      renewcommandShowFrameLinethickness{0.15pt}
      renewcommand*ShowFrameColor{color{red}}
      %---------------------------------------------------------------%
      usepackage{lipsum}

      begin{document}
      lipsum[1]
      begin{table}[htb]
      small % <---
      setlengthtabcolsep{3pt} % <---
      caption{Sensitivity Analysis of the Parameters in the Inventory model}
      label{tab:my tab}
      begin{tabular*}{linewidth}{@{extracolsep{fill}} % <---
      |lcc||cc cc cc|}
      hline
      multirow{2}{*}{textit{Parameters}} &
      multirow{2}{*}{textit{Values}} &
      multirow{2}{*}{textit{% Change}} &
      multicolumn{6}{c|}{Change in} \ cline{4-9}
      & & & $T$ & $t_1$ & $TVC$ & $S$ & $P$ & $Q$ \ hline
      end{tabular*}
      end{table}
      lipsum[2-8]
      end{document}



    which gives:



    enter image description here



    (red lines indicate text borders)






    share|improve this answer



























      up vote
      0
      down vote














      • i suspect, that your document has two columns

      • prescribe column width, which is smaller than width of cells content can lead to new problems (you can't always relay on hyphenation)


      • a solution can be use tabular* with prescibe table width equal column width, set tabcolsep to 3pt and use @{extracolsep{fill}}:



        documentclass[twocolumn]{article} % <---
        usepackage{amsmath}
        usepackage{multirow} % <---

        %---------------- show page layout. don't use in a real document!
        usepackage{showframe}
        renewcommandShowFrameLinethickness{0.15pt}
        renewcommand*ShowFrameColor{color{red}}
        %---------------------------------------------------------------%
        usepackage{lipsum}

        begin{document}
        lipsum[1]
        begin{table}[htb]
        small % <---
        setlengthtabcolsep{3pt} % <---
        caption{Sensitivity Analysis of the Parameters in the Inventory model}
        label{tab:my tab}
        begin{tabular*}{linewidth}{@{extracolsep{fill}} % <---
        |lcc||cc cc cc|}
        hline
        multirow{2}{*}{textit{Parameters}} &
        multirow{2}{*}{textit{Values}} &
        multirow{2}{*}{textit{% Change}} &
        multicolumn{6}{c|}{Change in} \ cline{4-9}
        & & & $T$ & $t_1$ & $TVC$ & $S$ & $P$ & $Q$ \ hline
        end{tabular*}
        end{table}
        lipsum[2-8]
        end{document}



      which gives:



      enter image description here



      (red lines indicate text borders)






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote










        • i suspect, that your document has two columns

        • prescribe column width, which is smaller than width of cells content can lead to new problems (you can't always relay on hyphenation)


        • a solution can be use tabular* with prescibe table width equal column width, set tabcolsep to 3pt and use @{extracolsep{fill}}:



          documentclass[twocolumn]{article} % <---
          usepackage{amsmath}
          usepackage{multirow} % <---

          %---------------- show page layout. don't use in a real document!
          usepackage{showframe}
          renewcommandShowFrameLinethickness{0.15pt}
          renewcommand*ShowFrameColor{color{red}}
          %---------------------------------------------------------------%
          usepackage{lipsum}

          begin{document}
          lipsum[1]
          begin{table}[htb]
          small % <---
          setlengthtabcolsep{3pt} % <---
          caption{Sensitivity Analysis of the Parameters in the Inventory model}
          label{tab:my tab}
          begin{tabular*}{linewidth}{@{extracolsep{fill}} % <---
          |lcc||cc cc cc|}
          hline
          multirow{2}{*}{textit{Parameters}} &
          multirow{2}{*}{textit{Values}} &
          multirow{2}{*}{textit{% Change}} &
          multicolumn{6}{c|}{Change in} \ cline{4-9}
          & & & $T$ & $t_1$ & $TVC$ & $S$ & $P$ & $Q$ \ hline
          end{tabular*}
          end{table}
          lipsum[2-8]
          end{document}



        which gives:



        enter image description here



        (red lines indicate text borders)






        share|improve this answer















        • i suspect, that your document has two columns

        • prescribe column width, which is smaller than width of cells content can lead to new problems (you can't always relay on hyphenation)


        • a solution can be use tabular* with prescibe table width equal column width, set tabcolsep to 3pt and use @{extracolsep{fill}}:



          documentclass[twocolumn]{article} % <---
          usepackage{amsmath}
          usepackage{multirow} % <---

          %---------------- show page layout. don't use in a real document!
          usepackage{showframe}
          renewcommandShowFrameLinethickness{0.15pt}
          renewcommand*ShowFrameColor{color{red}}
          %---------------------------------------------------------------%
          usepackage{lipsum}

          begin{document}
          lipsum[1]
          begin{table}[htb]
          small % <---
          setlengthtabcolsep{3pt} % <---
          caption{Sensitivity Analysis of the Parameters in the Inventory model}
          label{tab:my tab}
          begin{tabular*}{linewidth}{@{extracolsep{fill}} % <---
          |lcc||cc cc cc|}
          hline
          multirow{2}{*}{textit{Parameters}} &
          multirow{2}{*}{textit{Values}} &
          multirow{2}{*}{textit{% Change}} &
          multicolumn{6}{c|}{Change in} \ cline{4-9}
          & & & $T$ & $t_1$ & $TVC$ & $S$ & $P$ & $Q$ \ hline
          end{tabular*}
          end{table}
          lipsum[2-8]
          end{document}



        which gives:



        enter image description here



        (red lines indicate text borders)







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 30 at 22:06

























        answered Jun 30 at 20:15









        Zarko

        117k865155




        117k865155






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f438704%2fset-column-width%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

            Lallio

            Unable to find Lightning Node

            Futebolista