Skip to content

Language Support ​

Some parts of RefTeX are language dependent. The default settings work well for English. If you are writing in a different language, the following hints may be useful:

  • The mechanism to derive a label from context includes the abbreviation of words and omission of unimportant words. These mechanisms may have to be changed for other languages. See the variables reftex-derive-label-parameters and reftex-abbrev-parameters.
  • Also, when a label is derived from context, RefTeX clears the context string from non-ASCII characters in order to make a label. Starting with LaTeX release 2019-10-01, non-ASCII characters are allowed in LaTeX’s \label/\ref mechanism. If you want to change RefTeX’s behavior and allow extended characters in labels, then take a look at the variables reftex-translate-to-ascii-function and reftex-label-illegal-re. The following example allows any letters and digits (among other characters) in the label definition:
    emacs-lisp
    (setq reftex-label-illegal-re "[^-[:alnum:]_+=:;,.]")
  • When a label is referenced, RefTeX looks at the word before point to guess which label type is required. These magic words are different in every language. For an example of how to add magic words, see Adding Magic Words.
  • RefTeX inserts “punctuation” for multiple references and for the author list in citations. Some of this may be language dependent. See the variables reftex-multiref-punctuation and reftex-cite-punctuation.