Table next to figure with table caption on top but figure caption on bottom











up vote
4
down vote

favorite












I use the following code, which I modified from the code I found here (second example), to place a table next to a figure.



However, in comparison to the example linked above, I would like to have the figure caption be placed on the bottom of the figure and the table caption on the top of the table, while both should be aligned correctly at the bottom. So the figure caption should be aligned with the bottom of the table.



Unfortunatly, the following code shifts the table and the figure vertically, such that they are not aligned.



How can I fix that?



documentclass[11pt,a4paper,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage[font=small,labelfont=bf,tableposition=top]{caption}

begin{document}
begin{minipage}{textwidth}
begin{minipage}[b]{0.49textwidth}
centering
rule{6.4cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
captionof{figure}{A table beside a figure}
end{minipage}
hfill
begin{minipage}[b]{0.49textwidth}
centering
captionof{table}{A table beside a figure}
begin{tabular}{cc}hline
Table head & Table head \ hline
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \ hline
end{tabular}
end{minipage}
end{minipage}
end{document}


Edit: Changed height of figure.










share|improve this question




















  • 2




    Does using begin{minipage}[c] instead begin{minipage}[b] for both minipages give more like what you want?
    – David Purton
    Nov 11 at 6:39










  • Almost, thanks. I edited my question.
    – SampleTime
    Nov 11 at 7:10















up vote
4
down vote

favorite












I use the following code, which I modified from the code I found here (second example), to place a table next to a figure.



However, in comparison to the example linked above, I would like to have the figure caption be placed on the bottom of the figure and the table caption on the top of the table, while both should be aligned correctly at the bottom. So the figure caption should be aligned with the bottom of the table.



Unfortunatly, the following code shifts the table and the figure vertically, such that they are not aligned.



How can I fix that?



documentclass[11pt,a4paper,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage[font=small,labelfont=bf,tableposition=top]{caption}

begin{document}
begin{minipage}{textwidth}
begin{minipage}[b]{0.49textwidth}
centering
rule{6.4cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
captionof{figure}{A table beside a figure}
end{minipage}
hfill
begin{minipage}[b]{0.49textwidth}
centering
captionof{table}{A table beside a figure}
begin{tabular}{cc}hline
Table head & Table head \ hline
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \ hline
end{tabular}
end{minipage}
end{minipage}
end{document}


Edit: Changed height of figure.










share|improve this question




















  • 2




    Does using begin{minipage}[c] instead begin{minipage}[b] for both minipages give more like what you want?
    – David Purton
    Nov 11 at 6:39










  • Almost, thanks. I edited my question.
    – SampleTime
    Nov 11 at 7:10













up vote
4
down vote

favorite









up vote
4
down vote

favorite











I use the following code, which I modified from the code I found here (second example), to place a table next to a figure.



However, in comparison to the example linked above, I would like to have the figure caption be placed on the bottom of the figure and the table caption on the top of the table, while both should be aligned correctly at the bottom. So the figure caption should be aligned with the bottom of the table.



Unfortunatly, the following code shifts the table and the figure vertically, such that they are not aligned.



How can I fix that?



documentclass[11pt,a4paper,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage[font=small,labelfont=bf,tableposition=top]{caption}

begin{document}
begin{minipage}{textwidth}
begin{minipage}[b]{0.49textwidth}
centering
rule{6.4cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
captionof{figure}{A table beside a figure}
end{minipage}
hfill
begin{minipage}[b]{0.49textwidth}
centering
captionof{table}{A table beside a figure}
begin{tabular}{cc}hline
Table head & Table head \ hline
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \ hline
end{tabular}
end{minipage}
end{minipage}
end{document}


Edit: Changed height of figure.










share|improve this question















I use the following code, which I modified from the code I found here (second example), to place a table next to a figure.



However, in comparison to the example linked above, I would like to have the figure caption be placed on the bottom of the figure and the table caption on the top of the table, while both should be aligned correctly at the bottom. So the figure caption should be aligned with the bottom of the table.



Unfortunatly, the following code shifts the table and the figure vertically, such that they are not aligned.



How can I fix that?



documentclass[11pt,a4paper,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage[font=small,labelfont=bf,tableposition=top]{caption}

begin{document}
begin{minipage}{textwidth}
begin{minipage}[b]{0.49textwidth}
centering
rule{6.4cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
captionof{figure}{A table beside a figure}
end{minipage}
hfill
begin{minipage}[b]{0.49textwidth}
centering
captionof{table}{A table beside a figure}
begin{tabular}{cc}hline
Table head & Table head \ hline
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \ hline
end{tabular}
end{minipage}
end{minipage}
end{document}


Edit: Changed height of figure.







tables floats subfloats






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 7:09

























asked Nov 11 at 6:14









SampleTime

2426




2426








  • 2




    Does using begin{minipage}[c] instead begin{minipage}[b] for both minipages give more like what you want?
    – David Purton
    Nov 11 at 6:39










  • Almost, thanks. I edited my question.
    – SampleTime
    Nov 11 at 7:10














  • 2




    Does using begin{minipage}[c] instead begin{minipage}[b] for both minipages give more like what you want?
    – David Purton
    Nov 11 at 6:39










  • Almost, thanks. I edited my question.
    – SampleTime
    Nov 11 at 7:10








2




2




Does using begin{minipage}[c] instead begin{minipage}[b] for both minipages give more like what you want?
– David Purton
Nov 11 at 6:39




Does using begin{minipage}[c] instead begin{minipage}[b] for both minipages give more like what you want?
– David Purton
Nov 11 at 6:39












Almost, thanks. I edited my question.
– SampleTime
Nov 11 at 7:10




Almost, thanks. I edited my question.
– SampleTime
Nov 11 at 7:10










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Set the tabular to be aligned at the [b]aseline as well:



enter image description here



documentclass{article}

usepackage[
font = small,
labelfont = bf,
tableposition = top
]{caption}

begin{document}

noindent
begin{minipage}{textwidth}
begin{minipage}[b]{0.49textwidth}
centering
rule{5.5cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
captionof{figure}{A table beside a figure}
end{minipage}
hfill
begin{minipage}[b]{0.49textwidth}
centering
captionof{table}{A table beside a figure}
begin{tabular}[b]{cc}
hline
Table head & Table head \
hline
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
Some values & Some values \
hline
end{tabular}
end{minipage}
end{minipage}

end{document}





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',
    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%2f459423%2ftable-next-to-figure-with-table-caption-on-top-but-figure-caption-on-bottom%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








    up vote
    3
    down vote



    accepted










    Set the tabular to be aligned at the [b]aseline as well:



    enter image description here



    documentclass{article}

    usepackage[
    font = small,
    labelfont = bf,
    tableposition = top
    ]{caption}

    begin{document}

    noindent
    begin{minipage}{textwidth}
    begin{minipage}[b]{0.49textwidth}
    centering
    rule{5.5cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
    captionof{figure}{A table beside a figure}
    end{minipage}
    hfill
    begin{minipage}[b]{0.49textwidth}
    centering
    captionof{table}{A table beside a figure}
    begin{tabular}[b]{cc}
    hline
    Table head & Table head \
    hline
    Some values & Some values \
    Some values & Some values \
    Some values & Some values \
    Some values & Some values \
    Some values & Some values \
    Some values & Some values \
    hline
    end{tabular}
    end{minipage}
    end{minipage}

    end{document}





    share|improve this answer

























      up vote
      3
      down vote



      accepted










      Set the tabular to be aligned at the [b]aseline as well:



      enter image description here



      documentclass{article}

      usepackage[
      font = small,
      labelfont = bf,
      tableposition = top
      ]{caption}

      begin{document}

      noindent
      begin{minipage}{textwidth}
      begin{minipage}[b]{0.49textwidth}
      centering
      rule{5.5cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
      captionof{figure}{A table beside a figure}
      end{minipage}
      hfill
      begin{minipage}[b]{0.49textwidth}
      centering
      captionof{table}{A table beside a figure}
      begin{tabular}[b]{cc}
      hline
      Table head & Table head \
      hline
      Some values & Some values \
      Some values & Some values \
      Some values & Some values \
      Some values & Some values \
      Some values & Some values \
      Some values & Some values \
      hline
      end{tabular}
      end{minipage}
      end{minipage}

      end{document}





      share|improve this answer























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        Set the tabular to be aligned at the [b]aseline as well:



        enter image description here



        documentclass{article}

        usepackage[
        font = small,
        labelfont = bf,
        tableposition = top
        ]{caption}

        begin{document}

        noindent
        begin{minipage}{textwidth}
        begin{minipage}[b]{0.49textwidth}
        centering
        rule{5.5cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
        captionof{figure}{A table beside a figure}
        end{minipage}
        hfill
        begin{minipage}[b]{0.49textwidth}
        centering
        captionof{table}{A table beside a figure}
        begin{tabular}[b]{cc}
        hline
        Table head & Table head \
        hline
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        hline
        end{tabular}
        end{minipage}
        end{minipage}

        end{document}





        share|improve this answer












        Set the tabular to be aligned at the [b]aseline as well:



        enter image description here



        documentclass{article}

        usepackage[
        font = small,
        labelfont = bf,
        tableposition = top
        ]{caption}

        begin{document}

        noindent
        begin{minipage}{textwidth}
        begin{minipage}[b]{0.49textwidth}
        centering
        rule{5.5cm}{2.6cm} % Height changed from 3.6cm to 2.6cm
        captionof{figure}{A table beside a figure}
        end{minipage}
        hfill
        begin{minipage}[b]{0.49textwidth}
        centering
        captionof{table}{A table beside a figure}
        begin{tabular}[b]{cc}
        hline
        Table head & Table head \
        hline
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        Some values & Some values \
        hline
        end{tabular}
        end{minipage}
        end{minipage}

        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 11 at 7:16









        Werner

        433k609521634




        433k609521634






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f459423%2ftable-next-to-figure-with-table-caption-on-top-but-figure-caption-on-bottom%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

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python