* customizing org-beamer--format-frame @ 2014-04-25 12:24 Seb Frank 2014-04-26 13:05 ` Eric S Fraga 0 siblings, 1 reply; 5+ messages in thread From: Seb Frank @ 2014-04-25 12:24 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 609 bytes --] Hi there, I have customized org-beamer--format-frame to change the way headlines are treated (as I want a separate slide with only the headline in the center and plain frames not showing headlines after that). The way I currently do this is by redefining the function itself (using "defun org-beamer--format-frame"). This works, but is there any way to make this more modular, i.e. tell org-mode somewhere to use a different function (e.g., my-org-beamer--format-frame) to format a frame, so that it's easy to switch back and forth between different ones, as well as to revert to the default? Thanks, Seb [-- Attachment #2: Type: text/html, Size: 708 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: customizing org-beamer--format-frame 2014-04-25 12:24 customizing org-beamer--format-frame Seb Frank @ 2014-04-26 13:05 ` Eric S Fraga 2014-04-27 14:14 ` Seb Frank 0 siblings, 1 reply; 5+ messages in thread From: Eric S Fraga @ 2014-04-26 13:05 UTC (permalink / raw) To: Seb Frank; +Cc: emacs-orgmode On Friday, 25 Apr 2014 at 08:24, Seb Frank wrote: > Hi there, > > I have customized org-beamer--format-frame to change the way headlines are > treated (as I want a separate slide with only the headline in the center > and plain frames not showing headlines after that). The way I currently do > this is by redefining the function itself (using "defun > org-beamer--format-frame"). This works, but is there any way to make this > more modular, i.e. tell org-mode somewhere to use a different function > (e.g., my-org-beamer--format-frame) to format a frame, so that it's easy to > switch back and forth between different ones, as well as to revert to the > default? > > Thanks, > Seb As you haven't explained why you want this, it's difficult to understand the actual use case. So, guessing at your intent, I wonder whether you have thought about making use of section headings as well as frame headings to accomplish what you want? Assuming you are using org v8.x and not something older, if you set option H:2, second level headings define frames and top level headings define sections. You can then have section headings appear as a separate slide using code such as this: #+begin_src org ,#+latex_header: \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Topic}\tableofcontents[currentsection]\end{frame}} #+end_src In this case, any time a section heading is encountered (i.e. top level org heading), you'll get a slide with a table of contents with that heading emphasised. You can obviously do something different which more closely matches what you want. If you don't want individual frames to have headings, simply don't put any text in the headline for that frame. This way, you do not need to manipulate how beamer displays frames. An example set of slides with two sections and two out of four slides having no headline would look like this: #+begin_src org ,#+options: H:2 ,#+latex_header: \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Topic}\tableofcontents[currentsection]\end{frame}} ,* Introduction ,** First slide some text on the first slide ,** some text on the second slide which has no heading ,* Results ,** some third slide text, also on a slide with no heading ,** conclusions This was a great talk. #+end_src HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-1027-g4c0a29 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: customizing org-beamer--format-frame 2014-04-26 13:05 ` Eric S Fraga @ 2014-04-27 14:14 ` Seb Frank 2014-04-27 16:42 ` Eric S Fraga 0 siblings, 1 reply; 5+ messages in thread From: Seb Frank @ 2014-04-27 14:14 UTC (permalink / raw) To: Seb Frank, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 3335 bytes --] Thanks so much! I was trying to get a bit more flexibility with that separate slide (e.g., have the title in the centre of the page and no toc). So I took inspiration from your great solution and defined a latex macro #+begin_src latex \newcommand{\singleslide}[1]{{% \usebeamerfont{title} \begin{frame}[plain,c] \begin{center} \begin{minipage}[h]{.75\textwidth} \centering \textcolor{title}{\Large#1} \end{minipage} \end{center} \end{frame} }} #+end_src and a latex class #+begin_src emacs-lisp (add-to-list 'org-latex-classes '("my-org-beamer" "\\documentclass{beamer} ("\\singleside{%s}" . "\\singleslide{%s}"))))) #+end_src which did the job. Best, Seb On Sat, Apr 26, 2014 at 9:05 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > On Friday, 25 Apr 2014 at 08:24, Seb Frank wrote: > > Hi there, > > > > I have customized org-beamer--format-frame to change the way headlines > are > > treated (as I want a separate slide with only the headline in the center > > and plain frames not showing headlines after that). The way I currently > do > > this is by redefining the function itself (using "defun > > org-beamer--format-frame"). This works, but is there any way to make this > > more modular, i.e. tell org-mode somewhere to use a different function > > (e.g., my-org-beamer--format-frame) to format a frame, so that it's easy > to > > switch back and forth between different ones, as well as to revert to the > > default? > > > > Thanks, > > Seb > > As you haven't explained why you want this, it's difficult to understand > the actual use case. So, guessing at your intent, I wonder whether you > have thought about making use of section headings as well as frame > headings to accomplish what you want? > > Assuming you are using org v8.x and not something older, if you set > option H:2, second level headings define frames and top level headings > define sections. You can then have section headings appear as a > separate slide using code such as this: > > #+begin_src org > ,#+latex_header: > \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Topic}\tableofcontents[currentsection]\end{frame}} > #+end_src > > In this case, any time a section heading is encountered (i.e. top level > org heading), you'll get a slide with a table of contents with that > heading emphasised. You can obviously do something different which more > closely matches what you want. > > If you don't want individual frames to have headings, simply don't put > any text in the headline for that frame. > > This way, you do not need to manipulate how beamer displays frames. An > example set of slides with two sections and two out of four slides > having no headline would look like this: > > #+begin_src org > ,#+options: H:2 > ,#+latex_header: > \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Topic}\tableofcontents[currentsection]\end{frame}} > ,* Introduction > ,** First slide > some text on the first slide > ,** > some text on the second slide which has no heading > ,* Results > ,** > some third slide text, also on a slide with no heading > ,** conclusions > This was a great talk. > #+end_src > > HTH, > eric > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org > release_8.2.5h-1027-g4c0a29 > [-- Attachment #2: Type: text/html, Size: 4444 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: customizing org-beamer--format-frame 2014-04-27 14:14 ` Seb Frank @ 2014-04-27 16:42 ` Eric S Fraga 2014-04-27 21:13 ` Seb Frank 0 siblings, 1 reply; 5+ messages in thread From: Eric S Fraga @ 2014-04-27 16:42 UTC (permalink / raw) To: Seb Frank; +Cc: emacs-orgmode On Sunday, 27 Apr 2014 at 10:14, Seb Frank wrote: > Thanks so much! I was trying to get a bit more flexibility with that > separate slide (e.g., have the title in the centre of the page and no toc). > So I took inspiration from your great solution and defined a latex macro Interesting solution! Thanks for this. I can see its uses. For completeness, I assume you are using the H:2 option? -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-1027-g4c0a29 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: customizing org-beamer--format-frame 2014-04-27 16:42 ` Eric S Fraga @ 2014-04-27 21:13 ` Seb Frank 0 siblings, 0 replies; 5+ messages in thread From: Seb Frank @ 2014-04-27 21:13 UTC (permalink / raw) To: Seb Frank, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 598 bytes --] Yes, that's right. H:2 On Sun, Apr 27, 2014 at 12:42 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > On Sunday, 27 Apr 2014 at 10:14, Seb Frank wrote: > > Thanks so much! I was trying to get a bit more flexibility with that > > separate slide (e.g., have the title in the centre of the page and no > toc). > > So I took inspiration from your great solution and defined a latex macro > > Interesting solution! Thanks for this. I can see its uses. For > completeness, I assume you are using the H:2 option? > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org > release_8.2.5h-1027-g4c0a29 > [-- Attachment #2: Type: text/html, Size: 1005 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-27 21:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-25 12:24 customizing org-beamer--format-frame Seb Frank 2014-04-26 13:05 ` Eric S Fraga 2014-04-27 14:14 ` Seb Frank 2014-04-27 16:42 ` Eric S Fraga 2014-04-27 21:13 ` Seb Frank
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).