Closed bischrob closed 1 year ago
Using
> packageVersion("rticles")
[1] ‘0.24.2’
I don't have any issue to render the default template for peerj_article()
Are you using the default template ? Or did you use custom packages ? I wonder where this \gather
command is from
I tried it myself on an RStudio server and it did knit without problems. Is it a Windows problem? I'm not using any extra packages. I tried it with a default rticles document. I thought it might be the tinytex software, but a reinstall didn't fix it and neither did uninstalling it and installing Miktex.
I have the same problem when using the elsevier_article template. I have updated all my packages following https://yihui.org/tinytex/r/#debugging but it still does not work. In the past, I had no problems using this template. I use Windows.
I tried out other templates as well. While peerj gives the same error message, the frontiers_article, tf_article and many other templates work fine. I am not that much into coding and I might be wrong, but from googling similar error messages, I have the feeling it is because of conflicting latex packages using the same command. My guess would be that the elsevier_article and peerj template use a "problematic" latex package and the other templates don´t. Or that only users having installed a certain problematic latex package get this error.
I am using Windows too BTW. Forgot to mention.
I managed to reproduce on a clean install of TinyTeX with recent CTAN package. So one of the package used by this template is creating the issue by conflicting with another one.
Now the Game is to find which 😓 This is a LaTeX issue not a R issue.
Here is the issue: https://github.com/latex-lineno/lineno/issues/5
it comes from the lineno
package which should use Hooks to tweak some function.
I don't know if they will fix this upstream - As a patch, I changed the order in our files. It should solve the issue right now for rticles users.
Please do try latest rticles dev version as this should be fixed.
Thanks a lot for the report !
Thanks for the quick fix!
Yes, using the dev version remotes::install_github("rstudio/rticles")
fixed the problem
FWIW the version 5.1 of lineno package will have the fix. Updating / reinstalling from CTAN should work
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.
The peerJ article format gives the following error when knitting:
! LaTeX Error: Command \gather already defined. Or name \end... illegal, see p.192 of the manual.
Steps tried: downloaded development version of rticles, upgraded packages, restarts
Note: arxiv article format knits without error
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.