Hi. I am adapting this example: --8<---------------cut here---------------start------------->8--- https://tex.stackexchange.com/questions/28760/custom-beamer-blocks-for-pros-and-cons --8<---------------cut here---------------end--------------->8--- This is my file: --8<---------------cut here---------------start------------->8--- #+AUTHOR: Me #+EMAIL: #+DATE: 2022 #+DESCRIPTION: #+KEYWORDS: #+OPTIONS: toc:nil #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+startup: beamer #+LaTeX_CLASS: beamer #+LATEX_CLASS_OPTIONS: [bigger] #+BEAMER_FRAME_LEVEL: 2 #+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra) #+LaTeX_Header: \beamertemplatenavigationsymbolsempty #+LaTeX_Header: \newenvironment<>{problock}[1]{% #+LaTeX_Header: \begin{actionenv}#2% #+LaTeX_Header: \def\insertblocktitle{#1}% #+LaTeX_Header: \par% #+LaTeX_Header: \mode<presentation>{% #+LaTeX_Header: \setbeamercolor{block title}{fg=white,bg=orange!20!black} #+LaTeX_Header: \setbeamercolor{block body}{fg=black,bg=olive!50} #+LaTeX_Header: \setbeamercolor{itemize item}{fg=orange!20!black} #+LaTeX_Header: \setbeamertemplate{itemize item}[triangle] #+LaTeX_Header: }% #+LaTeX_Header: \usebeamertemplate{block begin}} #+LaTeX_Header: {\par\usebeamertemplate{block end}\end{actionenv}} ** Comparisson :PROPERTIES: :BEAMER_envargs: [t] :END: *** Pros :BMCOL:B_block: :PROPERTIES: :BEAMER_col: 0.45 :BEAMER_env: block :END: #+begin_problock - New. - Other Pro. - Additional Pro. #+end_problock *** Cons :BMCOL:B_block: :PROPERTIES: :BEAMER_col: 0.4 :BEAMER_env: block :BEAMER_envargs: <2-> :END: - Need Testing. - Other Con. - More Con. --8<---------------cut here---------------end--------------->8--- I am getting an error and PDF is not generated. Thanks.
> Am 26.05.2022 um 23:32 schrieb Andrés Ramírez <rrandresf@gmail.com>: > You want something like this as the resulting LaTeX code: \begin{frame}[label={sec:org5359014}]{Comparisson} \begin{columns} \begin{column}{0.45\columnwidth} \begin{block}{Pros} % <- superfluous environment \begin{problock}{Problock} % <— argument required \begin{itemize} \item New. \item Other Pro. \item Additional Pro. \end{itemize} \end{problock} \end{block} \end{column} > #+LaTeX_Header: \newenvironment<>{problock}[1]{% The =problock= environment takes 1 argument, but you supply none. You can supply an argument #+begin_problock @@latex:{Probloc}@@ This will be ignored for non-LaTeX exporters. But even here you have to block environments, the outer environment generated by =*** Pros= and the inner problock environment. You can get rid of the outer block environment by removing :BEAMER_env: block The resulting org code will look like this: :PROPERTIES: :BEAMER_col: 0.45 :END: #+begin_problock Pros @@latex:{Probloc}@@ - New. - Other Pro. - Additional Pro. #+end_problock Greetings Axel
Axel Kielhorn <org-mode@axelkielhorn.de> writes:
> #+begin_problock Pros
> @@latex:{Probloc}@@
> - New.
> - Other Pro.
> - Additional Pro.
> #+end_problock
Also, there is #+attr_latex:
#+attr_latex: :options {Problock}
#+begin_problock
#+end_problock
Best,
Ihor
Hi. Axel.
>>>>> "Axel" == Axel Kielhorn <org-mode@axelkielhorn.de> writes:
[...]
>> #+LaTeX_Header: \newenvironment<>{problock}[1]{%
Axel> The =problock= environment takes 1 argument, but you supply none.
Thanks. That part would have been very difficult to realize for a
latex-beginner.
Axel> You can supply an argument #+begin_problock @@latex:{Probloc}@@
Tested. And works.
Axel> This will be ignored for non-LaTeX exporters.
Axel> But even here you have to block environments, the outer environment generated by =***
Axel> Pros= and the inner problock environment.
Axel> You can get rid of the outer block environment by removing
Axel> :BEAMER_env: block
The other option could be pasing empty as parameter.
Thanks for the help.
Best Regards
Hi Ihor.
>>>>> "Ihor" == Ihor Radchenko <yantar92@gmail.com> writes:
Ihor> Axel Kielhorn <org-mode@axelkielhorn.de> writes:
>> #+begin_problock Pros @@latex:{Probloc}@@ - New. - Other Pro. - Additional Pro.
>> #+end_problock
Ihor> Also, there is #+attr_latex:
Ihor> #+attr_latex: :options {Problock} #+begin_problock #+end_problock
Right. It works too.
Thanks