[Tex/LaTex] generating bibliography items when using biblatex with WinEdt 6.0 and MikTeX2.9

biblatexwinedt

I just started using the biblatex package, it seems to have nice features for a full control over your citations and bibliography.

However something I miss from using the native BibTeX with WinEdt and MikTeX, is that after execution of the BibTex command, it would generate automatically my bibliography items so that could access them by citation key in the tree view or the gather view of the WinEdt GUI. It would also, whenever I'd type the \cite{} command, come up with a popup menu listing those items.

Is there any chance I could get this feature back with the biblatex package?

Best Answer

Bibliography items should appear in the project tree if you use \bibliography. To get this feature working with \addbibresource, you need to add a WinEdt input directive. Open up the options interface (Options... > Options Interface) and go to Navigation > Input Directives. This will open the Input.ini script. After the \bibliography directive, add this new entry:

  DIRECTIVE="\addbibresource??{??}"
    EXTENSION=".;.bib"
    PATH="%P;%p;%@('BIBINPUTS');"

Save and reload the script. Once you rebuild your project tree, the bibliography items should appear.

A menu containing the items should popup when you add braces to \cite or any natbib citation command. With biblatex you could simply use the package option setting natbib=true. Otherwise this feature can be extended to biblatex citation commands by further modifying WinEdt option scripts. From the options interface go to Delimiters... > Active Strings. After the \cite?{ string in ActiveStrings.ini add the following.

STRING="\?cite?{}"
  ENABLED=1
  FILTER="TeX"
  ACTION="[Exe('%b\Macros\Active Strings\Cite.edt');]"
  DBL_CLICK_ENABLED=1
  DBL_CLICK_FILTER="TeX"
  DBL_CLICK_ACTION="[IfNum(%c,%x,'<','SwapCaretSelect;');CharRight(2);Exe('%b\Macros\Active Strings\Cite.edt');]"

STRING="\?cite?{?},,"
  ENABLED=1
  FILTER="TeX"
  ACTION="[Exe('%b\Macros\Active Strings\Cite-cont.edt');]"

STRING="\?cite?{?,,"
  ENABLED=0
  FILTER="TeX"
  ACTION="[Exe('%b\Macros\Active Strings\Cite-sel.edt');]"

STRING="\?cite?{?}"
  FILTER="TeX"
  ACTION="[GDIShow;GDISetPage('Bib','%?');]"
  DBL_CLICK_ENABLED=1
  DBL_CLICK_FILTER="TeX"
  DBL_CLICK_ACTION="[IfNum(%c,%x,'<','SwapCaretSelect;');MatchDelimiter(1,1,1);CharLeft;GDIShow;GDISetPage('Bib','%?');]"

STRING="\?cite?{"
  FILTER="TeX"
  ACTION="[Relax;]"
  DBL_CLICK_ENABLED=1
  DBL_CLICK_FILTER="TeX"
  DBL_CLICK_ACTION="[IfNum(%c,%x,'<','SwapCaretSelect;');CharRight;GDIShow;GDISetPage('Bib');]"

From the options interface, go to Navigation > Gather. In Gather.ini add alternatives for the \cite{?} and \cite[?]{?} items. For example:

  ITEM="\cite{?}"
    ALT="\nocite?{?}"
    // NatBib extension
    ALT="\citep{?}"
    ALT="\citet{?}"
    ALT="\citealp{?}"
    ALT="\citealt{?}"
    ALT="\citefullauthor{?}"
    ALT="\citeauthor{?}"
    ALT="\citeyear{?}"
    // biblatex extension
    ALT="\autocite?{?}"
    ALT="\Autocite?{?}"
    ALT="\textcite?{?}"
    ALT="\Textcite?{?}"
    ...

Getting the popup feature working with multi-citation commands that generate qualified citation lists (e.g. \cites[<prenote1>][<postnote1>]{key1}[<prenote2>][<postnote2>]{key2}), will probably require a new active string macro. I ditched Windows awhile back so I never got around to writing any myself. The existing macros Cite.edt, Cite-cont.edt and Cite-sel.edt provide some examples. These can be found under Advanced Configuration > Active Strings from the options interface.