简体   繁体   中英

Using hyphen in the Description file of an R package

I am putting some references in the Description file of an R package. One of the authors has a hyphen in the surname, say Anne-Marie .

The problem with this is that the pdf produced in R CMD check had curtailed the sentence from the hyphen (One sentence ends with Anne- , and the next starts with Marie ).

I tried putting - using Unicode as well (I am using vi, so I ctrl + v , and the typed 045 to get - ). Still no luck.

Hope someone can help me with this. Thanks

Following is an example Description in the DESCRIPTION file

Lorem ipsum dolor sit amet quis mperdiet aenean t-distribution velit. Vitae nullam lectus-nullam sollicitudin quam imperdiet. Odio commodo commodo eu commodo enim orci ipsum elit id vestibulum eu. see also A Anne-Marie (1984) <1234/5678-91011(12)13-4> B someone, C another (1984) <1234/5678-91011(12)13-4>.1

The PDF output is something like this

Lorem ipsum dolor sit amet quis mperdiet aenean t-
distribution velit. Vitae nullam lectus-nullam sollicitudin 
quam imperdiet. Odio commodo commodo eu commodo enim orci 
ipsum elit id vestibulum eu. see also A Anne-
Marie (2019) <1234/5678-91011(12)13-4> B someone, C ano-
ther (1984) <1234/5678-91011(12)13-4>.1

The reason for the behaviour is that I have the whole description in a single line. (I didn't know it is possible to have the Description in multiple lines in the DESCRIPTION file.)

Now, I have broken the Description to multiple lines, and it solves the problem. For this, all lines (except the first) in the Description needs to be indented by four spaces .

Once indented this way, the pdf has the same line breaks as in the DESCRIPTION file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM