Am 29.11.18 um 14:07 schrieb Loris Bennett: > Eric S Fraga <esfli...@gmail.com> writes: > >> On Thursday, 29 Nov 2018 at 09:38, Julius Dittmar wrote: >>> Am 29.11.18 um 09:13 schrieb Julius Dittmar: >>>> Am 29.11.18 um 08:17 schrieb Loris Bennett: >>>>>> #+latex_header: >>>>>> \makeatletter\let\mytextheight\beamer@frametexheight\makeatother >>>>>> #+attr_latex: :height 0.75\mytextheight >>> >>> Oh, or perhaps just a typo is involved: is it really >>> \beamer@frametexheight or rather \beamer@frametextheight you are chasing >>> after? >> >> Also, you may need to define your mytextheight as a length and then use >> \setlength instead of \let. > > After correcting the typo I followed Eric's and Julius's suggestions and > I tried adding > > #+LATEX_HEADER: > \newlength\mytextheight\makeatletter\setlength\mytextheight{\beamer@frametextheight}\makeatother > > to the beginning of the Org file, but in this case > > \the\mytextheight > > is 0.0pt.
That's what I suspected. You could try to wrap this line in an #+begin_export latex block (as I suggested), then it will be within the document instead of in the preamble. I usually refrain from using AtBeginDocument hooks (Gustavo Barros' suggestion) because I do not know enough about them, so I rather add the commands to a place I can see ;-) > After that I tried adding the definition on the slide itself > > #+BEGIN_SRC latex > > \newlength\mytextheight\makeatletter\setlength\mytextheight{\beamer@frametextheight}\makeatother > #+END_SRC Hm, src-block? I would have thought you should wrap that in an export-block, so those commands get added to the exported document, not quoted within as a source code. That would mean #+begin_export latex \newlength\mytextheight\makeatletter\setlength\mytextheight{\beamer@frametextheight}\makeatother #+end_export HTH, Julius