public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Beamer output - ending frames etc
@ 2014-02-20  9:06 Tom Francart
       [not found] ` <ad015158-8b46-4048-a7f7-5b8df49eb62e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Francart @ 2014-02-20  9:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3154 bytes --]

Dear list,

I love using pandoc to make presentations through LaTeX beamer. To get the 
output I want, I use a few wrapper scripts, and am wondering whether there 
is a better true pandoc approach to do this.

*1. Ending a frame*
Sometimes it's necessary to insert some LaTeX code in between two frames 
generated by pandoc, for instance to use the beamer \againframe option, or 
to use \appendix, or to use the \setbeamertemplate function. Example:

# Section
## Frame1

Text

\setbeamertemplate{background canvas}[title]

## Frame2


Yields the following LaTeX code:
\section{Section}\label{section}

\begin{frame}{Frame1}

Text

\setbeamertemplate{background canvas}{[}title{]}

\end{frame}

\begin{frame}{Frame2}

\end{frame}


This does not work, because the \setbeamertemplate is wrapped in "Frame1". 
It should go in between \end{frame} and \begin{frame}{Frame2}. Is there a 
way to tell pandoc to end a frame?
(Another problem is that the second argument to setbeamertemplate gets 
wrapped in {}, I solve this using the approach below)

*2. Custom environments*
Pandoc does not parse markdown within \begin{...} and \end{...}. Sometimes 
this is useful though, for example when making a slide with two columns, 
each containing a list of items. I currently work around this by wrapping 
the begin and end statements in <!--- and ---> and using perl like this:

perl -i -pe "s/<\\!---(.+?)--->/\\\\verb\+AAAAAAA\1ZZZZZZZ\+/gm" < .build/$<.gpp > .build/$<.sed.gpp 
pandoc .build/doc.sed.gpp -o .build/doc.pandoc 
perl -i -pe "s/\\\\verb\+AAAAAAA(.+?)ZZZZZZZ\+/\1/gm" <.build/$<.pandoc.tex > .build/$<.tex

I also use this to pass through any Latex code that pandoc does not understand. I believe that the --parse-raw option might partly solve this, but still some of my fancy latex code gets scrambled.

It would be nice if there was a way to do this without using perl.
The very best way would probably be to implement all desired features (such 
as columns) in pandoc, but as this doesn't seem feasible on the short term, 
it might be good to have an easy way to just pass through code with pandoc 
entirely ignoring it. 

*3. Preamble*
I find myself customising the LaTeX template for each document I write, 
which mainly involves adding stuff to the preamble (as I've got the 
workaround above to put arbitrary LaTeX code in the actual document). What 
would be a good way to add stuff to the preamble from the markdown file 
itself? E.g., \usepackage, \newcommand, ...


best regards,
and thanks very much to John for making this fantastic software available!
Tom


-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ad015158-8b46-4048-a7f7-5b8df49eb62e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

[-- Attachment #2: Type: text/html, Size: 12144 bytes --]

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

* Re: Beamer output - ending frames etc
       [not found] ` <ad015158-8b46-4048-a7f7-5b8df49eb62e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-11-20  3:46   ` Wagner Macedo
  2014-11-20 13:09   ` Thøger Emil Rivera-Thorsen
  1 sibling, 0 replies; 6+ messages in thread
From: Wagner Macedo @ 2014-11-20  3:46 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 3852 bytes --]

To not open another thread, I want to say I'm interested in a solution to 
this too. To me is mainly because I wanted to use the option plain in some 
slides and pandoc do not allow to put as a option

## {.plain}

is silently ignored. I normally resolve issues I have in pandoc with 
filters, but I can't use filters to solve this because the beamer output 
needs \end{frame} tags, so I can't use RawLatex to put

\begin{frame}[plain]
...
\end{frame}

cause two end frames would be output.

Em quinta-feira, 20 de fevereiro de 2014 06h06min24s UTC-3, Tom Francart 
escreveu:
>
> Dear list,
>
> I love using pandoc to make presentations through LaTeX beamer. To get the 
> output I want, I use a few wrapper scripts, and am wondering whether there 
> is a better true pandoc approach to do this.
>
> *1. Ending a frame*
> Sometimes it's necessary to insert some LaTeX code in between two frames 
> generated by pandoc, for instance to use the beamer \againframe option, or 
> to use \appendix, or to use the \setbeamertemplate function. Example:
>
> # Section
> ## Frame1
>
> Text
>
> \setbeamertemplate{background canvas}[title]
>
> ## Frame2
>
>
> Yields the following LaTeX code:
> \section{Section}\label{section}
>
> \begin{frame}{Frame1}
>
> Text
>
> \setbeamertemplate{background canvas}{[}title{]}
>
> \end{frame}
>
> \begin{frame}{Frame2}
>
> \end{frame}
>
>
> This does not work, because the \setbeamertemplate is wrapped in "Frame1". 
> It should go in between \end{frame} and \begin{frame}{Frame2}. Is there a 
> way to tell pandoc to end a frame?
> (Another problem is that the second argument to setbeamertemplate gets 
> wrapped in {}, I solve this using the approach below)
>
> *2. Custom environments*
> Pandoc does not parse markdown within \begin{...} and \end{...}. Sometimes 
> this is useful though, for example when making a slide with two columns, 
> each containing a list of items. I currently work around this by wrapping 
> the begin and end statements in <!--- and ---> and using perl like this:
>
> perl -i -pe "s/<\\!---(.+?)--->/\\\\verb\+AAAAAAA\1ZZZZZZZ\+/gm" < .build/$<.gpp > .build/$<.sed.gpp 
> pandoc .build/doc.sed.gpp -o .build/doc.pandoc 
> perl -i -pe "s/\\\\verb\+AAAAAAA(.+?)ZZZZZZZ\+/\1/gm" <.build/$<.pandoc.tex > .build/$<.tex
>
> I also use this to pass through any Latex code that pandoc does not understand. I believe that the --parse-raw option might partly solve this, but still some of my fancy latex code gets scrambled.
>
> It would be nice if there was a way to do this without using perl.
> The very best way would probably be to implement all desired features 
> (such as columns) in pandoc, but as this doesn't seem feasible on the short 
> term, it might be good to have an easy way to just pass through code with 
> pandoc entirely ignoring it. 
>
> *3. Preamble*
> I find myself customising the LaTeX template for each document I write, 
> which mainly involves adding stuff to the preamble (as I've got the 
> workaround above to put arbitrary LaTeX code in the actual document). What 
> would be a good way to add stuff to the preamble from the markdown file 
> itself? E.g., \usepackage, \newcommand, ...
>
>
> best regards,
> and thanks very much to John for making this fantastic software available!
> Tom
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/004611a3-16e7-49d5-9959-efd9c62ecd60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 9527 bytes --]

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

* Re: Beamer output - ending frames etc
       [not found] ` <ad015158-8b46-4048-a7f7-5b8df49eb62e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2014-11-20  3:46   ` Wagner Macedo
@ 2014-11-20 13:09   ` Thøger Emil Rivera-Thorsen
       [not found]     ` <afc1389c-9ea4-41e1-8430-f7f78292a05d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Thøger Emil Rivera-Thorsen @ 2014-11-20 13:09 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 3659 bytes --]

You can put preamble stuff in your document if you use YAML front matter 
rather than the simple title block:

---
title: Bla bla bla
author: John Dow
date: insert date here
fontize: 11pt
header-includes:
- \usepackage[english]{babel}
- \setmainfont{Linux Libertine O}
abstract: |
  Lorem ipsum ...
...




