# newcommand in beamer template for beamer environment

I write beamer presentations in Pandoc and want to change from Pandoc commands for creating frames (n-th level of headers like ### or something like ***) to using latex new commands for beginning and ending a frame environment.

The reason is that I also write text around the slides and want to create papers with text and slides as minipages inbetween. In that case, I would use an article-template instead of the beamer template and interpret the newcommands as minipages rather than beamer slides.

Using the beamer commands is impossible, since they create an environment which would force me to use Latex code for the slides.

Since using separate commands for \begin{frame}and \end{frame} does not work -- the end part causes problems, I searched for another solution and found this one here:

\long\def\bslide#1\eslide{\begin{frame}{xxx}#1\end{frame}}


This line put in the preamble (of the beamer template; I do not post it here since it is the default + this line added before \begin{document}), does not create a slide from this code in the document (created a minimal working example with Pandoc and the Latex new commands):

---
title:          "Slides in Pandoc with Latex newcommands"
author:     "The Author"
date:           "2016-06-06"
pandoc-command: "pandoc -t beamer -s mew.md -o mew.beamer.pdf --latex-engine=xelatex --slide-level=5 --template=templates-minimal/pandoc2minibeamer.beamer"

...

# Part title

\bslide

This is a nice slide

\eslide


Using this terminal command:

pandoc -t beamer -s mew.md -o mew.beamer.pdf --latex-engine=xelatex --slide-level=5 --template=templates-minimal/pandoc2minibeamer.beamer


I get two slides, the title slide and the Part Title slide, but not the important slide.

What is wrong with this idea? Thanks!

• Welcome to TeX.SX!! It is better to post a full minimal working example. LaTeX MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. The code should compile and be as small as possible to demonstrate your problem. This makes it much easier for people to help you --- and much more likely that they will! – Andrew Jun 6 '16 at 7:59
• Thanks for your quick answer, I just edited the text and hope it is clearer now. – Shinoto Jun 6 '16 at 8:23