Does LaTeX redefine [some] TeX primitives?What is the difference between TeX and LaTeX?How is char processed in math mode?Why is there no mudimendef primitive?What is the difference between empty and @empty?Why isn't everything expandable?Creating new primitivesInput/Output primitives of TeXKnuth “Some Implementations of TeX”…Commands in TeX which are different in LaTeXHow to make commands defined by def behave as strings?Should different TeX implementations (e.g. MiKTeX's and TeX Live's) produce identical DVI files?Different file opened by openin (was: between 2017 and 2018)

English - Acceptable use of parentheses in an author's name

Improve survivability of bicycle container

Best gun to modify into a monsterhunter weapon?

Look mom! I made my own (Base 10) numeral system!

What word can be used to describe a bug in a movie?

Why couldn't soldiers sight their own weapons without officers' orders?

Does this Foo machine halt?

What method to use in a batch apex in order to get authentication token from a remote server?

Did WWII Japanese soldiers engage in cannibalism of their enemies?

In the movie Harry Potter and the Order or the Phoenix, why didn't Mr. Filch succeed to open the Room of Requirement if it's what he needed?

Geometric programming: Why are the constraints defined to be less than/equal to 1?

Are there any financial disadvantages to living significantly "below your means"?

Evaluate the following limit .

A question about 'reptile and volatiles' to describe creatures

As a 16 year old, how can I keep my money safe from my mother?

Physics of Guitar frets and sound

How can I read one message at a time from /var/mail

Could one become a successful researcher by writing some really good papers while being outside academia?

Double blind peer review when paper cites author's GitHub repo for code

Why does this Pokémon I just hatched need to be healed?

Acceptable to cut steak before searing?

What is the best way to cause swarm intelligence to be destroyed?

Do other countries guarantee freedoms that the United States does not have?

Does the United States guarantee any unique freedoms?



Does LaTeX redefine [some] TeX primitives?


What is the difference between TeX and LaTeX?How is char processed in math mode?Why is there no mudimendef primitive?What is the difference between empty and @empty?Why isn't everything expandable?Creating new primitivesInput/Output primitives of TeXKnuth “Some Implementations of TeX”…Commands in TeX which are different in LaTeXHow to make commands defined by def behave as strings?Should different TeX implementations (e.g. MiKTeX's and TeX Live's) produce identical DVI files?Different file opened by openin (was: between 2017 and 2018)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6















I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char behaves identically in text and math modes, as it can be seen from the following example:



documentclassarticle 
begindocument
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
enddocument


In TeX, the result is different:



In text mode, we obtain char"5. In math mode, we obtain $char"5$.
bye


It seems that some TeX primitives (at least one: char) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?










share|improve this question









New contributor



spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    6















    I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char behaves identically in text and math modes, as it can be seen from the following example:



    documentclassarticle 
    begindocument
    In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
    enddocument


    In TeX, the result is different:



    In text mode, we obtain char"5. In math mode, we obtain $char"5$.
    bye


    It seems that some TeX primitives (at least one: char) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?










    share|improve this question









    New contributor



    spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      6












      6








      6








      I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char behaves identically in text and math modes, as it can be seen from the following example:



      documentclassarticle 
      begindocument
      In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
      enddocument


      In TeX, the result is different:



      In text mode, we obtain char"5. In math mode, we obtain $char"5$.
      bye


      It seems that some TeX primitives (at least one: char) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?










      share|improve this question









      New contributor



      spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char behaves identically in text and math modes, as it can be seen from the following example:



      documentclassarticle 
      begindocument
      In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
      enddocument


      In TeX, the result is different:



      In text mode, we obtain char"5. In math mode, we obtain $char"5$.
      bye


      It seems that some TeX primitives (at least one: char) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?







      tex-core






      share|improve this question









      New contributor



      spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited 6 hours ago









      siracusa

      7,8212 gold badges18 silver badges35 bronze badges




      7,8212 gold badges18 silver badges35 bronze badges






      New contributor



      spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      spyglass007spyglass007

      333 bronze badges




      333 bronze badges




      New contributor



      spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      spyglass007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          1 Answer
          1






          active

          oldest

          votes


















          4














          LaTeX redefines the primitives input, end, -, /, underline and, in some contexts, par. It does not redefine char, but it uses different math codes.



          In plain TeX we see



          mathcode`^^E="023A % lnot


          but LaTeX doesn't assign a mathcode to ^^E (ASCII 5), so the value is as initially, that is, 5.



          When TeX processes char<number> in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A in family 2 (lnot); in LaTeX you get character "5 in family 0.



          Redefined primitives




          • input is redefined to allow input<filename>;


          • end is redefined to mark the end of environments;


          • - and / are redefined for technical reasons;


          • underline is redefined to be also used in text mode.

          As far as par is concerned, the redefinitions are essential for list-like environments.



          Why does plain TeX assign a math code to ASCII 5?



          Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.






          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
            );



            );






            spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f503599%2fdoes-latex-redefine-some-tex-primitives%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









            4














            LaTeX redefines the primitives input, end, -, /, underline and, in some contexts, par. It does not redefine char, but it uses different math codes.



            In plain TeX we see



            mathcode`^^E="023A % lnot


            but LaTeX doesn't assign a mathcode to ^^E (ASCII 5), so the value is as initially, that is, 5.



            When TeX processes char<number> in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A in family 2 (lnot); in LaTeX you get character "5 in family 0.



            Redefined primitives




            • input is redefined to allow input<filename>;


            • end is redefined to mark the end of environments;


            • - and / are redefined for technical reasons;


            • underline is redefined to be also used in text mode.

            As far as par is concerned, the redefinitions are essential for list-like environments.



            Why does plain TeX assign a math code to ASCII 5?



            Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.






            share|improve this answer































              4














              LaTeX redefines the primitives input, end, -, /, underline and, in some contexts, par. It does not redefine char, but it uses different math codes.



              In plain TeX we see



              mathcode`^^E="023A % lnot


              but LaTeX doesn't assign a mathcode to ^^E (ASCII 5), so the value is as initially, that is, 5.



              When TeX processes char<number> in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A in family 2 (lnot); in LaTeX you get character "5 in family 0.



              Redefined primitives




              • input is redefined to allow input<filename>;


              • end is redefined to mark the end of environments;


              • - and / are redefined for technical reasons;


              • underline is redefined to be also used in text mode.

              As far as par is concerned, the redefinitions are essential for list-like environments.



              Why does plain TeX assign a math code to ASCII 5?



              Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.






              share|improve this answer





























                4












                4








                4







                LaTeX redefines the primitives input, end, -, /, underline and, in some contexts, par. It does not redefine char, but it uses different math codes.



                In plain TeX we see



                mathcode`^^E="023A % lnot


                but LaTeX doesn't assign a mathcode to ^^E (ASCII 5), so the value is as initially, that is, 5.



                When TeX processes char<number> in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A in family 2 (lnot); in LaTeX you get character "5 in family 0.



                Redefined primitives




                • input is redefined to allow input<filename>;


                • end is redefined to mark the end of environments;


                • - and / are redefined for technical reasons;


                • underline is redefined to be also used in text mode.

                As far as par is concerned, the redefinitions are essential for list-like environments.



                Why does plain TeX assign a math code to ASCII 5?



                Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.






                share|improve this answer















                LaTeX redefines the primitives input, end, -, /, underline and, in some contexts, par. It does not redefine char, but it uses different math codes.



                In plain TeX we see



                mathcode`^^E="023A % lnot


                but LaTeX doesn't assign a mathcode to ^^E (ASCII 5), so the value is as initially, that is, 5.



                When TeX processes char<number> in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A in family 2 (lnot); in LaTeX you get character "5 in family 0.



                Redefined primitives




                • input is redefined to allow input<filename>;


                • end is redefined to mark the end of environments;


                • - and / are redefined for technical reasons;


                • underline is redefined to be also used in text mode.

                As far as par is concerned, the redefinitions are essential for list-like environments.



                Why does plain TeX assign a math code to ASCII 5?



                Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 7 hours ago

























                answered 7 hours ago









                egregegreg

                761k90 gold badges1987 silver badges3337 bronze badges




                761k90 gold badges1987 silver badges3337 bronze badges























                    spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.












                    spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.











                    spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.














                    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%2f503599%2fdoes-latex-redefine-some-tex-primitives%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

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單