Closed phargarten2 closed 5 years ago
@phargarten2 Please replace your Rmd file with mine
Ah, ha. Thank you. I noticed that the questions were solved using the booktabs LaTex package and the booktabs::pdf_book
output option.
@XiangyunHuang Thanks a lot!
@phargarten2 Feel free to answer your own question on SO.
This question came from the need to format a JSS-style article appropriately for submission. I recommend that the template is adjusted to reflect these formatting concerns. At the bottom of the header, please consider adding:
preamble: >
\usepackage{amsmath}
\usepackage{booktabs}
output:
bookdown::pdf_book:
base_format: rticles::jss_article
citation_package: natbib
bibliography: sample.bib
I realized that using the primary header #
, long titles still run off the page. It is only when using the secondary headers ##
that everything remains on the line.
I guess there isn't much we could do about the long headers. The behavior is defined by the journal document class (jss.cls
), and we don't have control over it. That said, I'm not sure if our jss.cls
needs to be updated; you may try to get a copy from the JSS website and see if it works any better. If it doesn't, I'd recommend that you avoid using too long first-level headers.
@yihui : Thank you. I didn't think that you could do anything about it; I just wanted to mention it for the record. I can't do second-level headers because JSS articles have section numbers. An easy and simple solution is just to have short headers, as you have mentioned. Thank you for allowing me to submit a LaTex-style manuscript without leaving the Rmarkdown environment!
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.
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 am preparing my manuscript based on the JSS Template in R Studio. Thank you for allowing me to do this without leaving the R Markdown environment. Following the instructions for journal submission, I got my article ready by using precise LaTex commands as mentioned in the JSS template. I am using
jss_article()
from the rticles package. However, I ran into the following formatting questions.[ ] I would like
jss_article()
to execute inline code commands liker print(x)
. Left unaltered, it fails to compile as in Rmarkdown error #385 (along with others). Following the solution, I put dollar signs around it. However, the inline code was not executed but printed to the screen. In the JSS format, are inline commands not executed inrticles::jss_article()
? [ ] Frequently, I would like to use inline code to extract an element from a list, liker print(x$B)
. Since "$" is a LaTex symbol, I need to use the escape character "\". Executing $r print(x\$B)
$ leads to which makes sense, as\$
is not a valid R command. Should I avoid using the dollar notation, and instead used the name notationx[["B"]]
?[ ] Long names run off the page like
# Example 4: Interval-Censored data with univariate Bayesian multivariate imputation .
The JSS Template seems to ignore thetidy
andtidy.opts
options of knitr.[ ] The knitr::kable() capability does not seem to be supported in
jss_article()
. Can you recommended a function to construct publication-worthy tables (similar to the output fromkable()
)?Please see cross-reference at https://stackoverflow.com/questions/56434067/formatting-questions-in-jss-article-of-rticles-package.
jss_article_formatting_questions.zip
Thank you for your help.