vimwiki panvimwiki markdownlint gfm
- 
Vimwiki supports GFM and does not recognize Pandoc markdown ::: {#refsfrom Pandoc Placement of the bibliography.- 
--to=gfmconverts to `<div id="refs" class="references csl-bib-body hanging-indent">`.
- 
Markdownlint-cliaccepts the anchor (no MD051/link-fragments), unlike the default pandoc format, but emitsMD033/no-inline-html, unless.markdownlint.yamloverrides.
 
- 
- 
Markdownlint-cliaccepts the anchor to resolveMD051/link-fragments.
- 
Vimwiki does not recognize <a id="anchor"></a>or<div id="ref-TSTF_476_Ar12007" class="csl-entry">.- If a Vimwiki tag matches the anchor, Vimwiki will prefer the tag.
- 
Manually creating the anchor leaves cruft in the file that could impair
    HTMLoutput.
 
- 
Pandoc can strip the references from --from=gfmand--from=markdownif using--to=markdown, without-citations.
.markdownlint.yaml:
# https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md
# MD051/link-fragments Link fragments should be valid [Context: "[2007](#ref-TSTF_476_Ar12007)"]
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md
MD033:
  # MD033/no-inline-html Inline HTML [Element: a]
  # MD033/no-inline-html Inline HTML [Element: div]
  # Allowed elements
  allowed_elements:
    - 'a'
    - 'div'
To expand citations, convert Vimwiki links to markdown and remove the link title:
pandoc --to=gfm --citeproc --metadata='link-citations:true' --from=markdown+wikilinks_title_after_pipe-citations --standalone pandoc --citeproc --metadata='link-citations:true' \ --from=markdown+wikilinks_title_after_pipe-task_lists \ --standalone --wrap=auto \ --to=markdown-citations \ expand_citeproc.md | wikilink_markdown pandoc --citeproc --metadata='link-citations:true' \ --from=markdown+wikilinks_title_after_pipe-task_lists \ --standalone --wrap=auto \ --to=gfm \ expand_citeproc.md | wikilink_markdown > expand_citeproc-gfm.md
expand_citeproc.md:
---
title: Try ZettelNew
date: 2023-09-16 07:36
tags: Zettelkasten
type: note
link-citations: true
references:
  - author:
    - family: Bloggs
      given: A. J.
    - family: Jones
      given: X. Y.
    container-title: Journal journal journal
    id: bloggs-jones
    issued: 1959
    title: Title title title title title title title title title title
    type: article-journal
  - author:
    - family: Chomsky
      given: N.
    container-title: A festschrift for Morris Halle
    editor:
    - family: Anderson
      given: S. R.
    - family: Kiparsky
      given: P.
    id: chomsky-73
    issued: 1973
    publisher: Holt, Rinehart & Winston
    publisher-place: New York
    title: Conditions on transformations
    type: paper-conference
---
Hey [Adding to the House of Dude](230916-1043)
```bash
# To convert BibLaTeX to Markdown Yaml Header above:
pandoc --from=biblatex --to=markdown default.bib --standalone
# To convert this file to expected output:
pandoc --citeproc \
  --from=markdown+wikilinks_title_after_pipe \
  --standalone \
  --to=markdown-citations+wikilinks_title_after_pipe  \
  --wrap=none \
  tests/func/reference_citation.md |
  reference_citation > tests/func/reference_citation.out.md
```
@bloggs-jones
[@chomsky-73]
[[vimwiki]]
----
House of Dude
expand_citeproc-gfm.md:
<!-- snip --> Hey [Adding to the House of Dude](230916-1043) <!-- snip --> Bloggs and Jones ([1959](#ref-bloggs-jones)) ([Chomsky 1973](#ref-chomsky-73)) [vimwiki](vimwiki) ------------------------------------------------------------------------ House of Dude <div id="refs" class="references csl-bib-body hanging-indent"> <div id="ref-bloggs-jones" class="csl-entry"> Bloggs, A. J., and X. Y. Jones. 1959. "Title Title Title Title Title Title Title Title Title Title." *Journal Journal Journal*. </div> <div id="ref-chomsky-73" class="csl-entry"> Chomsky, N. 1973. "Conditions on Transformations." In *A Festschrift for Morris Halle*, edited by S. R. Anderson and P. Kiparsky. New York: Holt, Rinehart & Winston. </div> </div>