Internal link processing pandoc plugin fails

What I’m trying to do

I use Obsidian for academic writing and need to convert my notes to docx, pdf or Latex frequently. I am using the Pandoc Plugin to do so successfully, with one exception: The „Internal link processing“ that controls how [[wiki-links]] are formatted does not work. I would like to remove the brackets if there is no alias or convert to the alias, if there is one:

  • [[wiki-link]] → wiki-link (as plain text!)
  • [[wiki-link|alias]] → alias (as plain text!)

Things I have tried

My problem has already been explained on the Pandoc Plugin Github page ([Bug] "Internal Link Processing" option has no effect · Issue #163 · OliverBalfour/obsidian-pandoc · GitHub). The suggested solution by ParkerRobb („ If you have Pandoc >3.0 and specify --from=markdown+wikilinks_title_after_pipe as a Pandoc option in “Extra Pandoc options” in the plugin settings, Pandoc itself will process the links and convert them to text (see the Pandoc User’s Guide, p108).“) does work insofar as it formats to a hyperlink:

  • [[wiki-link]] → wiki-link (as hyperlink in docx!)
  • [[wiki-link|alias]] → alias (as hyperlink in docx!)

I need it to be in Plain text. I will also post this question on the Github page. Any help is welcome :slight_smile:

As a small extra: Also, I just realized, that if I use ParkerRobb’s solution, the --citeproc does not work in the way I would like it to. I cite my literature as wikilinks (for quick access) and would like to have an order in which both processes are used. For example, I have:

  • [[@citekey]]
  • [[normal wikilink]]

I then first would like the citekey to be transformed:

  • [[@citekey]] → Author YYYY (or at least [Author YYYY])
  • [[normal wikilink]] → [[normal wikilink]] (no change)

and the Wikilink afterwards

  • [Author YYYY] → [Author YYYY]
  • [[normal wikilink]] → normal wikilink (in plain text)

It does work (as hyperlink), if the citations are no wikilinks, e.g.

  • [@citekey] → Author YYYY
  • [[normal wikilink]] → normal wikilink