Re: [O] ox-beamer.el tableofcontents, a suggestion

2016-03-02 Thread Joseph Vidal-Rosset
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 :

> 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}\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
>


Re: [O] ox-beamer.el tableofcontents, a suggestion

2016-03-02 Thread Eric S Fraga
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}\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



[O] ox-beamer.el tableofcontents, a suggestion

2016-03-02 Thread Joseph Vidal-Rosset
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.