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

Add list-of-vignettes feature to all vignettes #261

Open
5 tasks
bryanhanson opened this issue Aug 17, 2020 · 10 comments
Open
5 tasks

Add list-of-vignettes feature to all vignettes #261

bryanhanson opened this issue Aug 17, 2020 · 10 comments
Labels
Topic: vignette 📗 Related to vignettes of hyperSpec

Comments

@bryanhanson
Copy link
Collaborator

Currently, the intro vignette hyperSpec.Rmd has code to insert a file list-of-vignettes.md as well as internal links that point to the inserted code. This greatly reduces the need to edit the files if the name of the vignettes change, their links change or more vignettes are added, as everything is centralized.

These features should be added to the other vignettes when they are reviewed:

  • Fixed in baseline.Rmd
  • Fixed in chondro.Rmd
  • Fixed in flu.Rmd
  • Fixed in fileio.Rmd
  • Fixed in plotting.Rmd
@GegznaV
Copy link
Collaborator

GegznaV commented Aug 17, 2020 via email

@bryanhanson
Copy link
Collaborator Author

Good point. Probably we should not edit the ones here in hyperSpec that have been moved to other repos, and instead edit them there, eventually deleting them here. What do you think @GegznaV ?

@bryanhanson
Copy link
Collaborator Author

Maybe I should move this issue to the r-hyperspec.githhub.io issue list?

@eoduniyi
Copy link
Collaborator

@bryanhanson Let me make sure I got this straight: vignettes should point to each other via the list-of-vignettes and internal links.

hySpc.read.txt(vignette) <-> hyperSpec(vignette)

@bryanhanson
Copy link
Collaborator Author

Did @GegznaV fix this? One of his commits mentioned cross-references but that was probably section references(?).

But generally, mention of a different vignette (vig 2) somewhere deep in vig1 is marked by an internal link like this:

In addition, [`laser`](#list-of-vignettes)...

which when clicked takes the reader to the top of vig1 where they see the colored box with information about all vignettes that are available. This colored box is placed in (eventually) every vig by this code near the very top:

{r, echo = FALSE, results = "asis"}
res <- knitr::knit_child("list-of-vignettes.md", quiet = TRUE)
cat(res, sep = '\n')
It's operational in `hyperSpec.Rmd`

@eoduniyi
Copy link
Collaborator

Did @GegznaV fix this? One of his commits mentioned cross-references but that was probably section references(?).

But generally, mention of a different vignette (vig 2) somewhere deep in vig1 is marked by an internal link like this:

In addition, [`laser`](#list-of-vignettes)...

which when clicked takes the reader to the top of vig1 where they see the colored box with information about all vignettes that are available. This colored box is placed in (eventually) every vig by this code near the very top:

{r, echo = FALSE, results = "asis"}
res <- knitr::knit_child("list-of-vignettes.md", quiet = TRUE)
cat(res, sep = '\n')
It's operational in `hyperSpec.Rmd`

@bryanhanson have you seen issue #270

@bryanhanson
Copy link
Collaborator Author

OK, getting up to speed at >40 messages... 270 is a different issue from the internal links. I just checked and the internal links work in the intro vignette, but there are some cross references that are broken as reported in 270. Are we on the same page? I'm a little confused.

@eoduniyi
Copy link
Collaborator

OK, getting up to speed at >40 messages... 270 is a different issue from the internal links. I just checked and the internal links work in the intro vignette, but there are some cross references that are broken as reported in 270. Are we on the same page? I'm a little confused.

Oh okay, I will get back up to speed myself

@bryanhanson
Copy link
Collaborator Author

You are correct. There is some small difference between the two referencing environments.

I think I had this problem about 3 weeks ago converting the ChemoSpec vignette. This is what I put in ChemoSpec.Rmd in the yaml at the top:

output:
#    bookdown::html_document2: # use for pkgdown site
    bookdown::pdf_document2: # use for CRAN to keep size down
      toc: yes
      toc_depth: 2
      fig_caption: yes
      number_sections: true # needed for section cross-refs to work

Note the note I left myself. I'm busy outside right now but you might look and see what the settings are in the hyperSpec vignettes that are mis-behaving on cross-referencing. I recall having to troubleshoot quite a while. Also, the pdf vs html -- that's issue #259.

@GegznaV
Copy link
Collaborator

GegznaV commented Aug 31, 2020

Let's focus on "Add list-of-vignettes feature to all vignettes" here and open separate issues for all other topics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: vignette 📗 Related to vignettes of hyperSpec
Projects
None yet
Development

No branches or pull requests

3 participants