Fully justifying subfigures












0















In a figure environment, I can use centering to achieve this effect:



begin{figure}
centering
begin{subfigure}{0.3textwidth} A end{subfigure}
begin{subfigure}{0.3textwidth} B end{subfigure}
begin{subfigure}{0.3textwidth} C end{subfigure}
end{figure}


And they would be stacked together like this in the output



-ABC-


Where - denotes space.



Instead of centering, could we justify?, i.e.



A-B-C


Of course I can manually do it by inserting hspace{0.5textwidth} between A-B and B-C, but is there something more automatic available?



I tried justify from ragged2e which didn't work, and neither did begin{justify}. I assume these are for text and that's why they didn't work.










share|improve this question























  • as always justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use end{subfigure}hfill begin{subfigure} between the figures

    – David Carlisle
    7 hours ago











  • The subfigures are acually left-justified by default (if you omit centering) so that leaves space at the right. You're right about hfill though, that did the trick. I didn't know I could use it multiple times on the same line. You could post it as an answer.

    – Peeyush Kushwaha
    7 hours ago











  • No. As I say they are subject to the standard paragraph justification but you have a one line paragraph, it is exactly the same as if you have a parbox{textwidth}{a b c} the paragagrah a b c is justified but as teh last line has parfillski added and ther is only one line, it looks the same as left justified unless you set parfillskip to 0pt or add hfill between the letters. there is no difference between positioning subfigures and positioning letters, it is exactly the same code.

    – David Carlisle
    6 hours ago











  • Oh wow. Yes, setting setlengthparfillskip{0pt} works. What's the best place to put it? I've put it right after begin{figure}. I think it's a neater way and you should include it in your answer to make it more complete.

    – Peeyush Kushwaha
    4 hours ago











  • That only works if the subfigures are big enough that one word space between each figure is enough stretch to make them full width. adding hfill is far more general as that is infinite stretch.

    – David Carlisle
    4 hours ago
















0















In a figure environment, I can use centering to achieve this effect:



begin{figure}
centering
begin{subfigure}{0.3textwidth} A end{subfigure}
begin{subfigure}{0.3textwidth} B end{subfigure}
begin{subfigure}{0.3textwidth} C end{subfigure}
end{figure}


And they would be stacked together like this in the output



-ABC-


Where - denotes space.



Instead of centering, could we justify?, i.e.



A-B-C


Of course I can manually do it by inserting hspace{0.5textwidth} between A-B and B-C, but is there something more automatic available?



I tried justify from ragged2e which didn't work, and neither did begin{justify}. I assume these are for text and that's why they didn't work.










share|improve this question























  • as always justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use end{subfigure}hfill begin{subfigure} between the figures

    – David Carlisle
    7 hours ago











  • The subfigures are acually left-justified by default (if you omit centering) so that leaves space at the right. You're right about hfill though, that did the trick. I didn't know I could use it multiple times on the same line. You could post it as an answer.

    – Peeyush Kushwaha
    7 hours ago











  • No. As I say they are subject to the standard paragraph justification but you have a one line paragraph, it is exactly the same as if you have a parbox{textwidth}{a b c} the paragagrah a b c is justified but as teh last line has parfillski added and ther is only one line, it looks the same as left justified unless you set parfillskip to 0pt or add hfill between the letters. there is no difference between positioning subfigures and positioning letters, it is exactly the same code.

    – David Carlisle
    6 hours ago











  • Oh wow. Yes, setting setlengthparfillskip{0pt} works. What's the best place to put it? I've put it right after begin{figure}. I think it's a neater way and you should include it in your answer to make it more complete.

    – Peeyush Kushwaha
    4 hours ago











  • That only works if the subfigures are big enough that one word space between each figure is enough stretch to make them full width. adding hfill is far more general as that is infinite stretch.

    – David Carlisle
    4 hours ago














0












0








0








In a figure environment, I can use centering to achieve this effect:



begin{figure}
centering
begin{subfigure}{0.3textwidth} A end{subfigure}
begin{subfigure}{0.3textwidth} B end{subfigure}
begin{subfigure}{0.3textwidth} C end{subfigure}
end{figure}


And they would be stacked together like this in the output



-ABC-


Where - denotes space.



Instead of centering, could we justify?, i.e.



A-B-C


Of course I can manually do it by inserting hspace{0.5textwidth} between A-B and B-C, but is there something more automatic available?



I tried justify from ragged2e which didn't work, and neither did begin{justify}. I assume these are for text and that's why they didn't work.










share|improve this question














In a figure environment, I can use centering to achieve this effect:



begin{figure}
centering
begin{subfigure}{0.3textwidth} A end{subfigure}
begin{subfigure}{0.3textwidth} B end{subfigure}
begin{subfigure}{0.3textwidth} C end{subfigure}
end{figure}


And they would be stacked together like this in the output



-ABC-


Where - denotes space.



Instead of centering, could we justify?, i.e.



A-B-C


Of course I can manually do it by inserting hspace{0.5textwidth} between A-B and B-C, but is there something more automatic available?



I tried justify from ragged2e which didn't work, and neither did begin{justify}. I assume these are for text and that's why they didn't work.







floats subfloats






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 7 hours ago









Peeyush KushwahaPeeyush Kushwaha

1235




