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

Chapter references appear as ?? when chapter titles contain #294

Closed
ismayc opened this issue Jan 9, 2017 · 3 comments
Closed

Chapter references appear as ?? when chapter titles contain #294

ismayc opened this issue Jan 9, 2017 · 3 comments
Milestone

Comments

@ismayc
Copy link
Contributor

ismayc commented Jan 9, 2017

I'd like to have some R package names appear in the names of chapters in a book with the code format provided via the backticks around them. Unfortunately, when I try to create links to these chapters via \@ref(chapname), I receive ?? in PDF and HTML versions of the built book. The links do work when you click on them.

I tested this with bookdown-demo and received a similar error when I changed the first line of 01-intro.Rmd from "# Introduction {#intro}" to "# Introduction with `tidyverse` {#intro}". The cross-reference that appears on the next line of text (Chapter \@ref(intro) ) produces the ?? I referred to earlier.

My session info is below:

> devtools::session_info()
Session info ------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.2 (2016-10-31)
 system   x86_64, darwin13.4.0        
 ui       RStudio (1.0.136)           
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2017-01-09                  

Packages ----------------------------------------------------------------------------------
 package   * version date       source        
 backports   1.0.4   2016-10-24 CRAN (R 3.3.0)
 bookdown    0.3     2016-11-28 CRAN (R 3.3.2)
 devtools    1.12.0  2016-06-24 CRAN (R 3.3.0)
 digest      0.6.11  2017-01-03 CRAN (R 3.3.2)
 evaluate    0.10    2016-10-11 CRAN (R 3.3.0)
 htmltools   0.3.5   2016-03-21 CRAN (R 3.3.0)
 knitr       1.15.1  2016-11-22 CRAN (R 3.3.2)
 magrittr    1.5     2014-11-22 CRAN (R 3.3.0)
 memoise     1.0.0   2016-01-29 CRAN (R 3.3.0)
 needs     * 0.0.3   2016-03-28 CRAN (R 3.3.0)
 Rcpp        0.12.8  2016-11-17 CRAN (R 3.3.2)
 rmarkdown   1.3     2016-12-21 CRAN (R 3.3.2)
 rprojroot   1.1     2016-10-29 CRAN (R 3.3.0)
 stringi     1.1.2   2016-10-01 CRAN (R 3.3.0)
 stringr     1.1.0   2016-08-19 CRAN (R 3.3.0)
 webshot     0.4.0   2016-12-27 CRAN (R 3.3.2)
 withr       1.0.2   2016-06-20 CRAN (R 3.3.0)
 yaml        2.1.14  2016-11-12 CRAN (R 3.3.2)
@yihui
Copy link
Member

yihui commented Jan 9, 2017

I think this is the same issue as jgm/pandoc#2878 When the last element in the heading is a <code>, the attributes will be applied to the code. Perhaps you can change `tidyverse` (an R package name) to Tidyverse (a general name).

@yihui yihui closed this as completed Jan 9, 2017
@yihui yihui added this to the v0.4 milestone Jan 9, 2017
@ismayc
Copy link
Contributor Author

ismayc commented Jan 9, 2017

OK, change has been made to tidyverse instead of tidyverse.

@github-actions
Copy link

github-actions bot commented Nov 6, 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 6, 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