Inconsistent figure note line spacing rendering pdf in Bookdown









up vote
0
down vote

favorite












I am trying to insert a figure note to render in pdf from the following code chunk:



``r boxfreshAe, out.width = c("49%","49%","49%","49%"),fig.align = "center", warning=FALSE, message=FALSE, error=FALSE, fig.pos="H",fig.show = 'hold', fig.cap='(ref:boxfreshAe)', echo=FALSE


the text note reads like this:



(ref:boxfreshAe) Forest of Ae - boxplot of fresh example (%) by management example. A): 0 - 15 cm depth; B): 15 - 30 cm depth; C): litter example; D): H horizon. Displayed are minimum, twenty-fifth percentile, fiftyeth percentile, seventy-fifth percentile and maximum. Black dots are observations that may be outliers accoring to the rule ± 1.5 * interquartile range, this being determined as as the upper quartile minus the lower quartile [@reference2015]. Same colour / shape dots are same block replication.



but also this would work the same:



(ref:boxfreshAe) example example example example example example example example example example example example example example example exampleexample example example example example example example exampleexample example example exampleexample example example example



the above chunk contains box-and-whiskers plots and results in a pdf with a figure note that looks like this:




enter image description here




This is not what I want because the figure is using the layout of the main text of my book which I setup in the index.Rmd with linestretch: 2.



Instead, when I insert a photo the figure note has a reduced line spacing. I would like this spacing (below) to be also in the figure above.



(ref:shallow-Hhor) detail of the H horizon in the Control treatment. This was consistently < 5 cm deep.



