How to customize the margins of minipages in a beamer frame?












2















I use inmargin for innertheme but sometimes I would like to write two column contents where a certain text extends from the very left to the very right of the page. However, I am still not sure how to control the margins precisely.



I would like to equalize the margin of two minipages by making the clearance of the left box with respect to the left edge of the page equal to the clearance of the right box to the right edge of the page. The output below shows approximately what I want to get except that I want to get it in a more automated fashion rather than by trial and error in adjusting horizontal spaces and widths.



Also, I want beamer to automatically place minipages horizontally in such a way that the margins of both boxes satisfy a pre-determined value. For example setting the margin of the left box with respect to the left side of the paper to 5mm and setting the margin of the right box with respect to the right side of the paper to 10mm. Also, I would like the text to stretch from left to right with a pre-specified and equalized margins to left and right.



enter image description here



documentclass[aspectratio=169, xcolor={x11names}]{beamer}


usecolortheme{seahorse}
useoutertheme{split}
useinnertheme{inmargin}
newlength{widthTextMarginLeft}
setlength{widthTextMarginLeft}{1mm}
setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
setbeamersize{text margin left=widthTextMarginLeft, text margin right=widthTextMarginLeft}


usepackage{adjustbox}

usepackage{amsmath}
usepackage{amssymb, amsfonts}
usepackage{nccmath}
usepackage{mathtools}

