Changelog
Source:NEWS.md
parseLatex 0.4.1
CRAN release: 2025-06-06
- Added
row_to_vector(). - Added
is_text()andis_error(). - Added
showErrors(), and changed the formatting of errors indeparseLatex().parseLatex(recover = TRUE)now callsshowErrors()rather than generating warnings. - Fixed some parsing bugs related to error recovery.
- Sequences of spaces and tabs and sequences of linebreaks are each collected into single items containing the full sequence of characters.
- Deparsing of
SPECIALs has been improved. - Added
trim_whitespace(),envName()<-,find_block()andinsert_values()to help withkableExtrasupport. - Added support for
tabutables. - Added
is_char(),find_caption(),drop_caption(),path_to_caption(),get_range(). -
drop_items()now works onLaTeX2Itemlists. -
tableRow()by default ignores\pagebreakand\nopagebreak. The new argumentwithExtrasallows it to include these and other extras before the line in the result.withDataallows it to exclude the data.find_tableRow()andtableRow<-have similar modifications. -
find_rule()andrule()now remove the final whitespace from the result. - Added
columnOption()andcolumnOption<-()functions. - Added
new_env(), similar tonew_block(). - Added
split_chars(), usually used to split text or whitespace into individual characters. - Constants for the TeX catcodes are now exported, e.g.
NEWLINE. - The
find_*functions now have anallargument, to allow the search to be stopped at the first success, and apathargument, to control the form of the return value. - Added
ITEMLISTandPLACEHOLDERLaTeX tag values. These are used internally to organize long lists of items, e.g. to allow the rows of a table to be indexed directly. - Fixed bug in
parseLatex()in handling$within a definition.
parseLatex 0.3.0
CRAN release: 2025-02-20
- Added
stdbool.hto the includes for compatibility with oldergcc. (Thanks to Dirk Eddelbuettel for the report and PR #2). - Added a configure script to check for bison (on Unix-alike only).
- Adjacent math environments were treated as a syntax error.
-
\letis now handled the same way as\def: the next two tokens are not considered for evaluation. - Added arguments
defcmdanddefenvtoparseLatex()to allow the user to specify defining macros. These names are also now allowed in the magic comments. - Spaces between a
verbmacro and its argument caused the parsing to be incorrect. - Added argument
recovertoparseLatex(), to attempt to recover after a parsing error. This may help with diagnosing the error. The error will be wrapped in anERRORtag which is displayed as>>>text causing error<<<.
parseLatex 0.2.0
- Added
find_sequence(),set_contents(). - Add
DEFINITIONtag to allow\beginetc. to be temporarily ignored. This allows parseLatex to parse\newenvironmentand related macros that create definitions. -
parseLatex()now stops parsing after\end{document}just as LaTeX does. Theget_leftovers()function can retrieve the unparsed text. - Added support for “magic comments”. See the vignette for details.
-
verbmacros now allow embedded braces as long as they are balanced.