Replies: 2 comments 4 replies
-
Now, ACS's case is already more involved:
Relevant instructions include:
In the ACS extension this is implemented via with
(indentation added in an effort to clarify the nested levels) and the affiliation partial being injected,
Now, this appears to be very similar to what APS requires, but I have to admit I don't fully understand what's going on in there! The pandoc partials and pipes are kind of new to me, and their use not entirely obvious... If I try to translate what I read,
and the partial affiliation being injected:
where I'm inferring that
|
Beta Was this translation helpful? Give feedback.
-
(side-discussion) It also strikes me that the ever-more complex mini-language in pandoc templates is not an ideal solution – is there an alternative? In fact, might pandoc eventually move away from it? It would be so much nicer to use Lua for these convoluted programming steps (for loops, if/else, string formatting, etc.) Could one bypass the pandoc template altogether here, and have just a generic One option of course is to inject in this |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I naively started a template for APS (American Physical Society) journals, which relies on Revtex-4-2..
I thought I'd take inspiration from the ACS extension (what is Chemistry for, after all). It all seems reasonably straight-forward, with one glaring exception: the formatting of author-affiliation lines.
Every journal seems to reinvent the wheel here, and some strategies are easier than others to implement. I was wondering if we could share some of those strategies in one place, to help development of such templates (maybe I've missed such a resource already?).
In the case of APS (revtex, really), the expected format is:
The mention of
fills me with dread when I think of how to code this in pandoc's template mini-language.
I'm not new to the author-affiliation problem, in fact years ago I created a helper Shiny app that took Yaml-formatted metadata and produced the journal-specific header lines (title, author-affiliation, etc.) as a LaTeX file. This was easy to code because I had the expressive power of R to wrangle the data and produce the desired strings. Here, in contrast, we're dealing with pandoc's template syntax, which is not super convenient or easy to grasp.
Maybe we can add a few examples in a thread below and comment on how it works? I'll start with what I understand/don't understand about the Elsevier template, which seems easiest:
Desired output:
The nice thing is that addresses and authors are decoupled, the mapping between the two being done by the label references.
Pandoc template:
Beta Was this translation helpful? Give feedback.
All reactions