Den torsdagen den 20:e februari 2014 kl. 10:06:24 UTC+1 skrev Tom Francart:
>
> Dear list,
>
> I love using pandoc to make presentations through LaTeX beamer. To get the 
> output I want, I use a few wrapper scripts, and am wondering whether there 
> is a better true pandoc approach to do this.
>
> *1. Ending a frame*
> Sometimes it's necessary to insert some LaTeX code in between two frames 
> generated by pandoc, for instance to use the beamer \againframe option, or 
> to use \appendix, or to use the \setbeamertemplate function. Example:
>
> # Section
> ## Frame1
>
> Text
>
> \setbeamertemplate{background canvas}[title]
>
> ## Frame2
>
>
> Yields the following LaTeX code:
> \section{Section}\label{section}
>
> \begin{frame}{Frame1}
>
> Text
>
> \setbeamertemplate{background canvas}{[}title{]}
>
> \end{frame}
>
> \begin{frame}{Frame2}
>
> \end{frame}
>
>
> This does not work, because the \setbeamertemplate is wrapped in "Frame1". 
> It should go in between \end{frame} and \begin{frame}{Frame2}. Is there a 
> way to tell pandoc to end a frame?
> (Another problem is that the second argument to setbeamertemplate gets 
> wrapped in {}, I solve this using the approach below)
>
> *2. Custom environments*
> Pandoc does not parse markdown within \begin{...} and \end{...}. Sometimes 
> this is useful though, for example when making a slide with two columns, 
> each containing a list of items. I currently work around this by wrapping 
> the begin and end statements in <!--- and ---> and using perl like this:
>
> perl -i -pe "s/<\\!---(.+?)--->/\\\\verb\+AAAAAAA\1ZZZZZZZ\+/gm" < .build/$<.gpp > .build/$<.sed.gpp 
> pandoc .build/doc.sed.gpp -o .build/doc.pandoc 
> perl -i -pe "s/\\\\verb\+AAAAAAA(.+?)ZZZZZZZ\+/\1/gm" <.build/$<.pandoc.tex > .build/$<.tex
>
> I also use this to pass through any Latex code that pandoc does not understand. I believe that the --parse-raw option might partly solve this, but still some of my fancy latex code gets scrambled.
>
> It would be nice if there was a way to do this without using perl.
> The very best way would probably be to implement all desired features 
> (such as columns) in pandoc, but as this doesn't seem feasible on the short 
> term, it might be good to have an easy way to just pass through code with 
> pandoc entirely ignoring it. 
>
> *3. Preamble*
> I find myself customising the LaTeX template for each document I write, 
> which mainly involves adding stuff to the preamble (as I've got the 
> workaround above to put arbitrary LaTeX code in the actual document). What 
> would be a good way to add stuff to the preamble from the markdown file 
> itself? E.g., \usepackage, \newcommand, ...
>
>
> best regards,
> and thanks very much to John for making this fantastic software available!
> Tom
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 8976 bytes --]

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

* Re: Beamer output - ending frames etc
       [not found]     ` <afc1389c-9ea4-41e1-8430-f7f78292a05d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-11-20 14:56       ` Wagner Macedo
       [not found]         ` <CAKGY2PnfBGxi6Vd71F8-=8EVO3bRdayvxS1n6-CHoOPxs8iSHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Wagner Macedo @ 2014-11-20 14:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4800 bytes --]

Sorry, but I didn't get how your solution is related to the problem

--
Wagner Macedo

On 20 November 2014 10:09, Thøger Emil Rivera-Thorsen <thoger.emil@gmail.com
> wrote:

> You can put preamble stuff in your document if you use YAML front matter
> rather than the simple title block:
>
> ---
> title: Bla bla bla
> author: John Dow
> date: insert date here
> fontize: 11pt
> header-includes:
> - \usepackage[english]{babel}
> - \setmainfont{Linux Libertine O}
> abstract: |
>   Lorem ipsum ...
> ...
>
>
>
>
> Den torsdagen den 20:e februari 2014 kl. 10:06:24 UTC+1 skrev Tom Francart:
>
>> Dear list,
>>
>> I love using pandoc to make presentations through LaTeX beamer. To get
>> the output I want, I use a few wrapper scripts, and am wondering whether
>> there is a better true pandoc approach to do this.
>>
>> *1. Ending a frame*
>> Sometimes it's necessary to insert some LaTeX code in between two frames
>> generated by pandoc, for instance to use the beamer \againframe option, or
>> to use \appendix, or to use the \setbeamertemplate function. Example:
>>
>> # Section
>> ## Frame1
>>
>> Text
>>
>> \setbeamertemplate{background canvas}[title]
>>
>> ## Frame2
>>
>>
>> Yields the following LaTeX code:
>> \section{Section}\label{section}
>>
>> \begin{frame}{Frame1}
>>
>> Text
>>
>> \setbeamertemplate{background canvas}{[}title{]}
>>
>> \end{frame}
>>
>> \begin{frame}{Frame2}
>>
>> \end{frame}
>>
>>
>> This does not work, because the \setbeamertemplate is wrapped in
>> "Frame1". It should go in between \end{frame} and \begin{frame}{Frame2}. Is
>> there a way to tell pandoc to end a frame?
>> (Another problem is that the second argument to setbeamertemplate gets
>> wrapped in {}, I solve this using the approach below)
>>
>> *2. Custom environments*
>> Pandoc does not parse markdown within \begin{...} and \end{...}.
>> Sometimes this is useful though, for example when making a slide with two
>> columns, each containing a list of items. I currently work around this by
>> wrapping the begin and end statements in <!--- and ---> and using perl like
>> this:
>>
>> perl -i -pe "s/<\\!---(.+?)--->/\\\\verb\+AAAAAAA\1ZZZZZZZ\+/gm" < .build/$<.gpp > .build/$<.sed.gpp
>> pandoc .build/doc.sed.gpp -o .build/doc.pandoc
>> perl -i -pe "s/\\\\verb\+AAAAAAA(.+?)ZZZZZZZ\+/\1/gm" <.build/$<.pandoc.tex > .build/$<.tex
>>
>> I also use this to pass through any Latex code that pandoc does not understand. I believe that the --parse-raw option might partly solve this, but still some of my fancy latex code gets scrambled.
>>
>> It would be nice if there was a way to do this without using perl.
>> The very best way would probably be to implement all desired features
>> (such as columns) in pandoc, but as this doesn't seem feasible on the short
>> term, it might be good to have an easy way to just pass through code with
>> pandoc entirely ignoring it.
>>
>> *3. Preamble*
>> I find myself customising the LaTeX template for each document I write,
>> which mainly involves adding stuff to the preamble (as I've got the
>> workaround above to put arbitrary LaTeX code in the actual document). What
>> would be a good way to add stuff to the preamble from the markdown file
>> itself? E.g., \usepackage, \newcommand, ...
>>
>>
>> best regards,
>> and thanks very much to John for making this fantastic software available!
>> Tom
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKGY2PnfBGxi6Vd71F8-%3D8EVO3bRdayvxS1n6-CHoOPxs8iSHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 10767 bytes --]

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

* Re: Beamer output - ending frames etc
       [not found]         ` <CAKGY2PnfBGxi6Vd71F8-=8EVO3bRdayvxS1n6-CHoOPxs8iSHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-11-20 15:26           ` Thøger Emil Rivera-Thorsen
       [not found]             ` <fad7cf07-7e44-431f-afab-c7b51f914ba9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Thøger Emil Rivera-Thorsen @ 2014-11-20 15:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 5188 bytes --]

It was a reply to the original poster, which stated 3 different questions 
in the same message.
I was replying to the third one of them.