```r shallow-Hhor, out.width = "50%" , fig.align="center",fig.pos="h", fig.cap='(ref:shallow-Hhor)', echo=FALSE



enter image description here




Any help is very welcome, many thanks in advance.










share|improve this question



























    up vote
    0
    down vote

    favorite












    I am trying to insert a figure note to render in pdf from the following code chunk:



    ``r boxfreshAe, out.width = c("49%","49%","49%","49%"),fig.align = "center", warning=FALSE, message=FALSE, error=FALSE, fig.pos="H",fig.show = 'hold', fig.cap='(ref:boxfreshAe)', echo=FALSE


    the text note reads like this:



    (ref:boxfreshAe) Forest of Ae - boxplot of fresh example (%) by management example. A): 0 - 15 cm depth; B): 15 - 30 cm depth; C): litter example; D): H horizon. Displayed are minimum, twenty-fifth percentile, fiftyeth percentile, seventy-fifth percentile and maximum. Black dots are observations that may be outliers accoring to the rule ± 1.5 * interquartile range, this being determined as as the upper quartile minus the lower quartile [@reference2015]. Same colour / shape dots are same block replication.



    but also this would work the same:



    (ref:boxfreshAe) example example example example example example example example example example example example example example example exampleexample example example example example example example exampleexample example example exampleexample example example example



    the above chunk contains box-and-whiskers plots and results in a pdf with a figure note that looks like this:




    enter image description here




    This is not what I want because the figure is using the layout of the main text of my book which I setup in the index.Rmd with linestretch: 2.



    Instead, when I insert a photo the figure note has a reduced line spacing. I would like this spacing (below) to be also in the figure above.



    (ref:shallow-Hhor) detail of the H horizon in the Control treatment. This was consistently < 5 cm deep.



    ```r shallow-Hhor, out.width = "50%" , fig.align="center",fig.pos="h", fig.cap='(ref:shallow-Hhor)', echo=FALSE



    enter image description here




    Any help is very welcome, many thanks in advance.










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to insert a figure note to render in pdf from the following code chunk:



      ``r boxfreshAe, out.width = c("49%","49%","49%","49%"),fig.align = "center", warning=FALSE, message=FALSE, error=FALSE, fig.pos="H",fig.show = 'hold', fig.cap='(ref:boxfreshAe)', echo=FALSE


      the text note reads like this:



      (ref:boxfreshAe) Forest of Ae - boxplot of fresh example (%) by management example. A): 0 - 15 cm depth; B): 15 - 30 cm depth; C): litter example; D): H horizon. Displayed are minimum, twenty-fifth percentile, fiftyeth percentile, seventy-fifth percentile and maximum. Black dots are observations that may be outliers accoring to the rule ± 1.5 * interquartile range, this being determined as as the upper quartile minus the lower quartile [@reference2015]. Same colour / shape dots are same block replication.



      but also this would work the same:



      (ref:boxfreshAe) example example example example example example example example example example example example example example example exampleexample example example example example example example exampleexample example example exampleexample example example example



      the above chunk contains box-and-whiskers plots and results in a pdf with a figure note that looks like this:




      enter image description here




      This is not what I want because the figure is using the layout of the main text of my book which I setup in the index.Rmd with linestretch: 2.



      Instead, when I insert a photo the figure note has a reduced line spacing. I would like this spacing (below) to be also in the figure above.



      (ref:shallow-Hhor) detail of the H horizon in the Control treatment. This was consistently < 5 cm deep.



      ```r shallow-Hhor, out.width = "50%" , fig.align="center",fig.pos="h", fig.cap='(ref:shallow-Hhor)', echo=FALSE



      enter image description here




      Any help is very welcome, many thanks in advance.










      share|improve this question















      I am trying to insert a figure note to render in pdf from the following code chunk:



      ``r boxfreshAe, out.width = c("49%","49%","49%","49%"),fig.align = "center", warning=FALSE, message=FALSE, error=FALSE, fig.pos="H",fig.show = 'hold', fig.cap='(ref:boxfreshAe)', echo=FALSE


      the text note reads like this:



      (ref:boxfreshAe) Forest of Ae - boxplot of fresh example (%) by management example. A): 0 - 15 cm depth; B): 15 - 30 cm depth; C): litter example; D): H horizon. Displayed are minimum, twenty-fifth percentile, fiftyeth percentile, seventy-fifth percentile and maximum. Black dots are observations that may be outliers accoring to the rule ± 1.5 * interquartile range, this being determined as as the upper quartile minus the lower quartile [@reference2015]. Same colour / shape dots are same block replication.



      but also this would work the same:



      (ref:boxfreshAe) example example example example example example example example example example example example example example example exampleexample example example example example example example exampleexample example example exampleexample example example example



      the above chunk contains box-and-whiskers plots and results in a pdf with a figure note that looks like this:




      enter image description here




      This is not what I want because the figure is using the layout of the main text of my book which I setup in the index.Rmd with linestretch: 2.



      Instead, when I insert a photo the figure note has a reduced line spacing. I would like this spacing (below) to be also in the figure above.



      (ref:shallow-Hhor) detail of the H horizon in the Control treatment. This was consistently < 5 cm deep.



      ```r shallow-Hhor, out.width = "50%" , fig.align="center",fig.pos="h", fig.cap='(ref:shallow-Hhor)', echo=FALSE



      enter image description here




      Any help is very welcome, many thanks in advance.







      r pdf bookdown cross-reference line-spacing






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 11 at 14:21

























      asked Nov 11 at 12:25









      BAlpine

      176




      176






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          I solved the problem by changing the chunk option from fig.pos="H" to fig.pos="!h"






          share|improve this answer




















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f53248738%2finconsistent-figure-note-line-spacing-rendering-pdf-in-bookdown%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
            0
            down vote



            accepted










            I solved the problem by changing the chunk option from fig.pos="H" to fig.pos="!h"






            share|improve this answer
























              up vote
              0
              down vote



              accepted










              I solved the problem by changing the chunk option from fig.pos="H" to fig.pos="!h"






              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                I solved the problem by changing the chunk option from fig.pos="H" to fig.pos="!h"






                share|improve this answer












                I solved the problem by changing the chunk option from fig.pos="H" to fig.pos="!h"







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 13 at 11:46









                BAlpine

                176




                176



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f53248738%2finconsistent-figure-note-line-spacing-rendering-pdf-in-bookdown%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

                    Top Tejano songwriter Luis Silva dead of heart attack at 64

                    ReactJS Fetched API data displays live - need Data displayed static

                    政党