Automatic amount table columns and column numbers












4














I'm looking for a way to create a command with which Latex can automatically generate a table with a given amount of columns, and automatically fills in the column numbers as headers.



I'm looking for something like this:



newcommand{CountBox}[1]{
begin{flushright}
begin{tabular}{*{#1}{|l}}
hline
multicolumn{1}{|c|}{1} #1 \ hline
#1 \ hline
end{tabular}
end{flushright}
}


Where the following command creates the following table:



CountBox{6}


6 Column Table



And the following command creates the following table:



CountBox{3}


3 Column Table



I seem to get stuck on having to manually input the ampersands into the multicolumn command (have tried loop, while, and expandafter)



Thanks for the help!





Just in case the original code for the 6 column table:



begin{flushright}
begin{tabular}{*{7}{|l}}
hline
multicolumn{1}{|c|}{1} & 2 & 3 & 4 & 5 & 6 \ hline
& & & & & \ hline

end{tabular}
end{flushright}









share|improve this question







New contributor




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




















  • tex.stackexchange.com/questions/165625/… might be helpful
    – samcarter
    7 hours ago










  • any reason for centering the 1 in its cell and not the others ?
    – jfbu
    3 hours ago
















4














I'm looking for a way to create a command with which Latex can automatically generate a table with a given amount of columns, and automatically fills in the column numbers as headers.



I'm looking for something like this:



newcommand{CountBox}[1]{
begin{flushright}
begin{tabular}{*{#1}{|l}}
hline
multicolumn{1}{|c|}{1} #1 \ hline
#1 \ hline
end{tabular}
end{flushright}
}


Where the following command creates the following table:



CountBox{6}


6 Column Table



And the following command creates the following table:



CountBox{3}


3 Column Table



I seem to get stuck on having to manually input the ampersands into the multicolumn command (have tried loop, while, and expandafter)



Thanks for the help!





Just in case the original code for the 6 column table:



begin{flushright}
begin{tabular}{*{7}{|l}}
hline
multicolumn{1}{|c|}{1} & 2 & 3 & 4 & 5 & 6 \ hline
& & & & & \ hline

end{tabular}
end{flushright}









share|improve this question







New contributor




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




















  • tex.stackexchange.com/questions/165625/… might be helpful
    – samcarter
    7 hours ago










  • any reason for centering the 1 in its cell and not the others ?
    – jfbu
    3 hours ago














4












4








4


0





I'm looking for a way to create a command with which Latex can automatically generate a table with a given amount of columns, and automatically fills in the column numbers as headers.



I'm looking for something like this:



newcommand{CountBox}[1]{
begin{flushright}
begin{tabular}{*{#1}{|l}}
hline
multicolumn{1}{|c|}{1} #1 \ hline
#1 \ hline
end{tabular}
end{flushright}
}


Where the following command creates the following table:



CountBox{6}


6 Column Table



And the following command creates the following table:



CountBox{3}


3 Column Table



I seem to get stuck on having to manually input the ampersands into the multicolumn command (have tried loop, while, and expandafter)



Thanks for the help!





Just in case the original code for the 6 column table:



begin{flushright}
begin{tabular}{*{7}{|l}}
hline
multicolumn{1}{|c|}{1} & 2 & 3 & 4 & 5 & 6 \ hline
& & & & & \ hline

end{tabular}
end{flushright}









share|improve this question







New contributor




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











I'm looking for a way to create a command with which Latex can automatically generate a table with a given amount of columns, and automatically fills in the column numbers as headers.



I'm looking for something like this:



newcommand{CountBox}[1]{
begin{flushright}
begin{tabular}{*{#1}{|l}}
hline
multicolumn{1}{|c|}{1} #1 \ hline
#1 \ hline
end{tabular}
end{flushright}
}


Where the following command creates the following table:



CountBox{6}


6 Column Table



And the following command creates the following table:



CountBox{3}


3 Column Table



I seem to get stuck on having to manually input the ampersands into the multicolumn command (have tried loop, while, and expandafter)



Thanks for the help!





Just in case the original code for the 6 column table:



begin{flushright}
begin{tabular}{*{7}{|l}}
hline
multicolumn{1}{|c|}{1} & 2 & 3 & 4 & 5 & 6 \ hline
& & & & & \ hline

end{tabular}
end{flushright}






tables multicolumn automation






share|improve this question







New contributor




Phlemp 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




Phlemp 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




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









asked 7 hours ago









Phlemp

211




211




New contributor




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





New contributor





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






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












  • tex.stackexchange.com/questions/165625/… might be helpful
    – samcarter
    7 hours ago










  • any reason for centering the 1 in its cell and not the others ?
    – jfbu
    3 hours ago


















  • tex.stackexchange.com/questions/165625/… might be helpful
    – samcarter
    7 hours ago










  • any reason for centering the 1 in its cell and not the others ?
    – jfbu
    3 hours ago
















tex.stackexchange.com/questions/165625/… might be helpful
– samcarter
7 hours ago




tex.stackexchange.com/questions/165625/… might be helpful
– samcarter
7 hours ago












any reason for centering the 1 in its cell and not the others ?
– jfbu
3 hours ago




any reason for centering the 1 in its cell and not the others ?
– jfbu
3 hours ago










3 Answers
3






active

oldest

votes


















5














Here is an expl3 implementation. With the help of array and its w column specifier, all columns can be made as wide as the last (with the largest number).



documentclass{article}

usepackage{xparse,array}

ExplSyntaxOn
NewDocumentCommand{CountBox}{m}
{
% measure the wider number
hbox_set:Nn l_tmpa_box { #1 }
dim_set:Nn l_tmpa_dim { box_wd:N l_tmpa_box }
% do as many columns as specified
begin{tabular}{|*{#1}{w{c}{l_tmpa_dim}|}}
hline
% do '<number> &' one less than specified, then add the last number
int_step_function:nN { #1 - 1 } __phlemp_countbox_head:n #1 \
hline
% generate as many &'s as necessary to fill the second row
prg_replicate:nn { #1 - 1 } { & } \
hline
end{tabular}
}

% auxiliary function for adding the & after the number
cs_new_protected:Nn __phlemp_countbox_head:n { #1 & }
ExplSyntaxOff

begin{document}

CountBox{3} CountBox{10}

end{document}


enter image description here






share|improve this answer





























    2














    The following uses multido to generate the column numbering sequence and blank row. A similar approach to egreg's uses array's w{<align>}{<width>} to set the column width to the widest element:



    enter image description here



    documentclass{article}

    usepackage{multido,array}

    newcounter{boxCount}
    newlength{boxCountwd}

    makeatletter
    newcommand{CountBox}[1]{%
    setcounter{boxCount}{0}% Reset boxCount
    settowidth{boxCountwd}{#1}% Measure widest element
    defCountBoxSeq{@gobble}%
    defCountBoxSeqPhantom{@gobble}%
    multido{i=1+1}{#1}{%
    xdefCountBoxSeq{CountBoxSeq & i}%
    xdefCountBoxSeqPhantom{CountBoxSeqPhantom &}%
    }%
    noindent
    begin{tabular}{ *{#1}{|w{c}{boxCountwd}} | }
    hline
    CountBoxSeq \
    hline
    CountBoxSeqPhantom \
    hline
    end{tabular}%
    }
    makeatother

    begin{document}

    CountBox{5}

    end{document}





    share|improve this answer





























      1














      With foreach in TikZ:



      documentclass{article}       
      usepackage{tikz}
      usepackage{etoolbox}
      usetikzlibrary{
      positioning,
      shapes.multipart
      }
      tikzset{
      mynode/.style={
      draw,
      rectangle split,
      rectangle split parts=2,
      text centered,
      },
      }
      newcommand{CountBox}[1]{%
      begin{tikzpicture}
      node[mynode] (1) {1};
      ifnumcomp{#1}{=}{1}{}{%
      foreach mynum
      [evaluate=mynum as myprev using int(mynum-1)]
      in {2,...,#1}
      node[mynode,xshift=-pgflinewidth,anchor=west] (mynum) at (myprev.east) {mynum};
      }%
      end{tikzpicture}%
      }

      begin{document}
      CountBox{1}

      CountBox{3}

      CountBox{6}

      CountBox{2}
      CountBox{4}
      CountBox{7}
      end{document}


      enter image description here






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


        }
        });






        Phlemp 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%2f468575%2fautomatic-amount-table-columns-and-column-numbers%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5














        Here is an expl3 implementation. With the help of array and its w column specifier, all columns can be made as wide as the last (with the largest number).



        documentclass{article}

        usepackage{xparse,array}

        ExplSyntaxOn
        NewDocumentCommand{CountBox}{m}
        {
        % measure the wider number
        hbox_set:Nn l_tmpa_box { #1 }
        dim_set:Nn l_tmpa_dim { box_wd:N l_tmpa_box }
        % do as many columns as specified
        begin{tabular}{|*{#1}{w{c}{l_tmpa_dim}|}}
        hline
        % do '<number> &' one less than specified, then add the last number
        int_step_function:nN { #1 - 1 } __phlemp_countbox_head:n #1 \
        hline
        % generate as many &'s as necessary to fill the second row
        prg_replicate:nn { #1 - 1 } { & } \
        hline
        end{tabular}
        }

        % auxiliary function for adding the & after the number
        cs_new_protected:Nn __phlemp_countbox_head:n { #1 & }
        ExplSyntaxOff

        begin{document}

        CountBox{3} CountBox{10}

        end{document}


        enter image description here






        share|improve this answer


























          5














          Here is an expl3 implementation. With the help of array and its w column specifier, all columns can be made as wide as the last (with the largest number).



          documentclass{article}

          usepackage{xparse,array}

          ExplSyntaxOn
          NewDocumentCommand{CountBox}{m}
          {
          % measure the wider number
          hbox_set:Nn l_tmpa_box { #1 }
          dim_set:Nn l_tmpa_dim { box_wd:N l_tmpa_box }
          % do as many columns as specified
          begin{tabular}{|*{#1}{w{c}{l_tmpa_dim}|}}
          hline
          % do '<number> &' one less than specified, then add the last number
          int_step_function:nN { #1 - 1 } __phlemp_countbox_head:n #1 \
          hline
          % generate as many &'s as necessary to fill the second row
          prg_replicate:nn { #1 - 1 } { & } \
          hline
          end{tabular}
          }

          % auxiliary function for adding the & after the number
          cs_new_protected:Nn __phlemp_countbox_head:n { #1 & }
          ExplSyntaxOff

          begin{document}

          CountBox{3} CountBox{10}

          end{document}


          enter image description here






          share|improve this answer
























            5












            5








            5






            Here is an expl3 implementation. With the help of array and its w column specifier, all columns can be made as wide as the last (with the largest number).



            documentclass{article}

            usepackage{xparse,array}

            ExplSyntaxOn
            NewDocumentCommand{CountBox}{m}
            {
            % measure the wider number
            hbox_set:Nn l_tmpa_box { #1 }
            dim_set:Nn l_tmpa_dim { box_wd:N l_tmpa_box }
            % do as many columns as specified
            begin{tabular}{|*{#1}{w{c}{l_tmpa_dim}|}}
            hline
            % do '<number> &' one less than specified, then add the last number
            int_step_function:nN { #1 - 1 } __phlemp_countbox_head:n #1 \
            hline
            % generate as many &'s as necessary to fill the second row
            prg_replicate:nn { #1 - 1 } { & } \
            hline
            end{tabular}
            }

            % auxiliary function for adding the & after the number
            cs_new_protected:Nn __phlemp_countbox_head:n { #1 & }
            ExplSyntaxOff

            begin{document}

            CountBox{3} CountBox{10}

            end{document}


            enter image description here






            share|improve this answer












            Here is an expl3 implementation. With the help of array and its w column specifier, all columns can be made as wide as the last (with the largest number).



            documentclass{article}

            usepackage{xparse,array}

            ExplSyntaxOn
            NewDocumentCommand{CountBox}{m}
            {
            % measure the wider number
            hbox_set:Nn l_tmpa_box { #1 }
            dim_set:Nn l_tmpa_dim { box_wd:N l_tmpa_box }
            % do as many columns as specified
            begin{tabular}{|*{#1}{w{c}{l_tmpa_dim}|}}
            hline
            % do '<number> &' one less than specified, then add the last number
            int_step_function:nN { #1 - 1 } __phlemp_countbox_head:n #1 \
            hline
            % generate as many &'s as necessary to fill the second row
            prg_replicate:nn { #1 - 1 } { & } \
            hline
            end{tabular}
            }

            % auxiliary function for adding the & after the number
            cs_new_protected:Nn __phlemp_countbox_head:n { #1 & }
            ExplSyntaxOff

            begin{document}

            CountBox{3} CountBox{10}

            end{document}


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 6 hours ago









            egreg

            710k8618853168




            710k8618853168























                2














                The following uses multido to generate the column numbering sequence and blank row. A similar approach to egreg's uses array's w{<align>}{<width>} to set the column width to the widest element:



                enter image description here



                documentclass{article}

                usepackage{multido,array}

                newcounter{boxCount}
                newlength{boxCountwd}

                makeatletter
                newcommand{CountBox}[1]{%
                setcounter{boxCount}{0}% Reset boxCount
                settowidth{boxCountwd}{#1}% Measure widest element
                defCountBoxSeq{@gobble}%
                defCountBoxSeqPhantom{@gobble}%
                multido{i=1+1}{#1}{%
                xdefCountBoxSeq{CountBoxSeq & i}%
                xdefCountBoxSeqPhantom{CountBoxSeqPhantom &}%
                }%
                noindent
                begin{tabular}{ *{#1}{|w{c}{boxCountwd}} | }
                hline
                CountBoxSeq \
                hline
                CountBoxSeqPhantom \
                hline
                end{tabular}%
                }
                makeatother

                begin{document}

                CountBox{5}

                end{document}





                share|improve this answer


























                  2














                  The following uses multido to generate the column numbering sequence and blank row. A similar approach to egreg's uses array's w{<align>}{<width>} to set the column width to the widest element:



                  enter image description here



                  documentclass{article}

                  usepackage{multido,array}

                  newcounter{boxCount}
                  newlength{boxCountwd}

                  makeatletter
                  newcommand{CountBox}[1]{%
                  setcounter{boxCount}{0}% Reset boxCount
                  settowidth{boxCountwd}{#1}% Measure widest element
                  defCountBoxSeq{@gobble}%
                  defCountBoxSeqPhantom{@gobble}%
                  multido{i=1+1}{#1}{%
                  xdefCountBoxSeq{CountBoxSeq & i}%
                  xdefCountBoxSeqPhantom{CountBoxSeqPhantom &}%
                  }%
                  noindent
                  begin{tabular}{ *{#1}{|w{c}{boxCountwd}} | }
                  hline
                  CountBoxSeq \
                  hline
                  CountBoxSeqPhantom \
                  hline
                  end{tabular}%
                  }
                  makeatother

                  begin{document}

                  CountBox{5}

                  end{document}





                  share|improve this answer
























                    2












                    2








                    2






                    The following uses multido to generate the column numbering sequence and blank row. A similar approach to egreg's uses array's w{<align>}{<width>} to set the column width to the widest element:



                    enter image description here



                    documentclass{article}

                    usepackage{multido,array}

                    newcounter{boxCount}
                    newlength{boxCountwd}

                    makeatletter
                    newcommand{CountBox}[1]{%
                    setcounter{boxCount}{0}% Reset boxCount
                    settowidth{boxCountwd}{#1}% Measure widest element
                    defCountBoxSeq{@gobble}%
                    defCountBoxSeqPhantom{@gobble}%
                    multido{i=1+1}{#1}{%
                    xdefCountBoxSeq{CountBoxSeq & i}%
                    xdefCountBoxSeqPhantom{CountBoxSeqPhantom &}%
                    }%
                    noindent
                    begin{tabular}{ *{#1}{|w{c}{boxCountwd}} | }
                    hline
                    CountBoxSeq \
                    hline
                    CountBoxSeqPhantom \
                    hline
                    end{tabular}%
                    }
                    makeatother

                    begin{document}

                    CountBox{5}

                    end{document}





                    share|improve this answer












                    The following uses multido to generate the column numbering sequence and blank row. A similar approach to egreg's uses array's w{<align>}{<width>} to set the column width to the widest element:



                    enter image description here



                    documentclass{article}

                    usepackage{multido,array}

                    newcounter{boxCount}
                    newlength{boxCountwd}

                    makeatletter
                    newcommand{CountBox}[1]{%
                    setcounter{boxCount}{0}% Reset boxCount
                    settowidth{boxCountwd}{#1}% Measure widest element
                    defCountBoxSeq{@gobble}%
                    defCountBoxSeqPhantom{@gobble}%
                    multido{i=1+1}{#1}{%
                    xdefCountBoxSeq{CountBoxSeq & i}%
                    xdefCountBoxSeqPhantom{CountBoxSeqPhantom &}%
                    }%
                    noindent
                    begin{tabular}{ *{#1}{|w{c}{boxCountwd}} | }
                    hline
                    CountBoxSeq \
                    hline
                    CountBoxSeqPhantom \
                    hline
                    end{tabular}%
                    }
                    makeatother

                    begin{document}

                    CountBox{5}

                    end{document}






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 5 hours ago









                    Werner

                    438k649601653




                    438k649601653























                        1














                        With foreach in TikZ:



                        documentclass{article}       
                        usepackage{tikz}
                        usepackage{etoolbox}
                        usetikzlibrary{
                        positioning,
                        shapes.multipart
                        }
                        tikzset{
                        mynode/.style={
                        draw,
                        rectangle split,
                        rectangle split parts=2,
                        text centered,
                        },
                        }
                        newcommand{CountBox}[1]{%
                        begin{tikzpicture}
                        node[mynode] (1) {1};
                        ifnumcomp{#1}{=}{1}{}{%
                        foreach mynum
                        [evaluate=mynum as myprev using int(mynum-1)]
                        in {2,...,#1}
                        node[mynode,xshift=-pgflinewidth,anchor=west] (mynum) at (myprev.east) {mynum};
                        }%
                        end{tikzpicture}%
                        }

                        begin{document}
                        CountBox{1}

                        CountBox{3}

                        CountBox{6}

                        CountBox{2}
                        CountBox{4}
                        CountBox{7}
                        end{document}


                        enter image description here






                        share|improve this answer


























                          1














                          With foreach in TikZ:



                          documentclass{article}       
                          usepackage{tikz}
                          usepackage{etoolbox}
                          usetikzlibrary{
                          positioning,
                          shapes.multipart
                          }
                          tikzset{
                          mynode/.style={
                          draw,
                          rectangle split,
                          rectangle split parts=2,
                          text centered,
                          },
                          }
                          newcommand{CountBox}[1]{%
                          begin{tikzpicture}
                          node[mynode] (1) {1};
                          ifnumcomp{#1}{=}{1}{}{%
                          foreach mynum
                          [evaluate=mynum as myprev using int(mynum-1)]
                          in {2,...,#1}
                          node[mynode,xshift=-pgflinewidth,anchor=west] (mynum) at (myprev.east) {mynum};
                          }%
                          end{tikzpicture}%
                          }

                          begin{document}
                          CountBox{1}

                          CountBox{3}

                          CountBox{6}

                          CountBox{2}
                          CountBox{4}
                          CountBox{7}
                          end{document}


                          enter image description here






                          share|improve this answer
























                            1












                            1








                            1






                            With foreach in TikZ:



                            documentclass{article}       
                            usepackage{tikz}
                            usepackage{etoolbox}
                            usetikzlibrary{
                            positioning,
                            shapes.multipart
                            }
                            tikzset{
                            mynode/.style={
                            draw,
                            rectangle split,
                            rectangle split parts=2,
                            text centered,
                            },
                            }
                            newcommand{CountBox}[1]{%
                            begin{tikzpicture}
                            node[mynode] (1) {1};
                            ifnumcomp{#1}{=}{1}{}{%
                            foreach mynum
                            [evaluate=mynum as myprev using int(mynum-1)]
                            in {2,...,#1}
                            node[mynode,xshift=-pgflinewidth,anchor=west] (mynum) at (myprev.east) {mynum};
                            }%
                            end{tikzpicture}%
                            }

                            begin{document}
                            CountBox{1}

                            CountBox{3}

                            CountBox{6}

                            CountBox{2}
                            CountBox{4}
                            CountBox{7}
                            end{document}


                            enter image description here






                            share|improve this answer












                            With foreach in TikZ:



                            documentclass{article}       
                            usepackage{tikz}
                            usepackage{etoolbox}
                            usetikzlibrary{
                            positioning,
                            shapes.multipart
                            }
                            tikzset{
                            mynode/.style={
                            draw,
                            rectangle split,
                            rectangle split parts=2,
                            text centered,
                            },
                            }
                            newcommand{CountBox}[1]{%
                            begin{tikzpicture}
                            node[mynode] (1) {1};
                            ifnumcomp{#1}{=}{1}{}{%
                            foreach mynum
                            [evaluate=mynum as myprev using int(mynum-1)]
                            in {2,...,#1}
                            node[mynode,xshift=-pgflinewidth,anchor=west] (mynum) at (myprev.east) {mynum};
                            }%
                            end{tikzpicture}%
                            }

                            begin{document}
                            CountBox{1}

                            CountBox{3}

                            CountBox{6}

                            CountBox{2}
                            CountBox{4}
                            CountBox{7}
                            end{document}


                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 1 hour ago









                            CarLaTeX

                            29.9k447127




                            29.9k447127






















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










                                draft saved

                                draft discarded


















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













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












                                Phlemp 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.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • 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%2f468575%2fautomatic-amount-table-columns-and-column-numbers%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

                                Understanding the information contained in the Deep Space Network XML data?

                                Ross-on-Wye

                                Eastern Orthodox Church