Coder Social home page Coder Social logo

Wrong figure caption about hugo-xmin HOT 7 CLOSED

yihui avatar yihui commented on June 14, 2024
Wrong figure caption

from hugo-xmin.

Comments (7)

yihui avatar yihui commented on June 14, 2024

See https://bookdown.org/yihui/bookdown/figures.html for the requirements on chunk labels.

from hugo-xmin.

psychelzh avatar psychelzh commented on June 14, 2024

I have read those texts. I made a simpler example. But the caption is still not right (with unnecessary (#fig:load_data_and_visualization) heading).

```{r load_data_and_visualization, message=FALSE, warning=FALSE, fig.cap="Matrix plot of all variables"}
library(tidyverse)
birthsmoke <- read.table("https://onlinecourses.science.psu.edu/stat501/sites/onlinecourses.science.psu.edu.stat501/files/data/birthsmokers.txt", header = TRUE)
plot(birthsmoke)
```

image

from hugo-xmin.

yihui avatar yihui commented on June 14, 2024

You didn't read it carefully. To quote the documentation on that page:

If you want to cross-reference figures or tables generated from a code chunk, please make sure the chunk label only contains alphanumeric characters (a-z, A-Z, 0-9), slashes (/), or dashes (-).

from hugo-xmin.

psychelzh avatar psychelzh commented on June 14, 2024

I have changed it without spaces now. You could read my second example.

from hugo-xmin.

psychelzh avatar psychelzh commented on June 14, 2024

The point here is that the words "(#fig:load_data_and_visualization)" are unnecessary. I do not know why they appear here.

from hugo-xmin.

yihui avatar yihui commented on June 14, 2024

Okay, for the third time: please, please read the documentation carefully. I have copied the relevant part above. It is only one sentence. Please read every word in it.

from hugo-xmin.

psychelzh avatar psychelzh commented on June 14, 2024

Oh my, I know now. The underscore (_) is not supported. :( I am sorry, but it is very error-prone for newbies if underscore is not supported.

from hugo-xmin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.