Skip to content

Commit

Permalink
perf(latex): don't make reftex rescan
Browse files Browse the repository at this point in the history
Documents this in the README.

Also includes a couple of cosmetic changes.
  • Loading branch information
aikrahguzar authored Jan 13, 2025
1 parent 6f2c61e commit ce5e964
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 8 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,14 @@ If a bib file changes, the cache will automatically update the next time you run
Note that cached data preformatted completion candidates are independently tracked by file.
So, for example, if you have one very large bibliography file that changes a lot, you might consider splitting into one large file that is more stable, and one-or-more smaller ones that change more frequently.

*** Reftex and local bibliographic files in LaTeX

Citar relies on the builtin library reftex to find the bibliographic files included in a LaTeX document.
Reftex scan the LaTeX document to find these files and caches them.
If you find that Citar isn't picking up bibliographic entries in the included files it is most likely due to the fact that reftex needs to do a rescan.
You can use ~reftex-parse-all~ or ~reftex-parse-one~ to do such a scan interactively.
This should be only rarely needed.

** Notes

Citar offers configurable note-taking and access integration.
Expand Down
8 changes: 3 additions & 5 deletions citar-latex.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

(require 'citar)
(require 'tex nil t)
(require 'reftex-parse)
(require 'reftex-cite)

(defvar TeX-esc)
Expand All @@ -33,7 +32,8 @@
"citeauthor*" "Citeauthor*" "citetitle" "citetitle*" "citeyear"
"citeyear*" "citedate" "citedate*" "citeurl" "fullcite"
"footfullcite" "notecite" "Notecite" "pnotecite" "Pnotecite"
"fnotecite") . (["Prenote"] ["Postnote"] t))
"fnotecite")
. (["Prenote"] ["Postnote"] t))
(("nocite" "supercite") . nil))
"Citation commands and their argument specs.
Expand Down Expand Up @@ -70,9 +70,7 @@ entry when it is enabled."
;;;###autoload
(defun citar-latex-local-bib-files ()
"Local bibliographic for latex retrieved using reftex."
(ignore-errors
(reftex-access-scan-info t)
(copy-sequence (reftex-get-bibfile-list))))
(ignore-errors (copy-sequence (reftex-get-bibfile-list))))

;;;###autoload
(defun citar-latex-key-at-point ()
Expand Down

0 comments on commit ce5e964

Please sign in to comment.