auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] How to make biber the default?


From: Marcus Frings
Subject: [AUCTeX] How to make biber the default?
Date: Tue, 11 Jan 2011 13:33:02 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Hello,

yesterday I switched from BibTeX to biber which I integrated into AUCTeX
according to the manual:

--8<---------------cut here---------------start------------->8---
(eval-after-load "tex"
  '(add-to-list 'TeX-command-list
                '("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber") t))

(defun TeX-run-Biber (name command file)
  "Create a process for NAME using COMMAND to format FILE with Biber." 
  (let ((process (TeX-run-command name command file)))
    (setq TeX-sentinel-function 'TeX-Biber-sentinel)
    (if TeX-process-asynchronous
        process
      (TeX-synchronous-sentinel name file process))))

(defun TeX-Biber-sentinel (process name)
  "Cleanup TeX output buffer after running Biber."
  (goto-char (point-max))
  (cond
   ;; Check whether Biber reports any warnings or errors.
   ((re-search-backward (concat
                         "^(There \\(?:was\\|were\\) \\([0-9]+\\) "
                         "\\(warnings?\\|error messages?\\))") nil t)
    ;; Tell the user their number so that she sees whether the
    ;; situation is getting better or worse.
    (message (concat "Biber finished with %s %s. "
                     "Type `%s' to display output.")
             (match-string 1) (match-string 2)
             (substitute-command-keys
              "\\\\[TeX-recenter-output-buffer]")))
   (t
    (message (concat "Biber finished successfully. "
                     "Run LaTeX again to get citations right."))))
  (setq TeX-command-next TeX-command-default))
--8<---------------cut here---------------end--------------->8---

If I press "C-c C-c bib[TAB]" everything works fine and I can choose
between biber and BibTeX. However, is it possible that AUCTeX
automatically detects that biber should be used instead of BibTeX and
offers it as default command after C-c C-c, especially when its use is
indicated and forced by explicitly enabling biber as backend in the
document via "\usepackage[backend=biber]{biblatex}"?

Unfortunately C-c C-c always suggests BiBTeX to run next and I always
have to manually enter "biber" to override the BiBTex default.

As in my last posting I use Debian's AUCTeX 11.86. :-)

Gruß,
Marcus
-- 
Rafael: "Wieviele Welten müssen noch brennen, bevor Du genug hast, Gabriel?"
Gabriel: "Nur noch eine. Diese. Ich bin nicht gierig."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]