How can I use multicolumn in a pgfplotstable table?











up vote
3
down vote

favorite
1












In my experiments with pgfplotstable, I've run into some bumps:




  • merging multiple columns

  • adding formatting commands to text within cells


Problem



I cannot seem to properly add a multicolumn{}{}{} to my portable graphics format plot table.



I've viewed the following questions:




  • Multiple Multi columns with pgfplotstable

  • Pgfplotstable multicolumn table with dec sep align and Tabularx


Example



documentclass{article}
usepackage{fontspec}
usepackage{booktabs}
usepackage{pgfplotstable}
usepackage{multicol}% <-- Don't think this is needed.
pgfplotstableset{% Global config
every head row/.style={before row=toprule,after row=midrule},
every last row/.style={after row=bottomrule},
col sep=&,
row sep=\,
column type=l,
column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
string type,
postproc cell content/.append style={ % see sec 3.2
/pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}}
}%

begin{document}
pgfplotstabletypeset{%
col1 & col2 & col3\
here & more & stuff\
for & good & looks \ % multicolumn{2}{c}{good looks} % <-- Replacing the cells "good" and look" with this causes problems
}%
end{document}









share|improve this question




























    up vote
    3
    down vote

    favorite
    1












    In my experiments with pgfplotstable, I've run into some bumps:




    • merging multiple columns

    • adding formatting commands to text within cells


    Problem



    I cannot seem to properly add a multicolumn{}{}{} to my portable graphics format plot table.



    I've viewed the following questions:




    • Multiple Multi columns with pgfplotstable

    • Pgfplotstable multicolumn table with dec sep align and Tabularx


    Example



    documentclass{article}
    usepackage{fontspec}
    usepackage{booktabs}
    usepackage{pgfplotstable}
    usepackage{multicol}% <-- Don't think this is needed.
    pgfplotstableset{% Global config
    every head row/.style={before row=toprule,after row=midrule},
    every last row/.style={after row=bottomrule},
    col sep=&,
    row sep=\,
    column type=l,
    column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
    string type,
    postproc cell content/.append style={ % see sec 3.2
    /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}}
    }%

    begin{document}
    pgfplotstabletypeset{%
    col1 & col2 & col3\
    here & more & stuff\
    for & good & looks \ % multicolumn{2}{c}{good looks} % <-- Replacing the cells "good" and look" with this causes problems
    }%
    end{document}









    share|improve this question


























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      In my experiments with pgfplotstable, I've run into some bumps:




      • merging multiple columns

      • adding formatting commands to text within cells


      Problem



      I cannot seem to properly add a multicolumn{}{}{} to my portable graphics format plot table.



      I've viewed the following questions:




      • Multiple Multi columns with pgfplotstable

      • Pgfplotstable multicolumn table with dec sep align and Tabularx


      Example



      documentclass{article}
      usepackage{fontspec}
      usepackage{booktabs}
      usepackage{pgfplotstable}
      usepackage{multicol}% <-- Don't think this is needed.
      pgfplotstableset{% Global config
      every head row/.style={before row=toprule,after row=midrule},
      every last row/.style={after row=bottomrule},
      col sep=&,
      row sep=\,
      column type=l,
      column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
      string type,
      postproc cell content/.append style={ % see sec 3.2
      /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}}
      }%

      begin{document}
      pgfplotstabletypeset{%
      col1 & col2 & col3\
      here & more & stuff\
      for & good & looks \ % multicolumn{2}{c}{good looks} % <-- Replacing the cells "good" and look" with this causes problems
      }%
      end{document}









      share|improve this question















      In my experiments with pgfplotstable, I've run into some bumps:




      • merging multiple columns

      • adding formatting commands to text within cells


      Problem



      I cannot seem to properly add a multicolumn{}{}{} to my portable graphics format plot table.



      I've viewed the following questions:




      • Multiple Multi columns with pgfplotstable

      • Pgfplotstable multicolumn table with dec sep align and Tabularx


      Example



      documentclass{article}
      usepackage{fontspec}
      usepackage{booktabs}
      usepackage{pgfplotstable}
      usepackage{multicol}% <-- Don't think this is needed.
      pgfplotstableset{% Global config
      every head row/.style={before row=toprule,after row=midrule},
      every last row/.style={after row=bottomrule},
      col sep=&,
      row sep=\,
      column type=l,
      column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
      string type,
      postproc cell content/.append style={ % see sec 3.2
      /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}}
      }%

      begin{document}
      pgfplotstabletypeset{%
      col1 & col2 & col3\
      here & more & stuff\
      for & good & looks \ % multicolumn{2}{c}{good looks} % <-- Replacing the cells "good" and look" with this causes problems
      }%
      end{document}






      tables pgfplotstable multicolumn






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:35









      Community

      1




      1










      asked Mar 31 '15 at 16:49









      Jonathan Komar

      6,44632977




      6,44632977






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I think it is better to give a true minmal working example. There is much stuff, which has nothing to do with the problem...



          Maybe, you are looking for something like this:



          pgfplotstableset{
          every row no 0/.append style={after row={
          for & multicolumn{2}{c}{color{red} good looks} \
          }},
          }


          enter image description here



          % arara: lualatex

          %documentclass{article}
          documentclass[margin=5mm]{standalone}
          usepackage{fontspec}
          usepackage{booktabs}
          usepackage{pgfplotstable}

          %usepackage{multicol}% <-- Don't think this is needed.

          pgfplotstableset{% Global config
          every head row/.style={before row=toprule,after row=midrule},
          every last row/.style={after row=bottomrule},
          col sep=&,
          row sep=\,
          column type=l,
          column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
          string type,
          postproc cell content/.append style={ % see sec 3.2
          /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}
          },
          %
          }%

          begin{document}
          pgfplotstableset{
          every row no 0/.append style={after row={
          for & multicolumn{2}{c}{color{red} good looks} \
          }},
          }



          pgfplotstabletypeset{%
          col1 & col2 & col3\
          here & more & stuff\
          for & good & looks \ % multicolumn{2}{c}{good looks} \% <-- Replacing the cells "good" and look" with this causes problems
          }%
          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',
            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%2f236215%2fhow-can-i-use-multicolumn-in-a-pgfplotstable-table%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 think it is better to give a true minmal working example. There is much stuff, which has nothing to do with the problem...



            Maybe, you are looking for something like this:



            pgfplotstableset{
            every row no 0/.append style={after row={
            for & multicolumn{2}{c}{color{red} good looks} \
            }},
            }


            enter image description here



            % arara: lualatex

            %documentclass{article}
            documentclass[margin=5mm]{standalone}
            usepackage{fontspec}
            usepackage{booktabs}
            usepackage{pgfplotstable}

            %usepackage{multicol}% <-- Don't think this is needed.

            pgfplotstableset{% Global config
            every head row/.style={before row=toprule,after row=midrule},
            every last row/.style={after row=bottomrule},
            col sep=&,
            row sep=\,
            column type=l,
            column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
            string type,
            postproc cell content/.append style={ % see sec 3.2
            /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}
            },
            %
            }%

            begin{document}
            pgfplotstableset{
            every row no 0/.append style={after row={
            for & multicolumn{2}{c}{color{red} good looks} \
            }},
            }



            pgfplotstabletypeset{%
            col1 & col2 & col3\
            here & more & stuff\
            for & good & looks \ % multicolumn{2}{c}{good looks} \% <-- Replacing the cells "good" and look" with this causes problems
            }%
            end{document}





            share|improve this answer

























              up vote
              0
              down vote













              I think it is better to give a true minmal working example. There is much stuff, which has nothing to do with the problem...



              Maybe, you are looking for something like this:



              pgfplotstableset{
              every row no 0/.append style={after row={
              for & multicolumn{2}{c}{color{red} good looks} \
              }},
              }


              enter image description here



              % arara: lualatex

              %documentclass{article}
              documentclass[margin=5mm]{standalone}
              usepackage{fontspec}
              usepackage{booktabs}
              usepackage{pgfplotstable}

              %usepackage{multicol}% <-- Don't think this is needed.

              pgfplotstableset{% Global config
              every head row/.style={before row=toprule,after row=midrule},
              every last row/.style={after row=bottomrule},
              col sep=&,
              row sep=\,
              column type=l,
              column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
              string type,
              postproc cell content/.append style={ % see sec 3.2
              /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}
              },
              %
              }%

              begin{document}
              pgfplotstableset{
              every row no 0/.append style={after row={
              for & multicolumn{2}{c}{color{red} good looks} \
              }},
              }



              pgfplotstabletypeset{%
              col1 & col2 & col3\
              here & more & stuff\
              for & good & looks \ % multicolumn{2}{c}{good looks} \% <-- Replacing the cells "good" and look" with this causes problems
              }%
              end{document}





              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                I think it is better to give a true minmal working example. There is much stuff, which has nothing to do with the problem...



                Maybe, you are looking for something like this:



                pgfplotstableset{
                every row no 0/.append style={after row={
                for & multicolumn{2}{c}{color{red} good looks} \
                }},
                }


                enter image description here



                % arara: lualatex

                %documentclass{article}
                documentclass[margin=5mm]{standalone}
                usepackage{fontspec}
                usepackage{booktabs}
                usepackage{pgfplotstable}

                %usepackage{multicol}% <-- Don't think this is needed.

                pgfplotstableset{% Global config
                every head row/.style={before row=toprule,after row=midrule},
                every last row/.style={after row=bottomrule},
                col sep=&,
                row sep=\,
                column type=l,
                column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
                string type,
                postproc cell content/.append style={ % see sec 3.2
                /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}
                },
                %
                }%

                begin{document}
                pgfplotstableset{
                every row no 0/.append style={after row={
                for & multicolumn{2}{c}{color{red} good looks} \
                }},
                }



                pgfplotstabletypeset{%
                col1 & col2 & col3\
                here & more & stuff\
                for & good & looks \ % multicolumn{2}{c}{good looks} \% <-- Replacing the cells "good" and look" with this causes problems
                }%
                end{document}





                share|improve this answer












                I think it is better to give a true minmal working example. There is much stuff, which has nothing to do with the problem...



                Maybe, you are looking for something like this:



                pgfplotstableset{
                every row no 0/.append style={after row={
                for & multicolumn{2}{c}{color{red} good looks} \
                }},
                }


                enter image description here



                % arara: lualatex

                %documentclass{article}
                documentclass[margin=5mm]{standalone}
                usepackage{fontspec}
                usepackage{booktabs}
                usepackage{pgfplotstable}

                %usepackage{multicol}% <-- Don't think this is needed.

                pgfplotstableset{% Global config
                every head row/.style={before row=toprule,after row=midrule},
                every last row/.style={after row=bottomrule},
                col sep=&,
                row sep=\,
                column type=l,
                column type={>{fontseries{bx}selectfontcolor{orange}}l}, %see sec 2.6 for defining column types
                string type,
                postproc cell content/.append style={ % see sec 3.2
                /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfontcolor{black}}{}
                },
                %
                }%

                begin{document}
                pgfplotstableset{
                every row no 0/.append style={after row={
                for & multicolumn{2}{c}{color{red} good looks} \
                }},
                }



                pgfplotstabletypeset{%
                col1 & col2 & col3\
                here & more & stuff\
                for & good & looks \ % multicolumn{2}{c}{good looks} \% <-- Replacing the cells "good" and look" with this causes problems
                }%
                end{document}






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 26 at 17:53









                cis

                617514




                617514






























                    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.





                    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%2f236215%2fhow-can-i-use-multicolumn-in-a-pgfplotstable-table%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

                    How to send String Array data to Server using php in android

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Is anime1.com a legal site for watching anime?