diff --git a/bibtex-completion.el b/bibtex-completion.el index 7030d76..3732c34 100644 --- a/bibtex-completion.el +++ b/bibtex-completion.el @@ -681,27 +681,28 @@ Also do some preprocessing of the entries. If HT-STRINGS is provided it is assumed to be a hash table." (goto-char (point-min)) - (cl-loop - with fields = (append '("title" "crossref") - (-map (lambda (it) (if (symbolp it) (symbol-name it) it)) - bibtex-completion-additional-search-fields)) - for entry-type = (parsebib-find-next-item) - while entry-type - unless (member-ignore-case entry-type '("preamble" "string" "comment")) - collect (let* ((entry (substring-no-properties - (parsebib-read-entry entry-type (point) ht-strings nil - bibtex-completion-replace-tex))) - (fields (append - (list (if (assoc-string "author" entry 'case-fold) - "author" - "editor") - (if (assoc-string "date" entry 'case-fold) - "date" - "year")) - fields))) - (-map (lambda (it) - (cons (downcase (car it)) (cdr it))) - (bibtex-completion-prepare-entry entry fields))))) + (cl-letf (((symbol-function 'parsebib--convert-tex-italics) (lambda (str) str)) + ((symbol-function 'parsebib--convert-tex-bold) (lambda (str) str))) + (cl-loop + with fields = (append '("title" "crossref") + (-map (lambda (it) (if (symbolp it) (symbol-name it) it)) + bibtex-completion-additional-search-fields)) + for entry-type = (parsebib-find-next-item) + while entry-type + unless (member-ignore-case entry-type '("preamble" "string" "comment")) + collect (let* ((entry (parsebib-read-entry entry-type (point) ht-strings nil + bibtex-completion-replace-tex)) + (fields (append + (list (if (assoc-string "author" entry 'case-fold) + "author" + "editor") + (if (assoc-string "date" entry 'case-fold) + "date" + "year")) + fields))) + (-map (lambda (it) + (cons (downcase (car it)) (cdr it))) + (bibtex-completion-prepare-entry entry fields)))))) (defun bibtex-completion-get-entry (entry-key) "Given a BibTeX key this function scans all bibliographies listed in `bibtex-completion-bibliography' and returns an alist of the record with that key.