myst-templates / templates

List of all MyST Markdown community templates.
https://api.mystmd.org/templates
3 stars 1 forks source link

Add Physical Review Journals tex template #23

Closed dressedfez closed 1 year ago

dressedfez commented 1 year ago

This provides the initial version of the LaTex template for Physical Review Journal articles associated to the American Physical Society (see https://journals.aps.org/about).

rowanc1 commented 1 year ago

Thanks for coming to the webinar, let us know where you get to with this over the next few days and then we can start to jump in and help or develop any missing pieces.

dressedfez commented 1 year ago

@rowanc1 I have updated the repository and it looks already promising. I still need to work on the following topics:

  1. Affiliations and alternative affiliations
  2. Reprint rework
  3. Updating README: adding links to Revtex documentation
  4. Adding more of the options provided in Revtex: Command and Options summary
  5. Add an example paper with all options provided

Maybe there are more points, but these are the ones that I will address first.

dressedfez commented 1 year ago

I have updated the template repository. I think that I have reached a state where we can start a review process.

From the points mentioned above I have managed 2., 3. and 4.

Concerning 1. I have tried to use the affiliations on the doc level, but this did not seem to work. When I have introduced the affiliations in the frontmatter of the paper.md I got the warning that it will be ignored. Furthermore it is unclear to me how to handle the \collaboration since this does not come up in your author model. You have mentioned that there are possibilities to have a homepage associated with the author. How does this work?

Which publication can we use to for an example publication written with the template?

Shall I create issues in my repository for the open issues I have mentioned in the README?

stevejpurves commented 1 year ago

@dressedfez great - let me take a look and see if I can assist! And yes probably best to add issues on the template repo to track ongoing issues

stevejpurves commented 1 year ago

@dressedfez on the homepage that requires a change to myst and jtex which is tracked here: https://github.com/executablebooks/mystjs/issues/321

dressedfez commented 1 year ago

@stevejpurves have you found any time to review the template? When you find time for the review it would be great if you could answer https://github.com/dressedfez/myst_template_physical_review_journals/issues/9. I will try to close the remaining issues in the coming days.

stevejpurves commented 1 year ago

@dressedfez the example builds nicely for me - I note that the repo does have a thumbnail.png already 👍🏼 but the checkbox isn't ticked on the README yet.

Out of the open issues; I am looking at upstream changes to support 1 and 12 -- out of the other issues, @dressedfez what is the shortlist that you want to see resolved before adding this to the index

dressedfez commented 1 year ago

Supporting 1 und 12 would already be great.

Concerning the rest I have the following idea. Myst already supports max_words and max_chars (see https://myst-tools.org/docs/jtex/template-yml#template-parts) which we could use for the Physical Review Journals for example for abstracts (see in case of Physical Review Letters here). Since we can not define those limits for all different Physical Review Journal in one Template I would like to introduce for all Physical Review journals different templates. The issues 5, 6 and 7 can be moved to the corresponding Template repository or closed since they are not necessary for the current template.

Do you think it is possible to re-use the work of the template.tex over several repositories using git-submodules? This would allow an easier updating of the template.tex over several Template repositories.

I would say that the main work on the template is done to add it to the index.

dressedfez commented 1 year ago

Is the restriction mentioned here: https://myst-tools.org/docs/jtex/template-yml#template-files strict? Especially the statement: The first entry should always be template.tex; this must be in the top level folder next to the template.yml. If it is possible to put the template.tex in a sub-folder we could use git-submodules to avoid code duplication. @stevejpurves @rowanc1 ?

rowanc1 commented 1 year ago

I thought this might have been addressed in: https://github.com/executablebooks/mystjs/pull/89 But we are still being strict on the template.tex being at the top level. I think there was a reason for that, @fwkoch might know?

dressedfez commented 1 year ago

I think I have found something concerning this topic. Please have a look here: https://github.com/executablebooks/mystjs/issues/84#issuecomment-1324377723. To me it seems that this is as @fwkoch writes: I agree that the same-directory requirement is arbitrary and unnecessarily restrictive.

Maybe we have here a valid situation that would render us to break this restriction.

fwkoch commented 1 year ago

Hey, yeah - I still agree with my past comment but it does require a bit of work to break this restriction. I made a specific issue for it here: https://github.com/executablebooks/mystjs/issues/420

For now, I guess we just keep copying files to the root directory when necessary...

stevejpurves commented 1 year ago

@dressedfez

Other than that I've played with some options and cross checked the template.yml and template.tex and this looks great!

And sorry it's taken so long to get a review back to you 🙏🏼, once we're happy with the above we can merge this

dressedfez commented 1 year ago

Hey, yeah - I still agree with my past comment but it does require a bit of work to break this restriction. I made a specific issue for it here: executablebooks/mystjs#420

For now, I guess we just keep copying files to the root directory when necessary...

Understandable decision. Following this I will create for each journal (PRL, PRA, etc) an own template which will contain a copy of the template.tex file.

dressedfez commented 1 year ago

@dressedfez

  • Consider adding the two-column tag in to template.yml as this is a two column capable template
  • I cannot see the \appendix having any effect at all in the pdf I am producing, the text tagged appendix, is correctly rendered to the tex as in it is preceded by a \appendix command but in the PDF it is just appended to the main content as normal -- are appendices only applied in certain article types? if so it would be good to update the description for the part otherwise is something going wrong??

    • [EDIT] ok i see now!! there must be at least 1 heading in the appendix text before it will be properly separated from the rest of the content - this is fine and working well
  • on the various options for the main document class I was going to suggest that you use the syntax to get balanced whitespace trimming and everything on a single line. i.e. always [#- if condition -#] and [#- endif -#] rather than the one sided [#- if condition #]...[# endif -#] so that everything gets put on 1 line. But. it seems like you're intentionally going for multiple lines and preserving some whitespace? if so, then fine as is....

Other than that I've played with some options and cross checked the template.yml and template.tex and this looks great!

And sorry it's taken so long to get a review back to you 🙏🏼, once we're happy with the above we can merge this

I will contact you when I'm done with the requested changes. I'm currently busy so it might take as well a week or more.

stevejpurves commented 1 year ago

@dressedfez just to clarify, point 2 is moot, that's fine :)

and points 1 & 3 are questions/suggestions rather than requests. I'd be interested to just know what you think especially on the whitespace?

and i'm happy to quickly make the changes and open a PR if you're happy with my suggestions

dressedfez commented 1 year ago

Just go ahead with the PR