The use of justification












2















I used the following Latex source file:



RequirePackage{lineno}   
documentclass[aps,prl]{revtex4}
usepackage{graphicx}% Include figure files
usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
usepackage{lpic}
usepackage{amsmath,amssymb}
usepackage{nicefrac}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{xcolor}
usepackage{listingsutf8}
usepackage[section]{placeins}
lstset{mathescape=true}
newcommand{ket}[1]{left|{#1}rightrangle}
newcommand{bra}[1]{leftlangle{#1}right|}
newcommand{is}[1]{{color{blue} #1}}
usepackage{subcaption}

captionsetup{compatibility=false}
begin{document}

textbf{Corresponding author information}\
Ad van der Ven, email: a.vanderven@pwo.ru.nl

begin{figure}

begin{subfigure}{0.50textwidth}

{bf Figure}

caption{Based on the observed data sets}

label{fig:RegressionFixedObservedN4451}

end{subfigure}

captionsetup{justification=raggedright,singlelinecheck=false}

caption{Regression plot for the fixed condition of the ACT (N = 445). The
x-axis represents the natural logarithm of the absolute value of the minimum
residual score belonging to the sequence of 14 consecutive bars with the
smallest MSE. The y-axis represents the smallest MSE. The top line is the
line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
line exactly in between is the line $y=2x$.}
label{fig:observedfixedcondion}

end{figure}

end{document}


However I do not want to have justification=raggedright nor justification=raggedleft. I simply want the caption aligned left and right. It seems justification does not have that option. I could not find an answer at 'Questions that may already have your answer'.










share|improve this question

























  • Welcome to the site. To include source code in your question, highlight the code block and click the {} icon above the edit box. This will indent each line of code by 4 spaces in the edit box, which has the visual effect of rendering like code in the html page.

    – Steven B. Segletes
    Jan 8 at 12:20











  • To format inline "code" in your question, delimit the code with grave accents, like `code=0`

    – Steven B. Segletes
    Jan 8 at 12:26













  • Related: tex.stackexchange.com/questions/468942/…

    – Johannes_B
    Jan 8 at 12:40






  • 1





    the caption and subcaption packages are not compatible with revtex` package. see tex.stackexchange.com/questions/135718/….

    – Zarko
    Jan 8 at 12:46






  • 2





    If you are submitting to a journal using revtex then, as author, you should not restyle the document, the whole point of a publisher class like revtex is to remove choice from the author and enforce the publication style.

    – David Carlisle
    Jan 8 at 12:53
















2















I used the following Latex source file:



RequirePackage{lineno}   
documentclass[aps,prl]{revtex4}
usepackage{graphicx}% Include figure files
usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
usepackage{lpic}
usepackage{amsmath,amssymb}
usepackage{nicefrac}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{xcolor}
usepackage{listingsutf8}
usepackage[section]{placeins}
lstset{mathescape=true}
newcommand{ket}[1]{left|{#1}rightrangle}
newcommand{bra}[1]{leftlangle{#1}right|}
newcommand{is}[1]{{color{blue} #1}}
usepackage{subcaption}

captionsetup{compatibility=false}
begin{document}

textbf{Corresponding author information}\
Ad van der Ven, email: a.vanderven@pwo.ru.nl

begin{figure}

begin{subfigure}{0.50textwidth}

{bf Figure}

caption{Based on the observed data sets}

label{fig:RegressionFixedObservedN4451}

end{subfigure}

captionsetup{justification=raggedright,singlelinecheck=false}

caption{Regression plot for the fixed condition of the ACT (N = 445). The
x-axis represents the natural logarithm of the absolute value of the minimum
residual score belonging to the sequence of 14 consecutive bars with the
smallest MSE. The y-axis represents the smallest MSE. The top line is the
line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
line exactly in between is the line $y=2x$.}
label{fig:observedfixedcondion}

end{figure}

end{document}


However I do not want to have justification=raggedright nor justification=raggedleft. I simply want the caption aligned left and right. It seems justification does not have that option. I could not find an answer at 'Questions that may already have your answer'.










share|improve this question

























  • Welcome to the site. To include source code in your question, highlight the code block and click the {} icon above the edit box. This will indent each line of code by 4 spaces in the edit box, which has the visual effect of rendering like code in the html page.

    – Steven B. Segletes
    Jan 8 at 12:20











  • To format inline "code" in your question, delimit the code with grave accents, like `code=0`

    – Steven B. Segletes
    Jan 8 at 12:26













  • Related: tex.stackexchange.com/questions/468942/…

    – Johannes_B
    Jan 8 at 12:40






  • 1





    the caption and subcaption packages are not compatible with revtex` package. see tex.stackexchange.com/questions/135718/….

    – Zarko
    Jan 8 at 12:46






  • 2





    If you are submitting to a journal using revtex then, as author, you should not restyle the document, the whole point of a publisher class like revtex is to remove choice from the author and enforce the publication style.

    – David Carlisle
    Jan 8 at 12:53














2












2








2








I used the following Latex source file:



RequirePackage{lineno}   
documentclass[aps,prl]{revtex4}
usepackage{graphicx}% Include figure files
usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
usepackage{lpic}
usepackage{amsmath,amssymb}
usepackage{nicefrac}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{xcolor}
usepackage{listingsutf8}
usepackage[section]{placeins}
lstset{mathescape=true}
newcommand{ket}[1]{left|{#1}rightrangle}
newcommand{bra}[1]{leftlangle{#1}right|}
newcommand{is}[1]{{color{blue} #1}}
usepackage{subcaption}

captionsetup{compatibility=false}
begin{document}

textbf{Corresponding author information}\
Ad van der Ven, email: a.vanderven@pwo.ru.nl

begin{figure}

begin{subfigure}{0.50textwidth}

{bf Figure}

caption{Based on the observed data sets}

label{fig:RegressionFixedObservedN4451}

end{subfigure}

captionsetup{justification=raggedright,singlelinecheck=false}

caption{Regression plot for the fixed condition of the ACT (N = 445). The
x-axis represents the natural logarithm of the absolute value of the minimum
residual score belonging to the sequence of 14 consecutive bars with the
smallest MSE. The y-axis represents the smallest MSE. The top line is the
line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
line exactly in between is the line $y=2x$.}
label{fig:observedfixedcondion}

end{figure}

end{document}


However I do not want to have justification=raggedright nor justification=raggedleft. I simply want the caption aligned left and right. It seems justification does not have that option. I could not find an answer at 'Questions that may already have your answer'.










share|improve this question
















I used the following Latex source file:



RequirePackage{lineno}   
documentclass[aps,prl]{revtex4}
usepackage{graphicx}% Include figure files
usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
usepackage{lpic}
usepackage{amsmath,amssymb}
usepackage{nicefrac}
usepackage[utf8]{inputenc}
usepackage{hyperref}
usepackage{xcolor}
usepackage{listingsutf8}
usepackage[section]{placeins}
lstset{mathescape=true}
newcommand{ket}[1]{left|{#1}rightrangle}
newcommand{bra}[1]{leftlangle{#1}right|}
newcommand{is}[1]{{color{blue} #1}}
usepackage{subcaption}

captionsetup{compatibility=false}
begin{document}

textbf{Corresponding author information}\
Ad van der Ven, email: a.vanderven@pwo.ru.nl

begin{figure}

begin{subfigure}{0.50textwidth}

{bf Figure}

caption{Based on the observed data sets}

label{fig:RegressionFixedObservedN4451}

end{subfigure}

captionsetup{justification=raggedright,singlelinecheck=false}

caption{Regression plot for the fixed condition of the ACT (N = 445). The
x-axis represents the natural logarithm of the absolute value of the minimum
residual score belonging to the sequence of 14 consecutive bars with the
smallest MSE. The y-axis represents the smallest MSE. The top line is the
line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
line exactly in between is the line $y=2x$.}
label{fig:observedfixedcondion}

end{figure}

end{document}


However I do not want to have justification=raggedright nor justification=raggedleft. I simply want the caption aligned left and right. It seems justification does not have that option. I could not find an answer at 'Questions that may already have your answer'.







justification






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 8 at 12:25









Steven B. Segletes

153k9193402




153k9193402










asked Jan 8 at 12:13









Ad van der VenAd van der Ven

2113




2113













  • Welcome to the site. To include source code in your question, highlight the code block and click the {} icon above the edit box. This will indent each line of code by 4 spaces in the edit box, which has the visual effect of rendering like code in the html page.

    – Steven B. Segletes
    Jan 8 at 12:20











  • To format inline "code" in your question, delimit the code with grave accents, like `code=0`

    – Steven B. Segletes
    Jan 8 at 12:26













  • Related: tex.stackexchange.com/questions/468942/…

    – Johannes_B
    Jan 8 at 12:40






  • 1





    the caption and subcaption packages are not compatible with revtex` package. see tex.stackexchange.com/questions/135718/….

    – Zarko
    Jan 8 at 12:46






  • 2





    If you are submitting to a journal using revtex then, as author, you should not restyle the document, the whole point of a publisher class like revtex is to remove choice from the author and enforce the publication style.

    – David Carlisle
    Jan 8 at 12:53



















  • Welcome to the site. To include source code in your question, highlight the code block and click the {} icon above the edit box. This will indent each line of code by 4 spaces in the edit box, which has the visual effect of rendering like code in the html page.

    – Steven B. Segletes
    Jan 8 at 12:20











  • To format inline "code" in your question, delimit the code with grave accents, like `code=0`

    – Steven B. Segletes
    Jan 8 at 12:26













  • Related: tex.stackexchange.com/questions/468942/…

    – Johannes_B
    Jan 8 at 12:40






  • 1





    the caption and subcaption packages are not compatible with revtex` package. see tex.stackexchange.com/questions/135718/….

    – Zarko
    Jan 8 at 12:46






  • 2





    If you are submitting to a journal using revtex then, as author, you should not restyle the document, the whole point of a publisher class like revtex is to remove choice from the author and enforce the publication style.

    – David Carlisle
    Jan 8 at 12:53

















Welcome to the site. To include source code in your question, highlight the code block and click the {} icon above the edit box. This will indent each line of code by 4 spaces in the edit box, which has the visual effect of rendering like code in the html page.

– Steven B. Segletes
Jan 8 at 12:20





Welcome to the site. To include source code in your question, highlight the code block and click the {} icon above the edit box. This will indent each line of code by 4 spaces in the edit box, which has the visual effect of rendering like code in the html page.

– Steven B. Segletes
Jan 8 at 12:20













To format inline "code" in your question, delimit the code with grave accents, like `code=0`

– Steven B. Segletes
Jan 8 at 12:26







To format inline "code" in your question, delimit the code with grave accents, like `code=0`

– Steven B. Segletes
Jan 8 at 12:26















Related: tex.stackexchange.com/questions/468942/…

– Johannes_B
Jan 8 at 12:40





Related: tex.stackexchange.com/questions/468942/…

– Johannes_B
Jan 8 at 12:40




1




1





the caption and subcaption packages are not compatible with revtex` package. see tex.stackexchange.com/questions/135718/….

– Zarko
Jan 8 at 12:46





the caption and subcaption packages are not compatible with revtex` package. see tex.stackexchange.com/questions/135718/….

– Zarko
Jan 8 at 12:46




2




2





If you are submitting to a journal using revtex then, as author, you should not restyle the document, the whole point of a publisher class like revtex is to remove choice from the author and enforce the publication style.

– David Carlisle
Jan 8 at 12:53





If you are submitting to a journal using revtex then, as author, you should not restyle the document, the whole point of a publisher class like revtex is to remove choice from the author and enforce the publication style.

– David Carlisle
Jan 8 at 12:53










2 Answers
2






active

oldest

votes


















1














Use



[...]
usepackage{ragged2e}
usepackage{subcaption}
DeclareCaptionJustification{justified}{justifying}
captionsetup{compatibility=false,justification=justified}
[...]


enter image description here






share|improve this answer































    -1














    The formatting (line-centered caption) arises from the revtex4 document class. Here, I create my own caption justification option with DeclareCaptionJustification{myjust}{fulljustify}.



    I defined fulljustify by starting with the caption package definition of centerlast and modifying it to get rid of the centered last line.



    The option justification=justified, which would normally work in other document classes, is actually a null option, adding zero additional code, thus assuming the document class default is fully justified (which it is not for revtex4).



    RequirePackage{lineno}
    documentclass[aps,prl]{revtex4}
    usepackage{graphicx}% Include figure files
    usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
    usepackage{lpic}
    usepackage{amsmath,amssymb}
    usepackage{nicefrac}
    usepackage[utf8]{inputenc}
    usepackage{hyperref}
    usepackage{xcolor}
    usepackage{listingsutf8}
    usepackage[section]{placeins}
    lstset{mathescape=true}
    newcommand{ket}[1]{left|{#1}rightrangle}
    newcommand{bra}[1]{leftlangle{#1}right|}
    newcommand{is}[1]{{color{blue} #1}}
    usepackage{subcaption}
    captionsetup{compatibility=false}
    DeclareCaptionJustification{myjust}{fulljustify}

    makeatletter
    providecommandfulljustify{%
    let\@centercr
    leftskipz@%
    rightskipz@%
    parfillskipz@@plus 1fillrelax%
    }
    makeatother

    begin{document}
    textbf{Corresponding author information}\
    Ad van der Ven, email: a.vanderven@pwo.ru.nl
    begin{figure}
    begin{subfigure}{0.50textwidth}
    {bf Figure}
    caption{Based on the observed data sets}
    label{fig:RegressionFixedObservedN4451}
    end{subfigure}
    captionsetup{justification=myjust,singlelinecheck=false}
    caption{Regression plot for the fixed condition of the ACT (N = 445). The
    x-axis represents the natural logarithm of the absolute value of the minimum
    residual score belonging to the sequence of 14 consecutive bars with the
    smallest MSE. The y-axis represents the smallest MSE. The top line is the
    line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
    line exactly in between is the line $y=2x$.}
    label{fig:observedfixedcondion}
    end{figure}
    end{document}


    enter image description here






    share|improve this answer


























    • why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

      – David Carlisle
      Jan 8 at 12:51













    • Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

      – Ad van der Ven
      Jan 8 at 12:52











    • @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

      – Steven B. Segletes
      Jan 8 at 12:53











    • I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

      – David Carlisle
      Jan 8 at 12:56













    • testing my suggestions?, you show such little faith!

      – David Carlisle
      Jan 8 at 12:58











    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%2f469141%2fthe-use-of-justification%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



    [...]
    usepackage{ragged2e}
    usepackage{subcaption}
    DeclareCaptionJustification{justified}{justifying}
    captionsetup{compatibility=false,justification=justified}
    [...]


    enter image description here






    share|improve this answer




























      1














      Use



      [...]
      usepackage{ragged2e}
      usepackage{subcaption}
      DeclareCaptionJustification{justified}{justifying}
      captionsetup{compatibility=false,justification=justified}
      [...]


      enter image description here






      share|improve this answer


























        1












        1








        1







        Use



        [...]
        usepackage{ragged2e}
        usepackage{subcaption}
        DeclareCaptionJustification{justified}{justifying}
        captionsetup{compatibility=false,justification=justified}
        [...]


        enter image description here






        share|improve this answer













        Use



        [...]
        usepackage{ragged2e}
        usepackage{subcaption}
        DeclareCaptionJustification{justified}{justifying}
        captionsetup{compatibility=false,justification=justified}
        [...]


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 8 at 13:00









        HerbertHerbert

        271k24409719




        271k24409719























            -1














            The formatting (line-centered caption) arises from the revtex4 document class. Here, I create my own caption justification option with DeclareCaptionJustification{myjust}{fulljustify}.



            I defined fulljustify by starting with the caption package definition of centerlast and modifying it to get rid of the centered last line.



            The option justification=justified, which would normally work in other document classes, is actually a null option, adding zero additional code, thus assuming the document class default is fully justified (which it is not for revtex4).



            RequirePackage{lineno}
            documentclass[aps,prl]{revtex4}
            usepackage{graphicx}% Include figure files
            usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
            usepackage{lpic}
            usepackage{amsmath,amssymb}
            usepackage{nicefrac}
            usepackage[utf8]{inputenc}
            usepackage{hyperref}
            usepackage{xcolor}
            usepackage{listingsutf8}
            usepackage[section]{placeins}
            lstset{mathescape=true}
            newcommand{ket}[1]{left|{#1}rightrangle}
            newcommand{bra}[1]{leftlangle{#1}right|}
            newcommand{is}[1]{{color{blue} #1}}
            usepackage{subcaption}
            captionsetup{compatibility=false}
            DeclareCaptionJustification{myjust}{fulljustify}

            makeatletter
            providecommandfulljustify{%
            let\@centercr
            leftskipz@%
            rightskipz@%
            parfillskipz@@plus 1fillrelax%
            }
            makeatother

            begin{document}
            textbf{Corresponding author information}\
            Ad van der Ven, email: a.vanderven@pwo.ru.nl
            begin{figure}
            begin{subfigure}{0.50textwidth}
            {bf Figure}
            caption{Based on the observed data sets}
            label{fig:RegressionFixedObservedN4451}
            end{subfigure}
            captionsetup{justification=myjust,singlelinecheck=false}
            caption{Regression plot for the fixed condition of the ACT (N = 445). The
            x-axis represents the natural logarithm of the absolute value of the minimum
            residual score belonging to the sequence of 14 consecutive bars with the
            smallest MSE. The y-axis represents the smallest MSE. The top line is the
            line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
            line exactly in between is the line $y=2x$.}
            label{fig:observedfixedcondion}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer


























            • why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

              – David Carlisle
              Jan 8 at 12:51













            • Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

              – Ad van der Ven
              Jan 8 at 12:52











            • @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

              – Steven B. Segletes
              Jan 8 at 12:53











            • I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

              – David Carlisle
              Jan 8 at 12:56













            • testing my suggestions?, you show such little faith!

              – David Carlisle
              Jan 8 at 12:58
















            -1














            The formatting (line-centered caption) arises from the revtex4 document class. Here, I create my own caption justification option with DeclareCaptionJustification{myjust}{fulljustify}.



            I defined fulljustify by starting with the caption package definition of centerlast and modifying it to get rid of the centered last line.



            The option justification=justified, which would normally work in other document classes, is actually a null option, adding zero additional code, thus assuming the document class default is fully justified (which it is not for revtex4).



            RequirePackage{lineno}
            documentclass[aps,prl]{revtex4}
            usepackage{graphicx}% Include figure files
            usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
            usepackage{lpic}
            usepackage{amsmath,amssymb}
            usepackage{nicefrac}
            usepackage[utf8]{inputenc}
            usepackage{hyperref}
            usepackage{xcolor}
            usepackage{listingsutf8}
            usepackage[section]{placeins}
            lstset{mathescape=true}
            newcommand{ket}[1]{left|{#1}rightrangle}
            newcommand{bra}[1]{leftlangle{#1}right|}
            newcommand{is}[1]{{color{blue} #1}}
            usepackage{subcaption}
            captionsetup{compatibility=false}
            DeclareCaptionJustification{myjust}{fulljustify}

            makeatletter
            providecommandfulljustify{%
            let\@centercr
            leftskipz@%
            rightskipz@%
            parfillskipz@@plus 1fillrelax%
            }
            makeatother

            begin{document}
            textbf{Corresponding author information}\
            Ad van der Ven, email: a.vanderven@pwo.ru.nl
            begin{figure}
            begin{subfigure}{0.50textwidth}
            {bf Figure}
            caption{Based on the observed data sets}
            label{fig:RegressionFixedObservedN4451}
            end{subfigure}
            captionsetup{justification=myjust,singlelinecheck=false}
            caption{Regression plot for the fixed condition of the ACT (N = 445). The
            x-axis represents the natural logarithm of the absolute value of the minimum
            residual score belonging to the sequence of 14 consecutive bars with the
            smallest MSE. The y-axis represents the smallest MSE. The top line is the
            line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
            line exactly in between is the line $y=2x$.}
            label{fig:observedfixedcondion}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer


























            • why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

              – David Carlisle
              Jan 8 at 12:51













            • Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

              – Ad van der Ven
              Jan 8 at 12:52











            • @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

              – Steven B. Segletes
              Jan 8 at 12:53











            • I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

              – David Carlisle
              Jan 8 at 12:56













            • testing my suggestions?, you show such little faith!

              – David Carlisle
              Jan 8 at 12:58














            -1












            -1








            -1







            The formatting (line-centered caption) arises from the revtex4 document class. Here, I create my own caption justification option with DeclareCaptionJustification{myjust}{fulljustify}.



            I defined fulljustify by starting with the caption package definition of centerlast and modifying it to get rid of the centered last line.



            The option justification=justified, which would normally work in other document classes, is actually a null option, adding zero additional code, thus assuming the document class default is fully justified (which it is not for revtex4).



            RequirePackage{lineno}
            documentclass[aps,prl]{revtex4}
            usepackage{graphicx}% Include figure files
            usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
            usepackage{lpic}
            usepackage{amsmath,amssymb}
            usepackage{nicefrac}
            usepackage[utf8]{inputenc}
            usepackage{hyperref}
            usepackage{xcolor}
            usepackage{listingsutf8}
            usepackage[section]{placeins}
            lstset{mathescape=true}
            newcommand{ket}[1]{left|{#1}rightrangle}
            newcommand{bra}[1]{leftlangle{#1}right|}
            newcommand{is}[1]{{color{blue} #1}}
            usepackage{subcaption}
            captionsetup{compatibility=false}
            DeclareCaptionJustification{myjust}{fulljustify}

            makeatletter
            providecommandfulljustify{%
            let\@centercr
            leftskipz@%
            rightskipz@%
            parfillskipz@@plus 1fillrelax%
            }
            makeatother

            begin{document}
            textbf{Corresponding author information}\
            Ad van der Ven, email: a.vanderven@pwo.ru.nl
            begin{figure}
            begin{subfigure}{0.50textwidth}
            {bf Figure}
            caption{Based on the observed data sets}
            label{fig:RegressionFixedObservedN4451}
            end{subfigure}
            captionsetup{justification=myjust,singlelinecheck=false}
            caption{Regression plot for the fixed condition of the ACT (N = 445). The
            x-axis represents the natural logarithm of the absolute value of the minimum
            residual score belonging to the sequence of 14 consecutive bars with the
            smallest MSE. The y-axis represents the smallest MSE. The top line is the
            line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
            line exactly in between is the line $y=2x$.}
            label{fig:observedfixedcondion}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer















            The formatting (line-centered caption) arises from the revtex4 document class. Here, I create my own caption justification option with DeclareCaptionJustification{myjust}{fulljustify}.



            I defined fulljustify by starting with the caption package definition of centerlast and modifying it to get rid of the centered last line.



            The option justification=justified, which would normally work in other document classes, is actually a null option, adding zero additional code, thus assuming the document class default is fully justified (which it is not for revtex4).



            RequirePackage{lineno}
            documentclass[aps,prl]{revtex4}
            usepackage{graphicx}% Include figure files
            usepackage{epstopdf} % this graphic package converts eps to pdf for easier usage of eps files
            usepackage{lpic}
            usepackage{amsmath,amssymb}
            usepackage{nicefrac}
            usepackage[utf8]{inputenc}
            usepackage{hyperref}
            usepackage{xcolor}
            usepackage{listingsutf8}
            usepackage[section]{placeins}
            lstset{mathescape=true}
            newcommand{ket}[1]{left|{#1}rightrangle}
            newcommand{bra}[1]{leftlangle{#1}right|}
            newcommand{is}[1]{{color{blue} #1}}
            usepackage{subcaption}
            captionsetup{compatibility=false}
            DeclareCaptionJustification{myjust}{fulljustify}

            makeatletter
            providecommandfulljustify{%
            let\@centercr
            leftskipz@%
            rightskipz@%
            parfillskipz@@plus 1fillrelax%
            }
            makeatother

            begin{document}
            textbf{Corresponding author information}\
            Ad van der Ven, email: a.vanderven@pwo.ru.nl
            begin{figure}
            begin{subfigure}{0.50textwidth}
            {bf Figure}
            caption{Based on the observed data sets}
            label{fig:RegressionFixedObservedN4451}
            end{subfigure}
            captionsetup{justification=myjust,singlelinecheck=false}
            caption{Regression plot for the fixed condition of the ACT (N = 445). The
            x-axis represents the natural logarithm of the absolute value of the minimum
            residual score belonging to the sequence of 14 consecutive bars with the
            smallest MSE. The y-axis represents the smallest MSE. The top line is the
            line $y = 2x + ln{10}$. The bottom line is the line $y = 2x-ln{10}$. The
            line exactly in between is the line $y=2x$.}
            label{fig:observedfixedcondion}
            end{figure}
            end{document}


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 8 at 12:59

























            answered Jan 8 at 12:47









            Steven B. SegletesSteven B. Segletes

            153k9193402




            153k9193402













            • why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

              – David Carlisle
              Jan 8 at 12:51













            • Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

              – Ad van der Ven
              Jan 8 at 12:52











            • @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

              – Steven B. Segletes
              Jan 8 at 12:53











            • I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

              – David Carlisle
              Jan 8 at 12:56













            • testing my suggestions?, you show such little faith!

              – David Carlisle
              Jan 8 at 12:58



















            • why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

              – David Carlisle
              Jan 8 at 12:51













            • Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

              – Ad van der Ven
              Jan 8 at 12:52











            • @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

              – Steven B. Segletes
              Jan 8 at 12:53











            • I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

              – David Carlisle
              Jan 8 at 12:56













            • testing my suggestions?, you show such little faith!

              – David Carlisle
              Jan 8 at 12:58

















            why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

            – David Carlisle
            Jan 8 at 12:51







            why the +/- fil skips in left and rightskip? the default text justification simply uses 0pt there?

            – David Carlisle
            Jan 8 at 12:51















            Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

            – Ad van der Ven
            Jan 8 at 12:52





            Dear Steven B. Segletes, you in fact answered my question. Thank you very, very much for your answer.

            – Ad van der Ven
            Jan 8 at 12:52













            @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

            – Steven B. Segletes
            Jan 8 at 12:53





            @DavidCarlisle As I explained, I tweaked what was in the caption package. It's black magic to me.

            – Steven B. Segletes
            Jan 8 at 12:53













            I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

            – David Carlisle
            Jan 8 at 12:56







            I think they could be z@ with no difference in the output unless there is an fil glue added within the caption (the behaviour of hspace{0pt plus 1fil} in the presence of those settings is well defined but probably surprising:-)

            – David Carlisle
            Jan 8 at 12:56















            testing my suggestions?, you show such little faith!

            – David Carlisle
            Jan 8 at 12:58





            testing my suggestions?, you show such little faith!

            – David Carlisle
            Jan 8 at 12:58


















            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%2f469141%2fthe-use-of-justification%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 change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

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