Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m//setup{ <-- HERE [}1{]}_files/figure-latex/test_ggplot-1.pdf/ at /usr/local/bin/tlmgr line 1844.
Error in grep(paste0("/", x[j], ""), l) :
invalid regular expression '/setup{[}1{]}_files/figure-latex/test_ggplot-1.pdf', reason 'Invalid contents of {}'
Calls: ... system2_quiet -> on_error -> parse_packages -> grep
In addition: Warning message:
In grep(paste0("/", x[j], "$"), l) :
TRE pattern compilation error 'Invalid contents of {}'
Warning: Package longtable Warning: Column widths have changed
Warning: (longtable) in table 1 on input line 152.
Warning: LaTeX Warning: File `setup{[}1{]}_files/figure-latex/test_ggplot-1.pdf' not found on input line 168.
Execution halted
Assuming that M and ADAS11 are continuous and RID is discrete and that the same subset of DD is plot-able in an ide session, the reason lies in the toolchain being used for rendering to pdf. If our version is the same, the trouble comes here in tlmgr
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────
│ File: snip
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────
1 │ sub search_pkg_desc {
2 │ my ($tlp, $what, $inword) = @_;
3 │ my $pkg = $tlp->name;
4 │ my $t = "$pkg\n";
5 │ $t = $t . $tlp->shortdesc . "\n" if (defined($tlp->shortdesc));
6 │ $t = $t . $tlp->longdesc . "\n" if (defined($tlp->longdesc));
7 │ $t = $t . $tlp->cataloguedata->{'topics'} . "\n" if (defined($tlp->cataloguedata->{'topics'}));
8 │ my $pat = $what;
9 │ $pat = '\W' . $what . '\W' if ($inword);
10 │ my $matched = "";
11 │ if ($t =~ m/$pat/i) {
12 │ my $shortdesc = $tlp->shortdesc || "";
13 │ $matched .= "$pkg - $shortdesc";
14 │ }
15 │ return $matched;
16 │ }
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────
Since this has to do with TeX, the $pkg being dealt with is not an R package but a LaTeX one, it means that during compilation, an attempt was made to pass an argument to the tlmgr that was malformed. Because we know that markdown can render ggplot to pdf (put this in a chunk in a new markdown document default template to be rendered as pdf)
mtcars |> ggplot(aes(mpg,drat)) + geom_line()
The problem might lie in tlmgr, in which case you can try using {tinytex}.
Hi cderv, you are right. I have found where the problem is. It has nothing to do with tlmgr. The errors occur because the file name of the markdown contains brackets "", so deleting those brackets in the filename solved the problem.