Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Format for AAAS Science Journal#373

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
sasank89 wants to merge28 commits intorstudio:main
base:main
Choose a base branch
Loading
fromsasank89:aaas-science

Conversation

@sasank89
Copy link

@sasank89sasank89 commentedFeb 11, 2021
edited
Loading

Hi!@cderv

This is in reference to issue#320 . I have tried to do what I can. I do have some doubts which are given in/templates/science/resources/doubts.md. I have added my doubts in detail to the individual things below.

To contribute a new article template to this package, please make sure you have done the following things (note thatjournalname_article below is only an example name):

  • This project uses a Contributor Licence Agreement (CLA) that you'll be asked to sign when opening a PR. This is required for a significant pull request (it is fine not to sign it if a PR is only intended to fix a few typos). We use a tool called CLA assistant for that.
    You could also, unless you have done it in any other RStudio's projects before, sign theindividual orcorporate contributor agreement. You can send the signed copy tojj@rstudio.com.

  • Add thejournalname_article() function toR/article.R if the output format is simple enough, otherwise create a separateR/journalname_article.R.

Have done this bit. I am not sure how to word the function. Is this the function that is responsible for generating the output. I am not clearly understanding how the data is flowing through this.

  • Add the Pandoc LaTeX templateinst/rmarkdown/templates/journalname/resources/template.tex.

Added. I also included the original template from the Science website

  • Add a skeleton articleinst/rmarkdown/templates/journalname/skeleton/skeleton.Rmd.

