From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: ox-beamer.el tableofcontents, a suggestion Date: Wed, 2 Mar 2016 14:29:33 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bb03d4e86ff1f052d10e044 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab6qh-0001F0-Uz for emacs-orgmode@gnu.org; Wed, 02 Mar 2016 08:29:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ab6qg-00030j-Te for emacs-orgmode@gnu.org; Wed, 02 Mar 2016 08:29:55 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:36097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab6qg-00030a-If for emacs-orgmode@gnu.org; Wed, 02 Mar 2016 08:29:54 -0500 Received: by mail-wm0-x233.google.com with SMTP id n186so85667951wmn.1 for ; Wed, 02 Mar 2016 05:29:54 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Liste-emacs-orgmode@gnu.org" , Carsten Dominik , Nicolas Goaziou , John Kitchin , John Kitchin --047d7bb03d4e86ff1f052d10e044 Content-Type: text/plain; charset=UTF-8 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. --047d7bb03d4e86ff1f052d10e044 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,


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

% outline
\AtBeginSection[]
{
=C2=A0\b= egin{frame}
=C2=A0 \frametitle{}
=C2=A0 \small
=C2=A0 \tableofcont= ents[currentsection,hideothersubsections]
=C2=A0 \normalsize
=C2=A0\e= nd{frame}
}

the interest is reminding the outline to audien= ce after each begin of a new section.

In org-mode it is possi= ble to export this code if the following lines of=C2=A0 code of ox-beamer.e= l=C2=A0 :
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<= br>;; 11. Table of contents.
=C2=A0=C2=A0=C2=A0=C2=A0 (let ((depth (plis= t-get info :with-toc)))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (when depth=
=C2=A0=C2=A0=C2=A0 =C2=A0(concat
=C2=A0=C2=A0=C2=A0 =C2=A0 (format &= quot;\\begin{frame}%s{%s}\n"
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 = =C2=A0 (org-beamer--normalize-argument
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0 org-beamer-outline-frame-options 'option)
=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 org-beamer-outline-frame-title)
= =C2=A0=C2=A0=C2=A0 =C2=A0 (when (wholenump depth)
=C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 (format "\\setcounter{tocdepth}{%d}\n" depth))=C2=A0=C2=A0=C2=A0 =C2=A0 "\\tableofcontents\n"
=C2=A0=C2=A0= =C2=A0 =C2=A0 "\\end{frame}\n\n")))
;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;

are replaced by:

;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
=C2=A0= =C2=A0=C2=A0 ;; 11. Table of contents.
=C2=A0=C2=A0=C2=A0=C2=A0 (let ((d= epth (plist-get info :with-toc)))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (= when depth
=C2=A0=C2=A0=C2=A0 =C2=A0(concat
=C2=A0=C2=A0=C2=A0 =C2=A0= (format
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &q= uot;\\AtBeginSection\[\]\{
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 \\begin{frame= }\n
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \\small\n"
=C2=A0=C2= =A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 (org-beamer--normalize-argument
=C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 org-beamer-outline-frame-op= tions 'option)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 org-beam= er-outline-frame-title)
=C2=A0=C2=A0=C2=A0 =C2=A0 (when (wholenump depth= )
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (format "\\setcounter{tocde= pth}{%d}\n" depth))
=C2=A0=C2=A0=C2=A0 =C2=A0 "\\tableofconten= ts\[currentsection,hideothersubsections\]\n"
=C2=A0=C2=A0=C2=A0 =C2= =A0 "\\normalsize\n"
=C2=A0=C2=A0=C2=A0 =C2=A0 "\\end{fra= me}\n
}\n\n")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

it works in my s= etup.

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

At least it could be useful someone else.

Best wishes,
<= br>
Jo.



--047d7bb03d4e86ff1f052d10e044--