Wikilinks problem in Markdown document for reference notes and citations

I’m writing Markdown notes in Devonthink. I’d love to be able to export/copy/etc. these documents to then (outside of Devonthink) process using Pandoc. I want to be able to link within my idea notes to my reference notes, which have as their alias the citekey of the document, e.g. Braulik1999. Devonthink picks up these as Wikilinks:

* Braulik1999
* @Braulik1999

But it won’t pick this one up:

* [@Braulik1999]

Only that last one will generate a Pandoc citation. Is there any reason why that last one doesn’t get a Wikilink? I.e. if it’s an intentional decision in Devonthink’s parser design, I can understand that. But if it’s an oversight, could it potentially be changed?

And as a bonus feature request: what would be super super cool is if the link description in the rendered Markdown, i.e. the Preview window, showed the Title of the linked item, rather than the Wikilink text itself. E.g. in this example, the linked item has the following title:

Braulik (1999) The book of Ruth as intra-biblical critique of the Deuteronomic Law

And given that Devonthink knows the title of the item where I have given the alias it is theoretically possible to show that in the rendered Markdown, I assume?

I think that might be feasible with JavaScript. Is is certainly no feature of Markdown, because it requires access to the meta data underlying a link at render time. MD doesn’t do that, AFAIK. And since the format it is geared to a general public (not only DT users, that is), providing such a functionality would be way out of a normal renderer’s range.

Furthermore, there might be DT users who do not want this feature or who want it but with another subtly different outcome. I’d rather not see a function implemented for one particular use case that goes against the expectations of the rest.

BTW, there is MD syntax to add a text to a link. You could use that. With the added benefit that your files could be rendered correctly by other MD renderers outside of DT too. The obvious drawback is that you’d have to add the title manually, though.

Apologies, I wasn’t clear. I don’t want the rendered citation.

I’m suggesting that when I Wikilink to an alias, the rendered link shows the title of the item.

Re the MD syntax to add text to a link, the problem then is that when the file is being rendered by an external program the citation won’t be parseable externally.

If by title you mean the name of the record, then what I said holds. If you mean something else: what is the title of the MD document? Is it in the front matter? Is it the first first level headline?

Only double brackets like [[Braulik1999]] are currently supported but not single brackets.

Sure, and I’m not asking for single brackets to be supported. Just to loosen the parser slightly so that they are not excluded from recognition of WikiLinks. If I have Braulik1999 in a sentence it’s recognised as a WikiLink, but surrounded by single brackets it’s not. The fact that single brackets excludes it from recognition means that Markdown intended for processing by pandoc later (i.e. all my Markdown) can’t have citations recognised as potential WikiLinks.

That sounds like a contradictory statement.

If Pandoc uses single brackets in processing, there should be no issue. However @cgrunenberg stated only double brackets are supported for automatic WikiLinks.

Hmm, I think I’m failing to communicate what I’m trying to say… :slight_smile:

To me it’s not obvious why the automatic WikiLinks parser recognises all of these as WikiLinks:

@Braulik1999

(Braulik1999)

{Braulik1999}

#Braulik1999#

but not this:

[@Braulik1999]

It appears that the only characters which prevent detection of Braulik1999 are [ and ]. And those two characters are precisely the ones I want to use :slight_smile: Single brackets don’t mean anything in terms of WikiLinks recognition, so it’s not clear to me why they exclude Braulik1999 from being recognised as a WikiLink.

I’m not asking for single brackets to be recognised as special syntax. I’m just suggesting that single brackets shouldn’t exclude a WikiLink from being recognised.

2 Likes

A future release might revise this.

1 Like