Den torsdagen den 20:e november 2014 kl. 15:57:17 UTC+1 skrev Wagner Macedo:
>
> Sorry, but I didn't get how your solution is related to the problem
>
> --
> Wagner Macedo 
>
> On 20 November 2014 10:09, Thøger Emil Rivera-Thorsen <thoge...@gmail.com 
> <javascript:>> wrote:
>
>> You can put preamble stuff in your document if you use YAML front matter 
>> rather than the simple title block:
>>
>> ---
>> title: Bla bla bla
>> author: John Dow
>> date: insert date here
>> fontize: 11pt
>> header-includes:
>> - \usepackage[english]{babel}
>> - \setmainfont{Linux Libertine O}
>> abstract: |
>>   Lorem ipsum ...
>> ...
>>
>>
>>
>>
>> Den torsdagen den 20:e februari 2014 kl. 10:06:24 UTC+1 skrev Tom 
>> Francart:
>>
>>> Dear list,
>>>
>>> I love using pandoc to make presentations through LaTeX beamer. To get 
>>> the output I want, I use a few wrapper scripts, and am wondering whether 
>>> there is a better true pandoc approach to do this.
>>>
>>> *1. Ending a frame*
>>> Sometimes it's necessary to insert some LaTeX code in between two frames 
>>> generated by pandoc, for instance to use the beamer \againframe option, or 
>>> to use \appendix, or to use the \setbeamertemplate function. Example:
>>>
>>> # Section
>>> ## Frame1
>>>
>>> Text
>>>
>>> \setbeamertemplate{background canvas}[title]
>>>
>>> ## Frame2
>>>
>>>
>>> Yields the following LaTeX code:
>>> \section{Section}\label{section}
>>>
>>> \begin{frame}{Frame1}
>>>
>>> Text
>>>
>>> \setbeamertemplate{background canvas}{[}title{]}
>>>
>>> \end{frame}
>>>
>>> \begin{frame}{Frame2}
>>>
>>> \end{frame}
>>>
>>>
>>> This does not work, because the \setbeamertemplate is wrapped in 
>>> "Frame1". It should go in between \end{frame} and \begin{frame}{Frame2}. Is 
>>> there a way to tell pandoc to end a frame?
>>> (Another problem is that the second argument to setbeamertemplate gets 
>>> wrapped in {}, I solve this using the approach below)
>>>
>>> *2. Custom environments*
>>> Pandoc does not parse markdown within \begin{...} and \end{...}. 
>>> Sometimes this is useful though, for example when making a slide with two 
>>> columns, each containing a list of items. I currently work around this by 
>>> wrapping the begin and end statements in <!--- and ---> and using perl like 
>>> this:
>>>
>>> perl -i -pe "s/<\\!---(.+?)--->/\\\\verb\+AAAAAAA\1ZZZZZZZ\+/gm" < .build/$<.gpp > .build/$<.sed.gpp 
>>> pandoc .build/doc.sed.gpp -o .build/doc.pandoc 
>>> perl -i -pe "s/\\\\verb\+AAAAAAA(.+?)ZZZZZZZ\+/\1/gm" <.build/$<.pandoc.tex > .build/$<.tex
>>>
>>> I also use this to pass through any Latex code that pandoc does not understand. I believe that the --parse-raw option might partly solve this, but still some of my fancy latex code gets scrambled.
>>>
>>> It would be nice if there was a way to do this without using perl.
>>> The very best way would probably be to implement all desired features 
>>> (such as columns) in pandoc, but as this doesn't seem feasible on the short 
>>> term, it might be good to have an easy way to just pass through code with 
>>> pandoc entirely ignoring it. 
>>>
>>> *3. Preamble*
>>> I find myself customising the LaTeX template for each document I write, 
>>> which mainly involves adding stuff to the preamble (as I've got the 
>>> workaround above to put arbitrary LaTeX code in the actual document). What 
>>> would be a good way to add stuff to the preamble from the markdown file 
>>> itself? E.g., \usepackage, \newcommand, ...
>>>
>>>
>>> best regards,
>>> and thanks very much to John for making this fantastic software 
>>> available!
>>> Tom
>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/fad7cf07-7e44-431f-afab-c7b51f914ba9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 11742 bytes --]

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

* Re: Beamer output - ending frames etc
       [not found]             ` <fad7cf07-7e44-431f-afab-c7b51f914ba9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-11-20 19:55               ` Wagner Macedo
  0 siblings, 0 replies; 6+ messages in thread
From: Wagner Macedo @ 2014-11-20 19:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 6179 bytes --]

Understood, thanks.

--
Wagner Macedo

On 20 November 2014 12:26, Thøger Emil Rivera-Thorsen <thoger.emil@gmail.com
> wrote:

