hyperSpec icon indicating copy to clipboard operation
hyperSpec copied to clipboard

Add list-of-vignettes feature to all vignettes

Open bryanhanson opened this issue 5 years ago • 10 comments

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

bryanhanson avatar Aug 17 '20 19:08 bryanhanson

The hySpc.ggplot2 and the other vignettes in hySpc packages should also be included in this list.

2020 rugp. 17, pr 22:36, Bryan Hanson [email protected] rašė:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cbeleites/hyperSpec/issues/261, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBC43EFG5J6ESS7UKYJK43SBGBFRANCNFSM4QCDEL4Q .

GegznaV avatar Aug 17 '20 19:08 GegznaV

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 avatar Aug 17 '20 19:08 bryanhanson

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

bryanhanson avatar Aug 17 '20 19:08 bryanhanson

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

eoduniyi avatar Aug 20 '20 11:08 eoduniyi

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 avatar Aug 20 '20 12:08 bryanhanson

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

eoduniyi avatar Aug 20 '20 12:08 eoduniyi

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.

bryanhanson avatar Aug 20 '20 12:08 bryanhanson

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

eoduniyi avatar Aug 22 '20 18:08 eoduniyi

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.

bryanhanson avatar Aug 22 '20 19:08 bryanhanson

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

GegznaV avatar Aug 31 '20 15:08 GegznaV