Presentation that shows how to use lualatex to make a presentation

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












In my presentation, I would like to have a listings environment that shows how to make a presentation.
So far I have found that, when using listings in a presentation, we should pass the option fragile to the frame we want use the listings environment in.
I then thought that the following would work (compiling with lualatex):



documentclass[lualatex]beamer

usepackagelistings
lstsetlanguage=[LaTeX]TeX

begindocument
beginframe[fragile]Minimum Working Example
beginlstlisting
documentclass[lualatex]beamer

begindocument
beginframeI am the title of this slide!
I am some body text.
endframe
enddocument
endlstlisting
endframe
enddocument


This gives lua a panic attack:




PANIC: unprotected error in call to Lua API (object in use)




The first few latex errors are:




./test.tex:14: Missing } inserted.


}
l.14 endframe



./test.tex:14: LaTeX Error: beginlstlisting on input line 2 ended by endbe
amer@framepauses.



./test.tex:14: Extra }, or forgotten endgroup.




When commenting out the lines beginframe ... endframe it compiles fine, as can be seen in the picture below.



output



Googling this I didn't get very far, mostly ending up on questions that had as answer that we should not forget to pass fragile to the frame when using listings.
The difference between those questions and this one is that I am trying to put a frame in a listing, besides having a listing in a frame.










share|improve this question





















  • This problem also occurs with pdflatex and xelatex with the same LaTeX error.
    – Marijn
    18 mins ago






  • 2




    Put your example in an external file and use lstinputlisting. The inner endframe confuses beamer.
    – Ulrike Fischer
    17 mins ago














up vote
4
down vote

favorite












In my presentation, I would like to have a listings environment that shows how to make a presentation.
So far I have found that, when using listings in a presentation, we should pass the option fragile to the frame we want use the listings environment in.
I then thought that the following would work (compiling with lualatex):



documentclass[lualatex]beamer

usepackagelistings
lstsetlanguage=[LaTeX]TeX

begindocument
beginframe[fragile]Minimum Working Example
beginlstlisting
documentclass[lualatex]beamer

begindocument
beginframeI am the title of this slide!
I am some body text.
endframe
enddocument
endlstlisting
endframe
enddocument


This gives lua a panic attack:




PANIC: unprotected error in call to Lua API (object in use)




The first few latex errors are:




./test.tex:14: Missing } inserted.


}
l.14 endframe



./test.tex:14: LaTeX Error: beginlstlisting on input line 2 ended by endbe
amer@framepauses.



./test.tex:14: Extra }, or forgotten endgroup.




When commenting out the lines beginframe ... endframe it compiles fine, as can be seen in the picture below.



output



Googling this I didn't get very far, mostly ending up on questions that had as answer that we should not forget to pass fragile to the frame when using listings.
The difference between those questions and this one is that I am trying to put a frame in a listing, besides having a listing in a frame.










share|improve this question





















  • This problem also occurs with pdflatex and xelatex with the same LaTeX error.
    – Marijn
    18 mins ago






  • 2




    Put your example in an external file and use lstinputlisting. The inner endframe confuses beamer.
    – Ulrike Fischer
    17 mins ago












up vote
4
down vote

favorite









up vote
4
down vote

favorite











In my presentation, I would like to have a listings environment that shows how to make a presentation.
So far I have found that, when using listings in a presentation, we should pass the option fragile to the frame we want use the listings environment in.
I then thought that the following would work (compiling with lualatex):



documentclass[lualatex]beamer

usepackagelistings
lstsetlanguage=[LaTeX]TeX

begindocument
beginframe[fragile]Minimum Working Example
beginlstlisting
documentclass[lualatex]beamer

begindocument
beginframeI am the title of this slide!
I am some body text.
endframe
enddocument
endlstlisting
endframe
enddocument


This gives lua a panic attack:




PANIC: unprotected error in call to Lua API (object in use)




The first few latex errors are:




./test.tex:14: Missing } inserted.


}
l.14 endframe



./test.tex:14: LaTeX Error: beginlstlisting on input line 2 ended by endbe
amer@framepauses.



./test.tex:14: Extra }, or forgotten endgroup.




When commenting out the lines beginframe ... endframe it compiles fine, as can be seen in the picture below.



output



Googling this I didn't get very far, mostly ending up on questions that had as answer that we should not forget to pass fragile to the frame when using listings.
The difference between those questions and this one is that I am trying to put a frame in a listing, besides having a listing in a frame.










share|improve this question













