How to hold a object on two slides?

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











up vote
4
down vote

favorite
1












I'm working on an animation of "Odd Magic Square" with Loubere Method.



But I can't hold the number "2" with dashed outline square on the two slides!
How to?
enter image description here



The code:



 documentclass[11pt]beamer
usepackage[utf8]inputenc
usepackage[T1]fontenc
usethemedefault
%usepackagelistings
usepackagetikz

begindocument



beginframe$n$- magic matrix % ================================================================
beginitemize[<+->]
item text1
item text2
item text3
enditemize

beginonlyenv<+->
begintikzpicture
tikzstylenormal=[fill=yellow!80!red]
tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
tikzstyleredarrow=[->, thick, red]

foreach x in 0,1,2
foreach y in 0,1,2
draw[normal] (x, y) rectangle +(1, 1);

fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
only<+->
node at (1.5, 2.5) $1$;

only<+>
draw[testing] (2, 3) rectangle +(1, 1);
node at (2.5, 3.5) $2$;

only<+>
draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

only<.->
node at (2.5, 0.5) $2$;

only<+>
draw[testing] (3, 1) rectangle +(1, 1);
node at (3.5, 1.5) $3$;

only<+>
draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

only<.->
node at (0.5, 1.5) $3$;

only<+>
%draw[fill=white] (1, 2) rectangle +(1, 1);
draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
node at (1.8, 2.2) $4$;

only<+->
node at (0.5, 0.5) $4$;

endtikzpicture
endonlyenv
endframe
enddocument









