-
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
Updates AMS to V6.1 #444
Updates AMS to V6.1 #444
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
Thanks for this and sorry for the delay. Here are a few comment we need to work out.
Overall it would be best in if the skeleton contains more R code examples and Markdown. That would help our test too.
R/article.R
Outdated
@@ -88,9 +88,9 @@ amq_article <- function( | |||
#' <https://www.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/author-resources/latex-author-info/>. | |||
#' @export | |||
#' @rdname article | |||
ams_article <- function(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris")) { | |||
ams_article <- function(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris", "-auto_identifiers")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to understand: why do we need to remove this extension here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm not sure what my reasoning was. It might be the sort of thing that is obvious if we put it back in and see what results.
R/article.R
Outdated
pdf_document_format( | ||
"ams", keep_tex = keep_tex, md_extensions = md_extensions, ... | ||
"ams", keep_tex = keep_tex, md_extensions = md_extensions, citation_package = 'natbib', ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make this also a parameter of the function so that it can be changed.
Previously it was not set - so I don't think natbib was used. Does it need to be used to work now ?
We should try to prevent things breaking if possible and this would change the default citation processing. We need to offer a way to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood that natbib is hard-coded in ametsocv6.1.cls
$exauthors.email$ | ||
% Credit to https://stackoverflow.com/a/67609365 for different last-author case. | ||
\authors{ | ||
$if(authors/allbutlast)$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This syntax allbutlast
brings a min Pandoc requirement (at least 2.10) than we need to insure.
\centerline{(illustration here)} | ||
\appendcaption{B1}{Here is the appendix figure caption.} | ||
\end{figure} | ||
\bibliography{references} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we put this in the template as we usually do with other formats ?
plot(1:10) | ||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(fig.path = "", # AMS required | ||
out.extra = "", # To force figure labels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the issue exactly ?
fig_caption = TRUE
in pdf_document()
should be enough to have the caption 🤔
```{r,echo=FALSE,fig.cap='test the rmd output',fig.align='center',fig.width=3.17} | ||
plot(1:10) | ||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(fig.path = "", # AMS required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is required we could probably make that part of the format function 🤔
Each table must be numbered, provided with a caption, and mentioned specifically in the text. | ||
See below (in the .tex document) and at the end of the document for the formatting of a sample table (Table | ||
\ref{t1}). | ||
\section{Introduction} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to change to Markdown before merging
\section{Introduction} | |
# Introduction |
If we are lazy to do it manually, we can probably convert the tex file body using Pandoc directly
R/article.R
Outdated
@@ -88,9 +88,9 @@ amq_article <- function( | |||
#' <https://www.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/author-resources/latex-author-info/>. | |||
#' @export | |||
#' @rdname article | |||
ams_article <- function(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris")) { | |||
ams_article <- function(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris", "-auto_identifiers")) { | |||
pdf_document_format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to put a Pandoc requirement before running the function here - the test are failing because of this mainly
rmarkdown::pandoc_available('2.10', TRUE)
@ConorIA do you plan to keep working on this or should I take over ? Maybe AMS has also update to a newer version than 6.1. Enquiring about the status of this PR following my latest review |
Hi @cderv, sorry to have been unresponsive to your very detailed review. I find myself very short on free time these days, and haven't been writing much after finishing my thesis last fall. I would be happy to have you take over. The good news is that v6.1 is still the current AMS template https://www.ametsoc.org/index.cfm/ams/publications/author-information/latex-author-info/ |
Thanks for the feedback - I'll add that to my list then. Thanks for your contribution |
I did solve some of the conflict, but my last review did not get reply. I'll see if I can finish the work without the information of choice you made. It's been some time, so you may not remember why anyway. |
Hi @cderv . Sorry for my lack of responsiveness. It sure has been a while since I opened this PR. To be honest, I'm not sure that there was much thinking in my work. It was mostly about hacking the new template into the old example and trying to make it work. Certainly not up to the quality. I will take a look at your review comments, but as I noted in 2023. I don't think I'll be the one to get this PR over the finish line. I not longer use R in my day-to-day, nor am I in academia anymore. Just rusty skills and pleasant memories at this point! Sorry about that. |
and document
Replaces #348 and closes #298
Todos:
\section
entries with#
, but I was having compilation errors, so needed to go back to start.\twocolsig
and\twocolcapsule
when using twocol mode, but these are giving me undefined control sequence errors. I have commented out my conditional intemplate.tex
, but would like to get the functionality working before this is merged #helpwanted!authors/last
. e.g.authors/last.name
throws an error andauthors/last["name"]
returns "true", not "Author Eight".Thanks to @eliocamp as much of this was based on his work on the v5 template.
It looks like old releases of pandoc don't play nice with the pipes. For the record: