Side-to-Side figures with a sidebar [beamer]












1















I am doing a Beamer presentation and I am trying to put two figures next to each other using minipage. The problem is that my presentation contains a right sidebar and when I set the minipage width to .5textwidth the two figures seem to be centred around the centre of the page, ignoring the sidebar on the right. In a sense, I would like the textwidth to take in account the presence of the sidebar. Here is the piece of code I'm struggling with :



usetheme{Madrid}
useoutertheme[right]{sidebar}
setbeamercovered{dynamic}

begin{document}

begin{frame}
titlepage
end{frame}

begin{frame}{Outline}
tableofcontents
end{frame}

section{Problem 1}

begin{frame}{Problem 1}

begin{figure}[H]
centering
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image1}
end{minipage}%
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image2}
end{minipage}
end{figure}









share|improve this question























  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Feb 23 at 13:28
















1















I am doing a Beamer presentation and I am trying to put two figures next to each other using minipage. The problem is that my presentation contains a right sidebar and when I set the minipage width to .5textwidth the two figures seem to be centred around the centre of the page, ignoring the sidebar on the right. In a sense, I would like the textwidth to take in account the presence of the sidebar. Here is the piece of code I'm struggling with :



usetheme{Madrid}
useoutertheme[right]{sidebar}
setbeamercovered{dynamic}

begin{document}

begin{frame}
titlepage
end{frame}

begin{frame}{Outline}
tableofcontents
end{frame}

section{Problem 1}

begin{frame}{Problem 1}

begin{figure}[H]
centering
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image1}
end{minipage}%
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image2}
end{minipage}
end{figure}









share|improve this question























  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Feb 23 at 13:28














1












1








1








I am doing a Beamer presentation and I am trying to put two figures next to each other using minipage. The problem is that my presentation contains a right sidebar and when I set the minipage width to .5textwidth the two figures seem to be centred around the centre of the page, ignoring the sidebar on the right. In a sense, I would like the textwidth to take in account the presence of the sidebar. Here is the piece of code I'm struggling with :



usetheme{Madrid}
useoutertheme[right]{sidebar}
setbeamercovered{dynamic}

begin{document}

begin{frame}
titlepage
end{frame}

begin{frame}{Outline}
tableofcontents
end{frame}

section{Problem 1}

begin{frame}{Problem 1}

begin{figure}[H]
centering
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image1}
end{minipage}%
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image2}
end{minipage}
end{figure}









share|improve this question














I am doing a Beamer presentation and I am trying to put two figures next to each other using minipage. The problem is that my presentation contains a right sidebar and when I set the minipage width to .5textwidth the two figures seem to be centred around the centre of the page, ignoring the sidebar on the right. In a sense, I would like the textwidth to take in account the presence of the sidebar. Here is the piece of code I'm struggling with :



usetheme{Madrid}
useoutertheme[right]{sidebar}
setbeamercovered{dynamic}

begin{document}

begin{frame}
titlepage
end{frame}

begin{frame}{Outline}
tableofcontents
end{frame}

section{Problem 1}

begin{frame}{Problem 1}

begin{figure}[H]
centering
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image1}
end{minipage}%
begin{minipage}{.5textwidth}
centering
includegraphics[scale=.25,angle=-90]{image2}
end{minipage}
end{figure}






beamer floats minipage textwidth sidebyside






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 23 at 13:19









FagioFagio

61




61













  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Feb 23 at 13:28



















  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Feb 23 at 13:28

















Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

– dexteritas
Feb 23 at 13:28





Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

– dexteritas
Feb 23 at 13:28










2 Answers
2






active

oldest

votes


















1















  • Use width=textwidth (or height=textwidth if rotated by 90°) for the images and it works fine.

  • Use example-image to get a MWE.


Code:



documentclass{beamer}

usetheme{Madrid}
useoutertheme[right]{sidebar}
setbeamercovered{dynamic}

begin{document}

section{Problem 1}

begin{frame}{Problem 1}
begin{figure}
centering
begin{minipage}{.5textwidth}
centering
includegraphics[width=textwidth]{example-image}
end{minipage}%
begin{minipage}{.5textwidth}
centering
includegraphics[height=textwidth,angle=-90]{example-image}
end{minipage}
end{figure}
end{frame}

end{document}


Result:



enter image description here






share|improve this answer


























  • Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

    – Fagio
    Feb 23 at 13:55











  • Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

    – dexteritas
    Feb 25 at 19:39



















0














beamer has an environment for that: columns.



documentclass{beamer}
usetheme{Madrid}
useoutertheme[right]{sidebar}
setbeamercovered{dynamic}

begin{document}


section{Problem 1}

begin{frame}[t]
frametitle{Problem 1}

begin{columns}[t]
begin{column}{.45textwidth}
centering
includegraphics[scale=.25,angle=-90]{example-image-a}
end{column}%
begin{column}{.45textwidth}
centering
includegraphics[scale=.25,angle=-90]{example-image-b}
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%2f476321%2fside-to-side-figures-with-a-sidebar-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









    1















    • Use width=textwidth (or height=textwidth if rotated by 90°) for the images and it works fine.

    • Use example-image to get a MWE.


    Code:



    documentclass{beamer}

    usetheme{Madrid}
    useoutertheme[right]{sidebar}
    setbeamercovered{dynamic}

    begin{document}

    section{Problem 1}

    begin{frame}{Problem 1}
    begin{figure}
    centering
    begin{minipage}{.5textwidth}
    centering
    includegraphics[width=textwidth]{example-image}
    end{minipage}%
    begin{minipage}{.5textwidth}
    centering
    includegraphics[height=textwidth,angle=-90]{example-image}
    end{minipage}
    end{figure}
    end{frame}

    end{document}


    Result:



    enter image description here






    share|improve this answer


























    • Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

      – Fagio
      Feb 23 at 13:55











    • Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

      – dexteritas
      Feb 25 at 19:39
















    1















    • Use width=textwidth (or height=textwidth if rotated by 90°) for the images and it works fine.

    • Use example-image to get a MWE.


    Code:



    documentclass{beamer}

    usetheme{Madrid}
    useoutertheme[right]{sidebar}
    setbeamercovered{dynamic}

    begin{document}

    section{Problem 1}

    begin{frame}{Problem 1}
    begin{figure}
    centering
    begin{minipage}{.5textwidth}
    centering
    includegraphics[width=textwidth]{example-image}
    end{minipage}%
    begin{minipage}{.5textwidth}
    centering
    includegraphics[height=textwidth,angle=-90]{example-image}
    end{minipage}
    end{figure}
    end{frame}

    end{document}


    Result:



    enter image description here






    share|improve this answer


























    • Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

      – Fagio
      Feb 23 at 13:55











    • Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

      – dexteritas
      Feb 25 at 19:39














    1












    1








    1








    • Use width=textwidth (or height=textwidth if rotated by 90°) for the images and it works fine.

    • Use example-image to get a MWE.


    Code:



    documentclass{beamer}

    usetheme{Madrid}
    useoutertheme[right]{sidebar}
    setbeamercovered{dynamic}

    begin{document}

    section{Problem 1}

    begin{frame}{Problem 1}
    begin{figure}
    centering
    begin{minipage}{.5textwidth}
    centering
    includegraphics[width=textwidth]{example-image}
    end{minipage}%
    begin{minipage}{.5textwidth}
    centering
    includegraphics[height=textwidth,angle=-90]{example-image}
    end{minipage}
    end{figure}
    end{frame}

    end{document}


    Result:



    enter image description here






    share|improve this answer
















    • Use width=textwidth (or height=textwidth if rotated by 90°) for the images and it works fine.

    • Use example-image to get a MWE.


    Code:



    documentclass{beamer}

    usetheme{Madrid}
    useoutertheme[right]{sidebar}
    setbeamercovered{dynamic}

    begin{document}

    section{Problem 1}

    begin{frame}{Problem 1}
    begin{figure}
    centering
    begin{minipage}{.5textwidth}
    centering
    includegraphics[width=textwidth]{example-image}
    end{minipage}%
    begin{minipage}{.5textwidth}
    centering
    includegraphics[height=textwidth,angle=-90]{example-image}
    end{minipage}
    end{figure}
    end{frame}

    end{document}


    Result:



    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Feb 23 at 13:43

























    answered Feb 23 at 13:35









    dexteritasdexteritas

    3,7921127




    3,7921127













    • Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

      – Fagio
      Feb 23 at 13:55











    • Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

      – dexteritas
      Feb 25 at 19:39



















    • Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

      – Fagio
      Feb 23 at 13:55











    • Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

      – dexteritas
      Feb 25 at 19:39

















    Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

    – Fagio
    Feb 23 at 13:55





    Thank you, it was actually really helpful! Now, how can I make the image bigger while keeping them centred?

    – Fagio
    Feb 23 at 13:55













    Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

    – dexteritas
    Feb 25 at 19:39





    Why do you want to make the images bigger? By setting them to textwidth you get the maximum size (without overlapping each other or the borders).

    – dexteritas
    Feb 25 at 19:39











    0














    beamer has an environment for that: columns.



    documentclass{beamer}
    usetheme{Madrid}
    useoutertheme[right]{sidebar}
    setbeamercovered{dynamic}

    begin{document}


    section{Problem 1}

    begin{frame}[t]
    frametitle{Problem 1}

    begin{columns}[t]
    begin{column}{.45textwidth}
    centering
    includegraphics[scale=.25,angle=-90]{example-image-a}
    end{column}%
    begin{column}{.45textwidth}
    centering
    includegraphics[scale=.25,angle=-90]{example-image-b}
    end{column}
    end{columns}
    end{frame}
    end{document}


    enter image description here






    share|improve this answer




























      0














      beamer has an environment for that: columns.



      documentclass{beamer}
      usetheme{Madrid}
      useoutertheme[right]{sidebar}
      setbeamercovered{dynamic}

      begin{document}


      section{Problem 1}

      begin{frame}[t]
      frametitle{Problem 1}

      begin{columns}[t]
      begin{column}{.45textwidth}
      centering
      includegraphics[scale=.25,angle=-90]{example-image-a}
      end{column}%
      begin{column}{.45textwidth}
      centering
      includegraphics[scale=.25,angle=-90]{example-image-b}
      end{column}
      end{columns}
      end{frame}
      end{document}


      enter image description here






      share|improve this answer


























        0












        0








        0







        beamer has an environment for that: columns.



        documentclass{beamer}
        usetheme{Madrid}
        useoutertheme[right]{sidebar}
        setbeamercovered{dynamic}

        begin{document}


        section{Problem 1}

        begin{frame}[t]
        frametitle{Problem 1}

        begin{columns}[t]
        begin{column}{.45textwidth}
        centering
        includegraphics[scale=.25,angle=-90]{example-image-a}
        end{column}%
        begin{column}{.45textwidth}
        centering
        includegraphics[scale=.25,angle=-90]{example-image-b}
        end{column}
        end{columns}
        end{frame}
        end{document}


        enter image description here






        share|improve this answer













        beamer has an environment for that: columns.



        documentclass{beamer}
        usetheme{Madrid}
        useoutertheme[right]{sidebar}
        setbeamercovered{dynamic}

        begin{document}


        section{Problem 1}

        begin{frame}[t]
        frametitle{Problem 1}

        begin{columns}[t]
        begin{column}{.45textwidth}
        centering
        includegraphics[scale=.25,angle=-90]{example-image-a}
        end{column}%
        begin{column}{.45textwidth}
        centering
        includegraphics[scale=.25,angle=-90]{example-image-b}
        end{column}
        end{columns}
        end{frame}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 23 at 13:38









        marmotmarmot

        105k4126241




        105k4126241






























            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%2f476321%2fside-to-side-figures-with-a-sidebar-beamer%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

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?