usepackage{fvextra}
let verb Verb
newcommand{verbup}[1]{{upshape verb{#1}}}


usepackage{cleveref}
% BEGIN_FOLD

% Single equations (non-breakable)
crefformat{equation}{mbox{Eq. #2(#1)#3}}
crefrangeformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}
crefmultiformat{equation}{mbox{Eqs. #2(#1)#3}}{ and #2(#1)#3}{, #2(#1)#3}{ and #2(#1)#3}
crefrangemultiformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}{ and #3(#1)#4 to #5(#2)#6}{, #3(#1)#4 to #5(#2)#6}{ and #3(#1)#4 to #5(#2)#6}

% END_FOLD


usepackage[defaultmathsizes, subdued, italic, LGRgreek, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD

MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
AtBeginDocument{MTversion*{charter}}


% END_FOLD



% Customize addding contents to left margin
makeatletter
newlength{widthBeamerLeftMargin}
setlength{widthBeamerLeftMargin}{Gm@lmargin}
makeatother

newlength{widthTextMarginMin}
setlength{widthTextMarginMin}{3widthTextMarginLeft}

% minimum clearance of minipages with respect to the left margin (when using minipages)


newlength{widthBeamerLeftMarginX}
setlength{widthBeamerLeftMarginX}{widthBeamerLeftMargin}
addtolength{widthBeamerLeftMarginX}{-widthTextMarginMin}
addtolength{widthBeamerLeftMarginX}{0.9mm}
addtolength{widthBeamerLeftMarginX}{-2mm}

% amount of distance we are required to remove to maintain widthTextMarginMin with respect to the left margin

newlength{widthFullSlideText}
setlength{widthFullSlideText}{paperwidth}
addtolength{widthFullSlideText}{-3widthTextMarginMin}

% amount of text we need to maintain widthTextMarginMin for a single minipage extending slidewide





begin{document}



begin{frame}{Minipages in beamer}

centering
hspace*{-widthBeamerLeftMargin} {adjustbox{minipage={widthFullSlideText}}{When uncovering math contents, it is a good practice to place the verb{&} and the equation label outside the verb{uncover}}}


hspace*{-widthBeamerLeftMarginX}
begin{adjustbox}{minipage={0.45paperwidth}, frame}

begin{align}
S_{L, thinspace n} &= V_{n} thinspace I_{L, thinspace n}^{*}
label{eq:S_L_i_def}
\
intertext{Replacing the current in cref{eq:S_L_i_def}}
S_{L, thinspace n} &= V_{n} left( frac{V_{n}}{Z_{L, thinspace n}} right)^{*}
\
intertext{where $Z_{L, thinspace n}$ is the load impedance at bus $n$. Since mbox{$left| V_{n} right|^{2} = V_{n} V_{n}^{*}$} vspace{0.3baselineskip}}
S_{L, thinspace n}^{*} &= frac{left| V_{n} right|^{2}}{Z_{L, thinspace n}}
label{eq:op_imp_S_L_i_def1}
\
intertext{where vspace{0.3baselineskip}}
S_{L, thinspace n} &= P_{L, thinspace n} + j Q_{L, thinspace n}
label{eq:op_imp_S_L_i_def2}
end{align}

end{adjustbox}
hfill
begin{adjustbox}{minipage={0.45paperwidth}, frame}

begin{align}
Z_{L, thinspace n} &= frac{left| V_{n} right|^{2}}{S_{L, thinspace n}^{*}}
\
Z_{G, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{G, thinspace n}^{*}}
\
Z_{RES, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{RES, thinspace n}^{*}}
end{align}

end{adjustbox}
hspace{widthTextMarginMin}




end{frame}

end{document}









share|improve this question





























    2















    I use inmargin for innertheme but sometimes I would like to write two column contents where a certain text extends from the very left to the very right of the page. However, I am still not sure how to control the margins precisely.



    I would like to equalize the margin of two minipages by making the clearance of the left box with respect to the left edge of the page equal to the clearance of the right box to the right edge of the page. The output below shows approximately what I want to get except that I want to get it in a more automated fashion rather than by trial and error in adjusting horizontal spaces and widths.



    Also, I want beamer to automatically place minipages horizontally in such a way that the margins of both boxes satisfy a pre-determined value. For example setting the margin of the left box with respect to the left side of the paper to 5mm and setting the margin of the right box with respect to the right side of the paper to 10mm. Also, I would like the text to stretch from left to right with a pre-specified and equalized margins to left and right.



    enter image description here



    documentclass[aspectratio=169, xcolor={x11names}]{beamer}


    usecolortheme{seahorse}
    useoutertheme{split}
    useinnertheme{inmargin}
    newlength{widthTextMarginLeft}
    setlength{widthTextMarginLeft}{1mm}
    setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
    setbeamersize{text margin left=widthTextMarginLeft, text margin right=widthTextMarginLeft}


    usepackage{adjustbox}

    usepackage{amsmath}
    usepackage{amssymb, amsfonts}
    usepackage{nccmath}
    usepackage{mathtools}

    usepackage{fvextra}
    let verb Verb
    newcommand{verbup}[1]{{upshape verb{#1}}}


    usepackage{cleveref}
    % BEGIN_FOLD

    % Single equations (non-breakable)
    crefformat{equation}{mbox{Eq. #2(#1)#3}}
    crefrangeformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}
    crefmultiformat{equation}{mbox{Eqs. #2(#1)#3}}{ and #2(#1)#3}{, #2(#1)#3}{ and #2(#1)#3}
    crefrangemultiformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}{ and #3(#1)#4 to #5(#2)#6}{, #3(#1)#4 to #5(#2)#6}{ and #3(#1)#4 to #5(#2)#6}

    % END_FOLD


    usepackage[defaultmathsizes, subdued, italic, LGRgreek, symbolre, symbolmisc]{mathastext}
    % BEGIN_FOLD

    MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
    AtBeginDocument{MTversion*{charter}}


    % END_FOLD



    % Customize addding contents to left margin
    makeatletter
    newlength{widthBeamerLeftMargin}
    setlength{widthBeamerLeftMargin}{Gm@lmargin}
    makeatother

    newlength{widthTextMarginMin}
    setlength{widthTextMarginMin}{3widthTextMarginLeft}

    % minimum clearance of minipages with respect to the left margin (when using minipages)


    newlength{widthBeamerLeftMarginX}
    setlength{widthBeamerLeftMarginX}{widthBeamerLeftMargin}
    addtolength{widthBeamerLeftMarginX}{-widthTextMarginMin}
    addtolength{widthBeamerLeftMarginX}{0.9mm}
    addtolength{widthBeamerLeftMarginX}{-2mm}

    % amount of distance we are required to remove to maintain widthTextMarginMin with respect to the left margin

    newlength{widthFullSlideText}
    setlength{widthFullSlideText}{paperwidth}
    addtolength{widthFullSlideText}{-3widthTextMarginMin}

    % amount of text we need to maintain widthTextMarginMin for a single minipage extending slidewide





    begin{document}



    begin{frame}{Minipages in beamer}

    centering
    hspace*{-widthBeamerLeftMargin} {adjustbox{minipage={widthFullSlideText}}{When uncovering math contents, it is a good practice to place the verb{&} and the equation label outside the verb{uncover}}}


    hspace*{-widthBeamerLeftMarginX}
    begin{adjustbox}{minipage={0.45paperwidth}, frame}

    begin{align}
    S_{L, thinspace n} &= V_{n} thinspace I_{L, thinspace n}^{*}
    label{eq:S_L_i_def}
    \
    intertext{Replacing the current in cref{eq:S_L_i_def}}
    S_{L, thinspace n} &= V_{n} left( frac{V_{n}}{Z_{L, thinspace n}} right)^{*}
    \
    intertext{where $Z_{L, thinspace n}$ is the load impedance at bus $n$. Since mbox{$left| V_{n} right|^{2} = V_{n} V_{n}^{*}$} vspace{0.3baselineskip}}
    S_{L, thinspace n}^{*} &= frac{left| V_{n} right|^{2}}{Z_{L, thinspace n}}
    label{eq:op_imp_S_L_i_def1}
    \
    intertext{where vspace{0.3baselineskip}}
    S_{L, thinspace n} &= P_{L, thinspace n} + j Q_{L, thinspace n}
    label{eq:op_imp_S_L_i_def2}
    end{align}

    end{adjustbox}
    hfill
    begin{adjustbox}{minipage={0.45paperwidth}, frame}

    begin{align}
    Z_{L, thinspace n} &= frac{left| V_{n} right|^{2}}{S_{L, thinspace n}^{*}}
    \
    Z_{G, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{G, thinspace n}^{*}}
    \
    Z_{RES, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{RES, thinspace n}^{*}}
    end{align}

    end{adjustbox}
    hspace{widthTextMarginMin}




    end{frame}

    end{document}









    share|improve this question



























      2












      2








      2








      I use inmargin for innertheme but sometimes I would like to write two column contents where a certain text extends from the very left to the very right of the page. However, I am still not sure how to control the margins precisely.



      I would like to equalize the margin of two minipages by making the clearance of the left box with respect to the left edge of the page equal to the clearance of the right box to the right edge of the page. The output below shows approximately what I want to get except that I want to get it in a more automated fashion rather than by trial and error in adjusting horizontal spaces and widths.



      Also, I want beamer to automatically place minipages horizontally in such a way that the margins of both boxes satisfy a pre-determined value. For example setting the margin of the left box with respect to the left side of the paper to 5mm and setting the margin of the right box with respect to the right side of the paper to 10mm. Also, I would like the text to stretch from left to right with a pre-specified and equalized margins to left and right.



      enter image description here



      documentclass[aspectratio=169, xcolor={x11names}]{beamer}


      usecolortheme{seahorse}
      useoutertheme{split}
      useinnertheme{inmargin}
      newlength{widthTextMarginLeft}
      setlength{widthTextMarginLeft}{1mm}
      setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
      setbeamersize{text margin left=widthTextMarginLeft, text margin right=widthTextMarginLeft}


      usepackage{adjustbox}

      usepackage{amsmath}
      usepackage{amssymb, amsfonts}
      usepackage{nccmath}
      usepackage{mathtools}

      usepackage{fvextra}
      let verb Verb
      newcommand{verbup}[1]{{upshape verb{#1}}}


      usepackage{cleveref}
      % BEGIN_FOLD

      % Single equations (non-breakable)
      crefformat{equation}{mbox{Eq. #2(#1)#3}}
      crefrangeformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}
      crefmultiformat{equation}{mbox{Eqs. #2(#1)#3}}{ and #2(#1)#3}{, #2(#1)#3}{ and #2(#1)#3}
      crefrangemultiformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}{ and #3(#1)#4 to #5(#2)#6}{, #3(#1)#4 to #5(#2)#6}{ and #3(#1)#4 to #5(#2)#6}

      % END_FOLD


      usepackage[defaultmathsizes, subdued, italic, LGRgreek, symbolre, symbolmisc]{mathastext}
      % BEGIN_FOLD

      MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
      AtBeginDocument{MTversion*{charter}}


      % END_FOLD



      % Customize addding contents to left margin
      makeatletter
      newlength{widthBeamerLeftMargin}
      setlength{widthBeamerLeftMargin}{Gm@lmargin}
      makeatother

      newlength{widthTextMarginMin}
      setlength{widthTextMarginMin}{3widthTextMarginLeft}

      % minimum clearance of minipages with respect to the left margin (when using minipages)


      newlength{widthBeamerLeftMarginX}
      setlength{widthBeamerLeftMarginX}{widthBeamerLeftMargin}
      addtolength{widthBeamerLeftMarginX}{-widthTextMarginMin}
      addtolength{widthBeamerLeftMarginX}{0.9mm}
      addtolength{widthBeamerLeftMarginX}{-2mm}

      % amount of distance we are required to remove to maintain widthTextMarginMin with respect to the left margin

      newlength{widthFullSlideText}
      setlength{widthFullSlideText}{paperwidth}
      addtolength{widthFullSlideText}{-3widthTextMarginMin}

      % amount of text we need to maintain widthTextMarginMin for a single minipage extending slidewide





      begin{document}



      begin{frame}{Minipages in beamer}

      centering
      hspace*{-widthBeamerLeftMargin} {adjustbox{minipage={widthFullSlideText}}{When uncovering math contents, it is a good practice to place the verb{&} and the equation label outside the verb{uncover}}}


      hspace*{-widthBeamerLeftMarginX}
      begin{adjustbox}{minipage={0.45paperwidth}, frame}

      begin{align}
      S_{L, thinspace n} &= V_{n} thinspace I_{L, thinspace n}^{*}
      label{eq:S_L_i_def}
      \
      intertext{Replacing the current in cref{eq:S_L_i_def}}
      S_{L, thinspace n} &= V_{n} left( frac{V_{n}}{Z_{L, thinspace n}} right)^{*}
      \
      intertext{where $Z_{L, thinspace n}$ is the load impedance at bus $n$. Since mbox{$left| V_{n} right|^{2} = V_{n} V_{n}^{*}$} vspace{0.3baselineskip}}
      S_{L, thinspace n}^{*} &= frac{left| V_{n} right|^{2}}{Z_{L, thinspace n}}
      label{eq:op_imp_S_L_i_def1}
      \
      intertext{where vspace{0.3baselineskip}}
      S_{L, thinspace n} &= P_{L, thinspace n} + j Q_{L, thinspace n}
      label{eq:op_imp_S_L_i_def2}
      end{align}

      end{adjustbox}
      hfill
      begin{adjustbox}{minipage={0.45paperwidth}, frame}

      begin{align}
      Z_{L, thinspace n} &= frac{left| V_{n} right|^{2}}{S_{L, thinspace n}^{*}}
      \
      Z_{G, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{G, thinspace n}^{*}}
      \
      Z_{RES, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{RES, thinspace n}^{*}}
      end{align}

      end{adjustbox}
      hspace{widthTextMarginMin}




      end{frame}

      end{document}









      share|improve this question
















      I use inmargin for innertheme but sometimes I would like to write two column contents where a certain text extends from the very left to the very right of the page. However, I am still not sure how to control the margins precisely.



      I would like to equalize the margin of two minipages by making the clearance of the left box with respect to the left edge of the page equal to the clearance of the right box to the right edge of the page. The output below shows approximately what I want to get except that I want to get it in a more automated fashion rather than by trial and error in adjusting horizontal spaces and widths.



      Also, I want beamer to automatically place minipages horizontally in such a way that the margins of both boxes satisfy a pre-determined value. For example setting the margin of the left box with respect to the left side of the paper to 5mm and setting the margin of the right box with respect to the right side of the paper to 10mm. Also, I would like the text to stretch from left to right with a pre-specified and equalized margins to left and right.



      enter image description here



      documentclass[aspectratio=169, xcolor={x11names}]{beamer}


      usecolortheme{seahorse}
      useoutertheme{split}
      useinnertheme{inmargin}
      newlength{widthTextMarginLeft}
      setlength{widthTextMarginLeft}{1mm}
      setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
      setbeamersize{text margin left=widthTextMarginLeft, text margin right=widthTextMarginLeft}


      usepackage{adjustbox}

      usepackage{amsmath}
      usepackage{amssymb, amsfonts}
      usepackage{nccmath}
      usepackage{mathtools}

      usepackage{fvextra}
      let verb Verb
      newcommand{verbup}[1]{{upshape verb{#1}}}


      usepackage{cleveref}
      % BEGIN_FOLD

      % Single equations (non-breakable)
      crefformat{equation}{mbox{Eq. #2(#1)#3}}
      crefrangeformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}
      crefmultiformat{equation}{mbox{Eqs. #2(#1)#3}}{ and #2(#1)#3}{, #2(#1)#3}{ and #2(#1)#3}
      crefrangemultiformat{equation}{mbox{Eqs. #3(#1)#4 to #5(#2)#6}}{ and #3(#1)#4 to #5(#2)#6}{, #3(#1)#4 to #5(#2)#6}{ and #3(#1)#4 to #5(#2)#6}

      % END_FOLD


      usepackage[defaultmathsizes, subdued, italic, LGRgreek, symbolre, symbolmisc]{mathastext}
      % BEGIN_FOLD

      MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}
      AtBeginDocument{MTversion*{charter}}


      % END_FOLD



      % Customize addding contents to left margin
      makeatletter
      newlength{widthBeamerLeftMargin}
      setlength{widthBeamerLeftMargin}{Gm@lmargin}
      makeatother

      newlength{widthTextMarginMin}
      setlength{widthTextMarginMin}{3widthTextMarginLeft}

      % minimum clearance of minipages with respect to the left margin (when using minipages)


      newlength{widthBeamerLeftMarginX}
      setlength{widthBeamerLeftMarginX}{widthBeamerLeftMargin}
      addtolength{widthBeamerLeftMarginX}{-widthTextMarginMin}
      addtolength{widthBeamerLeftMarginX}{0.9mm}
      addtolength{widthBeamerLeftMarginX}{-2mm}

      % amount of distance we are required to remove to maintain widthTextMarginMin with respect to the left margin

      newlength{widthFullSlideText}
      setlength{widthFullSlideText}{paperwidth}
      addtolength{widthFullSlideText}{-3widthTextMarginMin}

      % amount of text we need to maintain widthTextMarginMin for a single minipage extending slidewide





      begin{document}



      begin{frame}{Minipages in beamer}

      centering
      hspace*{-widthBeamerLeftMargin} {adjustbox{minipage={widthFullSlideText}}{When uncovering math contents, it is a good practice to place the verb{&} and the equation label outside the verb{uncover}}}


      hspace*{-widthBeamerLeftMarginX}
      begin{adjustbox}{minipage={0.45paperwidth}, frame}

      begin{align}
      S_{L, thinspace n} &= V_{n} thinspace I_{L, thinspace n}^{*}
      label{eq:S_L_i_def}
      \
      intertext{Replacing the current in cref{eq:S_L_i_def}}
      S_{L, thinspace n} &= V_{n} left( frac{V_{n}}{Z_{L, thinspace n}} right)^{*}
      \
      intertext{where $Z_{L, thinspace n}$ is the load impedance at bus $n$. Since mbox{$left| V_{n} right|^{2} = V_{n} V_{n}^{*}$} vspace{0.3baselineskip}}
      S_{L, thinspace n}^{*} &= frac{left| V_{n} right|^{2}}{Z_{L, thinspace n}}
      label{eq:op_imp_S_L_i_def1}
      \
      intertext{where vspace{0.3baselineskip}}
      S_{L, thinspace n} &= P_{L, thinspace n} + j Q_{L, thinspace n}
      label{eq:op_imp_S_L_i_def2}
      end{align}

      end{adjustbox}
      hfill
      begin{adjustbox}{minipage={0.45paperwidth}, frame}

      begin{align}
      Z_{L, thinspace n} &= frac{left| V_{n} right|^{2}}{S_{L, thinspace n}^{*}}
      \
      Z_{G, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{G, thinspace n}^{*}}
      \
      Z_{RES, thinspace n} &= -frac{left| V_{n} right|^{2}}{S_{RES, thinspace n}^{*}}
      end{align}

      end{adjustbox}
      hspace{widthTextMarginMin}




      end{frame}

      end{document}






      beamer margins minipage






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 17 at 16:14









      JPi

      10.1k21551




      10.1k21551










      asked Mar 16 at 12:59









      Al-Motasem AldaoudeyehAl-Motasem Aldaoudeyeh

      1,857414




      1,857414






















          1 Answer
          1






          active

          oldest

          votes


















          1















          • to remove the sidebar on a specific frame, you could use the same technique as in https://tex.stackexchange.com/a/423246/36296 and change the hoffset of the page


          • for changing the margins mid document, you could hack the Gm@lmargin and Gm@rmargin values, but don't forget that you will have to recalculate textwidth etc.


          • I would not use an adjustbox for elements that contain text, you risk that the will get scaled and result in a suboptimal choice of font shape


          • with the onlytextwidth option beamer columns will automatically placed to fill the whole text width. If the sum of both columns is not enough space will be inserted in the centre. So it is not necessary to try to manually imitated beamers columns mechanism with adjustboxes


          • newcommand{verbup}[1]{{upshape verb{#1}}} looks like a very bad idea





          documentclass[aspectratio=169, xcolor={x11names}]{beamer}

          usepackage{amsmath}
          usepackage{amssymb, amsfonts}
          usepackage{nccmath}
          usepackage{mathtools}
          usepackage{cleveref}

          usecolortheme{seahorse}
          useoutertheme{split}
          useinnertheme{inmargin}

          newlength{widthTextMarginLeft}
          setlength{widthTextMarginLeft}{1mm}
          setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
          setbeamersize{text margin left=1mm, text margin right=1mm}


          begin{document}

          {
          makeatletter
          defGm@lmargin{0.5cm}%
          defGm@rmargin{0.5cm}%
          textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
          hsizetextwidth
          columnwidthtextwidth
          hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftrelax
          makeatother
          begin{frame}
          frametitle{Minipages in beamer}

          rule{textwidth}{1pt}

          begin{columns}[T,onlytextwidth]

          begin{column}{.48textwidth}
          rule{textwidth}{1pt}
          end{column}

          begin{column}{.48textwidth}
          rule{textwidth}{1pt}
          end{column}

          end{columns}

          end{frame}
          }

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


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479783%2fhow-to-customize-the-margins-of-minipages-in-a-beamer-frame%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









            1















            • to remove the sidebar on a specific frame, you could use the same technique as in https://tex.stackexchange.com/a/423246/36296 and change the hoffset of the page


            • for changing the margins mid document, you could hack the Gm@lmargin and Gm@rmargin values, but don't forget that you will have to recalculate textwidth etc.


            • I would not use an adjustbox for elements that contain text, you risk that the will get scaled and result in a suboptimal choice of font shape


            • with the onlytextwidth option beamer columns will automatically placed to fill the whole text width. If the sum of both columns is not enough space will be inserted in the centre. So it is not necessary to try to manually imitated beamers columns mechanism with adjustboxes


            • newcommand{verbup}[1]{{upshape verb{#1}}} looks like a very bad idea





            documentclass[aspectratio=169, xcolor={x11names}]{beamer}

            usepackage{amsmath}
            usepackage{amssymb, amsfonts}
            usepackage{nccmath}
            usepackage{mathtools}
            usepackage{cleveref}

            usecolortheme{seahorse}
            useoutertheme{split}
            useinnertheme{inmargin}

            newlength{widthTextMarginLeft}
            setlength{widthTextMarginLeft}{1mm}
            setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
            setbeamersize{text margin left=1mm, text margin right=1mm}


            begin{document}

            {
            makeatletter
            defGm@lmargin{0.5cm}%
            defGm@rmargin{0.5cm}%
            textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
            hsizetextwidth
            columnwidthtextwidth
            hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftrelax
            makeatother
            begin{frame}
            frametitle{Minipages in beamer}

            rule{textwidth}{1pt}

            begin{columns}[T,onlytextwidth]

            begin{column}{.48textwidth}
            rule{textwidth}{1pt}
            end{column}

            begin{column}{.48textwidth}
            rule{textwidth}{1pt}
            end{column}

            end{columns}

            end{frame}
            }

            end{document}


            enter image description here






            share|improve this answer






























              1















              • to remove the sidebar on a specific frame, you could use the same technique as in https://tex.stackexchange.com/a/423246/36296 and change the hoffset of the page


              • for changing the margins mid document, you could hack the Gm@lmargin and Gm@rmargin values, but don't forget that you will have to recalculate textwidth etc.


              • I would not use an adjustbox for elements that contain text, you risk that the will get scaled and result in a suboptimal choice of font shape


              • with the onlytextwidth option beamer columns will automatically placed to fill the whole text width. If the sum of both columns is not enough space will be inserted in the centre. So it is not necessary to try to manually imitated beamers columns mechanism with adjustboxes


              • newcommand{verbup}[1]{{upshape verb{#1}}} looks like a very bad idea





              documentclass[aspectratio=169, xcolor={x11names}]{beamer}

              usepackage{amsmath}
              usepackage{amssymb, amsfonts}
              usepackage{nccmath}
              usepackage{mathtools}
              usepackage{cleveref}

              usecolortheme{seahorse}
              useoutertheme{split}
              useinnertheme{inmargin}

              newlength{widthTextMarginLeft}
              setlength{widthTextMarginLeft}{1mm}
              setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
              setbeamersize{text margin left=1mm, text margin right=1mm}


              begin{document}

              {
              makeatletter
              defGm@lmargin{0.5cm}%
              defGm@rmargin{0.5cm}%
              textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
              hsizetextwidth
              columnwidthtextwidth
              hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftrelax
              makeatother
              begin{frame}
              frametitle{Minipages in beamer}

              rule{textwidth}{1pt}

              begin{columns}[T,onlytextwidth]

              begin{column}{.48textwidth}
              rule{textwidth}{1pt}
              end{column}

              begin{column}{.48textwidth}
              rule{textwidth}{1pt}
              end{column}

              end{columns}

              end{frame}
              }

              end{document}


              enter image description here






              share|improve this answer




























                1












                1








                1








                • to remove the sidebar on a specific frame, you could use the same technique as in https://tex.stackexchange.com/a/423246/36296 and change the hoffset of the page


                • for changing the margins mid document, you could hack the Gm@lmargin and Gm@rmargin values, but don't forget that you will have to recalculate textwidth etc.


                • I would not use an adjustbox for elements that contain text, you risk that the will get scaled and result in a suboptimal choice of font shape


                • with the onlytextwidth option beamer columns will automatically placed to fill the whole text width. If the sum of both columns is not enough space will be inserted in the centre. So it is not necessary to try to manually imitated beamers columns mechanism with adjustboxes


                • newcommand{verbup}[1]{{upshape verb{#1}}} looks like a very bad idea





                documentclass[aspectratio=169, xcolor={x11names}]{beamer}

                usepackage{amsmath}
                usepackage{amssymb, amsfonts}
                usepackage{nccmath}
                usepackage{mathtools}
                usepackage{cleveref}

                usecolortheme{seahorse}
                useoutertheme{split}
                useinnertheme{inmargin}

                newlength{widthTextMarginLeft}
                setlength{widthTextMarginLeft}{1mm}
                setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
                setbeamersize{text margin left=1mm, text margin right=1mm}


                begin{document}

                {
                makeatletter
                defGm@lmargin{0.5cm}%
                defGm@rmargin{0.5cm}%
                textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
                hsizetextwidth
                columnwidthtextwidth
                hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftrelax
                makeatother
                begin{frame}
                frametitle{Minipages in beamer}

                rule{textwidth}{1pt}

                begin{columns}[T,onlytextwidth]

                begin{column}{.48textwidth}
                rule{textwidth}{1pt}
                end{column}

                begin{column}{.48textwidth}
                rule{textwidth}{1pt}
                end{column}

                end{columns}

                end{frame}
                }

                end{document}


                enter image description here






                share|improve this answer
















                • to remove the sidebar on a specific frame, you could use the same technique as in https://tex.stackexchange.com/a/423246/36296 and change the hoffset of the page


                • for changing the margins mid document, you could hack the Gm@lmargin and Gm@rmargin values, but don't forget that you will have to recalculate textwidth etc.


                • I would not use an adjustbox for elements that contain text, you risk that the will get scaled and result in a suboptimal choice of font shape


                • with the onlytextwidth option beamer columns will automatically placed to fill the whole text width. If the sum of both columns is not enough space will be inserted in the centre. So it is not necessary to try to manually imitated beamers columns mechanism with adjustboxes


                • newcommand{verbup}[1]{{upshape verb{#1}}} looks like a very bad idea





                documentclass[aspectratio=169, xcolor={x11names}]{beamer}

                usepackage{amsmath}
                usepackage{amssymb, amsfonts}
                usepackage{nccmath}
                usepackage{mathtools}
                usepackage{cleveref}

                usecolortheme{seahorse}
                useoutertheme{split}
                useinnertheme{inmargin}

                newlength{widthTextMarginLeft}
                setlength{widthTextMarginLeft}{1mm}
                setbeamersize{sidebar width left=3cm, sidebar width right=0cm}
                setbeamersize{text margin left=1mm, text margin right=1mm}


                begin{document}

                {
                makeatletter
                defGm@lmargin{0.5cm}%
                defGm@rmargin{0.5cm}%
                textwidth=dimexprpaperwidth-Gm@lmargin-Gm@rmarginrelax
                hsizetextwidth
                columnwidthtextwidth
                hoffset=dimexpr-beamer@leftsidebar+Gm@lmargin-widthTextMarginLeftrelax
                makeatother
                begin{frame}
                frametitle{Minipages in beamer}

                rule{textwidth}{1pt}

                begin{columns}[T,onlytextwidth]

                begin{column}{.48textwidth}
                rule{textwidth}{1pt}
                end{column}

                begin{column}{.48textwidth}
                rule{textwidth}{1pt}
                end{column}

                end{columns}

                end{frame}
                }

                end{document}


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 17 at 16:17

























                answered Mar 17 at 16:06









                samcartersamcarter

                92.9k7105300




                92.9k7105300






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479783%2fhow-to-customize-the-margins-of-minipages-in-a-beamer-frame%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?