Skip to content

Commit

Permalink
fix latex3/luaotfload#213: detect the lua-uni-algos package in case o…
Browse files Browse the repository at this point in the history
…f error `module 'lua-uni-normalize' not found`

applying the same fix as quarto-dev/quarto-cli@ddf9cf3
  • Loading branch information
yihui committed Mar 1, 2022
1 parent 1ac8135 commit 157b62d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tinytex
Type: Package
Title: Helper Functions to Install and Maintain TeX Live, and Compile LaTeX Documents
Version: 0.37.1
Version: 0.37.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person(family = "RStudio, PBC", role = "cph"),
Expand Down
6 changes: 5 additions & 1 deletion R/latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ regex_errors = function() {
colorprofiles.sty = c(
'.* Package pdfx Error: No color profile ([^ ]+).*'
),
`lua-uni-algos.lua` = c(
".* module '(lua-uni-normalize)' not found:.*"
),
tikz = c(
# when a required tikz library is missing
'.* (tikzlibrary[^ ]+?[.]code[.]tex).*'
Expand Down Expand Up @@ -610,7 +613,8 @@ detect_files = function(text) {
v = grep_sub(p, '\\1', x)
if (length(v) == 0) return(v)
if (p == r$tikz && length(grep('! Package tikz Error:', text)) == 0) return()
for (i in c('epstopdf', 'colorprofiles.sty')) {
# these are some known filenames
for (i in c('epstopdf', grep('[.]', names(r), value = TRUE))) {
if (p %in% r[[i]]) return(i)
}
if (p == r$fd) v = tolower(v) # LGRcmr.fd -> lgrcmr.fd
Expand Down
1 change: 1 addition & 0 deletions tests/test-cran/test-latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ assert('detect_files() can detect filenames from LaTeX log', {
(detect_files('! Package isodate.sty Error: Package file substr.sty not found.') %==% 'substr.sty')
(detect_files("! Package fontenc Error: Encoding file `t2aenc.def' not found.") %==% 't2aenc.def')
(detect_files("! I can't find file `hyph-de-1901.ec.tex'.") %==% 'hyph-de-1901.ec.tex')
(detect_files("luaotfload-features.lua:835: module 'lua-uni-normalize' not found:") %==% 'lua-uni-algos.lua')
})


Expand Down

0 comments on commit 157b62d

Please sign in to comment.