Skip to content

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

Open

Description

@bryanhanson

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

Activity

  1. GegznaV commented on Aug 17, 2020

    @GegznaV
    Collaborator
  2. bryanhanson commented on Aug 17, 2020

    @bryanhanson
    CollaboratorAuthor

    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 ?

  3. bryanhanson commented on Aug 17, 2020

    @bryanhanson
    CollaboratorAuthor

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

  4. added
    Topic: vignette 📗
    on Aug 18, 2020
  5. eoduniyi commented on Aug 20, 2020

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

  6. bryanhanson commented on Aug 20, 2020

    @bryanhanson
    CollaboratorAuthor

    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`
    
  7. eoduniyi commented on Aug 20, 2020

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

  8. bryanhanson commented on Aug 20, 2020

    @bryanhanson
    CollaboratorAuthor

    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.

  9. eoduniyi commented on Aug 22, 2020

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

  10. bryanhanson commented on Aug 22, 2020

    @bryanhanson
    CollaboratorAuthor

    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.

  11. GegznaV commented on Aug 31, 2020

    @GegznaV
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Topic: vignette 📗

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions