[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing line breaks in Beamer with alltt
From: |
Eric S Fraga |
Subject: |
Re: Missing line breaks in Beamer with alltt |
Date: |
Sun, 29 Nov 2020 12:33:13 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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