\input
, \include
, and \section
(etc.) statements
have to be first on a line (except for white space).
reftex-enable-partial-scans
), the section
numbers in the table of contents may eventually become wrong. A full
scan will fix this.
reftex-label-alist
are
global and apply to all documents. If you need to make definitions
local to a document, because they would interfere with settings in other
documents, you should use AUCTeX and set up style files with calls to
reftex-add-label-environments
, reftex-set-cite-format
,
reftex-add-index-macros
, and reftex-add-section-levels
.
Settings made with these functions remain local to the current
document. See AUCTeX.
reftex-toc
may have problems to jump to an affected
section heading. There are three possible ways to deal with
this:
(setq reftex-keep-temporary-buffers t)
(setq reftex-initialize-temporary-buffers t)
reftex-initialize-temporary-buffers
to a list of hook
functions doing a minimal initialization.
See also the variable reftex-refontify-context
.
\begin
macro
to specify a label. E.g., Lamport’s pf.sty uses both
\step{label}{claim} and \begin{step+}{label} claim \end{step+}
We need to trick RefTeX into swallowing this:
;; Configuration for Lamport's pf.sty (setq reftex-label-alist '(("\\step{*}{}" ?p "st:" "~\\stepref{%s}" 2 ("Step" "St.")) ("\\begin{step+}{*}" ?p "st:" "~\\stepref{%s}" 1000)))
The first line is just a normal configuration for a macro. For the
step+
environment we actually tell RefTeX to look for the
macro ‘\begin{step+}’ and interpret the first
argument (which really is a second argument to the macro \begin
)
as a label of type ?p
. Argument count for this macro starts only
after the ‘{step+}’, also when specifying how to get
context.