emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: dates in heading break beamer export


From: Marcin Borkowski
Subject: Re: [O] Bug: dates in heading break beamer export
Date: Mon, 30 Sep 2013 19:05:38 +0200

Dnia 2013-09-30, o godz. 18:02:51
Daniele Pizzolli <address@hidden> napisaƂ(a):

> >> It's a LaTeX Beamer problem: it doesn't like
> >>
> >>    \section{title \textit{[2013-09-29 Sun]}}
> >>
> >> produced by Org, although regular LaTeX accepts it.
> >>
> >> Do you know about a workaround for this?
> 
> Not really.
> 
> > This is really a workaround: put a \protect before \textit.
> 
> Or why not drop \textit?

Sounds good for me.  (NB: there's a similar problems with tags, AFAIR.
And (AFAIR!) it's even worse, since the exporter uses a low-level TeX
command \hfill.)

> > In general, putting formatting commands in \section title etc.,
> > even if not erroneous, is considered a bad practice.
> 
> But org-mode allow this!
> 
> I think that if something is allowed in org-mode syntax but not by the
> underlining tools used for export, the exporter should take care to
> find a suitable workaround.

Definitely agreed.  The point is, what is a "suitable workaround"?

One idea is to define a command \orgsection, with syntax like this:
\orgsection[timestamp=...,tags={...,...}]{title proper}
This could be even defined in a specialized package, call it org.sty,
which is then turned on by means of \usepackage in exported files.
This is probably the cleanest solution I can think of, but has one
disadvantage: it diverges from LaTeX syntax, so if I edit manually (or
worse, transform automatically) such a file, I can encounter problems:
the (non-TeX) parser (e.g. an editor's one) may not know that
\orgsection is in fact a flavor of \section.  For pdf export this is a
non-issue, but AFAIK people use Org LaTeX export to create a file for
further work on it.

Another idea is to redefine \section so that it either accepts optional
arguments (therefore breaking its default interface!), or allow
something like this:

\timestamp{...}
\tags{...,...}
\section{title proper}

This is easy to do, but far from elegant.  Also, it does not help
further maintenance of such a LaTeX file.

Yet another solution would be to forget about LaTeX and use ConTeXt,
where defining custom sections etc. is much easier.  Of course, this is
fine only assuming that (1) I do not want to e.g. submit my file to a
LaTeX-accepting journal and (2) I'm fine with learning ConTeXt, which -
even though much better than LaTeX in terms of UI (and also
featurewise, btw) - has its own learning curve.

> I just found that the same problem (work in latex, does not work in
> beamer) exists for footnotes in header!

Quite possible.  You can always use \footnotemark and \footnotetext.
(Beamer hacks deeply into LaTeX innards, so things like this are no
surprise.)

> A feature request would be to have some checks on org files a la
> flymake, at least for common potential sources of problems that
> usually break the export like:
> 
> - missing two empty lines after footnotes
> - missing empty line after RESULTS:
> - =string=[footnote]

Just curious: what's the problem with =string=[footnote]?

> Maybe something already exists and I am simply not aware.
> 
> Regards,
> Daniele

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]