Have Multicolumn respect table column formatting











up vote
0
down vote

favorite












I would like the Multicolumns in my tables use the formatting from the parent table. The example below illustrates my question perfectly:



newcolumntype{v}[2]{% Vertigo latin for rotate
>{adjustbox{angle=#1,lap=width-(#2)}bgroup}%
l%
<{egroup}%
}
newcommand*rot{multicolumn{1}{v{60}{2em}}}

csvreader[longtable=*{2}{>{bfseries}l}@{hspace{extracolspace}}*{1}{r}@{hspace{extracolspace}}*{1}{r},
table head=caption{Transformers} \
cmidrule{1-4}
&
& multicolumn{1}{r}{SI{2}{voltampere}}**hspace{extracolspace}multicolextraspacepadding**

& multicolumn{1}{r}{SI{3}{voltampere}} \
cmidrule(r{extracolspace}){3-3}
cmidrule(r){4-4}
Time
& **bfseries**rot{Ambient}

& Core

& Core \
(SI{}{minute})
& multicolumn{2}{r}{(SIUnitSymbolCelsius)}**hspace{extracolspace}multicolextraspacepadding**

& (SIUnitSymbolCelsius) \
cmidrule(lr){1-1}
%
cmidrule(lr{extracolspace}){2-3}
%
cmidrule(r){4-4},
late after last line=\cmidrule{1-4},
/csv/separator=semicolon]%
{Results/Test.csv}
{
end time = endutime,
amb = amb,
asn core = asncore,
mars core = marscore
}
{endutime & amb & asncore & marscore}


So this code produces the first two columns in bold font and then an extra gap after a column "subsection". The output is shown below:



enter image description here



The issue is that custom command rot and other multicolumn commands require additional code, highlighted with **, in order to match the longtable column formating. In this case the second column's rotated heading should be bold like the rest of the column without the extra bfseries and the 3rd column heading should not require extra padding to respect the column's extra spacing. Is it possible to have a multicolumn respect the formatting of its parent table?










share|improve this question







New contributor




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
























    up vote
    0
    down vote

    favorite












    I would like the Multicolumns in my tables use the formatting from the parent table. The example below illustrates my question perfectly:



    newcolumntype{v}[2]{% Vertigo latin for rotate
    >{adjustbox{angle=#1,lap=width-(#2)}bgroup}%
    l%
    <{egroup}%
    }
    newcommand*rot{multicolumn{1}{v{60}{2em}}}

    csvreader[longtable=*{2}{>{bfseries}l}@{hspace{extracolspace}}*{1}{r}@{hspace{extracolspace}}*{1}{r},
    table head=caption{Transformers} \
    cmidrule{1-4}
    &
    & multicolumn{1}{r}{SI{2}{voltampere}}**hspace{extracolspace}multicolextraspacepadding**

    & multicolumn{1}{r}{SI{3}{voltampere}} \
    cmidrule(r{extracolspace}){3-3}
    cmidrule(r){4-4}
    Time
    & **bfseries**rot{Ambient}

    & Core

    & Core \
    (SI{}{minute})
    & multicolumn{2}{r}{(SIUnitSymbolCelsius)}**hspace{extracolspace}multicolextraspacepadding**

    & (SIUnitSymbolCelsius) \
    cmidrule(lr){1-1}
    %
    cmidrule(lr{extracolspace}){2-3}
    %
    cmidrule(r){4-4},
    late after last line=\cmidrule{1-4},
    /csv/separator=semicolon]%
    {Results/Test.csv}
    {
    end time = endutime,
    amb = amb,
    asn core = asncore,
    mars core = marscore
    }
    {endutime & amb & asncore & marscore}


    So this code produces the first two columns in bold font and then an extra gap after a column "subsection". The output is shown below:



    enter image description here



    The issue is that custom command rot and other multicolumn commands require additional code, highlighted with **, in order to match the longtable column formating. In this case the second column's rotated heading should be bold like the rest of the column without the extra bfseries and the 3rd column heading should not require extra padding to respect the column's extra spacing. Is it possible to have a multicolumn respect the formatting of its parent table?










    share|improve this question







    New contributor




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






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I would like the Multicolumns in my tables use the formatting from the parent table. The example below illustrates my question perfectly:



      newcolumntype{v}[2]{% Vertigo latin for rotate
      >{adjustbox{angle=#1,lap=width-(#2)}bgroup}%
      l%
      <{egroup}%
      }
      newcommand*rot{multicolumn{1}{v{60}{2em}}}

      csvreader[longtable=*{2}{>{bfseries}l}@{hspace{extracolspace}}*{1}{r}@{hspace{extracolspace}}*{1}{r},
      table head=caption{Transformers} \
      cmidrule{1-4}
      &
      & multicolumn{1}{r}{SI{2}{voltampere}}**hspace{extracolspace}multicolextraspacepadding**

      & multicolumn{1}{r}{SI{3}{voltampere}} \
      cmidrule(r{extracolspace}){3-3}
      cmidrule(r){4-4}
      Time
      & **bfseries**rot{Ambient}

      & Core

      & Core \
      (SI{}{minute})
      & multicolumn{2}{r}{(SIUnitSymbolCelsius)}**hspace{extracolspace}multicolextraspacepadding**

      & (SIUnitSymbolCelsius) \
      cmidrule(lr){1-1}
      %
      cmidrule(lr{extracolspace}){2-3}
      %
      cmidrule(r){4-4},
      late after last line=\cmidrule{1-4},
      /csv/separator=semicolon]%
      {Results/Test.csv}
      {
      end time = endutime,
      amb = amb,
      asn core = asncore,
      mars core = marscore
      }
      {endutime & amb & asncore & marscore}


      So this code produces the first two columns in bold font and then an extra gap after a column "subsection". The output is shown below:



      enter image description here



      The issue is that custom command rot and other multicolumn commands require additional code, highlighted with **, in order to match the longtable column formating. In this case the second column's rotated heading should be bold like the rest of the column without the extra bfseries and the 3rd column heading should not require extra padding to respect the column's extra spacing. Is it possible to have a multicolumn respect the formatting of its parent table?










      share|improve this question







      New contributor




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











      I would like the Multicolumns in my tables use the formatting from the parent table. The example below illustrates my question perfectly:



      newcolumntype{v}[2]{% Vertigo latin for rotate
      >{adjustbox{angle=#1,lap=width-(#2)}bgroup}%
      l%
      <{egroup}%
      }
      newcommand*rot{multicolumn{1}{v{60}{2em}}}

      csvreader[longtable=*{2}{>{bfseries}l}@{hspace{extracolspace}}*{1}{r}@{hspace{extracolspace}}*{1}{r},
      table head=caption{Transformers} \
      cmidrule{1-4}
      &
      & multicolumn{1}{r}{SI{2}{voltampere}}**hspace{extracolspace}multicolextraspacepadding**

      & multicolumn{1}{r}{SI{3}{voltampere}} \
      cmidrule(r{extracolspace}){3-3}
      cmidrule(r){4-4}
      Time
      & **bfseries**rot{Ambient}

      & Core

      & Core \
      (SI{}{minute})
      & multicolumn{2}{r}{(SIUnitSymbolCelsius)}**hspace{extracolspace}multicolextraspacepadding**

      & (SIUnitSymbolCelsius) \
      cmidrule(lr){1-1}
      %
      cmidrule(lr{extracolspace}){2-3}
      %
      cmidrule(r){4-4},
      late after last line=\cmidrule{1-4},
      /csv/separator=semicolon]%
      {Results/Test.csv}
      {
      end time = endutime,
      amb = amb,
      asn core = asncore,
      mars core = marscore
      }
      {endutime & amb & asncore & marscore}


      So this code produces the first two columns in bold font and then an extra gap after a column "subsection". The output is shown below:



      enter image description here



      The issue is that custom command rot and other multicolumn commands require additional code, highlighted with **, in order to match the longtable column formating. In this case the second column's rotated heading should be bold like the rest of the column without the extra bfseries and the 3rd column heading should not require extra padding to respect the column's extra spacing. Is it possible to have a multicolumn respect the formatting of its parent table?







      longtable multicol






      share|improve this question







      New contributor




      etienz 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




      etienz 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




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









      asked yesterday









      etienz

      11




      11




      New contributor




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





      New contributor





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






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



























          active

          oldest

          votes











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


          }
          });






          etienz 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%2f461073%2fhave-multicolumn-respect-table-column-formatting%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








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










           

          draft saved


          draft discarded


















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













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












          etienz 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%2f461073%2fhave-multicolumn-respect-table-column-formatting%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

          Entries order in /etc/network/interfaces

          新発田市

          Grub takes very long (several minutes) to open Menu (in Multi-Boot-System)