12 votes
Accepted

how to cite using emacs+auctex+reftex

Like for any other macro you want to insert in AUCTeX, you should use C-c RET cite RET (or C-c C-m cite RET; for more information about autocompletion in AUCTeX see the quick start or Completion ...
giordano's user avatar
  • 8,486
8 votes

how to cite using emacs+auctex+reftex

The command you need here is reftex-citation, which is bound to C-c [ by default. There is more info in the manual Alternatively, you can use helm-bibtex in place of reftex. Helm-bibtex is more ...
Tyler's user avatar
  • 2,541
6 votes
Accepted

automatic formatting of reference label

This behavior is controlled by the variable reftex-label-alist-builtin in reftex-vars.el, you find an entry there saying: (LaTeX "LaTeX default environments" ;; ... ("equation" ?e "eq:" ...
Arash Esbati's user avatar
  • 7,426
4 votes

Making Reftex insert `~\cite` instead of `\cite`

You have to set the variable reftex-cite-format via customize or in your init file. In your init file, this should do the trick: (setq reftex-cite-format '((?\C-m . "~\\cite{%l}") (?t ...
Arash Esbati's user avatar
  • 7,426
4 votes
Accepted

AUCTeX does not recognize cleveref labels

Within AUCTeX, latex.el provides support for vanilla LaTeX. Additions by packages are catered via AUCTeX style files. In this case, this is a shortcoming in cleveref.el which didn't have support for ...
Arash Esbati's user avatar
  • 7,426
4 votes

Emacs: Workflow to move BibTeX entries from global bibliography to local bibliography

RefTeX provides a function exactly for this purpose called reftex-create-bibtex-file. From the manual: 4.6 Database Subsets RefTeX offers two ways to create a new BibTeX database file. ...
Arash Esbati's user avatar
  • 7,426
3 votes

Adding new label/reference command pairs to RefTeX

Since you're using AUCTeX as well, I suggest you put your TeX macros inside a package, e.g. pflabel.sty, which can look like this: \ProvidesPackage{pflabel} [2019/09/08 v1.0 Support for pflabel's] \...
Arash Esbati's user avatar
  • 7,426
3 votes

RefTeX and enumitem

RefTeX comes with a variable called reftex-label-ignored-macros-and-environments. The documentation string says: reftex-label-ignored-macros-and-environments is a variable defined in reftex-vars....
Arash Esbati's user avatar
  • 7,426
3 votes
Accepted

Problems with referencing in Emacs/RefTeX

The \label should be placed after the \caption, for it's the latter which generates the number \label refers to (see Why does an environment's label have to appear after the caption?). As a matter of ...
gusbrs's user avatar
  • 13.8k
3 votes
Accepted

biblatex-chicago does not run biber automatically in Emacs

The issue here is that AUCTeX does not have a style file for biblatex-chicago. You can roll your own one which simply loads biblatex.el like this: ;;; biblatex-chicago.el --- AUCTeX style for `...
Arash Esbati's user avatar
  • 7,426
3 votes

Reftex and AMSRefs

I have just written a package that adds amsrefs support to reftex. It works for me but I would be grateful to have some more testers. Find it here: https://github.com/franburstall/amsreftex
Fran Burstall's user avatar
3 votes

Indexing support similar to RefTeX

Well, indexing is a very critical thing. For an excellent index is very often an person hired to create the index, because s/he can do it much more better than a program can. I do not know an editor ...
Mensch's user avatar
  • 65.4k
3 votes

RefTeX won't find my .bib file in local library tree

Sometimes the issue may just be that the file has not been parsed. This has happened to me a few times eventhough it should've been parsed when opened (especially when I have multiple latex projects ...
Nidish Narayanaa's user avatar
3 votes

show list of slides in AucTeX

The key binding C-c = is provided by RefTeX and not by AUCTeX. C-h k C-c = returns: C-c = runs the command reftex-toc (found in reftex-mode-map), which is an autoloaded interactive compiled Lisp ...
Arash Esbati's user avatar
  • 7,426
3 votes
Accepted

RefTeX not finding `label={name}` in custom environment

The behavior of reftex-label-regexps was changed with Emacs version 27: RefTeX now looks for the label key in the optional argument of given environments; others are ignored. The docstring says: ...
Arash Esbati's user avatar
  • 7,426
2 votes
Accepted

Reftex cross-reference files in different directories

Found a solution. The cause of the problem is TeX-master is not specified correctly. TeX-master should be set as the plain absolute path like "path/to/main.tex", or in the case of a git repository, ...
Yi Liu's user avatar
  • 31
2 votes
Accepted

How may one set the equation counter in AUCTeX?

If I'm understanding your question correctly, it seems to be more about getting RefTeX to see all the files associated with the project and treat them as one big project instead of disjointed files. ...
Ricardo's user avatar
  • 3,186
2 votes

I want auto labeling with auctex+reftex

You can tell Emacs to do what you want by making additions to the variables LaTeX-label-alist and reftex-label-alist. I don't recommend putting these changes in your .emacs, I would add them as local ...
Arash Esbati's user avatar
  • 7,426
2 votes

AUCTeX+RefTeX compile bibliography without explicitly providing bib file path

RefTeX manual says: User Option: reftex-default-bibliography List of BibTeX database files which should be used if none are specified. When reftex-citation is called from a document with ...
Arash Esbati's user avatar
  • 7,426
2 votes
Accepted

Emacs, AUCTeX, RefTeX and biblatex's multicite commands

You have many questions here so I try to stay brief. I presume that you have these lines in your init file: (add-hook 'LaTeX-mode-hook #'turn-on-reftex) (setq reftex-plug-into-AUCTeX t) 1 - What ...
Arash Esbati's user avatar
  • 7,426
2 votes
Accepted

How to cross-reference to a specific label with RefTeX

RefTeX stores regexps matching \label definitions in reftex-label-regexps; you have to customize it in order to match label without a \. You can make the \ optional by putting it inside a shy group. ...
Arash Esbati's user avatar
  • 7,426
2 votes
Accepted

AUCTeX/RefTeX: How do I handle labels that use `label={name}` syntax instead of `\label{name}`?

AUCTeX provides a function called LaTeX-env-label-as-keyval which does the job: It inserts a key-value label inside an optional argument of an environment. In case of theorems library from tcolorbox, ...
Arash Esbati's user avatar
  • 7,426
2 votes
Accepted

RefTeX and enumitem

It turns out that the variable I needed was reftex-label-regexps, which specifies the regexps that RefTeX considers labeling commands. I've now set it to only look for labeling commands of the form \...
Janet's user avatar
  • 421
2 votes
Accepted

Reftex and \include*{sections/sec} - how to get it to work?

RefTeX generates a regexp from the entries in reftex-include-file-commands and then parses the document. * has a special meaning in regexp; in order to match a literal asterisk, you have to quote it. ...
Arash Esbati's user avatar
  • 7,426
2 votes
Accepted

How to modify/customise reftex-cite-format

If you customize several of the entries, you may want to define a variable, say my-reftex-cite-format using reftex-cite-format-builtin natbib entry as starting point. And then set (setq reftex-cite-...
gusbrs's user avatar
  • 13.8k
2 votes
Accepted

auctex+reftex doesn't insert labels for tcbcolorbox environments

The AUCTeX support file tcolorboxlib-theorems.el is now officially part of AUCTeX distribution, but the file has changed a little since its first incarnation. I think the easiest solution is that you ...
Arash Esbati's user avatar
  • 7,426
1 vote

Emacs RefTeX: how to customize C-c [ or M-x reftex-citation

RefTeX is loading support for natbib macros; this is the reason why you are queried for the citation macro. I suspect you're also using AUCTeX in addition to RefTeX and you're loading natbib package ...
Arash Esbati's user avatar
  • 7,426
1 vote
Accepted

How to force RefTeX to parse the document for a specific word

RefTeX provides a variable for this purpose called reftex-label-regexps. You have to customize this variable with the appropriate regular expression which can look like this: <%[[:space:]]*fig("\(...
Arash Esbati's user avatar
  • 7,426
1 vote

AUCTeX/RefTeX with import package in emacs, known problem from 2013 but is there a fix now?

I suspect the editor recognition of file names used for \subimport is hopeless, because the leading portion of the path is implicit. Some different input syntax for \import and \includefrom might ...
Donald Arseneau's user avatar
1 vote

RefTeX: How to modify the "select a reference format" menu?

The following works for me, though it may be imperfect as I'm not very comfortable with RefTeX customization: (defun my-add-to-alist (alist-var key value &optional append) "Add an element to an ...
frougon's user avatar
  • 24.3k

Only top scored, non community-wiki answers of a minimum length are eligible