A table is not shrinking to predefined maximum size (beamer)
I am trying to create two tables and put them beside each other. Each table should shrink to the rectangle shown in green while maintaining the aspect ratio. However, it does not seem that this is the case. Replacing the table with a blind text seems to work well.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{adjustbox}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb, amsfonts}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
% END_FOLD
% Set margins
newlength{widthTextMarginLeftPageWide}
setlength{widthTextMarginLeftPageWide}{5mm}
newlength{widthTextMarginRightPageWide}
setlength{widthTextMarginRightPageWide}{5mm}
% Command to change margins for a page wide
makeatletter
newcommand{framePageWide}{
defGm@lmargin{widthTextMarginLeftPageWide}%
defGm@rmargin{widthTextMarginRightPageWide}%
textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
hsizetextwidth
columnwidthtextwidth
hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftPageWiderelax
}
makeatother
begin{document}
newcolumntype{q}[1]{>{raggedright arraybackslashhspace{0pt}}m{#1}}
newcolumntype{w}[1]{>{centering arraybackslashhspace{0pt}}m{#1}}
newcolumntype{e}[1]{>{raggedleft arraybackslashhspace{0pt}}m{#1}}
{framePageWide
begin{frame}{Results}
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With Our Approach}
\
& multicolumn{3}{c}{(Extended Brown's Method)}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $3times10^{-6}$ & $4.3times10^{-6}$ & $5times10^{-6}$
\
2383-bus & $3times10^{-6}$ & $3.8times10^{-6}$ & $6times10^{-6}$
\
3120-bus & $3times10^{-6}$ & $3.2times10^{-6}$ & $4times10^{-6}$
\
bottomrule
end{tabular}
end{adjustbox}
hfill
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With}
\
& multicolumn{3}{c}{Conventional Brown's Method}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $0.089$ & $0.092$ & $0.1000$
\
2383-bus & $163.8$ & $166.2$ & $172.5$
\
3120-bus & $387.2$ & $398.8$ & $415.6$
\
bottomrule
end{tabular}
end{adjustbox}
end{frame}
}
end{document}
tables beamer
|
show 1 more comment
I am trying to create two tables and put them beside each other. Each table should shrink to the rectangle shown in green while maintaining the aspect ratio. However, it does not seem that this is the case. Replacing the table with a blind text seems to work well.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{adjustbox}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb, amsfonts}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
% END_FOLD
% Set margins
newlength{widthTextMarginLeftPageWide}
setlength{widthTextMarginLeftPageWide}{5mm}
newlength{widthTextMarginRightPageWide}
setlength{widthTextMarginRightPageWide}{5mm}
% Command to change margins for a page wide
makeatletter
newcommand{framePageWide}{
defGm@lmargin{widthTextMarginLeftPageWide}%
defGm@rmargin{widthTextMarginRightPageWide}%
textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
hsizetextwidth
columnwidthtextwidth
hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftPageWiderelax
}
makeatother
begin{document}
newcolumntype{q}[1]{>{raggedright arraybackslashhspace{0pt}}m{#1}}
newcolumntype{w}[1]{>{centering arraybackslashhspace{0pt}}m{#1}}
newcolumntype{e}[1]{>{raggedleft arraybackslashhspace{0pt}}m{#1}}
{framePageWide
begin{frame}{Results}
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With Our Approach}
\
& multicolumn{3}{c}{(Extended Brown's Method)}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $3times10^{-6}$ & $4.3times10^{-6}$ & $5times10^{-6}$
\
2383-bus & $3times10^{-6}$ & $3.8times10^{-6}$ & $6times10^{-6}$
\
3120-bus & $3times10^{-6}$ & $3.2times10^{-6}$ & $4times10^{-6}$
\
bottomrule
end{tabular}
end{adjustbox}
hfill
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With}
\
& multicolumn{3}{c}{Conventional Brown's Method}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $0.089$ & $0.092$ & $0.1000$
\
2383-bus & $163.8$ & $166.2$ & $172.5$
\
3120-bus & $387.2$ & $398.8$ & $415.6$
\
bottomrule
end{tabular}
end{adjustbox}
end{frame}
}
end{document}
tables beamer
3
Shrinking elements that contain text is really not a good idea. Use a smaller font size or change the layout of your table to make it fit in the available space. See tex.stackexchange.com/questions/425453/… for more information
– samcarter
Mar 21 at 10:32
1
For example you could save some space by using shorter column headers
– samcarter
Mar 21 at 10:34
@samcarter I know but if the contents were scaled while maintaining aspect ratio, it would not be that hard to just zoom to the area of interest. Also, the idea here is not to rescale the table to be much smaller that the text is not readable but rather to force the table to fit exactly the specified size which helps create neater slides (e.g., preventing it from overlapping with adjacent contents)
– Al-Motasem Aldaoudeyeh
Mar 21 at 11:07
1
Maintaining the same aspect ratio is not the point. The problem is that when you scale down the text, you will still get the letter shapes which are made for normal size. If you use a smaller font size instead, you will get other letter shapes that are made to be easily read at this size.
– samcarter
Mar 21 at 11:48
1
Do you really have to repeat theSystem Size
column? Without it the table would most likely fit without the need to scale it.
– leandriis
Mar 21 at 12:33
|
show 1 more comment
I am trying to create two tables and put them beside each other. Each table should shrink to the rectangle shown in green while maintaining the aspect ratio. However, it does not seem that this is the case. Replacing the table with a blind text seems to work well.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{adjustbox}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb, amsfonts}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
% END_FOLD
% Set margins
newlength{widthTextMarginLeftPageWide}
setlength{widthTextMarginLeftPageWide}{5mm}
newlength{widthTextMarginRightPageWide}
setlength{widthTextMarginRightPageWide}{5mm}
% Command to change margins for a page wide
makeatletter
newcommand{framePageWide}{
defGm@lmargin{widthTextMarginLeftPageWide}%
defGm@rmargin{widthTextMarginRightPageWide}%
textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
hsizetextwidth
columnwidthtextwidth
hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftPageWiderelax
}
makeatother
begin{document}
newcolumntype{q}[1]{>{raggedright arraybackslashhspace{0pt}}m{#1}}
newcolumntype{w}[1]{>{centering arraybackslashhspace{0pt}}m{#1}}
newcolumntype{e}[1]{>{raggedleft arraybackslashhspace{0pt}}m{#1}}
{framePageWide
begin{frame}{Results}
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With Our Approach}
\
& multicolumn{3}{c}{(Extended Brown's Method)}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $3times10^{-6}$ & $4.3times10^{-6}$ & $5times10^{-6}$
\
2383-bus & $3times10^{-6}$ & $3.8times10^{-6}$ & $6times10^{-6}$
\
3120-bus & $3times10^{-6}$ & $3.2times10^{-6}$ & $4times10^{-6}$
\
bottomrule
end{tabular}
end{adjustbox}
hfill
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With}
\
& multicolumn{3}{c}{Conventional Brown's Method}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $0.089$ & $0.092$ & $0.1000$
\
2383-bus & $163.8$ & $166.2$ & $172.5$
\
3120-bus & $387.2$ & $398.8$ & $415.6$
\
bottomrule
end{tabular}
end{adjustbox}
end{frame}
}
end{document}
tables beamer
I am trying to create two tables and put them beside each other. Each table should shrink to the rectangle shown in green while maintaining the aspect ratio. However, it does not seem that this is the case. Replacing the table with a blind text seems to work well.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{adjustbox}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb, amsfonts}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
% END_FOLD
% Set margins
newlength{widthTextMarginLeftPageWide}
setlength{widthTextMarginLeftPageWide}{5mm}
newlength{widthTextMarginRightPageWide}
setlength{widthTextMarginRightPageWide}{5mm}
% Command to change margins for a page wide
makeatletter
newcommand{framePageWide}{
defGm@lmargin{widthTextMarginLeftPageWide}%
defGm@rmargin{widthTextMarginRightPageWide}%
textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
hsizetextwidth
columnwidthtextwidth
hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftPageWiderelax
}
makeatother
begin{document}
newcolumntype{q}[1]{>{raggedright arraybackslashhspace{0pt}}m{#1}}
newcolumntype{w}[1]{>{centering arraybackslashhspace{0pt}}m{#1}}
newcolumntype{e}[1]{>{raggedleft arraybackslashhspace{0pt}}m{#1}}
{framePageWide
begin{frame}{Results}
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With Our Approach}
\
& multicolumn{3}{c}{(Extended Brown's Method)}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $3times10^{-6}$ & $4.3times10^{-6}$ & $5times10^{-6}$
\
2383-bus & $3times10^{-6}$ & $3.8times10^{-6}$ & $6times10^{-6}$
\
3120-bus & $3times10^{-6}$ & $3.2times10^{-6}$ & $4times10^{-6}$
\
bottomrule
end{tabular}
end{adjustbox}
hfill
begin{adjustbox}{minipage={0.45textwidth}, max totalsize={0.45textwidth}{!}, cframe=SpringGreen3 0.3mm}
begin{tabular}{w{2cm} @{extracolsep{1mm}}|w{1.5cm} w{1.5cm} w{1.5cm}}
toprule
multirow{3}{=}{centering System Size} & multicolumn{3}{c}{Time Needed With}
\
& multicolumn{3}{c}{Conventional Brown's Method}
\
Xcline{2-4}{0.25mm}
& min & mean & max
\
Xhline{0.25mm}
200-bus & $0.089$ & $0.092$ & $0.1000$
\
2383-bus & $163.8$ & $166.2$ & $172.5$
\
3120-bus & $387.2$ & $398.8$ & $415.6$
\
bottomrule
end{tabular}
end{adjustbox}
end{frame}
}
end{document}
tables beamer
tables beamer
asked Mar 21 at 10:25
Al-Motasem AldaoudeyehAl-Motasem Aldaoudeyeh
1,869414
1,869414
3
Shrinking elements that contain text is really not a good idea. Use a smaller font size or change the layout of your table to make it fit in the available space. See tex.stackexchange.com/questions/425453/… for more information
– samcarter
Mar 21 at 10:32
1
For example you could save some space by using shorter column headers
– samcarter
Mar 21 at 10:34
@samcarter I know but if the contents were scaled while maintaining aspect ratio, it would not be that hard to just zoom to the area of interest. Also, the idea here is not to rescale the table to be much smaller that the text is not readable but rather to force the table to fit exactly the specified size which helps create neater slides (e.g., preventing it from overlapping with adjacent contents)
– Al-Motasem Aldaoudeyeh
Mar 21 at 11:07
1
Maintaining the same aspect ratio is not the point. The problem is that when you scale down the text, you will still get the letter shapes which are made for normal size. If you use a smaller font size instead, you will get other letter shapes that are made to be easily read at this size.
– samcarter
Mar 21 at 11:48
1
Do you really have to repeat theSystem Size
column? Without it the table would most likely fit without the need to scale it.
– leandriis
Mar 21 at 12:33
|
show 1 more comment
3
Shrinking elements that contain text is really not a good idea. Use a smaller font size or change the layout of your table to make it fit in the available space. See tex.stackexchange.com/questions/425453/… for more information
– samcarter
Mar 21 at 10:32
1
For example you could save some space by using shorter column headers
– samcarter
Mar 21 at 10:34
@samcarter I know but if the contents were scaled while maintaining aspect ratio, it would not be that hard to just zoom to the area of interest. Also, the idea here is not to rescale the table to be much smaller that the text is not readable but rather to force the table to fit exactly the specified size which helps create neater slides (e.g., preventing it from overlapping with adjacent contents)
– Al-Motasem Aldaoudeyeh
Mar 21 at 11:07
1
Maintaining the same aspect ratio is not the point. The problem is that when you scale down the text, you will still get the letter shapes which are made for normal size. If you use a smaller font size instead, you will get other letter shapes that are made to be easily read at this size.
– samcarter
Mar 21 at 11:48
1
Do you really have to repeat theSystem Size
column? Without it the table would most likely fit without the need to scale it.
– leandriis
Mar 21 at 12:33
3
3
Shrinking elements that contain text is really not a good idea. Use a smaller font size or change the layout of your table to make it fit in the available space. See tex.stackexchange.com/questions/425453/… for more information
– samcarter
Mar 21 at 10:32
Shrinking elements that contain text is really not a good idea. Use a smaller font size or change the layout of your table to make it fit in the available space. See tex.stackexchange.com/questions/425453/… for more information
– samcarter
Mar 21 at 10:32
1
1
For example you could save some space by using shorter column headers
– samcarter
Mar 21 at 10:34
For example you could save some space by using shorter column headers
– samcarter
Mar 21 at 10:34
@samcarter I know but if the contents were scaled while maintaining aspect ratio, it would not be that hard to just zoom to the area of interest. Also, the idea here is not to rescale the table to be much smaller that the text is not readable but rather to force the table to fit exactly the specified size which helps create neater slides (e.g., preventing it from overlapping with adjacent contents)
– Al-Motasem Aldaoudeyeh
Mar 21 at 11:07
@samcarter I know but if the contents were scaled while maintaining aspect ratio, it would not be that hard to just zoom to the area of interest. Also, the idea here is not to rescale the table to be much smaller that the text is not readable but rather to force the table to fit exactly the specified size which helps create neater slides (e.g., preventing it from overlapping with adjacent contents)
– Al-Motasem Aldaoudeyeh
Mar 21 at 11:07
1
1
Maintaining the same aspect ratio is not the point. The problem is that when you scale down the text, you will still get the letter shapes which are made for normal size. If you use a smaller font size instead, you will get other letter shapes that are made to be easily read at this size.
– samcarter
Mar 21 at 11:48
Maintaining the same aspect ratio is not the point. The problem is that when you scale down the text, you will still get the letter shapes which are made for normal size. If you use a smaller font size instead, you will get other letter shapes that are made to be easily read at this size.
– samcarter
Mar 21 at 11:48
1
1
Do you really have to repeat the
System Size
column? Without it the table would most likely fit without the need to scale it.– leandriis
Mar 21 at 12:33
Do you really have to repeat the
System Size
column? Without it the table would most likely fit without the need to scale it.– leandriis
Mar 21 at 12:33
|
show 1 more comment
2 Answers
2
active
oldest
votes
i would redesign your tables as follows:
- remove first column in the second table
- remove
hfill
between tables - use
S
column type fromsiunitx
package - for tables use
tabularx
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{siunitx}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
usepackage{tabularx}
newcommandmcx[1]{multicolumn{1}{>{centeringarraybackslash}X}{#1}}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
begin{document}
begin{frame}{Results}
small
begin{tabularx}{0.55linewidth}{@{} p{3.8em}
S[table-format=1.0e1]
S[table-format=1.1e1]
S[table-format=1.0e1]
@{} }
toprule
multirow{3}{=}{centering System Size}
& multicolumn{3}{c}{makecell{Time Needed\
With Our Approach\
(Extended Brown's Method)}} \
cmidrule(lr){2-4}
& mcx{min} & mcx{mean} & mcx{max}
\
midrule
200-bus & 3e6 & 4.3e6 & 5e6 \
2383-bus & 3e6 & 3.8e6 & 6e6 \
3120-bus & 3e6 & 3.2e6 & 4e6 \
bottomrule
end{tabularx}begin{tabularx}{0.4linewidth}{@{}
S[table-format=3.3]
S[table-format=3.3]
S[table-format=3.3]
@{} }
toprule
multicolumn{3}{c}{makecell{Time Needed\
With Conventional\
Brown's Method}} \
cmidrule(lr){1-3}
mcx{min} & mcx{mean} & mcx{max}
\
midrule
0.089 & 0.092 & 0.100 \
163.8 & 166.2 & 172.5 \
387.2 & 398.8 & 415.6 \
bottomrule
end{tabularx}
end{frame}
end{document}
add a comment |
Here's another suggestion for combining the two tables into a single table. It uses a tabular*
environment, with width set to textwidth
. The S
column type of the siunitx
package is employed to format and align the numeric cells. I'd also make the frame title a lot more descriptive.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
%useinnertheme{inmargin}
usepackage{ragged2e,booktabs,array}
usepackage{amsmath,amssymb,siunitx}
begin{document}
begin{frame}{Times needed with extended and conventional Brown's methods}
sisetup{exponent-product=cdot}
setlengthtabcolsep{0pt}
begin{tabular*}{textwidth}{@{extracolsep{fill}}
l S[table-format=1e-1]
S[table-format=1.1e-1]
S[table-format=1e-1]
*{3}{S[table-format=3.3]} }
toprule
System Size & multicolumn{6}{c}{Times needed with dots} \
cmidrule{2-7}
& multicolumn{3}{c}{Ext. Brown's Method}
& multicolumn{3}{c}{Conv. Brown's Method}\
& multicolumn{3}{c}{(Our Method)}\
cmidrule{2-4} cmidrule{5-7}
& {min} & {mean} & {max} & {min} & {mean} & {max} \
midrule
phantom{2}200-bus
& 3e-6 & 4.3e-6 & 5e-6 & 0.089 & 0.092 & 0.100 \
2383-bus & 3e-6 & 3.8e-6 & 6e-6 & 163.8 & 166.2 & 172.5 \
3120-bus & 3e-6 & 3.2e-6 & 4e-6 & 387.2 & 398.8 & 415.6 \
bottomrule
end{tabular*}
end{frame}
end{document}
add a comment |
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
});
}
});
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%2f480654%2fa-table-is-not-shrinking-to-predefined-maximum-size-beamer%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
i would redesign your tables as follows:
- remove first column in the second table
- remove
hfill
between tables - use
S
column type fromsiunitx
package - for tables use
tabularx
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{siunitx}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
usepackage{tabularx}
newcommandmcx[1]{multicolumn{1}{>{centeringarraybackslash}X}{#1}}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
begin{document}
begin{frame}{Results}
small
begin{tabularx}{0.55linewidth}{@{} p{3.8em}
S[table-format=1.0e1]
S[table-format=1.1e1]
S[table-format=1.0e1]
@{} }
toprule
multirow{3}{=}{centering System Size}
& multicolumn{3}{c}{makecell{Time Needed\
With Our Approach\
(Extended Brown's Method)}} \
cmidrule(lr){2-4}
& mcx{min} & mcx{mean} & mcx{max}
\
midrule
200-bus & 3e6 & 4.3e6 & 5e6 \
2383-bus & 3e6 & 3.8e6 & 6e6 \
3120-bus & 3e6 & 3.2e6 & 4e6 \
bottomrule
end{tabularx}begin{tabularx}{0.4linewidth}{@{}
S[table-format=3.3]
S[table-format=3.3]
S[table-format=3.3]
@{} }
toprule
multicolumn{3}{c}{makecell{Time Needed\
With Conventional\
Brown's Method}} \
cmidrule(lr){1-3}
mcx{min} & mcx{mean} & mcx{max}
\
midrule
0.089 & 0.092 & 0.100 \
163.8 & 166.2 & 172.5 \
387.2 & 398.8 & 415.6 \
bottomrule
end{tabularx}
end{frame}
end{document}
add a comment |
i would redesign your tables as follows:
- remove first column in the second table
- remove
hfill
between tables - use
S
column type fromsiunitx
package - for tables use
tabularx
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{siunitx}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
usepackage{tabularx}
newcommandmcx[1]{multicolumn{1}{>{centeringarraybackslash}X}{#1}}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
begin{document}
begin{frame}{Results}
small
begin{tabularx}{0.55linewidth}{@{} p{3.8em}
S[table-format=1.0e1]
S[table-format=1.1e1]
S[table-format=1.0e1]
@{} }
toprule
multirow{3}{=}{centering System Size}
& multicolumn{3}{c}{makecell{Time Needed\
With Our Approach\
(Extended Brown's Method)}} \
cmidrule(lr){2-4}
& mcx{min} & mcx{mean} & mcx{max}
\
midrule
200-bus & 3e6 & 4.3e6 & 5e6 \
2383-bus & 3e6 & 3.8e6 & 6e6 \
3120-bus & 3e6 & 3.2e6 & 4e6 \
bottomrule
end{tabularx}begin{tabularx}{0.4linewidth}{@{}
S[table-format=3.3]
S[table-format=3.3]
S[table-format=3.3]
@{} }
toprule
multicolumn{3}{c}{makecell{Time Needed\
With Conventional\
Brown's Method}} \
cmidrule(lr){1-3}
mcx{min} & mcx{mean} & mcx{max}
\
midrule
0.089 & 0.092 & 0.100 \
163.8 & 166.2 & 172.5 \
387.2 & 398.8 & 415.6 \
bottomrule
end{tabularx}
end{frame}
end{document}
add a comment |
i would redesign your tables as follows:
- remove first column in the second table
- remove
hfill
between tables - use
S
column type fromsiunitx
package - for tables use
tabularx
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{siunitx}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
usepackage{tabularx}
newcommandmcx[1]{multicolumn{1}{>{centeringarraybackslash}X}{#1}}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
begin{document}
begin{frame}{Results}
small
begin{tabularx}{0.55linewidth}{@{} p{3.8em}
S[table-format=1.0e1]
S[table-format=1.1e1]
S[table-format=1.0e1]
@{} }
toprule
multirow{3}{=}{centering System Size}
& multicolumn{3}{c}{makecell{Time Needed\
With Our Approach\
(Extended Brown's Method)}} \
cmidrule(lr){2-4}
& mcx{min} & mcx{mean} & mcx{max}
\
midrule
200-bus & 3e6 & 4.3e6 & 5e6 \
2383-bus & 3e6 & 3.8e6 & 6e6 \
3120-bus & 3e6 & 3.2e6 & 4e6 \
bottomrule
end{tabularx}begin{tabularx}{0.4linewidth}{@{}
S[table-format=3.3]
S[table-format=3.3]
S[table-format=3.3]
@{} }
toprule
multicolumn{3}{c}{makecell{Time Needed\
With Conventional\
Brown's Method}} \
cmidrule(lr){1-3}
mcx{min} & mcx{mean} & mcx{max}
\
midrule
0.089 & 0.092 & 0.100 \
163.8 & 166.2 & 172.5 \
387.2 & 398.8 & 415.6 \
bottomrule
end{tabularx}
end{frame}
end{document}
i would redesign your tables as follows:
- remove first column in the second table
- remove
hfill
between tables - use
S
column type fromsiunitx
package - for tables use
tabularx
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
useinnertheme{inmargin}
usepackage{siunitx}
usepackage{ragged2e}
% ========== Table packages ==========
usepackage{booktabs}
usepackage{makecell}
usepackage{multirow}
usepackage{tabularx}
newcommandmcx[1]{multicolumn{1}{>{centeringarraybackslash}X}{#1}}
% ========== Equations and math packages ==========
usepackage{amsmath}
usepackage{amssymb}
usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD
MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}
begin{document}
begin{frame}{Results}
small
begin{tabularx}{0.55linewidth}{@{} p{3.8em}
S[table-format=1.0e1]
S[table-format=1.1e1]
S[table-format=1.0e1]
@{} }
toprule
multirow{3}{=}{centering System Size}
& multicolumn{3}{c}{makecell{Time Needed\
With Our Approach\
(Extended Brown's Method)}} \
cmidrule(lr){2-4}
& mcx{min} & mcx{mean} & mcx{max}
\
midrule
200-bus & 3e6 & 4.3e6 & 5e6 \
2383-bus & 3e6 & 3.8e6 & 6e6 \
3120-bus & 3e6 & 3.2e6 & 4e6 \
bottomrule
end{tabularx}begin{tabularx}{0.4linewidth}{@{}
S[table-format=3.3]
S[table-format=3.3]
S[table-format=3.3]
@{} }
toprule
multicolumn{3}{c}{makecell{Time Needed\
With Conventional\
Brown's Method}} \
cmidrule(lr){1-3}
mcx{min} & mcx{mean} & mcx{max}
\
midrule
0.089 & 0.092 & 0.100 \
163.8 & 166.2 & 172.5 \
387.2 & 398.8 & 415.6 \
bottomrule
end{tabularx}
end{frame}
end{document}
edited Mar 21 at 13:03
answered Mar 21 at 12:52
ZarkoZarko
128k868168
128k868168
add a comment |
add a comment |
Here's another suggestion for combining the two tables into a single table. It uses a tabular*
environment, with width set to textwidth
. The S
column type of the siunitx
package is employed to format and align the numeric cells. I'd also make the frame title a lot more descriptive.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
%useinnertheme{inmargin}
usepackage{ragged2e,booktabs,array}
usepackage{amsmath,amssymb,siunitx}
begin{document}
begin{frame}{Times needed with extended and conventional Brown's methods}
sisetup{exponent-product=cdot}
setlengthtabcolsep{0pt}
begin{tabular*}{textwidth}{@{extracolsep{fill}}
l S[table-format=1e-1]
S[table-format=1.1e-1]
S[table-format=1e-1]
*{3}{S[table-format=3.3]} }
toprule
System Size & multicolumn{6}{c}{Times needed with dots} \
cmidrule{2-7}
& multicolumn{3}{c}{Ext. Brown's Method}
& multicolumn{3}{c}{Conv. Brown's Method}\
& multicolumn{3}{c}{(Our Method)}\
cmidrule{2-4} cmidrule{5-7}
& {min} & {mean} & {max} & {min} & {mean} & {max} \
midrule
phantom{2}200-bus
& 3e-6 & 4.3e-6 & 5e-6 & 0.089 & 0.092 & 0.100 \
2383-bus & 3e-6 & 3.8e-6 & 6e-6 & 163.8 & 166.2 & 172.5 \
3120-bus & 3e-6 & 3.2e-6 & 4e-6 & 387.2 & 398.8 & 415.6 \
bottomrule
end{tabular*}
end{frame}
end{document}
add a comment |
Here's another suggestion for combining the two tables into a single table. It uses a tabular*
environment, with width set to textwidth
. The S
column type of the siunitx
package is employed to format and align the numeric cells. I'd also make the frame title a lot more descriptive.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
%useinnertheme{inmargin}
usepackage{ragged2e,booktabs,array}
usepackage{amsmath,amssymb,siunitx}
begin{document}
begin{frame}{Times needed with extended and conventional Brown's methods}
sisetup{exponent-product=cdot}
setlengthtabcolsep{0pt}
begin{tabular*}{textwidth}{@{extracolsep{fill}}
l S[table-format=1e-1]
S[table-format=1.1e-1]
S[table-format=1e-1]
*{3}{S[table-format=3.3]} }
toprule
System Size & multicolumn{6}{c}{Times needed with dots} \
cmidrule{2-7}
& multicolumn{3}{c}{Ext. Brown's Method}
& multicolumn{3}{c}{Conv. Brown's Method}\
& multicolumn{3}{c}{(Our Method)}\
cmidrule{2-4} cmidrule{5-7}
& {min} & {mean} & {max} & {min} & {mean} & {max} \
midrule
phantom{2}200-bus
& 3e-6 & 4.3e-6 & 5e-6 & 0.089 & 0.092 & 0.100 \
2383-bus & 3e-6 & 3.8e-6 & 6e-6 & 163.8 & 166.2 & 172.5 \
3120-bus & 3e-6 & 3.2e-6 & 4e-6 & 387.2 & 398.8 & 415.6 \
bottomrule
end{tabular*}
end{frame}
end{document}
add a comment |
Here's another suggestion for combining the two tables into a single table. It uses a tabular*
environment, with width set to textwidth
. The S
column type of the siunitx
package is employed to format and align the numeric cells. I'd also make the frame title a lot more descriptive.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
%useinnertheme{inmargin}
usepackage{ragged2e,booktabs,array}
usepackage{amsmath,amssymb,siunitx}
begin{document}
begin{frame}{Times needed with extended and conventional Brown's methods}
sisetup{exponent-product=cdot}
setlengthtabcolsep{0pt}
begin{tabular*}{textwidth}{@{extracolsep{fill}}
l S[table-format=1e-1]
S[table-format=1.1e-1]
S[table-format=1e-1]
*{3}{S[table-format=3.3]} }
toprule
System Size & multicolumn{6}{c}{Times needed with dots} \
cmidrule{2-7}
& multicolumn{3}{c}{Ext. Brown's Method}
& multicolumn{3}{c}{Conv. Brown's Method}\
& multicolumn{3}{c}{(Our Method)}\
cmidrule{2-4} cmidrule{5-7}
& {min} & {mean} & {max} & {min} & {mean} & {max} \
midrule
phantom{2}200-bus
& 3e-6 & 4.3e-6 & 5e-6 & 0.089 & 0.092 & 0.100 \
2383-bus & 3e-6 & 3.8e-6 & 6e-6 & 163.8 & 166.2 & 172.5 \
3120-bus & 3e-6 & 3.2e-6 & 4e-6 & 387.2 & 398.8 & 415.6 \
bottomrule
end{tabular*}
end{frame}
end{document}
Here's another suggestion for combining the two tables into a single table. It uses a tabular*
environment, with width set to textwidth
. The S
column type of the siunitx
package is employed to format and align the numeric cells. I'd also make the frame title a lot more descriptive.
documentclass[aspectratio=169, xcolor={x11names}]{beamer}
usecolortheme{seahorse}
useoutertheme{miniframes}
%useinnertheme{inmargin}
usepackage{ragged2e,booktabs,array}
usepackage{amsmath,amssymb,siunitx}
begin{document}
begin{frame}{Times needed with extended and conventional Brown's methods}
sisetup{exponent-product=cdot}
setlengthtabcolsep{0pt}
begin{tabular*}{textwidth}{@{extracolsep{fill}}
l S[table-format=1e-1]
S[table-format=1.1e-1]
S[table-format=1e-1]
*{3}{S[table-format=3.3]} }
toprule
System Size & multicolumn{6}{c}{Times needed with dots} \
cmidrule{2-7}
& multicolumn{3}{c}{Ext. Brown's Method}
& multicolumn{3}{c}{Conv. Brown's Method}\
& multicolumn{3}{c}{(Our Method)}\
cmidrule{2-4} cmidrule{5-7}
& {min} & {mean} & {max} & {min} & {mean} & {max} \
midrule
phantom{2}200-bus
& 3e-6 & 4.3e-6 & 5e-6 & 0.089 & 0.092 & 0.100 \
2383-bus & 3e-6 & 3.8e-6 & 6e-6 & 163.8 & 166.2 & 172.5 \
3120-bus & 3e-6 & 3.2e-6 & 4e-6 & 387.2 & 398.8 & 415.6 \
bottomrule
end{tabular*}
end{frame}
end{document}
edited Mar 21 at 17:32
answered Mar 21 at 16:08
MicoMico
284k31388778
284k31388778
add a comment |
add a comment |
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.
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%2f480654%2fa-table-is-not-shrinking-to-predefined-maximum-size-beamer%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
3
Shrinking elements that contain text is really not a good idea. Use a smaller font size or change the layout of your table to make it fit in the available space. See tex.stackexchange.com/questions/425453/… for more information
– samcarter
Mar 21 at 10:32
1
For example you could save some space by using shorter column headers
– samcarter
Mar 21 at 10:34
@samcarter I know but if the contents were scaled while maintaining aspect ratio, it would not be that hard to just zoom to the area of interest. Also, the idea here is not to rescale the table to be much smaller that the text is not readable but rather to force the table to fit exactly the specified size which helps create neater slides (e.g., preventing it from overlapping with adjacent contents)
– Al-Motasem Aldaoudeyeh
Mar 21 at 11:07
1
Maintaining the same aspect ratio is not the point. The problem is that when you scale down the text, you will still get the letter shapes which are made for normal size. If you use a smaller font size instead, you will get other letter shapes that are made to be easily read at this size.
– samcarter
Mar 21 at 11:48
1
Do you really have to repeat the
System Size
column? Without it the table would most likely fit without the need to scale it.– leandriis
Mar 21 at 12:33