TOC in vignette (knitr::rmarkdown)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

TOC in vignette (knitr::rmarkdown)

Helmut Schütz
Dear all,

I can't figure out how to include a table of contents in a vignette.

What I have now:
---
title: "myPackage"
subtitle: mySubtitle"
author: "Me"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
   %\VignetteIndexEntry{replicateBE}
   %\VignetteEngine{knitr::rmarkdown}
   %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
   collapse = TRUE,
   comment = "#>"
)
```

This one works fine in my README.Rdm:
---
title: "myPackage"
output:
   github_document:
     toc: true
     toc_depth: 4
---

Cheers,
Helmut

--
Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
E [hidden email]
W https://bebac.at/
C https://bebac.at/Contact.htm
F https://forum.bebac.at/

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: TOC in vignette (knitr::rmarkdown)

Bert Gunter-2
Almost surely better posted on the r-package-devel mailing list.

Cheers,

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Aug 26, 2019 at 7:32 AM Helmut Schütz <[hidden email]>
wrote:

> Dear all,
>
> I can't figure out how to include a table of contents in a vignette.
>
> What I have now:
> ---
> title: "myPackage"
> subtitle: mySubtitle"
> author: "Me"
> date: "`r Sys.Date()`"
> output: rmarkdown::html_vignette
> vignette: >
>    %\VignetteIndexEntry{replicateBE}
>    %\VignetteEngine{knitr::rmarkdown}
>    %\VignetteEncoding{UTF-8}
> ---
>
> ```{r, include = FALSE}
> knitr::opts_chunk$set(
>    collapse = TRUE,
>    comment = "#>"
> )
> ```
>
> This one works fine in my README.Rdm:
> ---
> title: "myPackage"
> output:
>    github_document:
>      toc: true
>      toc_depth: 4
> ---
>
> Cheers,
> Helmut
>
> --
> Ing. Helmut Schütz
> BEBAC – Consultancy Services for
> Bioequivalence and Bioavailability Studies
> E [hidden email]
> W https://bebac.at/
> C https://bebac.at/Contact.htm
> F https://forum.bebac.at/
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: TOC in vignette (knitr::rmarkdown)

Yihui Xie-2
In reply to this post by Helmut Schütz
output:
  rmarkdown::html_vignette:
    toc: true

The syntax is the same for all R Markdown output formats:
https://bookdown.org/yihui/rmarkdown/html-document.html#table-of-contents

Regards,
Yihui
--
https://yihui.name

On Mon, Aug 26, 2019 at 9:32 AM Helmut Schütz <[hidden email]> wrote:

>
> Dear all,
>
> I can't figure out how to include a table of contents in a vignette.
>
> What I have now:
> ---
> title: "myPackage"
> subtitle: mySubtitle"
> author: "Me"
> date: "`r Sys.Date()`"
> output: rmarkdown::html_vignette
> vignette: >
>    %\VignetteIndexEntry{replicateBE}
>    %\VignetteEngine{knitr::rmarkdown}
>    %\VignetteEncoding{UTF-8}
> ---
>
> ```{r, include = FALSE}
> knitr::opts_chunk$set(
>    collapse = TRUE,
>    comment = "#>"
> )
> ```
>
> This one works fine in my README.Rdm:
> ---
> title: "myPackage"
> output:
>    github_document:
>      toc: true
>      toc_depth: 4
> ---
>
> Cheers,
> Helmut

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: TOC in vignette (knitr::rmarkdown)

Helmut Schütz
Hi Yihui,

THX; you made my day!

Cheers,
Helmut

Yihui Xie wrote on 2019-08-26 16:59:
> output:
>    rmarkdown::html_vignette:
>      toc: true
>
> The syntax is the same for all R Markdown output formats:
> https://bookdown.org/yihui/rmarkdown/html-document.html#table-of-contents
>
> Regards,
> Yihui

--
Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
Neubaugasse 36/11
1070 Vienna, Austria
T +43 1 2311746
M +43 699 10792458
E [hidden email]
W https://bebac.at/
C https://bebac.at/Contact.htm
F https://forum.bebac.at/
GIS 24799386, VAT ATU61115625, DUNS 300370568, EORI ATEOS1000096209
GDPR https://bebac.at/Data-Protection.htm
This e-mail is confidential and may also be legally privileged. If you
are not the intended recipient please reply to sender, do not disclose
its contents to any person and delete the e-mail. Any unauthorized
review, use, disclosure, copying or distribution is strictly prohibited.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: TOC in vignette (knitr::rmarkdown)

Helmut Schütz
In reply to this post by Bert Gunter-2
Hi Bert,

Bert Gunter wrote on 2019-08-26 16:52:
> Almost surely better posted on the r-package-devel mailing list.

Do you have a macro for those ‘answers’ of yours? SCNR.
*Which* kind of questions are -- in your opinion -- suitable to be
posted *here*?

Cheers,
Helmut

--
Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
W https://bebac.at/
C https://bebac.at/Contact.htm
F https://forum.bebac.at/


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: TOC in vignette (knitr::rmarkdown)

Jeff Newmiller
The footer of every message on this list has a link to the Posting Guide, which discusses several mailing lists. Among the issues mentioned there that seem particularly relevant to your emails are:

- R-help is for questions about R (which is a very general vehicle for implementing solution methods for a wide range of domains). "Questions likely to prompt discussion unintelligible to non-programmers should rather go to R-devel than R-help."

- R-package-devel is specifically about making packages for R. Clearly, that is a subset of topics related to the R language, but it is relatively specialized so it has a dedicated mailing list to avoid cluttering the mailboxes of people not interested in those details.

- There is a discussion regarding "Questions about statistics", which frequently triggers the "go elsewhere" response you may have seen.

- There is a warning that not all packages are on-topic in R-help:
"For questions about functions in standard packages distributed with R (see the FAQ Add-On Packages in R), ask questions on R-help. If the question relates to a contributed package , e.g., one downloaded from CRAN, try contacting the package maintainer first. You can also use find("functionname") and packageDescription("packagename") to find this information. Only send such questions to R-help or R-devel if you get no reply or need further assistance. This applies to both requests for help and to bug reports."

- There is a warning that the mailing list is a text-only list. It is difficult to cover all the "whys and hows" for this issue even in a Posting Guide, but when you fail to set your originating email program to send using plain text format then you run a significant risk that the people you want answers from will see a corrupted version of what you intended for them to see, making it less likely that they will respond.

Just think "is this about the R programming language and is there no more specific place to ask it" before you post to avoid most off-topic diversions.


On August 26, 2019 8:09:57 AM PDT, "Helmut Schütz" <[hidden email]> wrote:

>Hi Bert,
>
>Bert Gunter wrote on 2019-08-26 16:52:
>> Almost surely better posted on the r-package-devel mailing list.
>
>Do you have a macro for those ‘answers’ of yours? SCNR.
>*Which* kind of questions are -- in your opinion -- suitable to be
>posted *here*?
>
>Cheers,
>Helmut

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.