GNU bug report logs -
#62278
28.2; Outline in DocTeX mode
Previous Next
Reported by: Jan Braun <Jan.Braun <at> klein-gallien.org>
Date: Sun, 19 Mar 2023 18:15:02 UTC
Severity: normal
Tags: notabug
Found in version 28.2
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 62278 <at> debbugs.gnu.org (full text, mbox):
Jan Braun <Jan.Braun <at> klein-gallien.org> writes:
> When I start it as 'emacs -Q <file>.dtx‘ it opens the requested file in
> DocTeX mode.
>
> Next I load 'outline-minor-mode‘. If I than run the command
> 'outline-hide-body‘ I’d expect to be presented with the various
> \section, \subsection, … commands. But this does not happen.
>
> Instead the first meta comment, the documentclass command and the
> document environment are displayed, see the text below. Any other
> sectioning command is hidden.
I'd say this is by design: `latex-outline-regexp' defined in tex-mode.el
doesn't cater for headings which start with '%', but in doctex mode,
almost all of them do so. So you have to tell doctex about it with this
piece of code (which I haven't tested) in your init file:
(add-hook 'doctex-mode-hook
(lambda ()
(setq-local latex-outline-regexp
(concat "[% \t]*" "\\\\"
(regexp-opt
(append latex-metasection-list
(mapcar #'car latex-section-alist))
t))))
(setq-local outline-regexp latex-outline-regexp))
Best, Arash
This bug report was last modified 2 years and 134 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.