emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Missing line breaks in Beamer with alltt
Date: Sun, 29 Nov 2020 12:33:13 +0000	[thread overview]
Message-ID: <87v9dofily.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87v9do8qll.fsf@iki.fi> (Jarmo Hurri's message of "Sun, 29 Nov 2020 11:22:30 +0200")

On Sunday, 29 Nov 2020 at 11:22, Jarmo Hurri wrote:
> Any ideas?

First of all, the first frame works just fine for me.  Line breaks are
preserved.  However, I do know that in the past I have had problems with
alltt environments in beamer.  I tend to use one of the algorithm
packages instead.

Your second frame leads to an error because the \in and \leftarrow are
not in math mode.  Because your LaTeX code is explicitly in an export
LaTeX environment, org doesn't do its usual magic with LaTeX entities so
you need to put the maths delimiters yourself:

>     #+begin_src latex
>       \defverbatim\SomeCode{
>       \begin{alltt}
>       x $\in$ {0, 1, ..., n}
>       z $\leftarrow$ x + 1
>       \end{alltt}
>       }
>     #+end_src

When in doubt, export to LaTeX (C-e l b) and have a look at the
LaTeX.  Also then run pdflatex yourself on that LaTeX code to see what
errors come up.

HTH,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-143-g9a1549


  reply	other threads:[~2020-11-29 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29  9:22 Missing line breaks in Beamer with alltt Jarmo Hurri
2020-11-29 12:33 ` Eric S Fraga [this message]
2020-11-30  5:03   ` Jarmo Hurri
2020-11-30  9:32     ` Eric S Fraga
2020-12-03 16:07       ` Jarmo Hurri
2020-12-03 16:38         ` Eric S Fraga
2020-12-04 14:03           ` Jarmo Hurri
2020-12-04 15:17             ` Eric S Fraga

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=87v9dofily.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=jarmo.hurri@iki.fi \
    /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).