Redefining symbol midway through a document Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Conflict between color, graphicx and libertineWish to design new integral symbol with infinity symbol through itTeXLive/PDFTeX fonts loading problemConverting all numbers in document to set number of decimal placesGenerating PDF/A-1b compliant documents using pdfx and pdfLaTeXUndefined control sequence Hy@MakeCurrentHrefAuto when using tex4htRedefining math symbols like eta (with ensuremath)Redefining command outside math modebar through letter in mathmodeAdd an iterative layer to IfFileExists to check each graphicspath

Why aren't air breathing engines used as small first stages

If a contract sometimes uses the wrong name, is it still valid?

What would be the ideal power source for a cybernetic eye?

Letter Boxed validator

Stars Make Stars

How can I make names more distinctive without making them longer?

Diagram with tikz

Why is there no army of Iron-Mans in the MCU?

ListPlot join points by nearest neighbor rather than order

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

How do I mention the quality of my school without bragging

Why was the term "discrete" used in discrete logarithm?

If Jon Snow became King of the Seven Kingdoms what would his regnal number be?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Why are there no cargo aircraft with "flying wing" design?

do i need a schengen visa for a direct flight to amsterdam?

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

What happens to sewage if there is no river near by?

Gastric acid as a weapon

What do you call a phrase that's not an idiom yet?

Models of set theory where not every set can be linearly ordered

Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?

Are my PIs rude or am I just being too sensitive?

Does surprise arrest existing movement?



Redefining symbol midway through a document



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Conflict between color, graphicx and libertineWish to design new integral symbol with infinity symbol through itTeXLive/PDFTeX fonts loading problemConverting all numbers in document to set number of decimal placesGenerating PDF/A-1b compliant documents using pdfx and pdfLaTeXUndefined control sequence Hy@MakeCurrentHrefAuto when using tex4htRedefining math symbols like eta (with ensuremath)Redefining command outside math modebar through letter in mathmodeAdd an iterative layer to IfFileExists to check each graphicspath










2















I am trying to have one command (phi) draw two different symbols (varphi and regular phi) in the same document.



I have tried this with the below:



documentclassarticle
usepackageamsmath, amssymb

newcommandoldphiphi
renewcommandphivarphi

begindocument
$phi$
renewcommandphioldphi
$phi$
enddocument


But this wont compile (with pdftex or TexMaker), it seem like it gets stuck in a loop and wont create a pdf, but I can't see why?



Or is there a better way to achieve this?










share|improve this question
























  • Yes: using phi` when you want it, and `varphi`` when it is the one you need.

    – Bernard
    Mar 31 at 18:56











  • @Bernard I know that's the simplest way to do it really, but it would mean writing way to many extra letters :P

    – Sergestus
    Mar 31 at 19:01















2















I am trying to have one command (phi) draw two different symbols (varphi and regular phi) in the same document.



I have tried this with the below:



documentclassarticle
usepackageamsmath, amssymb

newcommandoldphiphi
renewcommandphivarphi

begindocument
$phi$
renewcommandphioldphi
$phi$
enddocument


But this wont compile (with pdftex or TexMaker), it seem like it gets stuck in a loop and wont create a pdf, but I can't see why?



Or is there a better way to achieve this?










share|improve this question
























  • Yes: using phi` when you want it, and `varphi`` when it is the one you need.

    – Bernard
    Mar 31 at 18:56











  • @Bernard I know that's the simplest way to do it really, but it would mean writing way to many extra letters :P

    – Sergestus
    Mar 31 at 19:01













2












2








2








I am trying to have one command (phi) draw two different symbols (varphi and regular phi) in the same document.



I have tried this with the below:



documentclassarticle
usepackageamsmath, amssymb

newcommandoldphiphi
renewcommandphivarphi

begindocument
$phi$
renewcommandphioldphi
$phi$
enddocument


But this wont compile (with pdftex or TexMaker), it seem like it gets stuck in a loop and wont create a pdf, but I can't see why?



Or is there a better way to achieve this?










share|improve this question
















I am trying to have one command (phi) draw two different symbols (varphi and regular phi) in the same document.



I have tried this with the below:



documentclassarticle
usepackageamsmath, amssymb

newcommandoldphiphi
renewcommandphivarphi

begindocument
$phi$
renewcommandphioldphi
$phi$
enddocument


But this wont compile (with pdftex or TexMaker), it seem like it gets stuck in a loop and wont create a pdf, but I can't see why?



Or is there a better way to achieve this?







math-mode macros pdftex symbols






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 31 at 19:01







Sergestus

















asked Mar 31 at 18:32









SergestusSergestus

254




254












  • Yes: using phi` when you want it, and `varphi`` when it is the one you need.

    – Bernard
    Mar 31 at 18:56











  • @Bernard I know that's the simplest way to do it really, but it would mean writing way to many extra letters :P

    – Sergestus
    Mar 31 at 19:01

















  • Yes: using phi` when you want it, and `varphi`` when it is the one you need.

    – Bernard
    Mar 31 at 18:56











  • @Bernard I know that's the simplest way to do it really, but it would mean writing way to many extra letters :P

    – Sergestus
    Mar 31 at 19:01
















Yes: using phi` when you want it, and `varphi`` when it is the one you need.

– Bernard
Mar 31 at 18:56





Yes: using phi` when you want it, and `varphi`` when it is the one you need.

– Bernard
Mar 31 at 18:56













@Bernard I know that's the simplest way to do it really, but it would mean writing way to many extra letters :P

– Sergestus
Mar 31 at 19:01





@Bernard I know that's the simplest way to do it really, but it would mean writing way to many extra letters :P

– Sergestus
Mar 31 at 19:01










2 Answers
2






active

oldest

votes


















4














With let, it works:



documentclassarticle
usepackageamsmath, amssymb

letoldphi=phi
letphi=varphi

begindocument

$phi$

letphi=oldphi
$phi$

letphi=varphi
$phi$

letphi=oldphi
$phi$

enddocument


enter image description here






share|improve this answer























  • Great! I had just reached the same conclusion below, thanks!

    – Sergestus
    Mar 31 at 19:18






  • 1





    Oh! I see. Great minds think together! :o)

    – Bernard
    Mar 31 at 19:21


















0














I have solved this myself using let and so post this for posterity.



documentclassarticle
usepackageamsmath, amssymb

letoldphiphi
letphivarphi

begindocument
$phi$
letphioldphi
$phi$
enddocument


My understanding is that newcommandxy simply replaces "a" with "b" so can become circular, whereas letab actually sets a to the value of b, so resolves any self-referencing issues.






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',
    autoActivateHeartbeat: false,
    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%2f482475%2fredefining-symbol-midway-through-a-document%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    With let, it works:



    documentclassarticle
    usepackageamsmath, amssymb

    letoldphi=phi
    letphi=varphi

    begindocument

    $phi$

    letphi=oldphi
    $phi$

    letphi=varphi
    $phi$

    letphi=oldphi
    $phi$

    enddocument


    enter image description here






    share|improve this answer























    • Great! I had just reached the same conclusion below, thanks!

      – Sergestus
      Mar 31 at 19:18






    • 1





      Oh! I see. Great minds think together! :o)

      – Bernard
      Mar 31 at 19:21















    4














    With let, it works:



    documentclassarticle
    usepackageamsmath, amssymb

    letoldphi=phi
    letphi=varphi

    begindocument

    $phi$

    letphi=oldphi
    $phi$

    letphi=varphi
    $phi$

    letphi=oldphi
    $phi$

    enddocument


    enter image description here






    share|improve this answer























    • Great! I had just reached the same conclusion below, thanks!

      – Sergestus
      Mar 31 at 19:18






    • 1





      Oh! I see. Great minds think together! :o)

      – Bernard
      Mar 31 at 19:21













    4












    4








    4







    With let, it works:



    documentclassarticle
    usepackageamsmath, amssymb

    letoldphi=phi
    letphi=varphi

    begindocument

    $phi$

    letphi=oldphi
    $phi$

    letphi=varphi
    $phi$

    letphi=oldphi
    $phi$

    enddocument


    enter image description here






    share|improve this answer













    With let, it works:



    documentclassarticle
    usepackageamsmath, amssymb

    letoldphi=phi
    letphi=varphi

    begindocument

    $phi$

    letphi=oldphi
    $phi$

    letphi=varphi
    $phi$

    letphi=oldphi
    $phi$

    enddocument


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 31 at 19:15









    BernardBernard

    176k778210




    176k778210












    • Great! I had just reached the same conclusion below, thanks!

      – Sergestus
      Mar 31 at 19:18






    • 1





      Oh! I see. Great minds think together! :o)

      – Bernard
      Mar 31 at 19:21

















    • Great! I had just reached the same conclusion below, thanks!

      – Sergestus
      Mar 31 at 19:18






    • 1





      Oh! I see. Great minds think together! :o)

      – Bernard
      Mar 31 at 19:21
















    Great! I had just reached the same conclusion below, thanks!

    – Sergestus
    Mar 31 at 19:18





    Great! I had just reached the same conclusion below, thanks!

    – Sergestus
    Mar 31 at 19:18




    1




    1





    Oh! I see. Great minds think together! :o)

    – Bernard
    Mar 31 at 19:21





    Oh! I see. Great minds think together! :o)

    – Bernard
    Mar 31 at 19:21











    0














    I have solved this myself using let and so post this for posterity.



    documentclassarticle
    usepackageamsmath, amssymb

    letoldphiphi
    letphivarphi

    begindocument
    $phi$
    letphioldphi
    $phi$
    enddocument


    My understanding is that newcommandxy simply replaces "a" with "b" so can become circular, whereas letab actually sets a to the value of b, so resolves any self-referencing issues.






    share|improve this answer



























      0














      I have solved this myself using let and so post this for posterity.



      documentclassarticle
      usepackageamsmath, amssymb

      letoldphiphi
      letphivarphi

      begindocument
      $phi$
      letphioldphi
      $phi$
      enddocument


      My understanding is that newcommandxy simply replaces "a" with "b" so can become circular, whereas letab actually sets a to the value of b, so resolves any self-referencing issues.






      share|improve this answer

























        0












        0








        0







        I have solved this myself using let and so post this for posterity.



        documentclassarticle
        usepackageamsmath, amssymb

        letoldphiphi
        letphivarphi

        begindocument
        $phi$
        letphioldphi
        $phi$
        enddocument


        My understanding is that newcommandxy simply replaces "a" with "b" so can become circular, whereas letab actually sets a to the value of b, so resolves any self-referencing issues.






        share|improve this answer













        I have solved this myself using let and so post this for posterity.



        documentclassarticle
        usepackageamsmath, amssymb

        letoldphiphi
        letphivarphi

        begindocument
        $phi$
        letphioldphi
        $phi$
        enddocument


        My understanding is that newcommandxy simply replaces "a" with "b" so can become circular, whereas letab actually sets a to the value of b, so resolves any self-referencing issues.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 31 at 19:15









        SergestusSergestus

        254




        254



























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482475%2fredefining-symbol-midway-through-a-document%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

            Triangular numbers and gcdProving sum of a set is $0 pmod n$ if $n$ is odd, or $fracn2 pmod n$ if $n$ is even?Is greatest common divisor of two numbers really their smallest linear combination?GCD, LCM RelationshipProve a set of nonnegative integers with greatest common divisor 1 and closed under addition has all but finite many nonnegative integers.all pairs of a and b in an equation containing gcdTriangular Numbers Modulo $k$ - Hit All Values?Understanding the Existence and Uniqueness of the GCDGCD and LCM with logical symbolsThe greatest common divisor of two positive integers less than 100 is equal to 3. Their least common multiple is twelve times one of the integers.Suppose that for all integers $x$, $x|a$ and $x|b$ if and only if $x|c$. Then $c = gcd(a,b)$Which is the gcd of 2 numbers which are multiplied and the result is 600000?

            Ingelân Ynhâld Etymology | Geografy | Skiednis | Polityk en bestjoer | Ekonomy | Demografy | Kultuer | Klimaat | Sjoch ek | Keppelings om utens | Boarnen, noaten en referinsjes Navigaasjemenuwww.gov.ukOffisjele webside fan it regear fan it Feriene KeninkrykOffisjele webside fan it Britske FerkearsburoNederlânsktalige ynformaasje fan it Britske FerkearsburoOffisjele webside fan English Heritage, de organisaasje dy't him ynset foar it behâld fan it Ingelske kultuergoedYnwennertallen fan alle Britske stêden út 'e folkstelling fan 2011Notes en References, op dizze sideEngland

            Հադիս Բովանդակություն Անվանում և նշանակություն | Դասակարգում | Աղբյուրներ | Նավարկման ցանկ