Rmd — bookend:pdf_document2 — Latex — Cross reference and caption figure not working The Next CEO of Stack Overflowref not working with achemsoFigure caption and reference formattingmemoir does not generate figure cross referenceCannot cross-reference figure after using captionofCross reference figure appears as “??”Caption in figure and cross-reference them properlyCross-reference referenced page in captionIncorrect Figure reference numbering and how to reference a figure that doesn't have a captionNot displaying 'Figure' cross referenceCross reference of Table, Figure etc

Is it possible to create a QR code using text?

How can I prove that a state of equilibrium is unstable?

Are British MPs missing the point, with these 'Indicative Votes'?

How can the PCs determine if an item is a phylactery?

Finitely generated matrix groups whose eigenvalues are all algebraic

Masking layers by a vector polygon layer in QGIS

How to compactly explain secondary and tertiary characters without resorting to stereotypes?

Find a path from s to t using as few red nodes as possible

How should I connect my cat5 cable to connectors having an orange-green line?

Simplify trigonometric expression using trigonometric identities

Avoiding the "not like other girls" trope?

How can a day be of 24 hours?

Shortening a title without changing its meaning

How to pronounce fünf in 45

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Is this a new Fibonacci Identity?

How can I replace x-axis labels with pre-determined symbols?

Why can't we say "I have been having a dog"?

My boss doesn't want me to have a side project

Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?

How to implement Comparable so it is consistent with identity-equality

Can you teleport closer to a creature you are Frightened of?

Can a PhD from a non-TU9 German university become a professor in a TU9 university?

Early programmable calculators with RS-232



Rmd — bookend:pdf_document2 — Latex — Cross reference and caption figure not working



The Next CEO of Stack Overflowref not working with achemsoFigure caption and reference formattingmemoir does not generate figure cross referenceCannot cross-reference figure after using captionofCross reference figure appears as “??”Caption in figure and cross-reference them properlyCross-reference referenced page in captionIncorrect Figure reference numbering and how to reference a figure that doesn't have a captionNot displaying 'Figure' cross referenceCross reference of Table, Figure etc










0















Can anyone help me understand how to write my header so that the figure caption and cross reference works?



I am practicing making captions and cross references to a simple plot in my Rmd file. I understand that to do so, I should add to my header: "output: bookend::pdf_document2" and "fig_caption = yes". Then, to a chunk called myfigure, I should add "fig.cap = "labelfig:myfigure My caption". To cross reference this figure I should write in the text "@ref(fig:myfigure)". My code is below. It won't knit because the formatting of the header is wrong.



---
title: "knit"
author: "Chase Hommeyer"
date: "4/1/2019"
output: bookdown::pdf_document2
toc: true
fig_caption: yes
---

```r myfigure, fig.cap = "\labelfig:myfigure My caption"
plot(pressure)
```

My plot is called @ref(fig:myfigure).


Then, I tried deleting the whitespace before toc and fig_caption, and it knit, but no caption appeared, and the text literally printed "@ref(fig:myfigure)" instead of a cross reference. The header I tried is here:
---
title: "knit"
author: "Chase Hommeyer"
date: "4/1/2019"
output: bookdown::pdf_document2
toc: true
fig_caption: yes
---



I also tried adding "pdf_document:" to the header, but the same issue of no caption and the cross reference being literally "@ref(fig:myfigure)". This header I tried is here:



 ---
title: "knit"
author: "Chase Hommeyer"
date: "4/1/2019"
output: bookdown::pdf_document2
pdf_document:
toc: true
fig_caption: yes
---


Can anyone help me understand how to write my header so that it works?









share







New contributor




chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    0















    Can anyone help me understand how to write my header so that the figure caption and cross reference works?



    I am practicing making captions and cross references to a simple plot in my Rmd file. I understand that to do so, I should add to my header: "output: bookend::pdf_document2" and "fig_caption = yes". Then, to a chunk called myfigure, I should add "fig.cap = "labelfig:myfigure My caption". To cross reference this figure I should write in the text "@ref(fig:myfigure)". My code is below. It won't knit because the formatting of the header is wrong.



    ---
    title: "knit"
    author: "Chase Hommeyer"
    date: "4/1/2019"
    output: bookdown::pdf_document2
    toc: true
    fig_caption: yes
    ---

    ```r myfigure, fig.cap = "\labelfig:myfigure My caption"
    plot(pressure)
    ```

    My plot is called @ref(fig:myfigure).


    Then, I tried deleting the whitespace before toc and fig_caption, and it knit, but no caption appeared, and the text literally printed "@ref(fig:myfigure)" instead of a cross reference. The header I tried is here:
    ---
    title: "knit"
    author: "Chase Hommeyer"
    date: "4/1/2019"
    output: bookdown::pdf_document2
    toc: true
    fig_caption: yes
    ---



    I also tried adding "pdf_document:" to the header, but the same issue of no caption and the cross reference being literally "@ref(fig:myfigure)". This header I tried is here:



     ---
    title: "knit"
    author: "Chase Hommeyer"
    date: "4/1/2019"
    output: bookdown::pdf_document2
    pdf_document:
    toc: true
    fig_caption: yes
    ---


    Can anyone help me understand how to write my header so that it works?









    share







    New contributor




    chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      Can anyone help me understand how to write my header so that the figure caption and cross reference works?



      I am practicing making captions and cross references to a simple plot in my Rmd file. I understand that to do so, I should add to my header: "output: bookend::pdf_document2" and "fig_caption = yes". Then, to a chunk called myfigure, I should add "fig.cap = "labelfig:myfigure My caption". To cross reference this figure I should write in the text "@ref(fig:myfigure)". My code is below. It won't knit because the formatting of the header is wrong.



      ---
      title: "knit"
      author: "Chase Hommeyer"
      date: "4/1/2019"
      output: bookdown::pdf_document2
      toc: true
      fig_caption: yes
      ---

      ```r myfigure, fig.cap = "\labelfig:myfigure My caption"
      plot(pressure)
      ```

      My plot is called @ref(fig:myfigure).


      Then, I tried deleting the whitespace before toc and fig_caption, and it knit, but no caption appeared, and the text literally printed "@ref(fig:myfigure)" instead of a cross reference. The header I tried is here:
      ---
      title: "knit"
      author: "Chase Hommeyer"
      date: "4/1/2019"
      output: bookdown::pdf_document2
      toc: true
      fig_caption: yes
      ---



      I also tried adding "pdf_document:" to the header, but the same issue of no caption and the cross reference being literally "@ref(fig:myfigure)". This header I tried is here:



       ---
      title: "knit"
      author: "Chase Hommeyer"
      date: "4/1/2019"
      output: bookdown::pdf_document2
      pdf_document:
      toc: true
      fig_caption: yes
      ---


      Can anyone help me understand how to write my header so that it works?









      share







      New contributor




      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      Can anyone help me understand how to write my header so that the figure caption and cross reference works?



      I am practicing making captions and cross references to a simple plot in my Rmd file. I understand that to do so, I should add to my header: "output: bookend::pdf_document2" and "fig_caption = yes". Then, to a chunk called myfigure, I should add "fig.cap = "labelfig:myfigure My caption". To cross reference this figure I should write in the text "@ref(fig:myfigure)". My code is below. It won't knit because the formatting of the header is wrong.



      ---
      title: "knit"
      author: "Chase Hommeyer"
      date: "4/1/2019"
      output: bookdown::pdf_document2
      toc: true
      fig_caption: yes
      ---

      ```r myfigure, fig.cap = "\labelfig:myfigure My caption"
      plot(pressure)
      ```

      My plot is called @ref(fig:myfigure).


      Then, I tried deleting the whitespace before toc and fig_caption, and it knit, but no caption appeared, and the text literally printed "@ref(fig:myfigure)" instead of a cross reference. The header I tried is here:
      ---
      title: "knit"
      author: "Chase Hommeyer"
      date: "4/1/2019"
      output: bookdown::pdf_document2
      toc: true
      fig_caption: yes
      ---



      I also tried adding "pdf_document:" to the header, but the same issue of no caption and the cross reference being literally "@ref(fig:myfigure)". This header I tried is here:



       ---
      title: "knit"
      author: "Chase Hommeyer"
      date: "4/1/2019"
      output: bookdown::pdf_document2
      pdf_document:
      toc: true
      fig_caption: yes
      ---


      Can anyone help me understand how to write my header so that it works?







      cross-referencing captions markdown





      share







      New contributor




      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 7 mins ago









      chase171chase171

      1




      1




      New contributor




      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      chase171 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          0






          active

          oldest

          votes












          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
          );



          );






          chase171 is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482686%2frmd-bookendpdf-document2-latex-cross-reference-and-caption-figure-not%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          chase171 is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          chase171 is a new contributor. Be nice, and check out our Code of Conduct.












          chase171 is a new contributor. Be nice, and check out our Code of Conduct.











          chase171 is a new contributor. Be nice, and check out our Code of Conduct.














          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%2f482686%2frmd-bookendpdf-document2-latex-cross-reference-and-caption-figure-not%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 should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

          152 Atala Notae | Nexus externi | Tabula navigationis"Discovery Circumstances: Numbered Minor Planets"2000152Small-Body Database

          Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"