rjournal / rjtools

Tools for AUTHORS to use for checking and submitting articles to the R Journal
https://rjournal.github.io/rjtools/
Other
31 stars 14 forks source link

Add `\ctv{}` macro parsing #33

Closed hope-data-science closed 2 years ago

hope-data-science commented 2 years ago

In the rmarkdown, when I use \ctv{} to refer to CRAN Task View, I find that I can see the resutls in the exported pdf, but these could not be found in the knitted html. Is there a way to fix this?

Replicated codes would be:

\ctv{NaturalLanguageProcessing}

Currently could only be used as:

[CRAN Task View: Natural Language Processing](https://cran.r-project.org/web/views/NaturalLanguageProcessing.html)

Thanks.

dicook commented 2 years ago

Hi Hope,

We might need to add this. It’s not common to use \ctv from what I have seen in submitted papers.

Where are you using this in your paper? To refer to other packages in the area of your package? We do list related CRAN Task Views when papers are published but this information is compiled automatically from the packages referenced (using \CRANpkg).

At this stage using the URL approach is best for you.

On 22 Mar 2022, at 1:22 pm, Hope @.***> wrote:

In the rmarkdown, when I use \ctv{} to refer to CRAN Task View, I find that I can see the resutls in the exported pdf, but these could not be found in the knitted html. Is there a way to fix this?

Replicated codes would be:

\ctv{NaturalLanguageProcessing}

Currently could only be used as:

CRAN Task View: Natural Language Processing

Thanks.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

cheers, Di


Dianne Cook @.***

hope-data-science commented 2 years ago

Hi Di,

I try to refer to the whole task view in R in the context, and find that in the author guidelines there is \ctv{} facility to be used so I try it in the rjtools, but failed to present it in html file.

I have also used a lot of \CRANpkg{} and \pkg{} in the preparing manuscript, and I have this question: Can I use \CRANpkg{} whenever possible? In the guideline it says "The first citation of a CRAN package should use \CRANpkg and the first citation of a Bioconductor package should use \BIOpkg. Further citations use \pkg and need not be followed by a citation". But some paper use it whenever possible (e.g. https://journal.r-project.org/dev/articles/RJ-2021-046/). I find that in html \pkg{} and \CRANpkg{} yield same text with links, whereas in the exported pdf \pkg{} yields bold text and \CRANpkg{} yields text with link. What is the preferred way to use these two formats?

Cheers, Hope

mitchelloharawild commented 2 years ago

Thanks for pointing this out, I wasn't aware of \ctv{}! I'll add this one in :+1:

mitchelloharawild commented 2 years ago

Also yes, you can use \CRANpkg{}, \BIOpkg{}everywhere. The guidelines have been updated for the dev website, but the legacy one will need updating. @dicook

mitchelloharawild commented 2 years ago

Added, thanks. Note that the functionality of the \ctv{} macro is set to match the LaTeX output. As such, it doesn't replace the ctv ID with the title and just adds a link to the task view.

dicook commented 2 years ago

Hi Hope,

Yes, \CRANpkg{} can be used everywhere with the new format. It was a limitation of the old build system that it could be used only once.

We will think about getting \ctv{} to work.

On 22 Mar 2022, at 2:25 pm, Hope @.***> wrote:

Hi Di,

I try to refer to the whole task view in R in the context, and find that in the author guidelines there is \ctv{} facility to be used so I try it in the rjtools, but failed to present it in html file.

I have also used a lot of \CRANpkg{} and \pkg{} in the preparing manuscript, and I have this question: Can I use \CRANpkg{} whenever possible? In the guideline it says "The first citation of a CRAN package should use \CRANpkg and the first citation of a Bioconductor package should use \BIOpkg. Further citations use \pkg and need not be followed by a citation". But some paper use it whenever possible (e.g. https://journal.r-project.org/dev/articles/RJ-2021-046/). I find that in html \pkg{} and \CRANpkg{} yield same text with links, whereas in the exported pdf \pkg{} yields bold text and \CRANpkg{} yields text with link. What is the preferred way to use these two formats?

Cheers, Hope

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

cheers, Di


Dianne Cook @.***

hope-data-science commented 2 years ago

Thank you for the feedback.