Newcommand alert











up vote
0
down vote

favorite












I would like to create a new command, like alert, but in other colours and if it was possible to combine it with the comand pmb.



I mean in the first frame shows 2x+1
and after a click pmb{2x+1} (in blue, for instance)



Thak you in advance










share|improve this question




















  • 1




    Welcome to TeX SX! What is your question about?
    – Bernard
    Dec 2 at 23:25






  • 1




    Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is pmb?), and this makes it really hard to help you. A MWE should start with a documentclass command, have a minimal preamble and then begin{document}...end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say.
    – Andrew
    Dec 2 at 23:31










  • Does this help?
    – marmot
    Dec 3 at 3:08










  • Note that pmb{2x+1} is wider than 2x+1
    – egreg
    Dec 6 at 21:33















up vote
0
down vote

favorite












I would like to create a new command, like alert, but in other colours and if it was possible to combine it with the comand pmb.



I mean in the first frame shows 2x+1
and after a click pmb{2x+1} (in blue, for instance)



Thak you in advance










share|improve this question




















  • 1




    Welcome to TeX SX! What is your question about?
    – Bernard
    Dec 2 at 23:25






  • 1




    Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is pmb?), and this makes it really hard to help you. A MWE should start with a documentclass command, have a minimal preamble and then begin{document}...end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say.
    – Andrew
    Dec 2 at 23:31










  • Does this help?
    – marmot
    Dec 3 at 3:08










  • Note that pmb{2x+1} is wider than 2x+1
    – egreg
    Dec 6 at 21:33













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I would like to create a new command, like alert, but in other colours and if it was possible to combine it with the comand pmb.



I mean in the first frame shows 2x+1
and after a click pmb{2x+1} (in blue, for instance)



Thak you in advance










share|improve this question















I would like to create a new command, like alert, but in other colours and if it was possible to combine it with the comand pmb.



I mean in the first frame shows 2x+1
and after a click pmb{2x+1} (in blue, for instance)



Thak you in advance







macros






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 3 at 0:28









Bernard

164k769192




164k769192










asked Dec 2 at 23:17









Sergio

1




1








  • 1




    Welcome to TeX SX! What is your question about?
    – Bernard
    Dec 2 at 23:25






  • 1




    Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is pmb?), and this makes it really hard to help you. A MWE should start with a documentclass command, have a minimal preamble and then begin{document}...end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say.
    – Andrew
    Dec 2 at 23:31










  • Does this help?
    – marmot
    Dec 3 at 3:08










  • Note that pmb{2x+1} is wider than 2x+1
    – egreg
    Dec 6 at 21:33














  • 1




    Welcome to TeX SX! What is your question about?
    – Bernard
    Dec 2 at 23:25






  • 1




    Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is pmb?), and this makes it really hard to help you. A MWE should start with a documentclass command, have a minimal preamble and then begin{document}...end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say.
    – Andrew
    Dec 2 at 23:31










  • Does this help?
    – marmot
    Dec 3 at 3:08










  • Note that pmb{2x+1} is wider than 2x+1
    – egreg
    Dec 6 at 21:33








1




1




Welcome to TeX SX! What is your question about?
– Bernard
Dec 2 at 23:25




Welcome to TeX SX! What is your question about?
– Bernard
Dec 2 at 23:25




1




1




Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is pmb?), and this makes it really hard to help you. A MWE should start with a documentclass command, have a minimal preamble and then begin{document}...end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say.
– Andrew
Dec 2 at 23:31




Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is pmb?), and this makes it really hard to help you. A MWE should start with a documentclass command, have a minimal preamble and then begin{document}...end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say.
– Andrew
Dec 2 at 23:31












Does this help?
– marmot
Dec 3 at 3:08




Does this help?
– marmot
Dec 3 at 3:08












Note that pmb{2x+1} is wider than 2x+1
– egreg
Dec 6 at 21:33




Note that pmb{2x+1} is wider than 2x+1
– egreg
Dec 6 at 21:33










1 Answer
1






active

oldest

votes

















up vote
1
down vote













You could define a command that uses alert, just in a different colour:



documentclass{beamer}

newcommand<>{myalert}[1]{%
begingroup
setbeamercolor{alerted text}{fg=blue}%
alert#2{#1}%
endgroup
}

begin{document}

begin{frame}

alert<1>{test}

myalert<3-5>{sdf}

end{frame}

end{document}





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%2f462877%2fnewcommand-alert%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    You could define a command that uses alert, just in a different colour:



    documentclass{beamer}

    newcommand<>{myalert}[1]{%
    begingroup
    setbeamercolor{alerted text}{fg=blue}%
    alert#2{#1}%
    endgroup
    }

    begin{document}

    begin{frame}

    alert<1>{test}

    myalert<3-5>{sdf}

    end{frame}

    end{document}





    share|improve this answer

























      up vote
      1
      down vote













      You could define a command that uses alert, just in a different colour:



      documentclass{beamer}

      newcommand<>{myalert}[1]{%
      begingroup
      setbeamercolor{alerted text}{fg=blue}%
      alert#2{#1}%
      endgroup
      }

      begin{document}

      begin{frame}

      alert<1>{test}

      myalert<3-5>{sdf}

      end{frame}

      end{document}





      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        You could define a command that uses alert, just in a different colour:



        documentclass{beamer}

        newcommand<>{myalert}[1]{%
        begingroup
        setbeamercolor{alerted text}{fg=blue}%
        alert#2{#1}%
        endgroup
        }

        begin{document}

        begin{frame}

        alert<1>{test}

        myalert<3-5>{sdf}

        end{frame}

        end{document}





        share|improve this answer












        You could define a command that uses alert, just in a different colour:



        documentclass{beamer}

        newcommand<>{myalert}[1]{%
        begingroup
        setbeamercolor{alerted text}{fg=blue}%
        alert#2{#1}%
        endgroup
        }

        begin{document}

        begin{frame}

        alert<1>{test}

        myalert<3-5>{sdf}

        end{frame}

        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 6 at 21:09









        samcarter

        83.4k794267




        83.4k794267






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462877%2fnewcommand-alert%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?