Added. Might update this as rest changes.

  • Add a description of the templateinst/rmarkdown/templates/journalname/template.yaml.

  • Please include the document class file (*.cls) if needed, but please do not include standard LaTeX packages (*.sty) that can be downloaded from CTAN. If you are using TinyTeX or TeX Live, you can verify if a package is available on CTAN viatinytex::parse_packages(files = "FILENAME"") (e.g., whenFILENAME isplain.bst, it should return"bibtex", which means this file is from a standard CTAN package). Please keep the number of new files absolutely minimal (e.g., do not include PDF output files), and also make examples minimal (e.g., if you need a.bib example, try to only leave one or two bibliography entries in it, and don't include too many items in it without using all of them).

  • Update Rd and namespace (could be done bydevtools::document()).

  • Update NEWS.

  • Update README with a link to the newly supported journal. Please add your Github username and the full name of the journal (follow other examples in the list).

Not yet done.

  • Add a test totests/testit/test-formats.R by adding a linetest_format("journalname"). We try to keep them in alphabetical order.

Not yet done. Will do once the template etc is finalised.

  • Add your name to the list of authorsAuthors@R in DESCRIPTION. You don't need to bump the package version in DESCRIPTION.

Not yet done.

Thank you so much for any guidance to improve this and help me close this PR.

@CLAassistant
Copy link

CLAassistant commentedFeb 11, 2021
edited
Loading

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign ourContributor License Agreement before we can accept your contribution.
1 out of3 committers have signed the CLA.

✅ cderv
❌ Sasank
❌ sasank89


Sasank seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, pleaseadd the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let usrecheck it.

Copy link
Collaborator

@cdervcderv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hi,

Thank you for this first draft!

I tried to answer most of your questions.

With there special workflow to not include images, this is not an easy template. One the workflow is correctly known and understood, I believe setting someknitr option and maybe pre/post processor forrmarkdown would do the job.

This could be tricky to automate maybe. so the idea of theafter_body content to be written in another file manually could be simpler.

I let you see what you want to do with all this.

Thanks.

@@ -0,0 +1,5 @@
1. Need a help to figure out how to create a pandoc template for the author's section
2. Is there a way to get Pandoc to render all images at the end?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What do you mean by that exactly ? Not sure to understand.

It would not be Pandoc butknitr orrmarkdown. Maybe this format would require a more advanced pre process and post process as other formats in therticles package. If so, this would be done on the R side.

If you explain more precisely I can guide you.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The journal requirements for figures are as follows -

If the manuscript is an initial submission, you should include figures within the PDF file that you upload, preferably at the end of the text.
For the final submission (after peer review)- Save your figures as separate files, using Science's guidelines for preparing figures, and upload the figures separately with figure captions at the end of your LaTeX file as ordinary text (i.e., do not use the {figure} environment)

So, my thought was to let the author set a variable to either "Draft" or "Final" in the YAML header and then compile the document as needed without having to change the primary rmarkdown file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is a good thought. I hope this will be possible to do so. You may try. I think it will need to be in the R function that would set or unset a value of aknitr option. It could also be a variable set in the setup chunk to use in chunks with figures. This variable would modify the value of the chunk option accordingly. I let you try what you think is better.

But Pandoc itself won't be able to do that (unless maybe using a Lua filter, but it seems too much)

Comment on lines +3 to +4
3. Problem is that they want figures rendered for the initial draft / peer review, but no figures included for the final version -
- potential solution - get pandoc variable "figures:true" to decide if images should be included in the PDF or not
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This would need to be controlled byknitr options I think. For examplefig.show = "hide" would generate the figure but not include them in the document.

What should the output document look like ? No figure inside the document but what in replacement ?

2. Is there a way to get Pandoc to render all images at the end?
3. Problem is that they want figures rendered for the initial draft / peer review, but no figures included for the final version -
- potential solution - get pandoc variable "figures:true" to decide if images should be included in the PDF or not
4. In which format does science want references? is there a custom csl file - There only appears to be Science.bst file? No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

.bst file is enough for the style. This command in the template

\bibliographystyle{Science}

is the one that should set the style.

Comment on lines +27 to +28
type:REVIEW/ARTICLE
figures:true / false [required to decide initial submission vs final draft]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not sure this is needed either.

If you need to show examples in the Rmd, do not use athis / that syntax. It should be valid YAML

figures:true# use false to ...

#' @export
#' @rdname article
science_article<-function(
...,keep_tex=TRUE,md_extensions= c("-autolink_bare_uris")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just curious why this extension needs to be unset ?

...,keep_tex=TRUE,md_extensions= c("-autolink_bare_uris")
) {
pdf_document_format(
"science",md_extensions=md_extensions,...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

keep_tex is defined above but is missing

Suggested change
"science",md_extensions=md_extensions,...
"science",keep_tex=keep_tex,md_extensions=md_extensions,...

sasank89and others added4 commitsFebruary 16, 2021 13:33
Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
@cderv
Copy link
Collaborator

Hi@sasank89 !

Just a friendly ping. Are you planning to keep working on this branch to add the AAAS template ?

Just in order to know what are the plan on this one.

Thanks.

@cderv
Copy link
Collaborator

Hi@sasank89,

I have merge master branch into this PR so that it is easier to start on better grounds next time you'll work on this.

Do you plan to continue this PR any time soon ?

No rush, just to know the status on this.

Comment on lines +50 to +59
\author
{John Smith,$^{1\ast}$ Jane Doe,$^{1}$ Joe Scientist$^{2}$\\
\\
\normalsize{$^{1}$Department of Chemistry, University of Wherever,}\\
\normalsize{An Unknown Address, Wherever, ST 00000, USA}\\
\normalsize{$^{2}$Another Unknown Address, Palookaville, ST 99999, USA}\\
\\
\normalsize{$^\ast$To whom correspondence should be addressed; E-mail: jsmith@wherever.edu.}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think we have CI error because of this here:$ cant be used as is in the template because it has special meanings. You need to escape that as Pandoc expects it:https://pandoc.org/MANUAL.html#delimiters

@sasank89
Copy link
Author

Hi@cderv ,

So sorry I dropped off for a few months. Unfortunately, I did not get much time to work on this the past few months. I do want to work on it and complete it. Hopefully, I will be able to do more in the coming months.

cderv reacted with thumbs up emoji

@cderv
Copy link
Collaborator

Hi@sasank89,

No problem. Take your time on it, I am in no hurry. I'll just continue to ping once in a while to get status update so that I know if this becomes stale or not.

Happy to help in any way, so please do ping me for anything that I could help with to add this article format.

Thanks for your time and work on this !

@cderv
Copy link
Collaborator

@sasank89 Just to share that there is another try at this in#486

@cdervcderv added the WIP labelApr 19, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cdervcdervcderv requested changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@sasank89@CLAassistant@cderv

[8]ページ先頭

©2009-2025 Movatter.jp