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:

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
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.
add a comment |
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:

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
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.
add a comment |
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:

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
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:

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
longtable multicol
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.
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.
add a comment |
add a comment |
active
oldest
votes
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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