outline: Extract headings of (R) Markdown-syntax text as an outline

Description Usage Arguments Value Examples

View source: R/individual.R

Description

Extract headings of (R) Markdown-syntax text as an outline

Usage

1
2
3
4
5
6
7
8
outline(
  from,
  md_list = FALSE,
  md_eq = FALSE,
  md_braces = FALSE,
  md_bookdown = FALSE,
  md_maxlevel = ""
)

Arguments

from

Character. The source text of the (R) Markdown syntax text, the R code, the FreeMind mind map code, or the path to the directory.

md_list

Logical. whether to process lists like headings in the Markdown input.

md_eq

Logical. Whether to include LaTeX equations in the Markdown input when converted to other formats.

md_braces

Logical. Whether to remove #ID in the headings of the markdown file (usually in a bookdown> project.

md_bookdown

Logical. Whether the R Markdown syntax text is in bookdown style, i.e. # (PART), # (APPENDIX), and # References as an upper level of the Level 1 heading.

md_maxlevel

Integer or ”. The maximum level of the markdown headings that are displayed in the mind map.

Value

Character, showing the outline.

Examples

1
2
3
4
5
input <- system.file("examples/mindr-md.Rmd", package = "mindr")
input_txt <- readLines(input, encoding = "UTF-8")
outline(input_txt)
outline(input_txt, md_list = TRUE, md_bookdown = TRUE)
outline(input_txt, md_list = TRUE, md_bookdown = TRUE, md_maxlevel = 2)

pzhaonet/mindr documentation built on Nov. 23, 2021, 7:24 p.m.