Skip to content

Add nucleotide acid research template #239

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

Open
3 tasks done
tcgriffith opened this issue Aug 20, 2019 · 7 comments
Open
3 tasks done

Add nucleotide acid research template #239

tcgriffith opened this issue Aug 20, 2019 · 7 comments
Labels
feature a feature request or enhancement help wanted ❤️ we'd love your help!

Comments

@tcgriffith
Copy link

I'll work on the NAR template. this issue serves as a record.


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included 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').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@tcgriffith
Copy link
Author

tcgriffith commented Aug 26, 2019

Basically working. Some issues:

  • The skeleton is quite bulky as I copied&pasted the original draft from nar-sample.tex.

  • The bibliography is a bit strange without using natbib in pandoc(nar-sample.tex doesn't use natbib) but I can't get the non-natbib bibliography to work at the moment:

  • longtable(pandoc's default) doesn't work in this template because nar is 2-column, similar to Add a PNAS template #72. So I provided a table example using knitr::kable(format="latex")

  • Figures are fine. and I figured out the fig.env="figure*" trick. for two-column figure.

  • I noticed that the syntax for cross-reference from bookdown::pdf_document2() is different from the default rmarkdown::pdf_document()

@tcgriffith
Copy link
Author

hyperlinks likehttps://github.com/sokrypton/GREMLIN_CPP in rmd will be translated into\url{https://github.com/sokrypton/GREMLIN_CPP} and failed to compile
investigating.

@tcgriffith
Copy link
Author

tcgriffith commented Aug 27, 2019

bibliography seems broken.I can use latexmk -pdf xxx.tex to generate the correct bibliography, but the knit button won't generate the desired bib.

@tcgriffith
Copy link
Author

Seems that \usepackage{hyperref} is not included in the original nar.cls. This package is required for \url{} to which pandoc convert all links.

@tcgriffith
Copy link
Author

tcgriffith commented Sep 11, 2019

List items will report an undefined control sequence error.
add the following command seems to fix the issue.
\def\tightlist{}

source
https://tex.stackexchange.com/questions/257418/error-tightlist-converting-md-file-into-pdf-using-pandoc/408474

@tcgriffith
Copy link
Author

tcgriffith commented Sep 17, 2019

Strange behaviour on natbib:

if there's \label{xxx} in the rmd, the natbib bibliography will appear in the final pdf as expected.

deleting \label{xxx}, all references are gone and report undefined references:

Package natbib Warning: There were undefined citations.

But the generated test.tex can be correctly compiled with bibliography with
latexmk -pdf test.tex

So the issue is narrowed down to how rmarkdown calls the latex engine AFTER the .tex file is generated.

MRE:

devtools::install_github("tcgriffith/rticles", ref="nar_dev")
rmarkdown::render("./test.Rmd")

test.Rmd,
delete \label{aaa} will remove bibliography

---
title: Template for preparing your research report submission to NAR using RMarkdown
bibliography: NAR-sample.bib
output: rticles::nar_article
---

# Introduction
\label{aaa} 
[@NovikovaSizinglongnoncoding2012]

NAR-sample.bib

@Article{NovikovaSizinglongnoncoding2012,
  title = {Sizing up Long Non-Coding {{RNAs}}: {{Do lncRNAs}} Have Secondary and Tertiary Structure?},
  volume = {2},
  issn = {1949-0992},
  shorttitle = {Sizing up Long Non-Coding {{RNAs}}},
  number = {6},
  journal = {BioArchitecture},
  doi = {10.4161/bioa.22592},
  author = {Irina V. Novikova and Scott P. Hennelly and Karissa Y. Sanbonmatsu},
  month = {nov},
  year = {2012},
  keywords = {cancer,epigenetics,RNA structure,hormone receptor,HOTAIR,lincRNA,lncRNA,long noncoding RNA,MALAT,non-coding,RNA,secondary structure,structural biology},
  pages = {189-199},
  file = {/home/tc/.mozilla/firefox/wh762y60.default/zotero/storage/H9MYM9JS/Novikova et al. - 2012 - Sizing up long non-coding RNAs Do lncRNAs have se.pdf;/home/tc/.mozilla/firefox/wh762y60.default/zotero/storage/EVMVWMGZ/bioa.html},
  pmid = {23267412},
}

@cderv
Copy link
Collaborator

cderv commented Aug 6, 2020

This is still open. The first PR has been close because it needs a rework. It can be used as base for a new one.
If anyone is willing to help @tcgriffith on this one, feel free to join ! Thanks.

@cderv cderv added help wanted ❤️ we'd love your help! feature a feature request or enhancement and removed enhancement labels Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

2 participants