export to babel, sometimes a block environment is inserted.urn:uuid:3c1d1f50-58c0-f384-bdc6-7e41ff33b0741970-01-01T00:00:01ZUwe Braueroub@mat.ucm.esexport to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:dffa49ea-7303-175c-ce78-fb05d4f44707
Hello

I have a org file that I want to export either to

1. Regular latex or

2. To beamer.

So I just use the corresponding export engines.

However the following minimal example puzzles me:

#+begin_src

# -*- org-confirm-babel-evaluate: nil -*-

* The  algorithm applied to the Lane-Emden equation
:PROPERTIES:
:BEAMER_env: frame
:BEAMER_opt: allowframebreaks
:END:

** The original Lane-Emden equation

#+begin_src latex :results latex replace :exports results :eval t
\begin{equation*}
\begin{cases}
y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\
y(0) &= 1\\
y'(0) &=0
\end{cases}
\end{equation*}
where $n\in[0,5]$ is the polytropic index.
#+end_src

#+end_src

Because it exports to

#+begin_src
\begin{frame}[allowframebreaks]{The SLM algorithm applied to the Lane-Emden equation}
\begin{block}{The original Lane-Emden equation}
\begin{equation*}
y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\
y(0) &= 1\\
y'(0) &=0
\end{equation*}
where $n\in[0,5]$ is the polytropic index.
\end{block}
\end{frame}

#+end_src

How can I avoid this annoying block environment?

Regards

Uwe Brauer


Colin Baxterm43cap@yandex.comRe: export to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:cfb56393-8765-0887-9af2-a3883cca6168
>>>>> Uwe Brauer <oub@mat.ucm.es> writes:

> Hello I have a org file that I want to export either to

>     1. Regular latex or

>     2. To beamer.

> So I just use the corresponding export engines.

> However the following minimal example puzzles me:

> #+begin_src

> # -*- org-confirm-babel-evaluate: nil -*- #+LATEX_HEADER_EXTRA:
> \usepackage{booktabs}

> * The algorithm applied to the Lane-Emden equation :PROPERTIES:
> :BEAMER_env: frame :BEAMER_opt: allowframebreaks :END:

> ** The original Lane-Emden equation

> #+begin_src latex :results latex replace :exports results :eval t
> \begin{equation*} \begin{cases} y''(x)+\frac{2}{x}y'(x)+y^{n}
> &=0\\ y(0) &= 1\\ y'(0) &=0 \end{cases} \end{equation*} where
> $n\in[0,5]$ is the polytropic index.  #+end_src

> #+end_src

> Because it exports to

> #+begin_src \begin{frame}[allowframebreaks]{The SLM algorithm
> applied to the Lane-Emden equation} \begin{block}{The original
> Lane-Emden equation} \begin{equation*}
> y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\ y(0) &= 1\\ y'(0) &=0
> \end{equation*} where $n\in[0,5]$ is the polytropic index.
> \end{block} \end{frame}

> #+end_src

> How can I avoid this annoying block environment?

> Regards

> Uwe Brauer

Try $in place of \begin{equation*};$ in place of \end{equation*}


Uwe Braueroub@mat.ucm.esRe: export to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:3ab8ea54-2d3c-5108-5029-fa7b2a23b1f2
[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]

>>> "CB" == Colin Baxter <m43cap@yandex.com> writes:

>>>>>> Uwe Brauer <oub@mat.ucm.es> writes:
>> Hello I have a org file that I want to export either to

>> 1. Regular latex or

>> 2. To beamer.

>> So I just use the corresponding export engines.

>> However the following minimal example puzzles me:

>> #+begin_src

>> # -*- org-confirm-babel-evaluate: nil -*- #+LATEX_HEADER_EXTRA:
>> \usepackage{booktabs}

>> * The algorithm applied to the Lane-Emden equation :PROPERTIES:
>> :BEAMER_env: frame :BEAMER_opt: allowframebreaks :END:

>> ** The original Lane-Emden equation

>> #+begin_src latex :results latex replace :exports results :eval t
>> \begin{equation*} \begin{cases} y''(x)+\frac{2}{x}y'(x)+y^{n}
>> &=0\\ y(0) &= 1\\ y'(0) &=0 \end{cases} \end{equation*} where
>> $n\in[0,5]$ is the polytropic index.  #+end_src

>> #+end_src

>> Because it exports to

>> #+begin_src \begin{frame}[allowframebreaks]{The SLM algorithm
>> applied to the Lane-Emden equation} \begin{block}{The original
>> Lane-Emden equation} \begin{equation*}
>> y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\ y(0) &= 1\\ y'(0) &=0
>> \end{equation*} where $n\in[0,5]$ is the polytropic index.
>> \end{block} \end{frame}

>> #+end_src

>> How can I avoid this annoying block environment?

>> Regards

>> Uwe Brauer

> Try $in place of \begin{equation*};$ in place of \end{equation*}

Thanks I also found out that the
* The ... algorithm applied to the Lane-Emden equation
:PROPERTIES:
:BEAMER_env: frame
:BEAMER_opt: allowframebreaks
:END:

* The original Lane-Emden equation

#+begin_src latex :results latex replace :exports results :eval t
\begin{equation*}
\begin{cases}
y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\
y(0) &= 1\\
y'(0) &=0
\end{cases}
\end{equation*}
where $n\in[0,5]$ is the polytropic index.
#+end_src

Works fine, that is changing ** to *

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

Eric S Fragae.fraga@ucl.ac.ukRe: export to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:62dade78-5961-774e-87ee-04ee5df10e40
On Thursday, 15 Oct 2020 at 19:44, Uwe Brauer wrote:
> How can I avoid this annoying block environment?

I know you have sort of solved this (by promoting the headline to a
higher level) but the question I would have asked is: what did you want
the export engine to do with a subheading?

In beamer, org assumes that a subheading starts some kind of block and
the default is just a basic block.  You can change this to other types
or have org ignore the actual headline.  I use the latter to provide
some structure to the org file without affecting the output.

--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


Uwe Braueroub@mat.ucm.esRe: export to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:17cad07e-f267-df82-5d84-a42edf9539ba
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Thursday, 15 Oct 2020 at 19:44, Uwe Brauer wrote:
>> How can I avoid this annoying block environment?

> I know you have sort of solved this (by promoting the headline to a
> higher level) but the question I would have asked is: what did you want
> the export engine to do with a subheading?

Well because this is how I would have written it starting directly in Latex.
Subsections help me to organize the documents, so I thought subheadings
would be converted to subsections, without interfering with blocks. So I
have learned something I did not know before.

> In beamer, org assumes that a subheading starts some kind of block and
> the default is just a basic block.

Ok I did not know that. I have to admit I use org mode, either because
of its excellent table editor, or if I want to export text+some code to LaTeX

> You can change this to other types or have org ignore the actual
> headline. I use the latter to provide some structure to the org file
> without affecting the output.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

Eric S Fragae.fraga@ucl.ac.ukRe: export to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:eec989a2-d4ff-6adc-cb8d-6c7265df029d
On Friday, 16 Oct 2020 at 18:06, Uwe Brauer wrote:

A good starting point to learn what is possible in org for beamer export
is to turn on beamer mode:

#+startup: beamer

This provides, in particular, one key binding (C-c C-b) which allows you
to change the interpretation of a subheading.  It pops up a menu of
options.

--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


Uwe Braueroub@mat.ucm.esRe: export to babel, sometimes a block environment is inserted.1970-01-01T00:00:02Zurn:uuid:9132e35f-a63d-76d5-53f8-116f7a0f622a
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Friday, 16 Oct 2020 at 18:06, Uwe Brauer wrote:

> A good starting point to learn what is possible in org for beamer export
> is to turn on beamer mode:

> #+startup: beamer

> This provides, in particular, one key binding (C-c C-b) which allows you
> to change the interpretation of a subheading.  It pops up a menu of
> options.

Thanks! Org mode still surprises me.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]