Sophisticated macro highlighting and biblatex support

View: New views
7 Messages — Rating Filter:   Alert me  

Sophisticated macro highlighting and biblatex support

by Frederik Fischbach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey there!

I'm trying to get my macros highlighted.
I managed to color the "\footcite" command of biblatex the correct way.
What I did: M-x customize-group RET font-latex-keywords RET, then I
chose "Font Latex Match Reference Keywords" and added "footcite".

But I've problems to do this with "\footcites", as it provides
sophisticated ways to enter bibliographic references.
e.g. "\footcites[20]{author1}[some remarks on this, cf.][33]{author2}"
Now just the part up to and including "{author1}" gets highlighted.

User-defiened keyword classes don't provide a way to highlight
references like this, do they? Because I only found the possibility to
work with entries like "\command[...]{...}", "{\foo text}" and "\foo".

Any hints?

Furthermore I wanted to know if biblatex gets integrated into RefTeX.
I've put this into my .emacs:
---8<----------------------------------------------
(setq reftex-cite-format
       '((?\C-m . "\\cite[]{%l}")
        (?f . "\\footcite[][]{%l}")
         (?t . "\\textcite[]{%l}")
         (?p . "\\parencite[]{%l}")
         (?o . "\\citepr[]{%l}")
         (?n . "\\nocite{%l}")))
(setq reftex-cite-prompt-optional-args t)
---8<----------------------------------------------

At least this makes it possible to work with "\footcite", but I don't
know how to implement "\footcites"...

Also it would be great if AucTeX recognized that biblatex is used in
order to have an automatic BibTeX run on doing C-c -- but this is not
that important.

Thanks & regards,

Fred



_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: Sophisticated macro highlighting and biblatex support

by Ralf Angeli-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Frederik (2009-10-06) writes:

> I'm trying to get my macros highlighted.
> I managed to color the "\footcite" command of biblatex the correct way.
> What I did: M-x customize-group RET font-latex-keywords RET, then I
> chose "Font Latex Match Reference Keywords" and added "footcite".
>
> But I've problems to do this with "\footcites", as it provides
> sophisticated ways to enter bibliographic references.
> e.g. "\footcites[20]{author1}[some remarks on this, cf.][33]{author2}"
> Now just the part up to and including "{author1}" gets highlighted.
>
> User-defiened keyword classes don't provide a way to highlight
> references like this, do they? Because I only found the possibility to
> work with entries like "\command[...]{...}", "{\foo text}" and "\foo".
>
> Any hints?

If your AUCTeX version is recent enough you can specify the arguments to
fontify.

> Furthermore I wanted to know if biblatex gets integrated into RefTeX.

I doubt that biblatex will get integrated, but perhaps support for it.
This will happen faster if people interested in the functionality
contribute patches.

> I've put this into my .emacs:
> ---8<----------------------------------------------
> (setq reftex-cite-format
>        '((?\C-m . "\\cite[]{%l}")
> (?f . "\\footcite[][]{%l}")
>          (?t . "\\textcite[]{%l}")
>          (?p . "\\parencite[]{%l}")
>          (?o . "\\citepr[]{%l}")
>          (?n . "\\nocite{%l}")))
> (setq reftex-cite-prompt-optional-args t)
> ---8<----------------------------------------------
>
> At least this makes it possible to work with "\footcite", but I don't
> know how to implement "\footcites"...

You mean how to get prompted multiple times for the BibTeX label?  I
don't think this is possible at the moment.  One would probably have to
extend the implementation to handle mandatory arguments similar to
optional ones.

> Also it would be great if AucTeX recognized that biblatex is used in
> order to have an automatic BibTeX run on doing C-c -- but this is not
> that important.

Somebody would have to extend the respective sentinel function to
recognize the biblatex output.

--
Ralf


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: Sophisticated macro highlighting and biblatex support

by Frederik Fischbach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> If your AUCTeX version is recent enough you can specify the arguments to
> fontify.
Is this already implemented in the release or only in cvs version? Is
this mentioned in the documentation? I don't get it...


> I doubt that biblatex will get integrated, but perhaps support for it.
That's what I meant ;-)

Sadly, as I don't know any lisp, I cannot help in supporting this project...

Thanks,
Fred



_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: Re: Sophisticated macro highlighting and biblatex support

by Ralf Angeli-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Frederik (2009-10-08) writes:

>> If your AUCTeX version is recent enough you can specify the arguments to
>> fontify.
> Is this already implemented in the release or only in cvs version?

It's available in 11.85.  The customization buffer should look something
like this:

font-latex-match-reference-keywords: Hide Value
INS DEL List:
            Keyword:
            Format:
INS
   State: EDITED, shown value does not take effect until you set or save it.
   List of keywords and formats for reference face. Hide Rest  
[...]

The Format field is where you can define the sequence of arguments.

> Is
> this mentioned in the documentation?

Only in CVS.

--
Ralf


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: Sophisticated macro highlighting and biblatex support

by Frederik Fischbach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The Format field is where you can define the sequence of arguments.

Yeah, I already found this variable but I don't know how to fill the
Format field, i.e. how to specify the sequence of arguments, like

Format: [...][...]{...}[...][...]{...}

Thanks,
Fred



_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: Re: Sophisticated macro highlighting and biblatex support

by Ralf Angeli-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Frederik (2009-10-09) writes:

>> The Format field is where you can define the sequence of arguments.
>
> Yeah, I already found this variable but I don't know how to fill the
> Format field

Check the description in `C-h v font-latex-user-keyword-classes <RET>'.

--
Ralf


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: Sophisticated macro highlighting and biblatex support

by Frederik Fischbach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Check the description in `C-h v font-latex-user-keyword-classes <RET>'.
Great, thanks!

Fred



_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex