Closed HumHongeKamyaab closed 3 years ago
Please see #74.
Thanks @alphapapa for pointing in right direction.
Following snippet from https://github.com/alphapapa/outshine/issues/63#issuecomment-485134720, worked for me.
(add-hook 'LaTeX-mode-hook #'(lambda ()
(outshine-mode 1)
(setq outline-level #'LaTeX-outline-level)
(setq outline-regexp (LaTeX-outline-regexp t))
(setq outline-heading-alist
(mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 x)))
LaTeX-section-list))))
If you need folding for \begin
also, you can customize LaTeX-section-list
as
(setq LaTeX-section-list '(
("part" 0)
("chapter" 1)
("section" 2)
("subsection" 3)
("subsubsection" 4)
("paragraph" 5)
("subparagraph" 6)
("begin" 7)
)
)
where ("begin" 7)
is added in a list in addition to default ones.
I want to use outshine minor mode in latex mode.
When I use
M-x outshine-cycle
on any\section{foo}
, I dont get folding of section like in org-mode, but instead get following message.I guess I am using outshine-mode in wrong way.