* 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
* Re: ox-beamer.el tableofcontents, a suggestion
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
0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2016-03-02 13:42 UTC (permalink / raw)
To: Joseph Vidal-Rosset; +Cc: Liste-emacs-orgmode@gnu.org
On Wednesday, 2 Mar 2016 at 14:29, Joseph Vidal-Rosset wrote:
> 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.
I find it reasonably straightforward to simply add the following line to
my beamer org files:
#+latex_header: \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Topic}\tableofcontents[currentsection,hideothersubsections]\end{frame}}
so no need to play with the elisp code...
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.3-456-g164555
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ox-beamer.el tableofcontents, a suggestion
2016-03-02 13:42 ` Eric S Fraga
@ 2016-03-02 16:34 ` Joseph Vidal-Rosset
0 siblings, 0 replies; 3+ messages in thread
From: Joseph Vidal-Rosset @ 2016-03-02 16:34 UTC (permalink / raw)
To: Joseph Vidal-Rosset, Liste-emacs-orgmode@gnu.org, Eric Fraga
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
Dear Eric,
Many thanks for this more elegant solution that I had just tested, and it
works!
I add that
#+OPTIONS: toc:nil
is necessary to avoid a repetition of table of contents.
Thanks again !
Jo.
2016-03-02 14:42 GMT+01:00 Eric S Fraga <e.fraga@ucl.ac.uk>:
> On Wednesday, 2 Mar 2016 at 14:29, Joseph Vidal-Rosset wrote:
> > 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.
>
> I find it reasonably straightforward to simply add the following line to
> my beamer org files:
>
> #+latex_header:
> \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Topic}\tableofcontents[currentsection,hideothersubsections]\end{frame}}
>
> so no need to play with the elisp code...
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.3-456-g164555
>
[-- Attachment #2: Type: text/html, Size: 1401 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.