1235













  • as always justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use end{subfigure}hfill begin{subfigure} between the figures

    – David Carlisle
    7 hours ago











  • The subfigures are acually left-justified by default (if you omit centering) so that leaves space at the right. You're right about hfill though, that did the trick. I didn't know I could use it multiple times on the same line. You could post it as an answer.

    – Peeyush Kushwaha
    7 hours ago











  • No. As I say they are subject to the standard paragraph justification but you have a one line paragraph, it is exactly the same as if you have a parbox{textwidth}{a b c} the paragagrah a b c is justified but as teh last line has parfillski added and ther is only one line, it looks the same as left justified unless you set parfillskip to 0pt or add hfill between the letters. there is no difference between positioning subfigures and positioning letters, it is exactly the same code.

    – David Carlisle
    6 hours ago











  • Oh wow. Yes, setting setlengthparfillskip{0pt} works. What's the best place to put it? I've put it right after begin{figure}. I think it's a neater way and you should include it in your answer to make it more complete.

    – Peeyush Kushwaha
    4 hours ago











  • That only works if the subfigures are big enough that one word space between each figure is enough stretch to make them full width. adding hfill is far more general as that is infinite stretch.

    – David Carlisle
    4 hours ago



















  • as always justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use end{subfigure}hfill begin{subfigure} between the figures

    – David Carlisle
    7 hours ago











  • The subfigures are acually left-justified by default (if you omit centering) so that leaves space at the right. You're right about hfill though, that did the trick. I didn't know I could use it multiple times on the same line. You could post it as an answer.

    – Peeyush Kushwaha
    7 hours ago











  • No. As I say they are subject to the standard paragraph justification but you have a one line paragraph, it is exactly the same as if you have a parbox{textwidth}{a b c} the paragagrah a b c is justified but as teh last line has parfillski added and ther is only one line, it looks the same as left justified unless you set parfillskip to 0pt or add hfill between the letters. there is no difference between positioning subfigures and positioning letters, it is exactly the same code.

    – David Carlisle
    6 hours ago











  • Oh wow. Yes, setting setlengthparfillskip{0pt} works. What's the best place to put it? I've put it right after begin{figure}. I think it's a neater way and you should include it in your answer to make it more complete.

    – Peeyush Kushwaha
    4 hours ago











  • That only works if the subfigures are big enough that one word space between each figure is enough stretch to make them full width. adding hfill is far more general as that is infinite stretch.

    – David Carlisle
    4 hours ago

















as always justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use end{subfigure}hfill begin{subfigure} between the figures

– David Carlisle
7 hours ago





as always justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use end{subfigure}hfill begin{subfigure} between the figures

– David Carlisle
7 hours ago













The subfigures are acually left-justified by default (if you omit centering) so that leaves space at the right. You're right about hfill though, that did the trick. I didn't know I could use it multiple times on the same line. You could post it as an answer.

– Peeyush Kushwaha
7 hours ago





The subfigures are acually left-justified by default (if you omit centering) so that leaves space at the right. You're right about hfill though, that did the trick. I didn't know I could use it multiple times on the same line. You could post it as an answer.

– Peeyush Kushwaha
7 hours ago













No. As I say they are subject to the standard paragraph justification but you have a one line paragraph, it is exactly the same as if you have a parbox{textwidth}{a b c} the paragagrah a b c is justified but as teh last line has parfillski added and ther is only one line, it looks the same as left justified unless you set parfillskip to 0pt or add hfill between the letters. there is no difference between positioning subfigures and positioning letters, it is exactly the same code.

– David Carlisle
6 hours ago





No. As I say they are subject to the standard paragraph justification but you have a one line paragraph, it is exactly the same as if you have a parbox{textwidth}{a b c} the paragagrah a b c is justified but as teh last line has parfillski added and ther is only one line, it looks the same as left justified unless you set parfillskip to 0pt or add hfill between the letters. there is no difference between positioning subfigures and positioning letters, it is exactly the same code.

– David Carlisle
6 hours ago













Oh wow. Yes, setting setlengthparfillskip{0pt} works. What's the best place to put it? I've put it right after begin{figure}. I think it's a neater way and you should include it in your answer to make it more complete.

– Peeyush Kushwaha
4 hours ago





Oh wow. Yes, setting setlengthparfillskip{0pt} works. What's the best place to put it? I've put it right after begin{figure}. I think it's a neater way and you should include it in your answer to make it more complete.

– Peeyush Kushwaha
4 hours ago













That only works if the subfigures are big enough that one word space between each figure is enough stretch to make them full width. adding hfill is far more general as that is infinite stretch.

– David Carlisle
4 hours ago





That only works if the subfigures are big enough that one word space between each figure is enough stretch to make them full width. adding hfill is far more general as that is infinite stretch.

– David Carlisle
4 hours ago










1 Answer
1






active

oldest

votes


















2














As always, justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use



end{subfigure}hfill begin{subfigure}


between the figures






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%2f483914%2ffully-justifying-subfigures%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









    2














    As always, justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use



    end{subfigure}hfill begin{subfigure}


    between the figures






    share|improve this answer




























      2














      As always, justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use



      end{subfigure}hfill begin{subfigure}


      between the figures






      share|improve this answer


























        2












        2








        2







        As always, justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use



        end{subfigure}hfill begin{subfigure}


        between the figures






        share|improve this answer













        As always, justification is the default so you almost never need justify, but the last line of a paragraph (even with justify) is allowed to be short, you could use



        end{subfigure}hfill begin{subfigure}


        between the figures







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 5 hours ago









        David CarlisleDavid Carlisle

        498k4111441893




        498k4111441893






























            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%2f483914%2ffully-justifying-subfigures%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

            Contact image not getting when fetch all contact list from iPhone by CNContact

            Idjassú

            count number of partitions of a set with n elements into k subsets