Syntax recognition for biblatex citation commands in TextMate
The
If you are using
Using TextEdit, copy the content of the 
LaTeX bundle that comes with TextMate will identify, and therefore colour, the syntax of citations commands passed to BibTeX, as long as they comply with the standard or natbib conventions; hence cite, citep, citet, footcite and other commands get appropriately coloured, as show below using the Cobalt syntax theme:
If you are using biblatex, you might want to get the autocite and textcite commands coloured too. The following edits should lead you there:
- Go to your Bundle Editor through the following menu selection:
Bundles → Bundle Editor → Edit Languages. - Start by duplicating your
LaTeXLanguage item, and rename the copied version to something different thanLaTeX copy, indicating that this copy reflects the originalLaTeXbundle. That will be your backup copy if something goes wrong with the rest of the editing. - To make sure your backup copy does not interfere with the new one, edit its
scopeNamevariable fromtext.tex.latextoNULL.
Using TextEdit, copy the content of the LateX Language item into a plain text document window, then search for meta.citation.latex. The code should start by reading:
name = 'meta.citation.latex';
begin = '(?x)
(
(\\) # Marker
(?:foot)?(?:full)?(?:no)?(?:short)? # Function Name
[cC]ite
(?:al)?(?:t|p|author|year(?:par)?|title)?[ANP]*
...
Append the Function Name line by adding (?:text)?(?:auto)? at the beginning of the list:
name = 'meta.citation.latex';
begin = '(?x)
(
(\\) # Marker
(?:text)?(?:auto)?(?:foot)?(?:full)?(?:no)?(?:short)? # Function Name
[cC]ite
(?:al)?(?:t|p|author|year(?:par)?|title)?[ANP]*
...
Copy-paste the text back into the Bundle Editor. Click the Testto see the front window document in TextMate show the new colouring for the
LaTeX bundle. Happy biblatex editing!

Sur le même sujet :
- A bibliographic workflow using CiteULike and BibDesk I am currently testing the following CiteULike + BibDesk workflow combination: CiteULike is a social bookmarking system oriented towards academic...
- Indispensable Applications: A Commentary This post comments Kieran Healy’s list [copy] of indispensable applications. I do not present my list as better, just...
- A Better Acronym Replacer for WordPress I use the now defunct Acronym Replacer by Joel Bennett of Huddled Masses. Since I do not need any text...


