-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
citation & doi formatting #282
Conversation
Thanks @zeileis, those seem like a good idea, I'll try to take a look this weekend. Can you add tests for those changes? There is a dummy test package in
Why? Is this discouraged? I personally always use |
Re: library. This is really confusing when teaching beginners. First, you tell them that But if you (or some of your users) feel strongly about using the NSE version, it would be nice to make it optional. |
I should start using the quoted versions all the time. FWIW, I agree with AZ on this. |
Re: tests. I have added now both a I also tried to update the snapshots by running |
BTW: If you want to see an example for the changes in the wild, check out https://betareg.R-Forge.R-project.org. I'm currently working on a new |
I see, I didn't teach to beginners yet so didn't have this experience. I don't have strong preferences, we can keep I did a mistake in a previous PR where I modified directly the Rd file instead of using I wish I was at UseR! to meet both of you, maybe next time ;) |
FYI, I just updated the PR with some minor changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just changed formatting a bit but looks good otherwise, thanks @zeileis !
Great, thanks a lot for considering this! And thanks also for the Re: formatting. Indexing with |
I know but I find this less readable. I understand why one would want to avoid coercion in a package built to be super performant like |
Fair enough! |
Etienne @etiennebacher & Vincent @vincentarelbundock, in this PR I propose a few small improvements:
In
rd2qmd.R
:\doi{...}
tags in Rd pages are now processed so that they show up as hyperlinks.Rd2HTML()
expands these to\Sexpr[results=rd]{tools:::Rd_expr_doi("...")}
which subsequently gets ignored by quarto. Hence I have added a regexp to replace this with a markdown link.library()
call added in the examples now avoids non-standard evaluation.In
import_misc.R
:citation(...)
now uses Markdown/HTML rather than verbatim code formatting. This is done by using theformat()
method forcitation
objects (plus separate processing for themheader
/header
of the citation, if any).