-
Notifications
You must be signed in to change notification settings - Fork 525
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
Suggested improvements for JSS support #254
Comments
Hi Achim, thanks for the kind words, and sorry for the late response! I think the first three improvements should be easy to implement, and I'll definitely do them. For the last one, it would be great if Pandoc could support short titles (not yet: jgm/pandoc#4409). I might be able to come up with a hack like this: # \proglang{R} code [R code]{.short-title} I'll think more about it. |
Complementing this suggestion, the backticks styntax Is this worth changing? I'm not sure if we can control how Pandoc converts backtick blocks, but assuming we do not use |
@Freguglia Since @statibk said it was okay to use backticks, I guess he implied that |
@cderv For the fourth issue, let's see if a Lua filter could work, e.g., see if we can generate \section[R code]{\proglang{R} code} from # \proglang{R} code {short-title="R code"} One thing that I'm not sure about is whether it works if the section title uses Markdown syntax, e.g., can # **R** code {short-title="R code"} generate \section[R code]{\textbf{R} code} instead of \section[R code]{**R** code} ? I guess the answer is yes, but just want to make sure. |
@statibk I'm wondering if it's okay to use # \proglang{R} code
\sectionmark{R code} If that's acceptable, there is nothing we need to do in rticles except documenting it. |
Just to give a synthesis of the changes to adress before closing this issue:
|
@yihui I tested and
\hypertarget{code}{%
\section{\texorpdfstring{\proglang{R} code}{ code}}\label{code}} and \hypertarget{r-code-1}{%
\section{\texorpdfstring{\textbf{R} code}{R code}}\label{r-code-1}} but either one generate currently a I'll see what I can come up with Lua to overcome that, but using |
@cderv It seems that you haven't written the Lua filter yet? I wonder if the problem persists if we actually add the short title in the square brackets after |
No I haven't yet write effectively, but I am onto it. Indeed, this works if we add the short title. \hypertarget{code}{%
\section[R Code]{\texorpdfstring{\proglang{R} code}{ code}}\label{code}} This is the hint I am following currently to write the lua filter. |
Notes from my search : optional <- if unnumbered || lstNoNotes == lst || null lstNoNotes
then return empty
else
return $ brackets txtNoNotes and But I don't really know how to activate it. It seems a bit specific to a case, but can be useful to support short title. |
Regarding lua, getting the One solution could be to detect headers with |
I'm okay with that. It seems you have implemented it in #310.
Sure. If jgm/pandoc#4409 is implemented, we should switch to the official solution. |
While reading the jss style guide https://www.jstatsoft.org/pages/view/style, I am reading that an R file with replication code should be provided. I added to the todo #254 (comment) @statibk does the Rmd file is enough or if we automatically produce an R script from the Rmd file using |
This adresses the comment in rstudio#254
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
By filing an issue to this repo, I promise that
xfun::session_info('rticles')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles')
.I understand that my issue may be closed if I don't fulfill my promises.
After authoring my first own rticles-based JSS submission, I wanted to thank you for providing Rmd support for JSS and suggest some small improvements.
Continuation prompts
At the moment rticles employs either
R+
(for evaluated code) orR>
(for non-evaluated code) as the continution prompt but+
would be requested by JSS. As an example,is currently displayed as follows when combined with
eval=TRUE
and with
eval=FALSE
asbut
would be desired.
Address formatting
In
skeleton.Rmd
a simple>
continuation is used for theaddress
. However, to force the right line breaks|
continuation would be better. I would suggest instead ofto use:
Inline code formatting
For code in Markdown it is ok to use backtick syntax, so that
\code{...}
is typically not necessary. Hence I it is ok to remove\code{print("abc")}
fromskeleton.Rmd
, I think.Escaping code/math in section titles
How can code/math formatting in section titles be escaped? For example, when I want in LaTeX
Can this be done in Markdown/Pandoc? If so, an example in
skeleton.Rmd
might help.Thanks for all your efforts regarding JSS support, these are much appreciated!
Achim
The text was updated successfully, but these errors were encountered: