% Single-line comment
\name<beginfold id='1'>{</beginfold id='1'>foo<endfold id='1'>}</endfold id='1'>
<beginfold id='2'>#ifdef</beginfold id='2'> unix
\alias<beginfold id='1'>{</beginfold id='1'>bar<endfold id='1'>}</endfold id='1'>
<endfold id='2'>#endif</endfold id='2'> ignored
\title<beginfold id='1'>{</beginfold id='1'>Foo<endfold id='1'>}</endfold id='1'>
\description<beginfold id='1'>{</beginfold id='1'>
    We have a list
    \itemize<beginfold id='1'>{</beginfold id='1'>
        \item foo,
        \item bar.
    <endfold id='1'>}</endfold id='1'>
    Also a table: \tabular<beginfold id='1'>{</beginfold id='1'>lr<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>
        foo \tab \code<beginfold id='1'>{</beginfold id='1'>foo<endfold id='1'>}</endfold id='1'> \cr
        bar \tab \preformatted<beginfold id='1'>{</beginfold id='1'>bar<endfold id='1'>}</endfold id='1'>
    <endfold id='1'>}</endfold id='1'>
    \samp error<beginfold id='1'>{</beginfold id='1'>code<endfold id='1'>}</endfold id='1'>
<endfold id='1'>}</endfold id='1'>
\section<beginfold id='1'>{</beginfold id='1'>Section<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>
    Escaped braces don't need balance \}
    \subsection<beginfold id='1'>{</beginfold id='1'>Subsection<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>
        \subsection<beginfold id='1'>{</beginfold id='1'>Subsubsection<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>
            Sections can be nested.
        <endfold id='1'>}</endfold id='1'>
    <endfold id='1'>}</endfold id='1'>
<endfold id='1'>}</endfold id='1'>
\usage<beginfold id='1'>{</beginfold id='1'>
foo(a, b = default)
\method<beginfold id='1'>{</beginfold id='1'>[<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>foo<endfold id='1'>}</endfold id='1'>(x, \dots)
<endfold id='1'>}</endfold id='1'>
\newcommand<beginfold id='1'>{</beginfold id='1'>\macro<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>Test#1<endfold id='1'>}</endfold id='1'>
\arguments<beginfold id='1'>{</beginfold id='1'>
  \item<beginfold id='1'>{</beginfold id='1'>a<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>\if<beginfold id='1'>{</beginfold id='1'>html<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>&pi; =<endfold id='1'>}</endfold id='1'> \Sexpr<beginfold id='3'>[</beginfold id='3'>stage=build<endfold id='3'>]</endfold id='3'><beginfold id='1'>{</beginfold id='1'>4*atan(1)<endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'>
  \item<beginfold id='1'>{</beginfold id='1'>\dots<endfold id='1'>}</endfold id='1'><beginfold id='1'>{</beginfold id='1'>\macro<beginfold id='1'>{</beginfold id='1'>text<endfold id='1'>}</endfold id='1'> \link<beginfold id='3'>[</beginfold id='3'>pkg:bar<endfold id='3'>]</endfold id='3'><beginfold id='1'>{</beginfold id='1'>fooo<endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'>
<endfold id='1'>}</endfold id='1'>
\value<beginfold id='1'>{</beginfold id='1'>
  Return a \code<beginfold id='1'>{</beginfold id='1'>\link<beginfold id='1'>{</beginfold id='1'>foo<endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'>.
<endfold id='1'>}</endfold id='1'>
\seealso<beginfold id='1'>{</beginfold id='1'>
  \code<beginfold id='1'>{</beginfold id='1'>\link<beginfold id='1'>{</beginfold id='1'>bar<endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'>
<endfold id='1'>}</endfold id='1'>
\examples<beginfold id='1'>{</beginfold id='1'>
# R comment
% Rdoc comment
foo(1)
\donttest<beginfold id='1'>{</beginfold id='1'>foo(2)<endfold id='1'>}</endfold id='1'>
\dontrun<beginfold id='1'>{</beginfold id='1'>foo(3)<endfold id='1'>}</endfold id='1'>
for (i in 1:10)
    foo(i)
<endfold id='1'>}</endfold id='1'>
\keyword<beginfold id='1'>{</beginfold id='1'>foo<endfold id='1'>}</endfold id='1'>
