> On 14 Aug 2016, at 14:50, Adrian Manea <[email protected]> wrote:
> 
> Yes, of course (sorry for the delay):
> 
> Assume you start with a .bib file in the folder where you'll create your .tex 
> file. Assume the folder is called MyFolder
> 
> 1. Launch Terminal and write bbedit --maketags /path/to/MyFolder. This 
> creates a tags file in that folder (that is actually it, a file called 
> "tags", with no extension).
> 2. Launch BBEdit, go to Preferences > Languages > Custom Extension Mappings 
> (the lower part). Add bib to Suffix and TeX to Language.
> 3. Create your .tex file in BBEdit, then start writing. Make sure you have 
> enabled completions (Preferences > Editing > Show Text Completions > After a 
> delay in typing > set time). When inserting a citation, write \cite{ and the 
> first 2-3 letters of a citekey. Then it will show you completions from the 
> .bib (actually tags) file based on the characters you've written.
> 
> That's it. I hope I haven't missed anything, it sure works for me this way.

Just a few questions, probably mostly on ctags:

* Does this assume you have the .bib and the .tex file in the same directory? 
  
  Often the bib file will be kept in a central location, as it can be shared 
  by many documents. In that case the file-finding mechanisms of TeX can be 
  used to find the desired files. But ctags doesn’t use those, and I assume 
  bbedit doesn’t do that either. 

* I had to add 

  --langdef=bib
  --langmap=bib:.bib
  --regex-bib=/^@[A-Za-z]+{([^,]*)/\1/b,bib/

  to my ~/.ctags file, otherwise I just get a header without actual entries 
recorded in 
  a directory with only bib files. It would be good if this were a default. I’m 
not sure 
  how BBEdit uses ctags and where the defaults come from. There appears to be a 
default 
  setting for latex files. 

* The completions aren’t restricted to the keys (at least not for \ref{} 
calls). 
  Is this supposed to be the case? If the restriction is supposed to be there, 
  how can I make a connection between keys and macros?

Once I understand how this works I’ll update my tex integration scripts to 
include tags 
creation.

Kind regards,

Maarten

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to