1CTAGS-LANG-RMARKDOWN(7)         Universal Ctags        CTAGS-LANG-RMARKDOWN(7)
2
3
4

NAME

6       ctags-lang-rmarkdown  -  Random  notes  about tagging R Markdown source
7       code with Universal Ctags
8

SYNOPSIS

10       ctags ...--extras=+{subparser}{guest} --languages=+RMarkdown ...
11       ctags ...--extras=+{subparser}{guest} --language-force=RMarkdown ...
12       ctags ...--extras=+{subparser}{guest} --map-RMarkdown=+.rmd ...
13
14

DESCRIPTION

16       RMarkdown parser is an exclusive subparser stacked on top of the  Mark‐
17       down parser.  It works when:
18
19       • the Markdown parser is enabled,
20
21       • the subparser extra is enabled, and
22
23       • the RMarkdown parser itself is enabled.
24
25       The  RMarkdown  parser extends the way of detecting codeblocks from the
26       Markdown parser. This extension is for running guest  parsers  on  code
27       chunks.
28
29       The Markdown parser expects the following syntax represents codeblocks:
30
31          ```language-name
32                  ...
33          ```
34
35       For an example
36
37          ```r
38                  ...
39          ```
40
41       The RMarkdown parser accepts the following syntax for code chunks:
42
43          ```{language-name chunk-label, ...}
44                  ...
45          ```
46
47       For an example
48
49          ```{r precalc fig.height=4}
50                  ...
51          ```
52
53       Give  --extras=+{guest}  for enabling guest to command line if you want
54       to run proper parsers on lines inside code chunks.
55
56       The parser extracts chunk labels coming after language-name as chunkla‐
57       bel  kind objcts. In the exapmle, the RMarkdown parser extracts precalc
58       as a chunklabel kind object.  The chunklabel kind  is  enabled  by  de‐
59       fault.
60

EXAMPLES

62       "input.rmd"
63
64          # Section 1
65
66          ```{r myblock}
67                  zero_fun <- function () {
68                          return 0
69                  }
70          ```
71
72          # Section 2
73
74       "output.tags"  with "--options=NONE --extras=+{guest} --fields=+KZln -o
75       - input.rmd"
76
77          Section 1       input.rmd       /^# Section 1$/;"       chapter line:1  language:Markdown
78          Section 2       input.rmd       /^# Section 2$/;"       chapter line:9  language:Markdown
79          myblock input.rmd       /^```{r myblock}$/;"    chunklabel      line:3  language:RMarkdown
80          zero_fun        input.rmd       /^      zero_fun <- function () {$/;"   function        line:4  language:R
81

SEE ALSO

83       ctags(1), ctags-client-tools(7), ctags-lang-r(7), R Markdown:  The  De‐
84       finitive Guide
85
86
87
88
895.9.0                                                  CTAGS-LANG-RMARKDOWN(7)
Impressum