[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24667: AUCTeX citation color
From: |
Arash Esbati |
Subject: |
bug#24667: AUCTeX citation color |
Date: |
Sun, 16 Oct 2016 12:03:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 |
Hi Mosè,
Mosè Giordano <address@hidden> writes:
> 2016-10-15 14:53 GMT+02:00 Arash Esbati <address@hidden>:
>> That was also was my first answer, but then I realized that biblatex.el
>> doesn't have support for natbib compat macros (cf. biblatex manual,
>> §3.8.9 natbib Compatibility Commands). I asked Travis to file this bug
>> report (thanks btw), I think the appended patch fixes the issue. It is
>> mostly taken from natbib.el, function `LaTeX-biblatex-natbib-note-args'
>> is a modified version of `natbib-note-args' and I think that `(when
>> TeX-arg-cite-note-p' is not really needed, but I didn't touch it since
>> it doesn't hurt either.
>
> Why copying most of natbib.el instead of running the corresponding
> hook?
I considered that, but dropped the idea because of various reasons:
natbib does not have uppercase version of the commands (e.g. \Citep), I
had to include them in biblatex.el anyway. Other commands like
\citeauthor are already in biblatex.el and I didn't want to go for a
possible clash. As a personal note, I'm not really happy with the
function `natbib-note-args' which inserts a pair of brackets when pre
and post notes are omitted:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{filecontents}{natbib-test.bib}
@book{lamp:94,
author = {Leslie Lamport},
title = {LaTeX - {A} Document Preparation System: User's Guide
and Reference Manual, Second Edition},
publisher = {Pearson / Prentice Hall},
year = {1994},
isbn = {978-0-201-52983-8},
timestamp = {Fri, 08 Apr 2011 18:21:00 +0200},
}
\end{filecontents}
\usepackage{natbib}
\bibliography{natbib-test}
\begin{document}
Eval (setq TeX-arg-cite-note-p t)
Hitting `C-c C-m RET citep RET RET lamp RET RET' inserts
\citep[]{lamp:94}.
% ^^
\end{document}
--8<---------------cut here---------------end--------------->8---
And finally, I was reluctant to load a style where the respective
package is marked "incompatible".
I don't have a strong opinion on this. We can proceed with whatever you
think fits better.
Best, Arash