Inconsistent figure note line spacing rendering pdf in Bookdown
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:
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
Any help is very welcome, many thanks in advance.
r pdf bookdown cross-reference line-spacing
add a comment |
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:
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
Any help is very welcome, many thanks in advance.
r pdf bookdown cross-reference line-spacing
add a comment |
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:
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
Any help is very welcome, many thanks in advance.
r pdf bookdown cross-reference line-spacing
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:
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
Any help is very welcome, many thanks in advance.
r pdf bookdown cross-reference line-spacing
r pdf bookdown cross-reference line-spacing
edited Nov 11 at 14:21
asked Nov 11 at 12:25
BAlpine
197
197
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I solved the problem by changing the chunk option from fig.pos="H"
to fig.pos="!h"
add a comment |
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',
autoActivateHeartbeat: false,
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
I solved the problem by changing the chunk option from fig.pos="H"
to fig.pos="!h"
add a comment |
I solved the problem by changing the chunk option from fig.pos="H"
to fig.pos="!h"
add a comment |
I solved the problem by changing the chunk option from fig.pos="H"
to fig.pos="!h"
I solved the problem by changing the chunk option from fig.pos="H"
to fig.pos="!h"
answered Nov 13 at 11:46
BAlpine
197
197
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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