Align headings nicely












2















I have this code which is the beginning part of a big table.



begin{table}[H]
begin{tabularx}{textwidth}{XXXXXXXXXXXX}
hline
multicolumn{1}{|X|}{} & multicolumn{1}{X|}{Shaft Diameter} & multicolumn{1}{X|}{Max Torque} &
multicolumn{1}{X|}{Outer Flange Diameter} & multicolumn{1}{X|}{Flange Base Depth} & multicolumn{1}{X|}{Inner Flange Diameter} & multicolumn{1}{X|}{Flange Boss Depth} & multicolumn{1}{X|}{Pitch Centre Diameter} & multicolumn{1}{X|}{Number of Holes} & multicolumn{1}{X|}{Hole Diameter} & multicolumn{1}{X|}{Key Way Width} & multicolumn{1}{X|}{Key Way Depth} \
hline


However, even though the headings are wrapped, they aren't being displayed nicely. Anyway fix for that please?










share|improve this question







New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    Welcome to TeX.SX! Please turn your code fragment into a compilable minimal working example (MWE) including the documentclass and all relevant packages that are needed to recreate your problem. Please also clarify on your desired alignment maybe by using a sketch.

    – leandriis
    2 days ago













  • What's the main document font size, and how wide is the textblock?

    – Mico
    2 days ago
















2















I have this code which is the beginning part of a big table.



begin{table}[H]
begin{tabularx}{textwidth}{XXXXXXXXXXXX}
hline
multicolumn{1}{|X|}{} & multicolumn{1}{X|}{Shaft Diameter} & multicolumn{1}{X|}{Max Torque} &
multicolumn{1}{X|}{Outer Flange Diameter} & multicolumn{1}{X|}{Flange Base Depth} & multicolumn{1}{X|}{Inner Flange Diameter} & multicolumn{1}{X|}{Flange Boss Depth} & multicolumn{1}{X|}{Pitch Centre Diameter} & multicolumn{1}{X|}{Number of Holes} & multicolumn{1}{X|}{Hole Diameter} & multicolumn{1}{X|}{Key Way Width} & multicolumn{1}{X|}{Key Way Depth} \
hline


However, even though the headings are wrapped, they aren't being displayed nicely. Anyway fix for that please?










share|improve this question







New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    Welcome to TeX.SX! Please turn your code fragment into a compilable minimal working example (MWE) including the documentclass and all relevant packages that are needed to recreate your problem. Please also clarify on your desired alignment maybe by using a sketch.

    – leandriis
    2 days ago













  • What's the main document font size, and how wide is the textblock?

    – Mico
    2 days ago














2












2








2








I have this code which is the beginning part of a big table.



begin{table}[H]
begin{tabularx}{textwidth}{XXXXXXXXXXXX}
hline
multicolumn{1}{|X|}{} & multicolumn{1}{X|}{Shaft Diameter} & multicolumn{1}{X|}{Max Torque} &
multicolumn{1}{X|}{Outer Flange Diameter} & multicolumn{1}{X|}{Flange Base Depth} & multicolumn{1}{X|}{Inner Flange Diameter} & multicolumn{1}{X|}{Flange Boss Depth} & multicolumn{1}{X|}{Pitch Centre Diameter} & multicolumn{1}{X|}{Number of Holes} & multicolumn{1}{X|}{Hole Diameter} & multicolumn{1}{X|}{Key Way Width} & multicolumn{1}{X|}{Key Way Depth} \
hline


However, even though the headings are wrapped, they aren't being displayed nicely. Anyway fix for that please?










share|improve this question







New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have this code which is the beginning part of a big table.



begin{table}[H]
begin{tabularx}{textwidth}{XXXXXXXXXXXX}
hline
multicolumn{1}{|X|}{} & multicolumn{1}{X|}{Shaft Diameter} & multicolumn{1}{X|}{Max Torque} &
multicolumn{1}{X|}{Outer Flange Diameter} & multicolumn{1}{X|}{Flange Base Depth} & multicolumn{1}{X|}{Inner Flange Diameter} & multicolumn{1}{X|}{Flange Boss Depth} & multicolumn{1}{X|}{Pitch Centre Diameter} & multicolumn{1}{X|}{Number of Holes} & multicolumn{1}{X|}{Hole Diameter} & multicolumn{1}{X|}{Key Way Width} & multicolumn{1}{X|}{Key Way Depth} \
hline


