Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

pandoc-citeproc -y should output subscript/superscript as markdown #128

Closed
njbart opened this issue May 9, 2015 · 2 comments
Closed

pandoc-citeproc -y should output subscript/superscript as markdown #128

njbart opened this issue May 9, 2015 · 2 comments

Comments

@njbart
Copy link
Contributor

njbart commented May 9, 2015

The new YAML format looks great. Just one finding:

pandoc-citeproc -y does not output subscript and superscript as markdown.

Example:

#!/bin/sh

cat > test.bib  << EOT
@article{item1,
    Title = {The Title:
     \textit{italics},
     \textbf{bold}, 
     \textsubscript{subscript with spaces}, 
     \textsuperscript{superscript}, 
     \textsc{small-caps}}
}
EOT

pandoc-citeproc -y test.bib

Actual:


---
references:
- id: item1
  type: article-journal
  title: 'The title: *Italics*, **bold**, 
    <span style="vertical-align:sub;">subscript with spaces</span>,
    <span style="vertical-align:sup;">superscript</span>, 
    <span style="font-variant:small-caps;">small-caps</span>'
  title-short: The title
...

Expected:


---
references:
- id: item1
  type: article-journal
  title: 'The title: *Italics*, **bold**, ^subscript\ with\ spaces^, ~superscript~, 
    <span style="font-variant:small-caps;">small-caps</span>'
  title-short: The title
...

Note: <span style="vertical-align:sup;"> is incorrect anyway, should be …super….

This test.yaml seems to work with html but certainly does not with latex, example:

pandoc-citeproc -y test.bib >  test.yaml
echo @item1 | pandoc -F pandoc-citeproc --biblio test.yaml -t latex

Actual output: … {Subscript}, {Superscript}

And pandoc-citeproc -j test.yaml gives:

[
  {
    "first-reference-note-number": 1,
    "id": "item1",
    "title": "The title: <i>Italics</i>, <b>bold</b>, <span style=\"vertical-align:sub;\">subscript</span>, <span style=\"vertical-align:sup;\">superscript</span>, <sc>small-caps</sc>",
    "type": "article-journal"
  }
]

but citeproc-js understands only <sub> and <sup>, so this cannot be used, e.g., for importing into Zotero.

BTW, where does "first-reference-note-number": 1, come from? I don’t think it should be there.

Maybe it would make sense to add a rich-text-markup example to the test suite?

@jgm jgm closed this as completed in 7132cdd May 9, 2015
@jgm
Copy link
Owner

jgm commented May 9, 2015

Fixed everything except the "first-reference-note-number" -- I still can't figure out where that is coming from. Will keep trying.

@jgm
Copy link
Owner

jgm commented May 9, 2015

OK, got that one too.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants