emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: dates in heading break beamer export
Date: Mon, 30 Sep 2013 19:05:38 +0200	[thread overview]
Message-ID: <20130930190538.5397f472@aga-netbook> (raw)
In-Reply-To: <5249A0AB.7080408@toel.it>

Dnia 2013-09-30, o godz. 18:02:51
Daniele Pizzolli <dan@toel.it> 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	other threads:[~2013-09-30 17:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 10:33 Bug: dates in heading break beamer export Daniele Pizzolli
2013-09-29 14:53 ` Nicolas Goaziou
2013-09-29 15:27   ` Marcin Borkowski
2013-09-30 16:02     ` Daniele Pizzolli
2013-09-30 17:05       ` Marcin Borkowski [this message]
2013-10-01 16:01         ` Nicolas Goaziou
2013-10-01 16:33           ` Marcin Borkowski
2013-10-02  6:50         ` Bug: code and footnotes (was Bug: dates in heading break beamer export) Daniele Pizzolli
2013-10-01  8:09       ` Bug: dates in heading break beamer export Eric S Fraga
2013-10-02  6:47       ` Daniele Pizzolli
2013-10-02 13:45         ` Nicolas Goaziou
2013-10-02 15:36           ` Daniele Pizzolli
2013-10-02 15:55             ` Nicolas Goaziou
2013-10-02 16:10               ` Daniele Pizzolli
2013-10-02 20:47                 ` Marcin Borkowski
2013-10-03 13:30                 ` Nicolas Goaziou
2013-10-03 15:59                   ` Daniele Pizzolli
2013-10-04 19:17                     ` Nicolas Goaziou
2013-10-02 22:12               ` Suvayu Ali

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=20130930190538.5397f472@aga-netbook \
    --to=mbork@wmi.amu.edu.pl \
    --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).