However, even though the headings are wrapped, they aren't being displayed nicely. Anyway fix for that please?







tables pdftex






share|improve this question







New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









HarryHarry

233




233




New contributor




Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Harry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 2





    Welcome to TeX.SX! Please turn your code fragment into a compilable minimal working example (MWE) including the documentclass and all relevant packages that are needed to recreate your problem. Please also clarify on your desired alignment maybe by using a sketch.

    – leandriis
    2 days ago













  • What's the main document font size, and how wide is the textblock?

    – Mico
    2 days ago














  • 2





    Welcome to TeX.SX! Please turn your code fragment into a compilable minimal working example (MWE) including the documentclass and all relevant packages that are needed to recreate your problem. Please also clarify on your desired alignment maybe by using a sketch.

    – leandriis
    2 days ago













  • What's the main document font size, and how wide is the textblock?

    – Mico
    2 days ago








2




2





Welcome to TeX.SX! Please turn your code fragment into a compilable minimal working example (MWE) including the documentclass and all relevant packages that are needed to recreate your problem. Please also clarify on your desired alignment maybe by using a sketch.

– leandriis
2 days ago







Welcome to TeX.SX! Please turn your code fragment into a compilable minimal working example (MWE) including the documentclass and all relevant packages that are needed to recreate your problem. Please also clarify on your desired alignment maybe by using a sketch.

– leandriis
2 days ago















What's the main document font size, and how wide is the textblock?

– Mico
2 days ago





What's the main document font size, and how wide is the textblock?

– Mico
2 days ago










2 Answers
2






active

oldest

votes


















2














There's no way you can accommodate those long headers in such narrow columns. Hyphenating them is not the solution, because they become utterly unreadable.



You might rotate the headers and make them smaller, but this is much of a “last resort”.



documentclass{article}
usepackage{tabularx,graphicx}

newcommand{mh}[1]{%
multicolumn{1}{c|}{%
makebox[0pt]{%
rotatebox[origin=cl]{90}{%
footnotesizebegin{tabular}{@{}l}#1end{tabular}%
}%
}%
}%
}

begin{document}

noindent
begin{tabularx}{textwidth}{|X|*{11}{>{raggedleftarraybackslash}X|}}
hline
& mh{Shaft Diameter} & mh{Max Torque} &
mh{Outer Flange \ Diameter} & mh{Flange Base \ Depth} &
mh{Inner Flange \ Diameter} & mh{Flange Boss \ Depth} &
mh{Pitch Centre \ Diameter} & mh{Number of Holes} &
mh{Hole Diameter} & mh{Key Way Width} & mh{Key Way Depth} \
hline
a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
hline
end{tabularx}

end{document}


enter image description here



However, I'd go for an “indexed” format.



documentclass{article}
usepackage{tabularx,booktabs}