In my presentation, I would like to have a listings environment that shows how to make a presentation.
So far I have found that, when using listings in a presentation, we should pass the option fragile to the frame we want use the listings environment in.
I then thought that the following would work (compiling with lualatex):



documentclass[lualatex]beamer

usepackagelistings
lstsetlanguage=[LaTeX]TeX

begindocument
beginframe[fragile]Minimum Working Example
beginlstlisting
documentclass[lualatex]beamer

begindocument
beginframeI am the title of this slide!
I am some body text.
endframe
enddocument
endlstlisting
endframe
enddocument


This gives lua a panic attack:




PANIC: unprotected error in call to Lua API (object in use)




The first few latex errors are:




./test.tex:14: Missing } inserted.


}
l.14 endframe



./test.tex:14: LaTeX Error: beginlstlisting on input line 2 ended by endbe
amer@framepauses.



./test.tex:14: Extra }, or forgotten endgroup.




When commenting out the lines beginframe ... endframe it compiles fine, as can be seen in the picture below.



output



Googling this I didn't get very far, mostly ending up on questions that had as answer that we should not forget to pass fragile to the frame when using listings.
The difference between those questions and this one is that I am trying to put a frame in a listing, besides having a listing in a frame.







beamer listings luatex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 38 mins ago









Abby

1658




1658











  • This problem also occurs with pdflatex and xelatex with the same LaTeX error.
    – Marijn
    18 mins ago






  • 2




    Put your example in an external file and use lstinputlisting. The inner endframe confuses beamer.
    – Ulrike Fischer
    17 mins ago
















  • This problem also occurs with pdflatex and xelatex with the same LaTeX error.
    – Marijn
    18 mins ago






  • 2




    Put your example in an external file and use lstinputlisting. The inner endframe confuses beamer.
    – Ulrike Fischer
    17 mins ago















This problem also occurs with pdflatex and xelatex with the same LaTeX error.
– Marijn
18 mins ago




This problem also occurs with pdflatex and xelatex with the same LaTeX error.
– Marijn
18 mins ago




2




2




Put your example in an external file and use lstinputlisting. The inner endframe confuses beamer.
– Ulrike Fischer
17 mins ago




Put your example in an external file and use lstinputlisting. The inner endframe confuses beamer.
– Ulrike Fischer
17 mins ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote













Another option is to use [containsverbatim]:



documentclass[lualatex]beamer

usepackagelistings
lstsetlanguage=[LaTeX]TeX

begindocument
beginframe[containsverbatim]
frametitleMinimum Working Example
beginlstlisting
documentclass[lualatex]beamer

begindocument
beginframeI am the title of this slide!
I am some body text.
endframe
enddocument
endlstlisting
endframe
enddocument


enter image description here



Source: https://stackoverflow.com/questions/2981008/latex-issue-with-beamer-and-listings.






