emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ox-beamer.el tableofcontents, a suggestion
@ 2016-03-02 13:29 Joseph Vidal-Rosset
  2016-03-02 13:42 ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Vidal-Rosset @ 2016-03-02 13:29 UTC (permalink / raw)
  To: Liste-emacs-orgmode@gnu.org, Carsten Dominik, Nicolas Goaziou,
	John Kitchin, John Kitchin

[-- Attachment #1: Type: text/plain, Size: 1920 bytes --]

Hello,


With beamer presentation it is often useful to put this latex code just
after \maketitle:

% outline
\AtBeginSection[]
{
 \begin{frame}
  \frametitle{}
  \small
  \tableofcontents[currentsection,hideothersubsections]
  \normalsize
 \end{frame}
}

the interest is reminding the outline to audience after each begin of a new
section.

In org-mode it is possible to export this code if the following lines of
code of ox-beamer.el  :
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 11. Table of contents.
     (let ((depth (plist-get info :with-toc)))
       (when depth
     (concat
      (format "\\begin{frame}%s{%s}\n"
          (org-beamer--normalize-argument
           org-beamer-outline-frame-options 'option)
          org-beamer-outline-frame-title)
      (when (wholenump depth)
        (format "\\setcounter{tocdepth}{%d}\n" depth))
      "\\tableofcontents\n"
      "\\end{frame}\n\n")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

are replaced by:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; 11. Table of contents.
     (let ((depth (plist-get info :with-toc)))
       (when depth
     (concat
      (format
           "\\AtBeginSection\[\]\{
       \\begin{frame}\n
        \\small\n"
          (org-beamer--normalize-argument
           org-beamer-outline-frame-options 'option)
          org-beamer-outline-frame-title)
      (when (wholenump depth)
        (format "\\setcounter{tocdepth}{%d}\n" depth))
      "\\tableofcontents\[currentsection,hideothersubsections\]\n"
      "\\normalsize\n"
      "\\end{frame}\n
}\n\n")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

it works in my setup.

Of course it would be better to add this function as new option and to
avoid this change of code. I do not know how to do.

At least it could be useful someone else.

Best wishes,

Jo.

[-- Attachment #2: Type: text/html, Size: 2550 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-02 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02 13:29 ox-beamer.el tableofcontents, a suggestion Joseph Vidal-Rosset
2016-03-02 13:42 ` Eric S Fraga
2016-03-02 16:34   ` Joseph Vidal-Rosset

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).