-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Pandoc 2.11 adds HTML to rendered references when --to=markdown_strict #6921
Comments
As far as the numbered list change: |
Raw inline HTML is part of original (strict) markdown. |
By the way, the reason those spans are there is to get proper CSL block-level formatting. If you strip it out or ignore it, you'll lose some distinctions that the style requires. If you strip it out, you will once again get the escape in |
For pandoc version 2.11. jgm/pandoc#6921
For pandoc version 2.11. jgm/pandoc#6921
That removed the unwanted
Ah yes. That is something else I've noticed with the citeproc migration. We no longer have line breaks between CSL blocks with our existing style. For example, the plain text output looks like:
Rather than:
Is this something where we need to update our CSL style? Let me know if I should open another issue describing this more clearly? |
Yes, take a look at the CSS in the current pandoc default template. |
I found the following, which styles some of the CSL spans but not pandoc/data/templates/styles.html Lines 156 to 178 in 7199d68
For HTML output, we could update our CSS to place csl-blocks on their own lines. But for |
Note: in the AST, we represent the display styles using Spans, since the type is No special style was added for 'block' because the default rendering of a div is fine for that. But it looks as if for some reason we're not rendering the Span with class csl-block as a div in the HTML. I need to look into this. <div class="csl-left-margin">6. </div><div class="csl-right-inline"><strong>A6</strong> <span class="csl-block">John Doe</span> <em>Cambridge University Press</em> (2010) <a href="https://127.0.0.1/documents/Watson--paper.pdf">https://127.0.0.1/documents/Watson--paper.pdf</a></div> To get the plain markdown output you want, you could use a filter that adds soft breaks before each Span with class csl-block -- or something like that. I might want to experiment with adding these soft breaks automatically for all formats, since this will produce nicer output outside of HTML/LaTeX. |
OK, I see the bug in |
Previously inner Spans used to represent CSL display attributes were not rendered as div tags. See #6921.
I've made some fixes to both HTML and LaTeX output; maybe you could try. Btw, I'm not sure the way you're using the "block" display style is right; I think that after using the "block" for the author, you should include another block for the rest; otherwise the HTML doesn't look right. Maybe there's a way to fix this by changing CSS, I'm not sure. |
This just looks better and doesn't affect the semantics. See #6921.
I've added some newlines in the markdown output which should improve things for you. |
Yes, we alternated block display for every other line since otherwise references were double spaced. See manubot/rootstock#346 (comment) and manubot/rootstock#134. But we should revisit our style for the new citeproc. One thing we did is create a document with all combinations of CSL JSON fields in manubot/manubot#110. Then we could render it for a given CSL style and check the formatting was as expected. Will hopefully do this soon for an updated style and report back. |
With pandoc 2.11.2 and the following pandoc command (run via bash):
outputs:
Formerly with pandoc 2.9.2.1 and
--filter=pandoc-citeproc
rather thanciteproc
:We've been using
markdown_strict
formanubot cite
markdown output because it did not include the HTML snippets. Is this regression intentional? Is there anyway to specify markdown output without these HTML fragments added to the bibliography?The text was updated successfully, but these errors were encountered: