emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] Macro in citation not expanded
@ 2022-10-16  9:07 M. ‘quintus’ Gülker
  2022-10-16  9:32 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: M. ‘quintus’ Gülker @ 2022-10-16  9:07 UTC (permalink / raw)
  To: emacs-orgmode

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<


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-24 11:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-16  9:07 [bug] Macro in citation not expanded M. ‘quintus’ Gülker
2022-10-16  9:32 ` Ihor Radchenko
2022-10-17 17:11   ` M. ‘quintus’ Gülker
2022-10-18  4:31     ` [RFC PATCH] " Ihor Radchenko
2022-11-11 20:50       ` M. ‘quintus’ Gülker
2022-11-13  4:12         ` Ihor Radchenko
2024-01-24 11:30       ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).