> It was a reply to the original poster, which stated 3 different questions
> in the same message.
> I was replying to the third one of them.
>
>
> Den torsdagen den 20:e november 2014 kl. 15:57:17 UTC+1 skrev Wagner
> Macedo:
>>
>> Sorry, but I didn't get how your solution is related to the problem
>>
>> --
>> Wagner Macedo
>>
>> On 20 November 2014 10:09, Thøger Emil Rivera-Thorsen <thoge...@gmail.com
>> > wrote:
>>
>>> You can put preamble stuff in your document if you use YAML front matter
>>> rather than the simple title block:
>>>
>>> ---
>>> title: Bla bla bla
>>> author: John Dow
>>> date: insert date here
>>> fontize: 11pt
>>> header-includes:
>>> - \usepackage[english]{babel}
>>> - \setmainfont{Linux Libertine O}
>>> abstract: |
>>>   Lorem ipsum ...
>>> ...
>>>
>>>
>>>
>>>
>>> Den torsdagen den 20:e februari 2014 kl. 10:06:24 UTC+1 skrev Tom
>>> Francart:
>>>
>>>> Dear list,
>>>>
>>>> I love using pandoc to make presentations through LaTeX beamer. To get
>>>> the output I want, I use a few wrapper scripts, and am wondering whether
>>>> there is a better true pandoc approach to do this.
>>>>
>>>> *1. Ending a frame*
>>>> Sometimes it's necessary to insert some LaTeX code in between two
>>>> frames generated by pandoc, for instance to use the beamer \againframe
>>>> option, or to use \appendix, or to use the \setbeamertemplate function.
>>>> Example:
>>>>
>>>> # Section
>>>> ## Frame1
>>>>
>>>> Text
>>>>
>>>> \setbeamertemplate{background canvas}[title]
>>>>
>>>> ## Frame2
>>>>
>>>>
>>>> Yields the following LaTeX code:
>>>> \section{Section}\label{section}
>>>>
>>>> \begin{frame}{Frame1}
>>>>
>>>> Text
>>>>
>>>> \setbeamertemplate{background canvas}{[}title{]}
>>>>
>>>> \end{frame}
>>>>
>>>> \begin{frame}{Frame2}
>>>>
>>>> \end{frame}
>>>>
>>>>
>>>> This does not work, because the \setbeamertemplate is wrapped in
>>>> "Frame1". It should go in between \end{frame} and \begin{frame}{Frame2}. Is
>>>> there a way to tell pandoc to end a frame?
>>>> (Another problem is that the second argument to setbeamertemplate gets
>>>> wrapped in {}, I solve this using the approach below)
>>>>
>>>> *2. Custom environments*
>>>> Pandoc does not parse markdown within \begin{...} and \end{...}.
>>>> Sometimes this is useful though, for example when making a slide with two
>>>> columns, each containing a list of items. I currently work around this by
>>>> wrapping the begin and end statements in <!--- and ---> and using perl like
>>>> this:
>>>>
>>>> perl -i -pe "s/<\\!---(.+?)--->/\\\\verb\+AAAAAAA\1ZZZZZZZ\+/gm" < .build/$<.gpp > .build/$<.sed.gpp
>>>> pandoc .build/doc.sed.gpp -o .build/doc.pandoc
>>>> perl -i -pe "s/\\\\verb\+AAAAAAA(.+?)ZZZZZZZ\+/\1/gm" <.build/$<.pandoc.tex > .build/$<.tex
>>>>
>>>> I also use this to pass through any Latex code that pandoc does not understand. I believe that the --parse-raw option might partly solve this, but still some of my fancy latex code gets scrambled.
>>>>
>>>> It would be nice if there was a way to do this without using perl.
>>>> The very best way would probably be to implement all desired features
>>>> (such as columns) in pandoc, but as this doesn't seem feasible on the short
>>>> term, it might be good to have an easy way to just pass through code with
>>>> pandoc entirely ignoring it.
>>>>
>>>> *3. Preamble*
>>>> I find myself customising the LaTeX template for each document I write,
>>>> which mainly involves adding stuff to the preamble (as I've got the
>>>> workaround above to put arbitrary LaTeX code in the actual document). What
>>>> would be a good way to add stuff to the preamble from the markdown file
>>>> itself? E.g., \usepackage, \newcommand, ...
>>>>
>>>>
>>>> best regards,
>>>> and thanks very much to John for making this fantastic software
>>>> available!
>>>> Tom
>>>>
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "pandoc-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/afc1389c-9ea4-41e1-8430-f7f78292a05d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/fad7cf07-7e44-431f-afab-c7b51f914ba9%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/fad7cf07-7e44-431f-afab-c7b51f914ba9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKGY2P%3Dm0Fed%2BrgZstNgMYt3R5sSw-sC2mstxe3rK3Fqh6t%2BMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 12564 bytes --]

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

end of thread, other threads:[~2014-11-20 19:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20  9:06 Beamer output - ending frames etc Tom Francart
     [not found] ` <ad015158-8b46-4048-a7f7-5b8df49eb62e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-11-20  3:46   ` Wagner Macedo
2014-11-20 13:09   ` Thøger Emil Rivera-Thorsen
     [not found]     ` <afc1389c-9ea4-41e1-8430-f7f78292a05d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-11-20 14:56       ` Wagner Macedo
     [not found]         ` <CAKGY2PnfBGxi6Vd71F8-=8EVO3bRdayvxS1n6-CHoOPxs8iSHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-20 15:26           ` Thøger Emil Rivera-Thorsen
     [not found]             ` <fad7cf07-7e44-431f-afab-c7b51f914ba9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-11-20 19:55               ` Wagner Macedo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).