In a document I was writing recently I wanted to include an image
after the title but *before* the table of contents.  Since the
"\\tableofcontents" is part of the "muse-latex-header" this was a bit
tricky. 

To produce a reusable solution I nicked and adapted the code from the
"html" style as follows:

> (defun muse-my-latex-finalize-buffer ()
>  (goto-char (point-min))
>  (muse-latex-fixup-dquotes)
>  (when muse-publish-generate-contents
>    (goto-char (car muse-publish-generate-contents))
>    (muse-insert-markup "\\tableofcontents")))

To use it one also has to include it in a derived style:

> (muse-derive-style "my-latex" "latex"
>                  :after     'muse-my-latex-finalize-buffer)

Of course, I also removed the static "\\tableofcontents" from my
"muse-latex-header".

Cheers,
Mathias


_______________________________________________
Muse-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/muse-el-discuss

Reply via email to