Ok I think I understand better: you want to add attributes to inlines, as in djot. https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html#inline-attributes . The problem, then, isn't just that language isn't a basic attribute. It's also that Pandoc's internal representation of documents don't allow attributes *at all* on arbitrary inline elements. See the specification of the AST elements here: https://pandoc.org/lua-filters.html#type-inline . Code, Span, Image have attributes but Emph doesn't, for instance. So your custom reader would need to convert whatever syntax you use to Span elements with a "lang=xx" attribute. Re the link hack, you could require a colon, i.e. tag languages with [...](:de): -- langTags.lua function Link (l) if l.target:match('^%a%a$') or l.target:match('$:^%a%a%-%a%a$') then return pandoc.Span(l.content, { lang = l.target}) end end Your newbie audience would need to understand that: [this one](https://www.example.org) is a link [that one](:en) is language markup I don't think it's difficult to master for authoring. Of course it the point is rather to teach about markup, the ambiguity isn't great. (Though you could consider that unambiguous, e.g. declare that all [...](:..) is markup. There's also the issue that you can't combine this language attribute with others. J On Thursday, March 16, 2023 at 5:46:05 PM UTC Pablo Rodríguez wrote: > On 3/16/23 10:32, Julien Dutant wrote: > > Hi Pablo, > > > > If simple markdown is key here, why not hack the link syntax? Nobody > > ever links to 'fr' or 'en-gb' so we could write: > > > > [savoir-faire](fr) > > Hi Julien, > > I really appreciate your help, but I’m afraid that lightweight markup > doesn’t allow such an inconsistency. > > Sorry, I thought that language was a basic attribute (such as identifier > and class). But I seem to be > > This is why I thought I would make sense to have a lightweight syntax. > > I apologize again, imagine explaining that language goes in link > destination to an audience with absolutely no coding background. This > would give anyone a hard time trying to justify it. > > Really appreciate you help, but as Bastien suggested, my proposal for > lightweight language syntax seems to require a custom reader. > > Many thanks for your help again, > > Pablo > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c238d079-4ba5-4f39-8171-c17e1119d4c5n%40googlegroups.com.