emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug] Macro in citation not expanded


From: M . ‘quintus’ Gülker
Subject: [bug] Macro in citation not expanded
Date: Sun, 16 Oct 2022 11:07:49 +0200

Dear list,

it turns out that macros in citation commands are not expanded. Minimal
working example:

/tmp/mwe.org:

    #+TITLE: Test
    #+LANGUAGE: de
    #+bibliography: /tmp/mwe.bib
    #+cite_export: csl /tmp/juristische-schulung.csl
    #+MACRO: name @@latex:\textsc{$1}@@
    
    Dies {{{name(Foo)}}}  ist ein Test. [cite:@doe2022nothing p. 55,, zum 
vorgenannten Argument {{{name(Doe)}}} aaO.]

/tmp/mwe.bib is:

    @Book{doe2022nothing,
    author       = {John Doe},
    title        = {Nothing Important},
    year      = {2022},
    edition   = {2},
    publisher = {Some Publisher},
    location  = {Nowhere},
    langid    = {english}}

/tmp/juristische-schulung.csl is 
<https://github.com/citation-style-language/styles/blob/e22b8a566bad9b4c7f52720f60dd875057a5d210/juristische-schulung.csl>.

Exporting this to LaTeX yields:

    Dies \textsc{Foo}  ist ein Test.\footnote{\textit{Doe}, Nothing important, 
2. Aufl. (2022), 55, zum vorgenannten Argument \{\{\{name(Doe)\}\}\} aaO.}

This replaces the first call to the `name' macro properly, but it does
not replace the call to the `name' macro inside the `cite:' construct.
Instead, it copies the macro construct verbatim into the LaTeX footnote.
The correct output should have been:

    Dies \textsc{Foo}  ist ein Test.\footnote{\textit{Doe}, Nothing important, 
2. Aufl. (2022), 55, zum vorgenannten Argument \textsc{Doe} aaO.}

Version information:

Org mode version 9.6-pre (release_9.5-1162-g15b3aa @ 
/home/quintus/.emacs.d/org-mode/lisp/)
citeproc.el @ ba49516265fa24b138346c4918d39d19b4de8a62
GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.31, cairo 
version 1.16.0)

  -quintus

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kontakt@guelker.eu    | O<



reply via email to

[Prev in Thread] Current Thread [Next in Thread]