all_patterns: All built-in patterns

Description Usage Format References See Also Examples

Description

This object is a named list of all built-in patterns.

Usage

1

Format

An object of class list of length 8.

References

Usage: https://yihui.name/knitr/patterns/

See Also

knit_patterns

Examples

1
2
3
4

Example output

$chunk.begin
[1] "^\\s*<<(.*)>>=.*$"

$chunk.end
[1] "^\\s*@\\s*(%+.*|)$"

$inline.code
[1] "\\\\Sexpr\\{([^}]+)\\}"

$inline.comment
[1] "^\\s*%.*"

$ref.chunk
[1] "^\\s*<<(.+)>>\\s*$"

$header.begin
[1] "(^|\n)\\s*\\\\documentclass[^}]+\\}"

$document.begin
[1] "\\s*\\\\begin\\{document\\}"

$chunk.begin
[1] "^\\s*<!--\\s*begin.rcode\\s*(.*)"

$chunk.end
[1] "^\\s*end.rcode\\s*-->"

$ref.chunk
[1] "^\\s*<<(.+)>>\\s*$"

$inline.code
[1] "<!--\\s*rinline(.+?)-->"

$header.begin
[1] "\\s*<head>"

List of 8
 $ rnw     :List of 7
  ..$ chunk.begin   : chr "^\\s*<<(.*)>>=.*$"
  ..$ chunk.end     : chr "^\\s*@\\s*(%+.*|)$"
  ..$ inline.code   : chr "\\\\Sexpr\\{([^}]+)\\}"
  ..$ inline.comment: chr "^\\s*%.*"
  ..$ ref.chunk     : chr "^\\s*<<(.+)>>\\s*$"
  ..$ header.begin  : chr "(^|\n)\\s*\\\\documentclass[^}]+\\}"
  ..$ document.begin: chr "\\s*\\\\begin\\{document\\}"
 $ brew    :List of 1
  ..$ inline.code: chr "<%[=]{0,1}\\s+([^%]+)\\s+[-]*%>"
 $ tex     :List of 8
  ..$ chunk.begin   : chr "^\\s*%+\\s*begin.rcode\\s*(.*)"
  ..$ chunk.end     : chr "^\\s*%+\\s*end.rcode"
  ..$ chunk.code    : chr "^\\s*%+"
  ..$ ref.chunk     : chr "^%+\\s*<<(.+)>>\\s*$"
  ..$ inline.comment: chr "^\\s*%.*"
  ..$ inline.code   : chr "\\\\rinline\\{([^}]+)\\}"
  ..$ header.begin  : chr "(^|\n)\\s*\\\\documentclass[^}]+\\}"
  ..$ document.begin: chr "\\s*\\\\begin\\{document\\}"
 $ html    :List of 5
  ..$ chunk.begin : chr "^\\s*<!--\\s*begin.rcode\\s*(.*)"
  ..$ chunk.end   : chr "^\\s*end.rcode\\s*-->"
  ..$ ref.chunk   : chr "^\\s*<<(.+)>>\\s*$"
  ..$ inline.code : chr "<!--\\s*rinline(.+?)-->"
  ..$ header.begin: chr "\\s*<head>"
 $ md      :List of 4
  ..$ chunk.begin: chr "^[\t >]*```+\\s*\\{([a-zA-Z0-9_]+.*)\\}\\s*$"
  ..$ chunk.end  : chr "^[\t >]*```+\\s*$"
  ..$ ref.chunk  : chr "^\\s*<<(.+)>>\\s*$"
  ..$ inline.code: chr "(?<!(^|\n)``)`r[ #]([^`]+)\\s*`"
 $ rst     :List of 5
  ..$ chunk.begin: chr "^\\s*[.][.]\\s+\\{r(.*)\\}\\s*$"
  ..$ chunk.end  : chr "^\\s*[.][.]\\s+[.][.]\\s*$"
  ..$ chunk.code : chr "^\\s*[.][.]"
  ..$ ref.chunk  : chr "^\\.*\\s*<<(.+)>>\\s*$"
  ..$ inline.code: chr ":r:`([^`]+)`"
 $ asciidoc:List of 6
  ..$ chunk.begin   : chr "^//\\s*begin[.]rcode(.*)$"
  ..$ chunk.end     : chr "^//\\s*end[.]rcode\\s*$"
  ..$ chunk.code    : chr "^//+"
  ..$ ref.chunk     : chr "^\\s*<<(.+)>>\\s*$"
  ..$ inline.code   : chr "`r +([^`]+)\\s*`|[+]r +([^+]+)\\s*[+]"
  ..$ inline.comment: chr "^//.*"
 $ textile :List of 5
  ..$ chunk.begin   : chr "^###[.]\\s+begin[.]rcode(.*)$"
  ..$ chunk.end     : chr "^###[.]\\s+end[.]rcode\\s*$"
  ..$ ref.chunk     : chr "^\\s*<<(.+)>>\\s*$"
  ..$ inline.code   : chr "@r +([^@]+)\\s*@"
  ..$ inline.comment: chr "^###[.].*"

knitr documentation built on Nov. 13, 2019, 1:07 a.m.