powered by
Strip comments from LaTeX lines
strip_comments(lines, retain.percent.symbol = TRUE)
lines but with all text to the right of every unescaped % removed
lines
%
Character vector of a LaTeX document.
(logical, default: TRUE) Should the % symbol itself be stripped?
TRUE
some_lines <- c("Text. % A comment", "20\\% of comments are % useful") strip_comments(some_lines) strip_comments(some_lines, retain.percent.symbol = FALSE)
Run the code above in your browser using DataLab