share|improve this answer



























    up vote
    1
    down vote













    As a workaround you can apply the example from page 62 of the beamer user guide:



    % !TeX TS-program = lualatex
    documentclass[lualatex]beamer

    usepackagelistings
    lstsetlanguage=[LaTeX]TeX

    newenvironmentslide
    beginframe[fragile,environment=slide]
    endframe

    begindocument
    beginslide
    frametitleMinimum Working Example
    beginlstlisting
    documentclass[lualatex]beamer

    begindocument
    beginframeI am the title of this slide!
    I am some body text.
    endframe
    enddocument
    endlstlisting
    endslide
    enddocument





    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "85"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454417%2fpresentation-that-shows-how-to-use-lualatex-to-make-a-presentation%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      Another option is to use [containsverbatim]:



      documentclass[lualatex]beamer

      usepackagelistings
      lstsetlanguage=[LaTeX]TeX

      begindocument
      beginframe[containsverbatim]
      frametitleMinimum Working Example
      beginlstlisting
      documentclass[lualatex]beamer

      begindocument
      beginframeI am the title of this slide!
      I am some body text.
      endframe
      enddocument
      endlstlisting
      endframe
      enddocument


      enter image description here



      Source: https://stackoverflow.com/questions/2981008/latex-issue-with-beamer-and-listings.






      share|improve this answer
























        up vote
        2
        down vote













        Another option is to use [containsverbatim]:



        documentclass[lualatex]beamer

        usepackagelistings
        lstsetlanguage=[LaTeX]TeX

        begindocument
        beginframe[containsverbatim]
        frametitleMinimum Working Example
        beginlstlisting
        documentclass[lualatex]beamer

        begindocument
        beginframeI am the title of this slide!
        I am some body text.
        endframe
        enddocument
        endlstlisting
        endframe
        enddocument


        enter image description here



        Source: https://stackoverflow.com/questions/2981008/latex-issue-with-beamer-and-listings.






        share|improve this answer






















          up vote
          2
          down vote










          up vote
          2
          down vote









          Another option is to use [containsverbatim]:



          documentclass[lualatex]beamer

          usepackagelistings
          lstsetlanguage=[LaTeX]TeX

          begindocument
          beginframe[containsverbatim]
          frametitleMinimum Working Example
          beginlstlisting
          documentclass[lualatex]beamer

          begindocument
          beginframeI am the title of this slide!
          I am some body text.
          endframe
          enddocument
          endlstlisting
          endframe
          enddocument


          enter image description here



          Source: https://stackoverflow.com/questions/2981008/latex-issue-with-beamer-and-listings.






          share|improve this answer












          Another option is to use [containsverbatim]:



          documentclass[lualatex]beamer

          usepackagelistings
          lstsetlanguage=[LaTeX]TeX

          begindocument
          beginframe[containsverbatim]
          frametitleMinimum Working Example
          beginlstlisting
          documentclass[lualatex]beamer

          begindocument
          beginframeI am the title of this slide!
          I am some body text.
          endframe
          enddocument
          endlstlisting
          endframe
          enddocument


          enter image description here



          Source: https://stackoverflow.com/questions/2981008/latex-issue-with-beamer-and-listings.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 14 mins ago









          Marijn

          6,861633




          6,861633




















              up vote
              1
              down vote













              As a workaround you can apply the example from page 62 of the beamer user guide:



              % !TeX TS-program = lualatex
              documentclass[lualatex]beamer

              usepackagelistings
              lstsetlanguage=[LaTeX]TeX

              newenvironmentslide
              beginframe[fragile,environment=slide]
              endframe

              begindocument
              beginslide
              frametitleMinimum Working Example
              beginlstlisting
              documentclass[lualatex]beamer

              begindocument
              beginframeI am the title of this slide!
              I am some body text.
              endframe
              enddocument
              endlstlisting
              endslide
              enddocument





              share|improve this answer
























                up vote
                1
                down vote













                As a workaround you can apply the example from page 62 of the beamer user guide:



                % !TeX TS-program = lualatex
                documentclass[lualatex]beamer

                usepackagelistings
                lstsetlanguage=[LaTeX]TeX

                newenvironmentslide
                beginframe[fragile,environment=slide]
                endframe

                begindocument
                beginslide
                frametitleMinimum Working Example
                beginlstlisting
                documentclass[lualatex]beamer

                begindocument
                beginframeI am the title of this slide!
                I am some body text.
                endframe
                enddocument
                endlstlisting
                endslide
                enddocument





                share|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  As a workaround you can apply the example from page 62 of the beamer user guide:



                  % !TeX TS-program = lualatex
                  documentclass[lualatex]beamer

                  usepackagelistings
                  lstsetlanguage=[LaTeX]TeX

                  newenvironmentslide
                  beginframe[fragile,environment=slide]
                  endframe

                  begindocument
                  beginslide
                  frametitleMinimum Working Example
                  beginlstlisting
                  documentclass[lualatex]beamer

                  begindocument
                  beginframeI am the title of this slide!
                  I am some body text.
                  endframe
                  enddocument
                  endlstlisting
                  endslide
                  enddocument





                  share|improve this answer












                  As a workaround you can apply the example from page 62 of the beamer user guide:



                  % !TeX TS-program = lualatex
                  documentclass[lualatex]beamer

                  usepackagelistings
                  lstsetlanguage=[LaTeX]TeX

                  newenvironmentslide
                  beginframe[fragile,environment=slide]
                  endframe

                  begindocument
                  beginslide
                  frametitleMinimum Working Example
                  beginlstlisting
                  documentclass[lualatex]beamer

                  begindocument
                  beginframeI am the title of this slide!
                  I am some body text.
                  endframe
                  enddocument
                  endlstlisting
                  endslide
                  enddocument






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 16 mins ago









                  samcarter

                  77.4k787247




                  77.4k787247



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454417%2fpresentation-that-shows-how-to-use-lualatex-to-make-a-presentation%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      Long meetings (6-7 hours a day): Being “babysat” by supervisor

                      What does second last employer means? [closed]

                      One-line joke