2

By default, only \cite is folded by AUCTeX. If you want other citation commands to be folded as well, you have to add them to LaTeX-fold-macro-spec-list manually. For example, with (push '("[nc]" ("nocite")) LaTeX-fold-macro-spec-list), I tell AUCTEX to fold the command \nocite and display "[nc]". If you want only the contents in parentheses to be shown but not the command (as it is done with sections or italics), you can replace "[nc]" by "{1}". In this case, only the citation key is displayed.

Now I have two specific cases which make me despair:

  1. I'd like to have \citealias folded as specified in \defcitealias in my .tex-file. For example, if I define \defcitealias{key}{In December}, \citealias{key} should fold into "In December".

  2. I'm trying to have \parencite folded to "(author, year, page)" as specified in the .bib-file. For example, if "key" is the citation key for "examplearticle", which is specified in the .bib-file as

    @article{examplearticle,
    title = {example title},
    author = {Gentzen, Gerhard},
    date = {1935-12}, ...} 
    

AUCTeX should fold \parencite[20]{example} and display "(Gentzen, 1935, p. 20)".

I'm quite new to elisp and this is simply too big of a task for me. Can anyone of you help me out?

0 Answers0