Skip to content
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

yaml metadata block for scientific publications #2899

Closed
dwaggott opened this issue May 4, 2016 · 5 comments
Closed

yaml metadata block for scientific publications #2899

dwaggott opened this issue May 4, 2016 · 5 comments

Comments

@dwaggott
Copy link

dwaggott commented May 4, 2016

I'm working on a process for getting collaboratively written scientific journal articles (in google docs) into latex via pandoc. Currently I export as a docx, convert to markdown via pandoc, split the markdown into a yaml metadata and main text, then convert to pdf via pandoc. The yaml metadata has the title, authors and abstract.

  1. I have multiple authors and each has multiple affiliations. Currently no matter what I do each author gets output as TRUE. Any ideas?
  2. Has anyone played around with the template to get multiple affiliations working? Ideally with superscript pointers to a list below.
  3. Funding or Acknowledgments would be helpful sections to add to the latex template
  4. Are there any ways to markup the docx so that the yaml metadata section can be auto-generated?
@Jmuccigr
Copy link
Contributor

Jmuccigr commented May 4, 2016

Hard to tell on #1 without an example.

@jgm
Copy link
Owner

jgm commented May 4, 2016

+++ Daryl Waggott [May 04 16 08:59 ]:

I'm working on a process for getting collaboratively written scientific
journal articles (in google docs) into latex via pandoc. Currently I
export as a docx, convert to markdown via pandoc, split the markdown
into a yaml metadata and main text, then convert to pdf via pandoc. The
yaml metadata has the title, authors and abstract.

  1. I have multiple authors and each has multiple affiliations.
    Currently no matter what I do each author gets output as TRUE. Any
    ideas?

You need a custom template to have structured authors. See
the README.

Note: The `author` variable in the default templates expects a simple list or
string.  To use the structured authors in the example, you would need a
custom template.  For example:

    $for(author)$
    $if(author.name)$
    $author.name$$if(author.affiliation)$ ($author.affiliation$)$endif$
    $else$
    $author$
    $endif$
    $endfor$

There may be a more elegant way to do this in LaTeX.

  1. Has anyone played around with the template to get multiple
    affiliations working? Ideally with superscript pointers to a list
    below.
  2. Funding or Acknowledgments would be helpful sections to add to the
    latex template

Just use a custom template. See the README on Templates.

  1. Are there any ways to markup the docx so that the yaml metadata
    section can be auto-generated?

I believe fields in the docx "properties" will come across as metadata.

@dwaggott
Copy link
Author

dwaggott commented May 4, 2016

@jgm
Copy link
Owner

jgm commented May 10, 2016

Yes, see above. Use a custom template. Actually, the one I give above won't be enough for you, since you have lists of institutes. Try something like:

\author{
$for(author)$
$author.name$
($for(author.institute)$$author.institute$$sep$, $endfor$)
$sep$\and
$endfor$
}

@jgm jgm closed this as completed May 10, 2016
@jgm
Copy link
Owner

jgm commented May 10, 2016

PS. For questions like this, use the pandoc-discuss mailing list. Many more people will read it and be able to help. This tracker is for bug reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants