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 helmut.schuetz at bebac.at W https://bebac.at/ C https://bebac.at/Contact.htm F https://forum.bebac.at/
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 <helmut.schuetz at bebac.at> 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 helmut.schuetz at bebac.at > W https://bebac.at/ > C https://bebac.at/Contact.htm > F https://forum.bebac.at/ > > ______________________________________________ > R-help at r-project.org 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]]
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 <helmut.schuetz at bebac.at> 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
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 helmut.schuetz at bebac.at 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.
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]]