[R-pkg-devel] a problem with the underscore in a R function document
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Sat Jun 11 14:38:29 CEST 2022
As Martin said, just remove the \.
The other thing I'd do is use \sQuote{_AAseq.txt.gz} instead of entering
the quotes yourself. Then you don't need to worry about the difference
between plain quotes and directional quotes, R will use whichever is
appropriate.
Duncan Murdoch
On 11/06/2022 8:29 a.m., Martin Maechler wrote:
>>>>>> Yaoyong Li
>>>>>> on Sat, 11 Jun 2022 12:29:25 +0100 writes:
>
> > Hello,
>
> > I just got a problem in a function document in a package I developed.The
> > file containing the document is generatingCDSaaFile.Rd. The problem is
> > related to the underscore I used in the following sentence
>
> > and the last part is ‘\_AAseq.txt.gz’
>
> > I got a 'note' message when the package was checked in the CRAN:
>
> > checkRd: (-1) generatingCDSaaFile.Rd:72: Escaped LaTeX specials: \_
>
> > I don't think I saw this kind of message in the past (say six months
> > ago).
>
> Yes, you are right.. this is quite new. Some of my
> <pkg>/man/*.Rd files have been affected similarly.
>
> AFAIK there is a history behind, where the Rd -> LaTeX
> translation code was partly buggy for quite a long time, and hence
> such `\`-escapes where necessary in *.Rd such that the produced
> *.tex was LaTeX-able.
>
> However, these Rd2latex bugs/problems have been fixed and now
> almost all such \-escapes are not only unneeded but actually the
> `\` become visible, hence ugly looking
> ==> hence the NOTE.
>
> > A copy of the check result in CRAN is appended below. As you can
> > see, I also got the same problem in other places in the document. I
> > have been trying to fix the problem via searching Google. I have tried
> > to replace "\_" with "\textunderscore " as some internet post
> > suggested, but this did not solve the problem.
>
> > So I just wonder if anyone can help me with the problem. Please let me
> > know if any more information is needed.
>
> In all cases in my packages, just removing the `\` (or
> sometimes `\\` ?) was perfect, so I think you can and should do
> just that.
>
> Best,
> Martin
>
>
> > Best regards,
>
> > Yaoyong
>
> > #####################################################
>
> > CRAN Package Check Results for Package geno2proteo
> > <https://cran.r-project.org/web/packages/geno2proteo/index.html>
>
> > Last updated on 2022-06-11 11:52:26 CEST.
> > FlavorVersionTinstallTcheckTtotalStatusFlags
> > r-devel-linux-x86_64-debian-clang
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-debian-clang>
> > 0.0.5 17.31 170.54 187.85 NOTE
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/geno2proteo-00check.html>
> > r-devel-linux-x86_64-debian-gcc
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-debian-gcc>
> > 0.0.5 12.00 130.58 142.58 NOTE
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/geno2proteo-00check.html>
> > r-devel-linux-x86_64-fedora-clang
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-fedora-clang>
> > 0.0.5 220.04 NOTE
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/geno2proteo-00check.html>
> > r-devel-linux-x86_64-fedora-gcc
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-fedora-gcc>
> > 0.0.5 229.54 NOTE
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/geno2proteo-00check.html>
> > r-devel-windows-x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-devel-windows-x86_64>
> > 0.0.5 242.00 470.00 712.00 NOTE
> > <https://www.r-project.org/nosvn/R.check/r-devel-windows-x86_64/geno2proteo-00check.html>
> > r-patched-linux-x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-patched-linux-x86_64>
> > 0.0.5 12.58 164.99 177.57 OK
> > <https://www.r-project.org/nosvn/R.check/r-patched-linux-x86_64/geno2proteo-00check.html>
> > r-release-linux-x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-release-linux-x86_64>
> > 0.0.5 OK
> > <https://www.r-project.org/nosvn/R.check/r-release-linux-x86_64/geno2proteo-00check.html>
> > r-release-macos-arm64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-release-macos-arm64>
> > 0.0.5 65.00 OK
> > <https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/geno2proteo-00check.html>
> > r-release-macos-x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-release-macos-x86_64>
> > 0.0.5 89.00 OK
> > <https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/geno2proteo-00check.html>
> > r-release-windows-x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-release-windows-x86_64>
> > 0.0.5 195.00 363.00 558.00 OK
> > <https://www.r-project.org/nosvn/R.check/r-release-windows-x86_64/geno2proteo-00check.html>
> > r-oldrel-macos-arm64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-oldrel-macos-arm64>
> > 0.0.5 57.00 OK
> > <https://www.r-project.org/nosvn/R.check/r-oldrel-macos-arm64/geno2proteo-00check.html>
> > r-oldrel-macos-x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-oldrel-macos-x86_64>
> > 0.0.5 84.00 OK
> > <https://www.r-project.org/nosvn/R.check/r-oldrel-macos-x86_64/geno2proteo-00check.html>
> > r-oldrel-windows-ix86+x86_64
> > <https://cran.r-project.org/web/checks/check_flavors.html#r-oldrel-windows-ix86_x86_64>
> > 0.0.5 32.00 145.00 177.00 OK
> > <https://www.r-project.org/nosvn/R.check/r-oldrel-windows-ix86+x86_64/geno2proteo-00check.html>
> > Check
> > Details
>
> > Version: 0.0.5
> > Check: Rd files
> > Result: NOTE
> > checkRd: (-1) generatingCDSaaFile.Rd:23: Escaped LaTeX specials: \_ \_
> > checkRd: (-1) generatingCDSaaFile.Rd:72: Escaped LaTeX specials: \_
>
> > Flavors: r-devel-linux-x86_64-debian-clang
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/geno2proteo-00check.html>,
> > r-devel-linux-x86_64-debian-gcc
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/geno2proteo-00check.html>,
> > r-devel-linux-x86_64-fedora-clang
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/geno2proteo-00check.html>,
> > r-devel-linux-x86_64-fedora-gcc
> > <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/geno2proteo-00check.html>,
> > r-devel-windows-x86_64
> > <https://www.r-project.org/nosvn/R.check/r-devel-windows-x86_64/geno2proteo-00check.html>
>
> > ##########################################################################
>
> > [[alternative HTML version deleted]]
>
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list