Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ref:foo) doesn't work for theorem environment in name field when knit as pdf #75

Closed
3 tasks done
ssp3nc3r opened this issue Jan 26, 2020 · 2 comments
Closed
3 tasks done

Comments

@ssp3nc3r
Copy link

The advice in bookdown for formatting long figure captions and other text is to create a reference,

(ref:foo) Title with _formatting_.

With a blank line above and below, and then referring to this in the figure caption.

I'm not getting this to work for theorem environments like example, however, when knitting to pdf.

Coding something like,

# Test

(ref:foo) This is a test.

``{exercise revision1, echo = T, name="(ref:foo)"} Some exercise description.

``

When knitted as a pdf:

bookdown::render_book("test.rmd", bookdown::tufte_book2())

Results in,

Exercise 1.1 ((ref:foo)). Some exercise description.

I have cross-posted on Stack overflow:

https://stackoverflow.com/questions/59868385/formatting-bookdown-theorem-environment-titles-e-g-example-using-reffoo

> xfun::session_info('rmarkdown')
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.2, RStudio 1.2.5036

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  base64enc_0.1.3 digest_0.6.23   evaluate_0.14   glue_1.3.1      graphics_3.6.2  grDevices_3.6.2 highr_0.8       htmltools_0.4.0 jsonlite_1.6   
  knitr_1.27      magrittr_1.5    markdown_1.1    methods_3.6.2   mime_0.8        Rcpp_1.0.3      rlang_0.4.2     rmarkdown_2.1   stats_3.6.2    
  stringi_1.4.5   stringr_1.4.0   tinytex_0.19    tools_3.6.2     utils_3.6.2     xfun_0.12       yaml_2.2.0     

Pandoc version: 2.3.1

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('tufte'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/tufte').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@yihui
Copy link
Member

yihui commented May 6, 2020

Should be fixed now. Thanks for the report!

Please try:

remotes::install_github(c('yihui/knitr', 'rstudio/bookdown'))

@github-actions
Copy link

github-actions bot commented Nov 4, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants