GNU bug report logs -
#24667
AUCTeX citation color
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24667 in the body.
You can then email your comments to 24667 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Tue, 11 Oct 2016 15:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Travis Knepp <travis.n.knepp <at> nasa.gov>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Tue, 11 Oct 2016 15:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Coloring of citations (when using \citep, \citet, etc. as opposed to
just using \cite) is not properly working. Details from the
stackexchange post
(http://emacs.stackexchange.com/questions/27591/auctex-citation-color)
are here:
When inserting a reference in a LaTeX document (using Auctex) I normally
type:
|\cite{joebob_2010} |
where "\cite" shows up in blue font, while "joebob_2010" shows up
reddish/purple. I like this coloring. However, when I use
|\citep{joebob_2010} |
all text shows up white.
In my .emacs file I put:
|(add-hook 'LaTeX-mode-hook (lambda () (font-lock-add-keywords nil
'(("\\(\\\\citep\\)\\s-*{" 1 font-lock-keyword-face t)))
(font-lock-add-keywords nil '(("\\(\\\\citet\\)\\s-*{" 1
font-lock-keyword-face t))) )) |
This changed the color of "\citep" to blue, but the reference to
"joebob_2010" remains white. Can I modify this to have the same coloring
as "\cite{joebob_2010}"?
--
Travis N. Knepp
Lead Research Scientist
SAGE-III on ISS <http://sage.nasa.gov/>CAPABLE Air Quality Station
<http://capable.larc.nasa.gov/>
travis.n.knepp <at> ssaihq.com <mailto:travis.n.knepp <at> ssaihq.com>
Mail Stop 401A, B1250, Room 149
Hampton, VA 23681-2199
757-864-5558
Science Systems and Applications, Inc. (SSAI)
/Science and Technology with Passion/
10210 Greenbelt Road, Suite 600
Lanham, MD 20706
www.ssaihq.com <http://www.ssaihq.com/>
Please be mindful about forwarding this e-mail; it may contain
confidential information that is not intended for anyone else. Thank you.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Tue, 11 Oct 2016 23:43:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Travis,
2016-10-11 12:49 GMT+02:00 Travis Knepp <travis.n.knepp <at> nasa.gov>:
> Coloring of citations (when using \citep, \citet, etc. as opposed to just
> using \cite) is not properly working. Details from the stackexchange post
> (http://emacs.stackexchange.com/questions/27591/auctex-citation-color) are
> here:
>
>
>
> When inserting a reference in a LaTeX document (using Auctex) I normally
> type:
>
> \cite{joebob_2010}
>
> where "\cite" shows up in blue font, while "joebob_2010" shows up
> reddish/purple. I like this coloring. However, when I use
>
> \citep{joebob_2010}
>
> all text shows up white.
>
> In my .emacs file I put:
>
> (add-hook 'LaTeX-mode-hook
> (lambda ()
> (font-lock-add-keywords nil '(("\\(\\\\citep\\)\\s-*{" 1
> font-lock-keyword-face t)))
> (font-lock-add-keywords nil '(("\\(\\\\citet\\)\\s-*{" 1
> font-lock-keyword-face t)))
> ))
>
> This changed the color of "\citep" to blue, but the reference to
> "joebob_2010" remains white. Can I modify this to have the same coloring as
> "\cite{joebob_2010}"?
you can find the answer in the documentation ( (info
"(auctex)Fontification of macros") or
https://www.gnu.org/software/auctex/manual/auctex.html#Fontification-of-macros):
Highlighting of macros can be customized by adapting keyword lists
which can be found in the customization group `font-latex-keywords'.
Thus, you have to issue M-x customize-group RET font-latex-keywords
RET and then add to the "Font Latex Match Reference Keywords" variable
the new entry with "citep" (without quotes) as "keyword" field and
"*[[{" (without quotes) as "format" field. If you want instead to
write some Elisp, you can put this
--8<---------------cut here---------------start------------->8---
(font-latex-add-keywords
'(("citep" "*[[{"))
'reference)
--8<---------------cut here---------------end--------------->8---
inside the hook.
Out of curiosity, do you use natbib or jurabib packages? If you have
parsing enabled, you should automatically get fontification of citep
macro.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Thu, 13 Oct 2016 13:23:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 24667 <at> debbugs.gnu.org (full text, mbox):
close 24667
tags 24667 notabug
thanks
Hi Travis,
2016-10-13 15:15 GMT+02:00 Travis Knepp <travis.n.knepp <at> nasa.gov>:
> Mose,
>
> Thank you for your help. This seems to have solved the issue. Sorry
> for the "bug" false alarm. I will post your solution to the stack exchange.
You're welcome. Thanks for the feedback, I'm closing this ticket.
Bye,
Mosè
PS: Please, remember to use "Reply all" button when you reply to a
mailing list message, so that everyone will be able to read it ;-) In
this case, it may be useful for other people to know that the proposed
solution did work.
bug closed, send any further explanations to
24667 <at> debbugs.gnu.org and Travis Knepp <travis.n.knepp <at> nasa.gov>
Request was from
Mosè Giordano <mose <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 13 Oct 2016 13:23:02 GMT)
Full text and
rfc822 format available.
Added tag(s) notabug.
Request was from
Mosè Giordano <mose <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 13 Oct 2016 13:23:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Sat, 15 Oct 2016 12:55:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Mosè,
Mosè Giordano <mose <at> gnu.org> writes:
> 2016-10-11 12:49 GMT+02:00 Travis Knepp <travis.n.knepp <at> nasa.gov>:
>> Coloring of citations (when using \citep, \citet, etc. as opposed to just
>> using \cite) is not properly working. Details from the stackexchange post
>> (http://emacs.stackexchange.com/questions/27591/auctex-citation-color) are
>> here:
>>
>> When inserting a reference in a LaTeX document (using Auctex) I normally
>> type:
>>
>> \cite{joebob_2010}
>>
>> where "\cite" shows up in blue font, while "joebob_2010" shows up
>> reddish/purple. I like this coloring. However, when I use
>>
>> \citep{joebob_2010}
>>
>> all text shows up white.
[...]
> If you want instead to write some Elisp, you can put this
>
> (font-latex-add-keywords
> '(("citep" "*[[{"))
> 'reference)
>
> inside the hook.
>
> Out of curiosity, do you use natbib or jurabib packages?
First of all, sorry for my late response. Travis uses biblatex. And
while we're at it: Travis, how do insert this macro? Do you type
\citep{<key>} or do you hit `C-c m RET citep RET' or use Reftex? I'm
asking since you're asking for the fontification; I think the completion
support (see below) is much more needed.
> If you have parsing enabled, you should automatically get
> fontification of citep macro.
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.
--8<---------------cut here---------------start------------->8---
diff --git a/style/biblatex.el b/style/biblatex.el
index 06cd57a..f0e235d 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -216,6 +216,32 @@ for citation keys."
(TeX-argument-insert (mapconcat 'identity items ",") optional))
(setq noinsert t))))
+(defun LaTeX-biblatex-natbib-note-args (optional)
+ "Prompt for two note arguments of a natbib compat citation command."
+ (when TeX-arg-cite-note-p
+ (let ((pre (TeX-read-string
+ (TeX-argument-prompt optional nil "Prenote")))
+ (post (TeX-read-string
+ (TeX-argument-prompt optional nil "Postnote"))))
+ (cond
+ (;; Both optional args are given
+ (and pre (not (string= pre ""))
+ post (not (string= post "")))
+ (insert LaTeX-optop pre LaTeX-optcl
+ LaTeX-optop post LaTeX-optcl))
+ (;; pre is given, post is empty: Make sure that we insert an
+ ;; extra pair of `[]', otherwise pre becomes post
+ (and pre (not (string= pre ""))
+ (string= post ""))
+ (insert LaTeX-optop pre LaTeX-optcl
+ LaTeX-optop LaTeX-optcl))
+ (;; pre is empty, post is given
+ (and (string= pre "")
+ post (not (string= post "")))
+ (insert LaTeX-optop post LaTeX-optcl))
+ (;; both empty
+ t (ignore))))))
+
(TeX-add-style-hook
"biblatex"
(lambda ()
@@ -456,6 +482,53 @@ for citation keys."
'("DefineHyphenationExceptions"
(TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t)
"NewBibliographyString")
+
+ ;; § 3.8.9 natbib Compatibility Commands
+ (when (or (LaTeX-provided-package-options-member "biblatex" "natbib")
+ (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
+ (let ((cmds '(("citet" . 1) ("citet*" . 1)
+ ("Citet" . 1) ("Citet*" . 1)
+ ("citep" . 2) ("citep*" . 2)
+ ("Citep" . 2) ("Citep*" . 2)
+ ("citealt" . 1) ("citealt*" . 1)
+ ("Citealt" . 1) ("Citealt*" . 1)
+ ("citealp" . 2) ("citealp*" . 2)
+ ("Citealp" . 2) ("Citealp*" . 2))))
+ ;; Taken from natbib.el:
+ (apply
+ #'TeX-add-symbols
+ (mapcar
+ (lambda (cmd)
+ (cond
+ ((= (cdr cmd) 1)
+ ;; Just one optional argument, the post note
+ (list
+ (car cmd)
+ '(TeX-arg-conditional TeX-arg-cite-note-p (["Postnote"]) nil)
+ 'TeX-arg-cite))
+ ((= (cdr cmd) 2)
+ ;; Pre and post notes
+ (list
+ (car cmd)
+ '(TeX-arg-conditional TeX-arg-cite-note-p
+ ([LaTeX-biblatex-natbib-note-args])
+ nil)
+ 'TeX-arg-cite))))
+ cmds))
+
+ ;; Fontification for compat macros do not go into `font-latex.el':
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("citet" "*[{")
+ ("Citet" "*[{")
+ ("citep" "*[[{")
+ ("Citep" "*[[{")
+ ("citealt" "*[{")
+ ("Citealt" "*[{")
+ ("citealp" "*[[{")
+ ("Citealp" "*[[{"))
+ 'biblatex))))
+
(LaTeX-add-environments
;;; Bibliography commands
;; Bibliography Sections
--8<---------------cut here---------------end--------------->8---
Here also a small file I tested with:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{filecontents}{biblatex-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},
}
@book{mitt:97,
author = {Michel Goossens and
Sebastian Rahtz and
Frank Mittelbach},
title = {The LaTeX Graphics Companion - Illustrating documents
with TeX and PostScript},
series = {Addison-Wesley series on tools and techniques
for computer typesetting},
publisher = {Addison-Wesley},
year = {1997},
isbn = {978-0-201-85469-5},
}
\end{filecontents}
\usepackage[natbib,backend=bibtex,style=authoryear]{biblatex}
\bibliography{biblatex-test}
\begin{document}
\noindent \textbf{Textual}:\\
\citet{lamp:94}, \\
\citet[which see]{lamp:94},\\
\citet*{mitt:97}, \\
\citealt{mitt:97,lamp:94}, \\
\Citealt{mitt:97,lamp:94}
\noindent \textbf{Parenthesis}:\\
\citep{mitt:97}, \\
\citep[see][Page~5]{mitt:97}, \\
\citep*{mitt:97}, \\
\citealp{mitt:97}, \\
\Citealp{mitt:97}, \\
\citealp*{mitt:97}, \\
\Citealp*{mitt:97}
\end{document}
--8<---------------cut here---------------end--------------->8---
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Sat, 15 Oct 2016 16:03:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
2016-10-15 14:53 GMT+02:00 Arash Esbati <arash.esbati+ml <at> gmail.com>:
> 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? If the problem is the function to run, you can define and use
in natbib.el a local variable holding the name of the function. In
biblatex.el that variable would be set to
`LaTeX-biblatex-natbib-note-args'.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Sun, 16 Oct 2016 10:08:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Mosè,
Mosè Giordano <mose <at> gnu.org> writes:
> 2016-10-15 14:53 GMT+02:00 Arash Esbati <arash.esbati+ml <at> gmail.com>:
>> 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
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Sun, 16 Oct 2016 13:09:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
2016-10-16 12:03 GMT+02:00 Arash Esbati <arash.esbati+ml <at> gmail.com>:
> 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.
Good points.
> 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:
By the way, `natbib-note-args' is a pretty old function, but doesn't
follow the standard naming adopted within AUCTeX nowadays. If you're
going to touch it, please rename it.
> And finally, I was reluctant to load a style where the respective
> package is marked "incompatible".
I don't agree on this. The LaTeX packages are incompatible, but
AUCTeX only cares about the user interfaces they provide: if the
macros provided by the natbib package and the natbib compatibility
layer bundled in biblatex were exactly equal, I'd see no reason why we
couldn't load natbib hook within biblatex. However, you explained
that this is not the case, so I think you can apply the patch you
suggested yesterday.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Sun, 16 Oct 2016 19:56:01 GMT)
Full text and
rfc822 format available.
Message #30 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Mosè,
Mosè Giordano <mose <at> gnu.org> writes:
> 2016-10-16 12:03 GMT+02:00 Arash Esbati <arash.esbati+ml <at> gmail.com>:
>>
>> 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:
>
> By the way, `natbib-note-args' is a pretty old function, but doesn't
> follow the standard naming adopted within AUCTeX nowadays. If you're
> going to touch it, please rename it.
I can rename and fix the behaviour of `natbib-note-args', I presume that
I am not the only person who dislikes the addition of those brackets.
> However, you explained that this is not the case, so I think you can
> apply the patch you suggested yesterday.
Done. I missed to mention bug#24667 in the ChangeLog entry, but not a
big deal I think since the bug was already closed ;-)
Again, thanks for your comments.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Mon, 17 Oct 2016 12:27:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 24667 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Arash,
I use Reftex and apply the hook in my .emacs file. I insert
references via C-c [ and change the \cite to \citep or \citet as needed.
Travis
On 10/15/2016 08:53 AM, Arash Esbati wrote:
> Hi Mosè,
>
> Mosè Giordano <mose <at> gnu.org> writes:
>
>> 2016-10-11 12:49 GMT+02:00 Travis Knepp <travis.n.knepp <at> nasa.gov>:
>>> Coloring of citations (when using \citep, \citet, etc. as opposed to just
>>> using \cite) is not properly working. Details from the stackexchange post
>>> (http://emacs.stackexchange.com/questions/27591/auctex-citation-color) are
>>> here:
>>>
>>> When inserting a reference in a LaTeX document (using Auctex) I normally
>>> type:
>>>
>>> \cite{joebob_2010}
>>>
>>> where "\cite" shows up in blue font, while "joebob_2010" shows up
>>> reddish/purple. I like this coloring. However, when I use
>>>
>>> \citep{joebob_2010}
>>>
>>> all text shows up white.
> [...]
>
>> If you want instead to write some Elisp, you can put this
>>
>> (font-latex-add-keywords
>> '(("citep" "*[[{"))
>> 'reference)
>>
>> inside the hook.
>>
>> Out of curiosity, do you use natbib or jurabib packages?
> First of all, sorry for my late response. Travis uses biblatex. And
> while we're at it: Travis, how do insert this macro? Do you type
> \citep{<key>} or do you hit `C-c m RET citep RET' or use Reftex? I'm
> asking since you're asking for the fontification; I think the completion
> support (see below) is much more needed.
>
>> If you have parsing enabled, you should automatically get
>> fontification of citep macro.
> 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.
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/style/biblatex.el b/style/biblatex.el
> index 06cd57a..f0e235d 100644
> --- a/style/biblatex.el
> +++ b/style/biblatex.el
> @@ -216,6 +216,32 @@ for citation keys."
> (TeX-argument-insert (mapconcat 'identity items ",") optional))
> (setq noinsert t))))
>
> +(defun LaTeX-biblatex-natbib-note-args (optional)
> + "Prompt for two note arguments of a natbib compat citation command."
> + (when TeX-arg-cite-note-p
> + (let ((pre (TeX-read-string
> + (TeX-argument-prompt optional nil "Prenote")))
> + (post (TeX-read-string
> + (TeX-argument-prompt optional nil "Postnote"))))
> + (cond
> + (;; Both optional args are given
> + (and pre (not (string= pre ""))
> + post (not (string= post "")))
> + (insert LaTeX-optop pre LaTeX-optcl
> + LaTeX-optop post LaTeX-optcl))
> + (;; pre is given, post is empty: Make sure that we insert an
> + ;; extra pair of `[]', otherwise pre becomes post
> + (and pre (not (string= pre ""))
> + (string= post ""))
> + (insert LaTeX-optop pre LaTeX-optcl
> + LaTeX-optop LaTeX-optcl))
> + (;; pre is empty, post is given
> + (and (string= pre "")
> + post (not (string= post "")))
> + (insert LaTeX-optop post LaTeX-optcl))
> + (;; both empty
> + t (ignore))))))
> +
> (TeX-add-style-hook
> "biblatex"
> (lambda ()
> @@ -456,6 +482,53 @@ for citation keys."
> '("DefineHyphenationExceptions"
> (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t)
> "NewBibliographyString")
> +
> + ;; § 3.8.9 natbib Compatibility Commands
> + (when (or (LaTeX-provided-package-options-member "biblatex" "natbib")
> + (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
> + (let ((cmds '(("citet" . 1) ("citet*" . 1)
> + ("Citet" . 1) ("Citet*" . 1)
> + ("citep" . 2) ("citep*" . 2)
> + ("Citep" . 2) ("Citep*" . 2)
> + ("citealt" . 1) ("citealt*" . 1)
> + ("Citealt" . 1) ("Citealt*" . 1)
> + ("citealp" . 2) ("citealp*" . 2)
> + ("Citealp" . 2) ("Citealp*" . 2))))
> + ;; Taken from natbib.el:
> + (apply
> + #'TeX-add-symbols
> + (mapcar
> + (lambda (cmd)
> + (cond
> + ((= (cdr cmd) 1)
> + ;; Just one optional argument, the post note
> + (list
> + (car cmd)
> + '(TeX-arg-conditional TeX-arg-cite-note-p (["Postnote"]) nil)
> + 'TeX-arg-cite))
> + ((= (cdr cmd) 2)
> + ;; Pre and post notes
> + (list
> + (car cmd)
> + '(TeX-arg-conditional TeX-arg-cite-note-p
> + ([LaTeX-biblatex-natbib-note-args])
> + nil)
> + 'TeX-arg-cite))))
> + cmds))
> +
> + ;; Fontification for compat macros do not go into `font-latex.el':
> + (when (and (featurep 'font-latex)
> + (eq TeX-install-font-lock 'font-latex-setup))
> + (font-latex-add-keywords '(("citet" "*[{")
> + ("Citet" "*[{")
> + ("citep" "*[[{")
> + ("Citep" "*[[{")
> + ("citealt" "*[{")
> + ("Citealt" "*[{")
> + ("citealp" "*[[{")
> + ("Citealp" "*[[{"))
> + 'biblatex))))
> +
> (LaTeX-add-environments
> ;;; Bibliography commands
> ;; Bibliography Sections
> --8<---------------cut here---------------end--------------->8---
>
> Here also a small file I tested with:
>
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
>
> \begin{filecontents}{biblatex-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},
> }
>
> @book{mitt:97,
> author = {Michel Goossens and
> Sebastian Rahtz and
> Frank Mittelbach},
> title = {The LaTeX Graphics Companion - Illustrating documents
> with TeX and PostScript},
> series = {Addison-Wesley series on tools and techniques
> for computer typesetting},
> publisher = {Addison-Wesley},
> year = {1997},
> isbn = {978-0-201-85469-5},
> }
> \end{filecontents}
>
> \usepackage[natbib,backend=bibtex,style=authoryear]{biblatex}
>
> \bibliography{biblatex-test}
>
> \begin{document}
>
> \noindent \textbf{Textual}:\\
> \citet{lamp:94}, \\
> \citet[which see]{lamp:94},\\
> \citet*{mitt:97}, \\
> \citealt{mitt:97,lamp:94}, \\
> \Citealt{mitt:97,lamp:94}
>
> \noindent \textbf{Parenthesis}:\\
> \citep{mitt:97}, \\
> \citep[see][Page~5]{mitt:97}, \\
> \citep*{mitt:97}, \\
> \citealp{mitt:97}, \\
> \Citealp{mitt:97}, \\
> \citealp*{mitt:97}, \\
> \Citealp*{mitt:97}
>
> \end{document}
> --8<---------------cut here---------------end--------------->8---
>
> Best, Arash
--
Travis N. Knepp
Lead Research Scientist
SAGE-III on ISS <http://sage.nasa.gov/>CAPABLE Air Quality Station
<http://capable.larc.nasa.gov/>
travis.n.knepp <at> ssaihq.com <mailto:travis.n.knepp <at> ssaihq.com>
Mail Stop 401A, B1250, Room 149
Hampton, VA 23681-2199
757-864-5558
Science Systems and Applications, Inc. (SSAI)
/Science and Technology with Passion/
10210 Greenbelt Road, Suite 600
Lanham, MD 20706
www.ssaihq.com <http://www.ssaihq.com/>
Please be mindful about forwarding this e-mail; it may contain
confidential information that is not intended for anyone else. Thank you.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#24667
; Package
auctex
.
(Tue, 18 Oct 2016 09:48:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 24667 <at> debbugs.gnu.org (full text, mbox):
Hi Travis,
Travis Knepp <travis.n.knepp <at> nasa.gov> writes:
> I use Reftex and apply the hook in my .emacs file. I insert
> references via C-c [ and change the \cite to \citep or \citet as
> needed.
Thanks for your response. If you install the latest AUCTeX version from
elpa, you can enter `C-c C-m citep RET' or `C-c C-m citet RET' and
proceed from there. I think this is more convenient than to append a
`p' or `t' to \cite.
I have a patch to integrate biblatex into Reftex. I'm moving that
discussion to devel mailing-list.
Best, Arash
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 15 Nov 2016 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.