Find a code sequence
Usage
find_sequence(items, sequence, all = FALSE, ignore_whitespace = TRUE)
items_are_equal(items1, items2)
Arguments
- items, sequence
LaTeX2 objects or lists.
- all
Whether to return all matches, or just the first.
- ignore_whitespace
Whether to ignore whitespace in comparisons.
- items1, items2
Two LaTeX2 or LaTeX2item objects.
Value
find_sequence()
returns a path or list of paths where sequence
occurs within items
.
items_are_equal
returns a logical indicator of equality after removing source references.
Examples
find_sequence(parseLatex("a & b & c"), "b & c")
#> path= range=5:9