Skip to content

Commit

Permalink
there are packages that rely on \hlstr and \hlstd commands (such as F…
Browse files Browse the repository at this point in the history
…uzzyNumbers and pandocfilters), so define them for backward compatibility
  • Loading branch information
yihui committed May 27, 2024
1 parent b728125 commit 01441a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/header.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ make_header_latex = function(doc) {
h = one_string(c(
header_latex_packages(doc),
.header.maxwidth, opts_knit$get('header'),
if (length(grep('\\hlstd', doc, fixed = TRUE))) '\\let\\hlstd\\hldef',
if (length(grep('\\hlstr', doc, fixed = TRUE))) '\\let\\hlstr\\hlsng',
if (getOption('OutDec') != '.') '\\usepackage{amsmath}',
if (out_format('latex')) '\\usepackage{alltt}'
))
Expand Down

0 comments on commit 01441a8

Please sign in to comment.