all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Custom beamer blocks for pros and cons list
@ 2022-05-26 21:32 Andrés Ramírez
  2022-05-27  7:38 ` Axel Kielhorn
  0 siblings, 1 reply; 5+ messages in thread
From: Andrés Ramírez @ 2022-05-26 21:32 UTC (permalink / raw)
  To: emacs-orgmode

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom beamer blocks for pros and cons list
  2022-05-26 21:32 Custom beamer blocks for pros and cons list Andrés Ramírez
@ 2022-05-27  7:38 ` Axel Kielhorn
  2022-05-27  8:33   ` Ihor Radchenko
  2022-05-27 14:13   ` andrés ramírez
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Kielhorn @ 2022-05-27  7:38 UTC (permalink / raw)
  To: Org-Mode Mailing List


> 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom beamer blocks for pros and cons list
  2022-05-27  7:38 ` Axel Kielhorn
@ 2022-05-27  8:33   ` Ihor Radchenko
  2022-05-27 14:15     ` andrés ramírez
  2022-05-27 14:13   ` andrés ramírez
  1 sibling, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-05-27  8:33 UTC (permalink / raw)
  To: Axel Kielhorn; +Cc: Org-Mode Mailing List

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom beamer blocks for pros and cons list
  2022-05-27  7:38 ` Axel Kielhorn
  2022-05-27  8:33   ` Ihor Radchenko
@ 2022-05-27 14:13   ` andrés ramírez
  1 sibling, 0 replies; 5+ messages in thread
From: andrés ramírez @ 2022-05-27 14:13 UTC (permalink / raw)
  To: Axel Kielhorn; +Cc: Org-Mode Mailing List

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom beamer blocks for pros and cons list
  2022-05-27  8:33   ` Ihor Radchenko
@ 2022-05-27 14:15     ` andrés ramírez
  0 siblings, 0 replies; 5+ messages in thread
From: andrés ramírez @ 2022-05-27 14:15 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Axel Kielhorn, Org-Mode Mailing List

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-27 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 21:32 Custom beamer blocks for pros and cons list Andrés Ramírez
2022-05-27  7:38 ` Axel Kielhorn
2022-05-27  8:33   ` Ihor Radchenko
2022-05-27 14:15     ` andrés ramírez
2022-05-27 14:13   ` andrés ramírez

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.