get_leftovers: Retrieve source from beyond the end of the document.

View source: R/get_leftovers.R

get_leftoversR Documentation

Retrieve source from beyond the end of the document.

Description

Retrieve source from beyond the end of the document.

Usage

get_leftovers(text, items = parseLatex(text))

Arguments

text

Character vector holding source.

items

Parsed version of text.

Value

The part of text that follows ⁠\end{document}⁠ other than a single newline, named according to the original line numbers.

Note

The line numbering in the output matches what a text editor would see; embedded newlines in text will result in separate lines in the output.

Examples

# line:  1                  2                3
text <- "\\begin{document}\n\\end{document}\nnotes"
get_leftovers(text)

parseLatex documentation built on April 3, 2025, 5:27 p.m.