emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs as a word processor


From: Kévin Le Gouguec
Subject: Re: Emacs as a word processor
Date: Wed, 23 Dec 2020 18:09:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Kangas <stefankangas@gmail.com> writes:

>> One area that could benefit from some improvements is reference
>> management. Org offers footnotes, which are not quite the same as
>> proper first-class references or citations.
>
> Indeed, this is one of the worst parts of Org-mode now.  But I have a
> hard time even conceptually dreaming up what an ideal UI would look
> like here.

In terms of UI, I find RefTeX's selection buffers pretty ergonomic.

For intra-document references:
- C-c ) RET
- s for subsections, t for tables, etc.
- A pop-up buffer shows an outline of all matching labels in the
  document; the user can pick one with n/p and RET.

For citations:
- C-c [
- type in a regular expression
- A pop-up buffer shows the list of all BibTeX entries where a field
  matches the regexp; the user can pick one with n/p and RET.

Cf. [1] for a sample document and instructions to try out the UI.

RefTeX's implementation is probably heavily tailored to BibTeX
bibliographies; FWIW I think it'd make sense to reuse its "presentation
layer", or at least take inspiration from it for a new UI.


[1] Install AUCTeX from GNU ELPA, then evaluate the following:

#+begin_src elisp
(put 'TeX-auto-save 'safe-local-variable 'booleanp)
(put 'TeX-parse-self 'safe-local-variable 'booleanp)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
#+end_src

Save the attachments in $SOME_DIRECTORY; add this to
$SOME_DIRECTORY/.dir-locals.el:

#+begin_src elisp
((latex-mode
  . ((TeX-auto-save . t)
     (TeX-parse-self . t)))
 (bibtex-mode
  . ((TeX-auto-save . t)
     (TeX-parse-self . t))))
#+end_src

Open the .tex attachment: C-c ) RET should allow you to pick any label
defined inside the file; C-c [ should let you pick any citation defined
in the .bib attachment.

Attachment: example.tex
Description: Text Data

Attachment: biblio.bib
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]