Ivan Krylov
2025-Jan-16 20:21 UTC
[Rd] UTF-8 encoding issue with R CMD check with install-args="--latex"
? Thu, 16 Jan 2025 18:09:25 +0100 Peter Ruckdeschel via R-devel <r-devel at r-project.org> ?????:> this is to report some minor UTF-8 encoding issue with R CMD check > with option --install-args="--latex" (and possibly more install-args).Thank you for a very detailed report! This doesn't happen on R-4.2.2 or 4.3.1, but it does happen on R-devel. Comparing the calls from R CMD check to R CMD Rd2pdf, I see no difference in the environment variables or any significant difference in the command lines. The command being run ends up being equivalent to R CMD Rd2pdf <package>.Rcheck/<package> ...and the source of the difference is the presence (or absence) of the <package>.Rcheck/<package>/latex directory. If I temporarily move it away during an R CMD check --install-args=--latex run, the command succeeds. Indeed, tools:::.pkg2tex says>> ## First check for a latex dir (from R CMD INSTALL --latex). >> ## Second guess is this is a >= 2.10.0 package with stored .rds >> ## files. >> ## If it does not exist, guess this is a source package. >> latexdir <- file.path(pkgdir, "latex")The individual *.tex files in the latex/ subdirectory of the installed package all do start with an "\inputencoding{utf8}" line. When the latex/ subdirectory doesn't exist, the !dir.exists(latexdir) branch is taken, where Rd2latex(...) is called with writeEncoding FALSE, thus avoiding the problem. -- Best regards, Ivan
Kurt Hornik
2025-Jan-17 08:01 UTC
[Rd] UTF-8 encoding issue with R CMD check with install-args="--latex"
>>>>> Ivan Krylov via R-devel writes:Thanks. Will try to fix ... Best -k> ? Thu, 16 Jan 2025 18:09:25 +0100 > Peter Ruckdeschel via R-devel <r-devel at r-project.org> ?????:>> this is to report some minor UTF-8 encoding issue with R CMD check >> with option --install-args="--latex" (and possibly more install-args).> Thank you for a very detailed report!> This doesn't happen on R-4.2.2 or 4.3.1, but it does happen on R-devel.> Comparing the calls from R CMD check to R CMD Rd2pdf, I see no > difference in the environment variables or any significant difference > in the command lines. The command being run ends up being equivalent to> R CMD Rd2pdf <package>.Rcheck/<package>> ...and the source of the difference is the presence (or absence) of the > <package>.Rcheck/<package>/latex directory. If I temporarily move it > away during an R CMD check --install-args=--latex run, the command > succeeds.> Indeed, tools:::.pkg2tex says>>> ## First check for a latex dir (from R CMD INSTALL --latex). >>> ## Second guess is this is a >= 2.10.0 package with stored .rds >>> ## files. >>> ## If it does not exist, guess this is a source package. >>> latexdir <- file.path(pkgdir, "latex")> The individual *.tex files in the latex/ subdirectory of the installed > package all do start with an "\inputencoding{utf8}" line.> When the latex/ subdirectory doesn't exist, the !dir.exists(latexdir) > branch is taken, where Rd2latex(...) is called with writeEncoding > FALSE, thus avoiding the problem.> -- > Best regards, > Ivan> ______________________________________________ > R-devel at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-devel
Maybe Matching Threads
- UTF-8 encoding issue with R CMD check with install-args="--latex"
- UTF-8 encoding issue with R CMD check with install-args="--latex"
- UTF-8 encoding issue with R CMD check with install-args="--latex"
- Problem creating reference manuals from latex
- Suggestion / patch to support more Unicode characters in R CMD Rd2pdf