how to cite in Rmarkdown chunk caption without using bookdown?
I am currently doing my thesis in Rmarkdown, and I have some citation I need in figure captions. I found a similar question in this page, yet the answer refers to the bookdown. In my case, I am using a .bib file.
My issue is that I have the thesis almost all written and the change to bookdown will probably bring errors which will be hard to debug now.
I have in the chunk:
{r yPlus, echo=FALSE, fig.cap="\label{fig:yPlus}Tipo de escoamento dado pela distânica à parede (adaptado de \cite{Versteeg:2007aa}).", fig.align="center"}
but when I run the Rmarkdown, I get [?] in the citation. I have tried citep
as well, but it raises an error.
Is there a way to work around this issue without many complications? I am not very comfortable with all this yet.
Thank you all for the help.
latex r-markdown caption citations
add a comment |
I am currently doing my thesis in Rmarkdown, and I have some citation I need in figure captions. I found a similar question in this page, yet the answer refers to the bookdown. In my case, I am using a .bib file.
My issue is that I have the thesis almost all written and the change to bookdown will probably bring errors which will be hard to debug now.
I have in the chunk:
{r yPlus, echo=FALSE, fig.cap="\label{fig:yPlus}Tipo de escoamento dado pela distânica à parede (adaptado de \cite{Versteeg:2007aa}).", fig.align="center"}
but when I run the Rmarkdown, I get [?] in the citation. I have tried citep
as well, but it raises an error.
Is there a way to work around this issue without many complications? I am not very comfortable with all this yet.
Thank you all for the help.
latex r-markdown caption citations
You can change tobookdown
with minimal interruption by usingbookdown::pdf_document2
instead ofpdf_document
as output format. I would give this a try first.
– Ralf Stubner
Nov 20 at 20:07
Thank you, Ralf, for the suggestion. I have tried to perform the change, but it has started raising errors. I am afraid it will not be an easy change.
– Sergio Cavaleiro Costa
Nov 21 at 10:24
Great that you found a solution. Care to add it as an answer instead of comment?
– Ralf Stubner
Nov 21 at 12:01
I have made it figure out what was the problem. For further reference, I was referring to figures in the chunk usingfig.cap="\label{foo} my caption"
. When I have passed all to ther foo, fig.cap="my caption"
I made it work. Another issue I found was some of the labels were likemy_foo_label
, so the "_" were bring issues as well. Once again, thank you, @RalfStubner.
– Sergio Cavaleiro Costa
Nov 21 at 12:05
add a comment |
I am currently doing my thesis in Rmarkdown, and I have some citation I need in figure captions. I found a similar question in this page, yet the answer refers to the bookdown. In my case, I am using a .bib file.
My issue is that I have the thesis almost all written and the change to bookdown will probably bring errors which will be hard to debug now.
I have in the chunk:
{r yPlus, echo=FALSE, fig.cap="\label{fig:yPlus}Tipo de escoamento dado pela distânica à parede (adaptado de \cite{Versteeg:2007aa}).", fig.align="center"}
but when I run the Rmarkdown, I get [?] in the citation. I have tried citep
as well, but it raises an error.
Is there a way to work around this issue without many complications? I am not very comfortable with all this yet.
Thank you all for the help.
latex r-markdown caption citations
I am currently doing my thesis in Rmarkdown, and I have some citation I need in figure captions. I found a similar question in this page, yet the answer refers to the bookdown. In my case, I am using a .bib file.
My issue is that I have the thesis almost all written and the change to bookdown will probably bring errors which will be hard to debug now.
I have in the chunk:
{r yPlus, echo=FALSE, fig.cap="\label{fig:yPlus}Tipo de escoamento dado pela distânica à parede (adaptado de \cite{Versteeg:2007aa}).", fig.align="center"}
but when I run the Rmarkdown, I get [?] in the citation. I have tried citep
as well, but it raises an error.
Is there a way to work around this issue without many complications? I am not very comfortable with all this yet.
Thank you all for the help.
latex r-markdown caption citations
latex r-markdown caption citations
edited Nov 20 at 18:33
asked Nov 20 at 16:30
Sergio Cavaleiro Costa
85
85
You can change tobookdown
with minimal interruption by usingbookdown::pdf_document2
instead ofpdf_document
as output format. I would give this a try first.
– Ralf Stubner
Nov 20 at 20:07
Thank you, Ralf, for the suggestion. I have tried to perform the change, but it has started raising errors. I am afraid it will not be an easy change.
– Sergio Cavaleiro Costa
Nov 21 at 10:24
Great that you found a solution. Care to add it as an answer instead of comment?
– Ralf Stubner
Nov 21 at 12:01
I have made it figure out what was the problem. For further reference, I was referring to figures in the chunk usingfig.cap="\label{foo} my caption"
. When I have passed all to ther foo, fig.cap="my caption"
I made it work. Another issue I found was some of the labels were likemy_foo_label
, so the "_" were bring issues as well. Once again, thank you, @RalfStubner.
– Sergio Cavaleiro Costa
Nov 21 at 12:05
add a comment |
You can change tobookdown
with minimal interruption by usingbookdown::pdf_document2
instead ofpdf_document
as output format. I would give this a try first.
– Ralf Stubner
Nov 20 at 20:07
Thank you, Ralf, for the suggestion. I have tried to perform the change, but it has started raising errors. I am afraid it will not be an easy change.
– Sergio Cavaleiro Costa
Nov 21 at 10:24
Great that you found a solution. Care to add it as an answer instead of comment?
– Ralf Stubner
Nov 21 at 12:01
I have made it figure out what was the problem. For further reference, I was referring to figures in the chunk usingfig.cap="\label{foo} my caption"
. When I have passed all to ther foo, fig.cap="my caption"
I made it work. Another issue I found was some of the labels were likemy_foo_label
, so the "_" were bring issues as well. Once again, thank you, @RalfStubner.
– Sergio Cavaleiro Costa
Nov 21 at 12:05
You can change to
bookdown
with minimal interruption by using bookdown::pdf_document2
instead of pdf_document
as output format. I would give this a try first.– Ralf Stubner
Nov 20 at 20:07
You can change to
bookdown
with minimal interruption by using bookdown::pdf_document2
instead of pdf_document
as output format. I would give this a try first.– Ralf Stubner
Nov 20 at 20:07
Thank you, Ralf, for the suggestion. I have tried to perform the change, but it has started raising errors. I am afraid it will not be an easy change.
– Sergio Cavaleiro Costa
Nov 21 at 10:24
Thank you, Ralf, for the suggestion. I have tried to perform the change, but it has started raising errors. I am afraid it will not be an easy change.
– Sergio Cavaleiro Costa
Nov 21 at 10:24
Great that you found a solution. Care to add it as an answer instead of comment?
– Ralf Stubner
Nov 21 at 12:01
Great that you found a solution. Care to add it as an answer instead of comment?
– Ralf Stubner
Nov 21 at 12:01
I have made it figure out what was the problem. For further reference, I was referring to figures in the chunk using
fig.cap="\label{foo} my caption"
. When I have passed all to the r foo, fig.cap="my caption"
I made it work. Another issue I found was some of the labels were like my_foo_label
, so the "_" were bring issues as well. Once again, thank you, @RalfStubner.– Sergio Cavaleiro Costa
Nov 21 at 12:05
I have made it figure out what was the problem. For further reference, I was referring to figures in the chunk using
fig.cap="\label{foo} my caption"
. When I have passed all to the r foo, fig.cap="my caption"
I made it work. Another issue I found was some of the labels were like my_foo_label
, so the "_" were bring issues as well. Once again, thank you, @RalfStubner.– Sergio Cavaleiro Costa
Nov 21 at 12:05
add a comment |
active
oldest
votes
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%2f53397413%2fhow-to-cite-in-rmarkdown-chunk-caption-without-using-bookdown%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f53397413%2fhow-to-cite-in-rmarkdown-chunk-caption-without-using-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
You can change to
bookdown
with minimal interruption by usingbookdown::pdf_document2
instead ofpdf_document
as output format. I would give this a try first.– Ralf Stubner
Nov 20 at 20:07
Thank you, Ralf, for the suggestion. I have tried to perform the change, but it has started raising errors. I am afraid it will not be an easy change.
– Sergio Cavaleiro Costa
Nov 21 at 10:24
Great that you found a solution. Care to add it as an answer instead of comment?
– Ralf Stubner
Nov 21 at 12:01
I have made it figure out what was the problem. For further reference, I was referring to figures in the chunk using
fig.cap="\label{foo} my caption"
. When I have passed all to ther foo, fig.cap="my caption"
I made it work. Another issue I found was some of the labels were likemy_foo_label
, so the "_" were bring issues as well. Once again, thank you, @RalfStubner.– Sergio Cavaleiro Costa
Nov 21 at 12:05