newcommand{mh}[1]{multicolumn{1}{c}{(#1)}}
newcommand{mhd}[2]{mbox{(#1): #2}}

begin{document}

noindent
begin{tabularx}{textwidth}{X*{11}{>{raggedleftarraybackslash}X}}
toprule
& mh{1} & mh{2} & mh{3} & mh{4} & mh{5} & mh{6}
& mh{7} & mh{8} & mh{9} & mh{10} & mh{11} \
midrule
a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
bottomrule
end{tabularx}

medskip
{footnotesizeraggedright
mhd{1}{Shaft Diameter};
mhd{2}{Max Torque};
mhd{3}{Outer Flange Diameter};
mhd{4}{Flange Base Depth};
mhd{5}{Inner Flange Diameter};
mhd{6}{Flange Boss Depth};
mhd{7}{Pitch Centre Diameter};
mhd{8}{Number of Holes};
mhd{9}{Hole Diameter};
mhd{10}{Key Way Width};
mhd{11}{Key Way Depth}.\}

end{document}


enter image description here






share|improve this answer































    1














    Given that the table has a header column and eleven [11!] data columns, it's almost certainly necessary to typeset the table in landscape format. One way to do so is to employ a sidewaystable environment, provided by the rotating package, instead of a table environment.



    Note that if you use the X column type for the data columns, it's not necessary to encase the header cells in multicolumn{1}{X|}{...} "wrappers".



    enter image description here



    documentclass{article} % choose an appropriate document class
    usepackage[a4paper,margin=2.5cm]{geometry} % select suitable page parameters
    usepackage[english]{babel} % load language-appropriate hyphenation patterns
    usepackage{rotating} % for 'sidewaystable' env.
    usepackage{tabularx} % for 'tabularx' env. and 'X' col. type
    usepackage{ragged2e} % for 'Centering' macro
    newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}

    begin{document}
    begin{sidewaystable}
    setlengthtabcolsep{3pt} % default: 6pt
    setlengthextrarowheight{2pt} % for a slightly more open "look"
    begin{tabularx}{textwidth}{|*{12}{C|}}
    hline
    & Shaft Diameter &
    Max Torque & Outer Flange Diameter &
    Flange Base Depth & Inner Flange Diameter &
    Flange Boss Depth & Pitch Centre Diameter &
    Number of Holes & Hole Diameter &
    Key Way Width & Key Way Depth \
    hline
    end{tabularx}
    end{sidewaystable}
    end{document}





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


      }
      });






      Harry is a new contributor. Be nice, and check out our Code of Conduct.










      draft saved

      draft discarded


















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














      There's no way you can accommodate those long headers in such narrow columns. Hyphenating them is not the solution, because they become utterly unreadable.



      You might rotate the headers and make them smaller, but this is much of a “last resort”.



      documentclass{article}
      usepackage{tabularx,graphicx}

      newcommand{mh}[1]{%
      multicolumn{1}{c|}{%
      makebox[0pt]{%
      rotatebox[origin=cl]{90}{%
      footnotesizebegin{tabular}{@{}l}#1end{tabular}%
      }%
      }%
      }%
      }

      begin{document}

      noindent
      begin{tabularx}{textwidth}{|X|*{11}{>{raggedleftarraybackslash}X|}}
      hline
      & mh{Shaft Diameter} & mh{Max Torque} &
      mh{Outer Flange \ Diameter} & mh{Flange Base \ Depth} &
      mh{Inner Flange \ Diameter} & mh{Flange Boss \ Depth} &
      mh{Pitch Centre \ Diameter} & mh{Number of Holes} &
      mh{Hole Diameter} & mh{Key Way Width} & mh{Key Way Depth} \
      hline
      a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
      hline
      end{tabularx}

      end{document}


      enter image description here



      However, I'd go for an “indexed” format.



      documentclass{article}
      usepackage{tabularx,booktabs}

      newcommand{mh}[1]{multicolumn{1}{c}{(#1)}}
      newcommand{mhd}[2]{mbox{(#1): #2}}

      begin{document}

      noindent
      begin{tabularx}{textwidth}{X*{11}{>{raggedleftarraybackslash}X}}
      toprule
      & mh{1} & mh{2} & mh{3} & mh{4} & mh{5} & mh{6}
      & mh{7} & mh{8} & mh{9} & mh{10} & mh{11} \
      midrule
      a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
      a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
      a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
      bottomrule
      end{tabularx}

      medskip
      {footnotesizeraggedright
      mhd{1}{Shaft Diameter};
      mhd{2}{Max Torque};
      mhd{3}{Outer Flange Diameter};
      mhd{4}{Flange Base Depth};
      mhd{5}{Inner Flange Diameter};
      mhd{6}{Flange Boss Depth};
      mhd{7}{Pitch Centre Diameter};
      mhd{8}{Number of Holes};
      mhd{9}{Hole Diameter};
      mhd{10}{Key Way Width};
      mhd{11}{Key Way Depth}.\}

      end{document}


      enter image description here






      share|improve this answer




























        2














        There's no way you can accommodate those long headers in such narrow columns. Hyphenating them is not the solution, because they become utterly unreadable.



        You might rotate the headers and make them smaller, but this is much of a “last resort”.



        documentclass{article}
        usepackage{tabularx,graphicx}

        newcommand{mh}[1]{%
        multicolumn{1}{c|}{%
        makebox[0pt]{%
        rotatebox[origin=cl]{90}{%
        footnotesizebegin{tabular}{@{}l}#1end{tabular}%
        }%
        }%
        }%
        }

        begin{document}

        noindent
        begin{tabularx}{textwidth}{|X|*{11}{>{raggedleftarraybackslash}X|}}
        hline
        & mh{Shaft Diameter} & mh{Max Torque} &
        mh{Outer Flange \ Diameter} & mh{Flange Base \ Depth} &
        mh{Inner Flange \ Diameter} & mh{Flange Boss \ Depth} &
        mh{Pitch Centre \ Diameter} & mh{Number of Holes} &
        mh{Hole Diameter} & mh{Key Way Width} & mh{Key Way Depth} \
        hline
        a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
        hline
        end{tabularx}

        end{document}


        enter image description here



        However, I'd go for an “indexed” format.



        documentclass{article}
        usepackage{tabularx,booktabs}

        newcommand{mh}[1]{multicolumn{1}{c}{(#1)}}
        newcommand{mhd}[2]{mbox{(#1): #2}}

        begin{document}

        noindent
        begin{tabularx}{textwidth}{X*{11}{>{raggedleftarraybackslash}X}}
        toprule
        & mh{1} & mh{2} & mh{3} & mh{4} & mh{5} & mh{6}
        & mh{7} & mh{8} & mh{9} & mh{10} & mh{11} \
        midrule
        a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
        a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
        a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
        bottomrule
        end{tabularx}

        medskip
        {footnotesizeraggedright
        mhd{1}{Shaft Diameter};
        mhd{2}{Max Torque};
        mhd{3}{Outer Flange Diameter};
        mhd{4}{Flange Base Depth};
        mhd{5}{Inner Flange Diameter};
        mhd{6}{Flange Boss Depth};
        mhd{7}{Pitch Centre Diameter};
        mhd{8}{Number of Holes};
        mhd{9}{Hole Diameter};
        mhd{10}{Key Way Width};
        mhd{11}{Key Way Depth}.\}

        end{document}


        enter image description here






        share|improve this answer


























          2












          2








          2







          There's no way you can accommodate those long headers in such narrow columns. Hyphenating them is not the solution, because they become utterly unreadable.



          You might rotate the headers and make them smaller, but this is much of a “last resort”.



          documentclass{article}
          usepackage{tabularx,graphicx}

          newcommand{mh}[1]{%
          multicolumn{1}{c|}{%
          makebox[0pt]{%
          rotatebox[origin=cl]{90}{%
          footnotesizebegin{tabular}{@{}l}#1end{tabular}%
          }%
          }%
          }%
          }

          begin{document}

          noindent
          begin{tabularx}{textwidth}{|X|*{11}{>{raggedleftarraybackslash}X|}}
          hline
          & mh{Shaft Diameter} & mh{Max Torque} &
          mh{Outer Flange \ Diameter} & mh{Flange Base \ Depth} &
          mh{Inner Flange \ Diameter} & mh{Flange Boss \ Depth} &
          mh{Pitch Centre \ Diameter} & mh{Number of Holes} &
          mh{Hole Diameter} & mh{Key Way Width} & mh{Key Way Depth} \
          hline
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          hline
          end{tabularx}

          end{document}


          enter image description here



          However, I'd go for an “indexed” format.



          documentclass{article}
          usepackage{tabularx,booktabs}

          newcommand{mh}[1]{multicolumn{1}{c}{(#1)}}
          newcommand{mhd}[2]{mbox{(#1): #2}}

          begin{document}

          noindent
          begin{tabularx}{textwidth}{X*{11}{>{raggedleftarraybackslash}X}}
          toprule
          & mh{1} & mh{2} & mh{3} & mh{4} & mh{5} & mh{6}
          & mh{7} & mh{8} & mh{9} & mh{10} & mh{11} \
          midrule
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          bottomrule
          end{tabularx}

          medskip
          {footnotesizeraggedright
          mhd{1}{Shaft Diameter};
          mhd{2}{Max Torque};
          mhd{3}{Outer Flange Diameter};
          mhd{4}{Flange Base Depth};
          mhd{5}{Inner Flange Diameter};
          mhd{6}{Flange Boss Depth};
          mhd{7}{Pitch Centre Diameter};
          mhd{8}{Number of Holes};
          mhd{9}{Hole Diameter};
          mhd{10}{Key Way Width};
          mhd{11}{Key Way Depth}.\}

          end{document}


          enter image description here






          share|improve this answer













          There's no way you can accommodate those long headers in such narrow columns. Hyphenating them is not the solution, because they become utterly unreadable.



          You might rotate the headers and make them smaller, but this is much of a “last resort”.



          documentclass{article}
          usepackage{tabularx,graphicx}

          newcommand{mh}[1]{%
          multicolumn{1}{c|}{%
          makebox[0pt]{%
          rotatebox[origin=cl]{90}{%
          footnotesizebegin{tabular}{@{}l}#1end{tabular}%
          }%
          }%
          }%
          }

          begin{document}

          noindent
          begin{tabularx}{textwidth}{|X|*{11}{>{raggedleftarraybackslash}X|}}
          hline
          & mh{Shaft Diameter} & mh{Max Torque} &
          mh{Outer Flange \ Diameter} & mh{Flange Base \ Depth} &
          mh{Inner Flange \ Diameter} & mh{Flange Boss \ Depth} &
          mh{Pitch Centre \ Diameter} & mh{Number of Holes} &
          mh{Hole Diameter} & mh{Key Way Width} & mh{Key Way Depth} \
          hline
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          hline
          end{tabularx}

          end{document}


          enter image description here



          However, I'd go for an “indexed” format.



          documentclass{article}
          usepackage{tabularx,booktabs}

          newcommand{mh}[1]{multicolumn{1}{c}{(#1)}}
          newcommand{mhd}[2]{mbox{(#1): #2}}

          begin{document}

          noindent
          begin{tabularx}{textwidth}{X*{11}{>{raggedleftarraybackslash}X}}
          toprule
          & mh{1} & mh{2} & mh{3} & mh{4} & mh{5} & mh{6}
          & mh{7} & mh{8} & mh{9} & mh{10} & mh{11} \
          midrule
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          a & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          bottomrule
          end{tabularx}

          medskip
          {footnotesizeraggedright
          mhd{1}{Shaft Diameter};
          mhd{2}{Max Torque};
          mhd{3}{Outer Flange Diameter};
          mhd{4}{Flange Base Depth};
          mhd{5}{Inner Flange Diameter};
          mhd{6}{Flange Boss Depth};
          mhd{7}{Pitch Centre Diameter};
          mhd{8}{Number of Holes};
          mhd{9}{Hole Diameter};
          mhd{10}{Key Way Width};
          mhd{11}{Key Way Depth}.\}

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          egregegreg

          714k8618963184




          714k8618963184























              1














              Given that the table has a header column and eleven [11!] data columns, it's almost certainly necessary to typeset the table in landscape format. One way to do so is to employ a sidewaystable environment, provided by the rotating package, instead of a table environment.



              Note that if you use the X column type for the data columns, it's not necessary to encase the header cells in multicolumn{1}{X|}{...} "wrappers".



              enter image description here



              documentclass{article} % choose an appropriate document class
              usepackage[a4paper,margin=2.5cm]{geometry} % select suitable page parameters
              usepackage[english]{babel} % load language-appropriate hyphenation patterns
              usepackage{rotating} % for 'sidewaystable' env.
              usepackage{tabularx} % for 'tabularx' env. and 'X' col. type
              usepackage{ragged2e} % for 'Centering' macro
              newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}

              begin{document}
              begin{sidewaystable}
              setlengthtabcolsep{3pt} % default: 6pt
              setlengthextrarowheight{2pt} % for a slightly more open "look"
              begin{tabularx}{textwidth}{|*{12}{C|}}
              hline
              & Shaft Diameter &
              Max Torque & Outer Flange Diameter &
              Flange Base Depth & Inner Flange Diameter &
              Flange Boss Depth & Pitch Centre Diameter &
              Number of Holes & Hole Diameter &
              Key Way Width & Key Way Depth \
              hline
              end{tabularx}
              end{sidewaystable}
              end{document}





              share|improve this answer




























                1














                Given that the table has a header column and eleven [11!] data columns, it's almost certainly necessary to typeset the table in landscape format. One way to do so is to employ a sidewaystable environment, provided by the rotating package, instead of a table environment.



                Note that if you use the X column type for the data columns, it's not necessary to encase the header cells in multicolumn{1}{X|}{...} "wrappers".



                enter image description here



                documentclass{article} % choose an appropriate document class
                usepackage[a4paper,margin=2.5cm]{geometry} % select suitable page parameters
                usepackage[english]{babel} % load language-appropriate hyphenation patterns
                usepackage{rotating} % for 'sidewaystable' env.
                usepackage{tabularx} % for 'tabularx' env. and 'X' col. type
                usepackage{ragged2e} % for 'Centering' macro
                newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}

                begin{document}
                begin{sidewaystable}
                setlengthtabcolsep{3pt} % default: 6pt
                setlengthextrarowheight{2pt} % for a slightly more open "look"
                begin{tabularx}{textwidth}{|*{12}{C|}}
                hline
                & Shaft Diameter &
                Max Torque & Outer Flange Diameter &
                Flange Base Depth & Inner Flange Diameter &
                Flange Boss Depth & Pitch Centre Diameter &
                Number of Holes & Hole Diameter &
                Key Way Width & Key Way Depth \
                hline
                end{tabularx}
                end{sidewaystable}
                end{document}





                share|improve this answer


























                  1












                  1








                  1







                  Given that the table has a header column and eleven [11!] data columns, it's almost certainly necessary to typeset the table in landscape format. One way to do so is to employ a sidewaystable environment, provided by the rotating package, instead of a table environment.



                  Note that if you use the X column type for the data columns, it's not necessary to encase the header cells in multicolumn{1}{X|}{...} "wrappers".



                  enter image description here



                  documentclass{article} % choose an appropriate document class
                  usepackage[a4paper,margin=2.5cm]{geometry} % select suitable page parameters
                  usepackage[english]{babel} % load language-appropriate hyphenation patterns
                  usepackage{rotating} % for 'sidewaystable' env.
                  usepackage{tabularx} % for 'tabularx' env. and 'X' col. type
                  usepackage{ragged2e} % for 'Centering' macro
                  newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}

                  begin{document}
                  begin{sidewaystable}
                  setlengthtabcolsep{3pt} % default: 6pt
                  setlengthextrarowheight{2pt} % for a slightly more open "look"
                  begin{tabularx}{textwidth}{|*{12}{C|}}
                  hline
                  & Shaft Diameter &
                  Max Torque & Outer Flange Diameter &
                  Flange Base Depth & Inner Flange Diameter &
                  Flange Boss Depth & Pitch Centre Diameter &
                  Number of Holes & Hole Diameter &
                  Key Way Width & Key Way Depth \
                  hline
                  end{tabularx}
                  end{sidewaystable}
                  end{document}





                  share|improve this answer













                  Given that the table has a header column and eleven [11!] data columns, it's almost certainly necessary to typeset the table in landscape format. One way to do so is to employ a sidewaystable environment, provided by the rotating package, instead of a table environment.



                  Note that if you use the X column type for the data columns, it's not necessary to encase the header cells in multicolumn{1}{X|}{...} "wrappers".



                  enter image description here



                  documentclass{article} % choose an appropriate document class
                  usepackage[a4paper,margin=2.5cm]{geometry} % select suitable page parameters
                  usepackage[english]{babel} % load language-appropriate hyphenation patterns
                  usepackage{rotating} % for 'sidewaystable' env.
                  usepackage{tabularx} % for 'tabularx' env. and 'X' col. type
                  usepackage{ragged2e} % for 'Centering' macro
                  newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}

                  begin{document}
                  begin{sidewaystable}
                  setlengthtabcolsep{3pt} % default: 6pt
                  setlengthextrarowheight{2pt} % for a slightly more open "look"
                  begin{tabularx}{textwidth}{|*{12}{C|}}
                  hline
                  & Shaft Diameter &
                  Max Torque & Outer Flange Diameter &
                  Flange Base Depth & Inner Flange Diameter &
                  Flange Boss Depth & Pitch Centre Diameter &
                  Number of Holes & Hole Diameter &
                  Key Way Width & Key Way Depth \
                  hline
                  end{tabularx}
                  end{sidewaystable}
                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 days ago









                  MicoMico

                  275k30374763




                  275k30374763






















                      Harry is a new contributor. Be nice, and check out our Code of Conduct.










                      draft saved

                      draft discarded


















                      Harry is a new contributor. Be nice, and check out our Code of Conduct.













                      Harry is a new contributor. Be nice, and check out our Code of Conduct.












                      Harry is a new contributor. Be nice, and check out our Code of Conduct.
















                      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%2f470844%2falign-headings-nicely%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

                      "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                      Alcedinidae

                      Origin of the phrase “under your belt”?