From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [export] Easy way to make children of Beamer frames generate list items?
Date: Sat, 14 Sep 2013 17:15:08 +0200 [thread overview]
Message-ID: <20130914151508.GH28088@kuru.dyndns-at-home.com> (raw)
In-Reply-To: <CA+M2ft-iuUi7=Yh8CaCnQyMFqbjfnNJZKNAKM1L26oDdF_OX7w@mail.gmail.com>
Hi Christoph and John,
I'll take an extreme view here. So apologies in advance.
On Sat, Sep 14, 2013 at 09:40:50AM -0500, John Hendy wrote:
> On Sat, Sep 14, 2013 at 9:28 AM, Christoph LANGE
> <math.semantic.web@gmail.com> wrote:
> > Dear all,
> >
> > here is another problem that I have with reusing old Beamer
> > presentations (Org version 7) with the new exporter.
> >
> > The manual says that "all frame's children become `block' environments".
> >
> > Is there a way of reverting to the default behaviour of the old
> > exporter, which by default exported frame's children as list items?
> > E.g. by setting a certain property on the frame's children?
> >
>
> Tricky problem, and I could see how this would be an issue. I guess I
> always held to using unordered lists (- blah) for my lists vs. relying
> on the nested headling functionality (** blah). I wonder if you could
> tweak the beamer definition somehow to make a sort of "legacy beamer"
> class for exporting these?
I think it is unwise to keep coming up with ways to support semantically
wrong behaviour just for the sake of backwards compatibility. This was
changed with good reason and after a lot of discussions. If you
continue on this path, you will have to keep maintaining this yourself
for all eternity (sorry about the hyperbole :-p). It's a lot of work
for a long time just to avoid some annoying work now.
> For example, I have the default template in my .emacs from the Beamer
> setup instructions on Worg:
>
> #+begin_src .emacs
>
> (add-to-list 'org-latex-classes
> '("beamer"
> "\\documentclass\[presentation\]\{beamer\}"
> ("\\section\{%s\}" . "\\section*\{%s\}")
> ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
> ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))
>
>
> #+end_src
>
> Perhaps something there could be tweaked? I'm no lisp or org -> latex
> mapping person, but perhaps others will have an idea of how you can
> map something dynamically so that "One level below the H:number
> setting gets converted to \itemize" (vs. the current conversion to
> \begin{example} ?
I think the answer is in your response; the template is for headlines up
to a depth n as specified by H:n. The old (and new) behaviour was (is)
for all headlines deeper than n (n+1 and onwards). This is
core-functionality, not something that is configurable.
That said, I think converting headlines to lists is not difficult. You
should be able to define a keyboard macro to semi-automate it. You can
mark a headline, C-c @, followed by C-c - to convert to a list.
Actually, I think it should be possible to write a custom function to
traverse a buffer and convert all headlines deeper than n to lists using
these same functions.
How about a combination of org-map-entries with a custom function which
does something like this (semi-pseudo-code):
(lambda nil
(if (> depth 3) ; assuming n=3 in H:n
(progn
(org-mark-subtree)
(org-ctrl-c-minus))))
I think you can get depth with something like this:
(car (org-heading-components))
Hope this helps,
--
Suvayu
Open source is the future. It sets us free.
next prev parent reply other threads:[~2013-09-14 15:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-14 14:28 [export] Easy way to make children of Beamer frames generate list items? Christoph LANGE
2013-09-14 14:40 ` John Hendy
2013-09-14 15:15 ` Suvayu Ali [this message]
2013-09-15 2:16 ` James Harkins
2013-09-15 2:49 ` John Hendy
2013-09-15 10:57 ` Suvayu Ali
2013-09-15 11:07 ` Christoph LANGE
2013-09-15 11:41 ` Carsten Dominik
2013-09-15 12:42 ` Suvayu Ali
2013-09-17 19:59 ` Christoph LANGE
2013-09-15 14:48 ` John Hendy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130914151508.GH28088@kuru.dyndns-at-home.com \
--to=fatkasuvayu+linux@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).