.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CTAGS-LANG-RMARKDOWN" 7 "" "6.1.0" "Universal Ctags" .SH NAME ctags-lang-rmarkdown \- Random notes about tagging R Markdown source code with Universal Ctags .SH SYNOPSIS .nf \fBctags\fP ...\-\-extras=+{subparser}{guest} \-\-languages=+RMarkdown ... \fBctags\fP ...\-\-extras=+{subparser}{guest} \-\-language\-force=RMarkdown ... \fBctags\fP ...\-\-extras=+{subparser}{guest} \-\-map\-RMarkdown=+.rmd ... .fi .sp .SH DESCRIPTION .sp RMarkdown parser is an exclusive subparser stacked on top of the Markdown parser. It works when: .INDENT 0.0 .IP \(bu 2 the Markdown parser is enabled, .IP \(bu 2 the \fBsubparser\fP extra is enabled, and .IP \(bu 2 the RMarkdown parser itself is enabled. .UNINDENT .sp The RMarkdown parser extends the way of detecting \fBcodeblocks\fP from the Markdown parser. This extension is for running guest parsers on \fBcode chunks\fP\&. .sp The Markdown parser expects the following syntax represents codeblocks: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \(ga\(ga\(galanguage\-name ... \(ga\(ga\(ga .ft P .fi .UNINDENT .UNINDENT .sp For an example .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \(ga\(ga\(gar ... \(ga\(ga\(ga .ft P .fi .UNINDENT .UNINDENT .sp The RMarkdown parser accepts the following syntax for code chunks: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \(ga\(ga\(ga{language\-name chunk\-label, ...} ... \(ga\(ga\(ga .ft P .fi .UNINDENT .UNINDENT .sp For an example .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \(ga\(ga\(ga{r precalc fig.height=4} ... \(ga\(ga\(ga .ft P .fi .UNINDENT .UNINDENT .sp Give \fI\-\-extras=+{guest}\fP for enabling \fBguest\fP to command line if you want to run proper parsers on lines inside code chunks. .sp The parser extracts chunk labels coming after \fIlanguage\-name\fP as \fIchunklabel\fP kind objcts. In the exapmle, the RMarkdown parser extracts \fIprecalc\fP as a \fIchunklabel\fP kind object. The \fIchunklabel\fP kind is enabled by default. .SH EXAMPLES .sp \(dqinput.rmd\(dq .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Section 1 \(ga\(ga\(ga{r myblock} zero_fun <\- function () { return 0 } \(ga\(ga\(ga # Section 2 .ft P .fi .UNINDENT .UNINDENT .sp \(dqoutput.tags\(dq with \(dq\-\-options=NONE \-\-extras=+{guest} \-\-fields=+KZln \-o \- input.rmd\(dq .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C Section 1 input.rmd /^# Section 1$/;\(dq chapter line:1 language:Markdown Section 2 input.rmd /^# Section 2$/;\(dq chapter line:9 language:Markdown myblock input.rmd /^\(ga\(ga\(ga{r myblock}$/;\(dq chunklabel line:3 language:RMarkdown zero_fun input.rmd /^ zero_fun <\- function () {$/;\(dq function line:4 language:R .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .sp ctags(1), ctags\-client\-tools(7), ctags\-lang\-r(7), \fI\%R Markdown: The Definitive Guide\fP .\" Generated by docutils manpage writer. .