share|improve this question

























    up vote
    4
    down vote

    favorite
    1












    I'm working on an animation of "Odd Magic Square" with Loubere Method.



    But I can't hold the number "2" with dashed outline square on the two slides!
    How to?
    enter image description here



    The code:



     documentclass[11pt]beamer
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usethemedefault
    %usepackagelistings
    usepackagetikz

    begindocument



    beginframe$n$- magic matrix % ================================================================
    beginitemize[<+->]
    item text1
    item text2
    item text3
    enditemize

    beginonlyenv<+->
    begintikzpicture
    tikzstylenormal=[fill=yellow!80!red]
    tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
    tikzstyleredarrow=[->, thick, red]

    foreach x in 0,1,2
    foreach y in 0,1,2
    draw[normal] (x, y) rectangle +(1, 1);

    fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
    only<+->
    node at (1.5, 2.5) $1$;

    only<+>
    draw[testing] (2, 3) rectangle +(1, 1);
    node at (2.5, 3.5) $2$;

    only<+>
    draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

    only<.->
    node at (2.5, 0.5) $2$;

    only<+>
    draw[testing] (3, 1) rectangle +(1, 1);
    node at (3.5, 1.5) $3$;

    only<+>
    draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

    only<.->
    node at (0.5, 1.5) $3$;

    only<+>
    %draw[fill=white] (1, 2) rectangle +(1, 1);
    draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
    node at (1.8, 2.2) $4$;

    only<+->
    node at (0.5, 0.5) $4$;

    endtikzpicture
    endonlyenv
    endframe
    enddocument









    share|improve this question























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      I'm working on an animation of "Odd Magic Square" with Loubere Method.



      But I can't hold the number "2" with dashed outline square on the two slides!
      How to?
      enter image description here



      The code:



       documentclass[11pt]beamer
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usethemedefault
      %usepackagelistings
      usepackagetikz

      begindocument



      beginframe$n$- magic matrix % ================================================================
      beginitemize[<+->]
      item text1
      item text2
      item text3
      enditemize

      beginonlyenv<+->
      begintikzpicture
      tikzstylenormal=[fill=yellow!80!red]
      tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
      tikzstyleredarrow=[->, thick, red]

      foreach x in 0,1,2
      foreach y in 0,1,2
      draw[normal] (x, y) rectangle +(1, 1);

      fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
      only<+->
      node at (1.5, 2.5) $1$;

      only<+>
      draw[testing] (2, 3) rectangle +(1, 1);
      node at (2.5, 3.5) $2$;

      only<+>
      draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

      only<.->
      node at (2.5, 0.5) $2$;

      only<+>
      draw[testing] (3, 1) rectangle +(1, 1);
      node at (3.5, 1.5) $3$;

      only<+>
      draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

      only<.->
      node at (0.5, 1.5) $3$;

      only<+>
      %draw[fill=white] (1, 2) rectangle +(1, 1);
      draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
      node at (1.8, 2.2) $4$;

      only<+->
      node at (0.5, 0.5) $4$;

      endtikzpicture
      endonlyenv
      endframe
      enddocument









      share|improve this question













      I'm working on an animation of "Odd Magic Square" with Loubere Method.



      But I can't hold the number "2" with dashed outline square on the two slides!
      How to?
      enter image description here



      The code:



       documentclass[11pt]beamer
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usethemedefault
      %usepackagelistings
      usepackagetikz

      begindocument



      beginframe$n$- magic matrix % ================================================================
      beginitemize[<+->]
      item text1
      item text2
      item text3
      enditemize

      beginonlyenv<+->
      begintikzpicture
      tikzstylenormal=[fill=yellow!80!red]
      tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
      tikzstyleredarrow=[->, thick, red]

      foreach x in 0,1,2
      foreach y in 0,1,2
      draw[normal] (x, y) rectangle +(1, 1);

      fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
      only<+->
      node at (1.5, 2.5) $1$;

      only<+>
      draw[testing] (2, 3) rectangle +(1, 1);
      node at (2.5, 3.5) $2$;

      only<+>
      draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

      only<.->
      node at (2.5, 0.5) $2$;

      only<+>
      draw[testing] (3, 1) rectangle +(1, 1);
      node at (3.5, 1.5) $3$;

      only<+>
      draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

      only<.->
      node at (0.5, 1.5) $3$;

      only<+>
      %draw[fill=white] (1, 2) rectangle +(1, 1);
      draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
      node at (1.8, 2.2) $4$;

      only<+->
      node at (0.5, 0.5) $4$;

      endtikzpicture
      endonlyenv
      endframe
      enddocument






      tikz-pgf beamer






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      xaero

      434




      434




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          You can play with the overlay specification of only. See the code below.



          documentclass[11pt]beamer
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usethemedefault
          %usepackagelistings
          usepackagetikz

          begindocument



          beginframe$n$- magic matrix % ================================================================
          beginitemize[<+->]
          item text1
          item text2
          item text3
          enditemize

          beginonlyenv<+->
          begintikzpicture
          tikzstylenormal=[fill=yellow!80!red]
          tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
          tikzstyleredarrow=[->, thick, red]

          foreach x in 0,1,2
          foreach y in 0,1,2
          draw[normal] (x, y) rectangle +(1, 1);

          fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
          only<+->
          node at (1.5, 2.5) $1$;

          only<.-+>
          draw[testing] (2, 3) rectangle +(1, 1);
          node at (2.5, 3.5) $2$;

          only<.>
          draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

          only<.->
          node at (2.5, 0.5) $2$;

          only<+>
          only<.-+>
          draw[testing] (3, 1) rectangle +(1, 1);
          node at (3.5, 1.5) $3$;

          only<.>
          draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

          only<.->
          node at (0.5, 1.5) $3$;

          only<+>
          %draw[fill=white] (1, 2) rectangle +(1, 1);
          draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
          node at (1.8, 2.2) $4$;

          only<+->
          node at (0.5, 0.5) $4$;

          endtikzpicture
          endonlyenv
          endframe
          enddocument


          enter image description here






          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: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            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%2f457837%2fhow-to-hold-a-object-on-two-slides%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            You can play with the overlay specification of only. See the code below.



            documentclass[11pt]beamer
            usepackage[utf8]inputenc
            usepackage[T1]fontenc
            usethemedefault
            %usepackagelistings
            usepackagetikz

            begindocument



            beginframe$n$- magic matrix % ================================================================
            beginitemize[<+->]
            item text1
            item text2
            item text3
            enditemize

            beginonlyenv<+->
            begintikzpicture
            tikzstylenormal=[fill=yellow!80!red]
            tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
            tikzstyleredarrow=[->, thick, red]

            foreach x in 0,1,2
            foreach y in 0,1,2
            draw[normal] (x, y) rectangle +(1, 1);

            fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
            only<+->
            node at (1.5, 2.5) $1$;

            only<.-+>
            draw[testing] (2, 3) rectangle +(1, 1);
            node at (2.5, 3.5) $2$;

            only<.>
            draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

            only<.->
            node at (2.5, 0.5) $2$;

            only<+>
            only<.-+>
            draw[testing] (3, 1) rectangle +(1, 1);
            node at (3.5, 1.5) $3$;

            only<.>
            draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

            only<.->
            node at (0.5, 1.5) $3$;

            only<+>
            %draw[fill=white] (1, 2) rectangle +(1, 1);
            draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
            node at (1.8, 2.2) $4$;

            only<+->
            node at (0.5, 0.5) $4$;

            endtikzpicture
            endonlyenv
            endframe
            enddocument


            enter image description here






            share|improve this answer
























              up vote
              2
              down vote













              You can play with the overlay specification of only. See the code below.



              documentclass[11pt]beamer
              usepackage[utf8]inputenc
              usepackage[T1]fontenc
              usethemedefault
              %usepackagelistings
              usepackagetikz

              begindocument



              beginframe$n$- magic matrix % ================================================================
              beginitemize[<+->]
              item text1
              item text2
              item text3
              enditemize

              beginonlyenv<+->
              begintikzpicture
              tikzstylenormal=[fill=yellow!80!red]
              tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
              tikzstyleredarrow=[->, thick, red]

              foreach x in 0,1,2
              foreach y in 0,1,2
              draw[normal] (x, y) rectangle +(1, 1);

              fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
              only<+->
              node at (1.5, 2.5) $1$;

              only<.-+>
              draw[testing] (2, 3) rectangle +(1, 1);
              node at (2.5, 3.5) $2$;

              only<.>
              draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

              only<.->
              node at (2.5, 0.5) $2$;

              only<+>
              only<.-+>
              draw[testing] (3, 1) rectangle +(1, 1);
              node at (3.5, 1.5) $3$;

              only<.>
              draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

              only<.->
              node at (0.5, 1.5) $3$;

              only<+>
              %draw[fill=white] (1, 2) rectangle +(1, 1);
              draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
              node at (1.8, 2.2) $4$;

              only<+->
              node at (0.5, 0.5) $4$;

              endtikzpicture
              endonlyenv
              endframe
              enddocument


              enter image description here






              share|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                You can play with the overlay specification of only. See the code below.



                documentclass[11pt]beamer
                usepackage[utf8]inputenc
                usepackage[T1]fontenc
                usethemedefault
                %usepackagelistings
                usepackagetikz

                begindocument



                beginframe$n$- magic matrix % ================================================================
                beginitemize[<+->]
                item text1
                item text2
                item text3
                enditemize

                beginonlyenv<+->
                begintikzpicture
                tikzstylenormal=[fill=yellow!80!red]
                tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
                tikzstyleredarrow=[->, thick, red]

                foreach x in 0,1,2
                foreach y in 0,1,2
                draw[normal] (x, y) rectangle +(1, 1);

                fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
                only<+->
                node at (1.5, 2.5) $1$;

                only<.-+>
                draw[testing] (2, 3) rectangle +(1, 1);
                node at (2.5, 3.5) $2$;

                only<.>
                draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

                only<.->
                node at (2.5, 0.5) $2$;

                only<+>
                only<.-+>
                draw[testing] (3, 1) rectangle +(1, 1);
                node at (3.5, 1.5) $3$;

                only<.>
                draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

                only<.->
                node at (0.5, 1.5) $3$;

                only<+>
                %draw[fill=white] (1, 2) rectangle +(1, 1);
                draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
                node at (1.8, 2.2) $4$;

                only<+->
                node at (0.5, 0.5) $4$;

                endtikzpicture
                endonlyenv
                endframe
                enddocument


                enter image description here






                share|improve this answer












                You can play with the overlay specification of only. See the code below.



                documentclass[11pt]beamer
                usepackage[utf8]inputenc
                usepackage[T1]fontenc
                usethemedefault
                %usepackagelistings
                usepackagetikz

                begindocument



                beginframe$n$- magic matrix % ================================================================
                beginitemize[<+->]
                item text1
                item text2
                item text3
                enditemize

                beginonlyenv<+->
                begintikzpicture
                tikzstylenormal=[fill=yellow!80!red]
                tikzstyletesting=[fill=yellow!80!red, fill opacity=0.4, dashed]
                tikzstyleredarrow=[->, thick, red]

                foreach x in 0,1,2
                foreach y in 0,1,2
                draw[normal] (x, y) rectangle +(1, 1);

                fill[fill opacity=0.1, fill=white] (-1, 3) rectangle +(1, 1);
                only<+->
                node at (1.5, 2.5) $1$;

                only<.-+>
                draw[testing] (2, 3) rectangle +(1, 1);
                node at (2.5, 3.5) $2$;

                only<.>
                draw[redarrow] (2.5, 3.5) --(2.5, 0.8);

                only<.->
                node at (2.5, 0.5) $2$;

                only<+>
                only<.-+>
                draw[testing] (3, 1) rectangle +(1, 1);
                node at (3.5, 1.5) $3$;

                only<.>
                draw[redarrow] (3.5, 1.5) --(0.8, 1.5);

                only<.->
                node at (0.5, 1.5) $3$;

                only<+>
                %draw[fill=white] (1, 2) rectangle +(1, 1);
                draw[fill=red!80!black, fill opacity=0.4, draw=red, dashed] (1, 2) rectangle +(1, 1);
                node at (1.8, 2.2) $4$;

                only<+->
                node at (0.5, 0.5) $4$;

                endtikzpicture
                endonlyenv
                endframe
                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 hours ago









                bmv

                2,542824




                2,542824



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457837%2fhow-to-hold-a-object-on-two-slides%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    Confectionery