tiny etc. in mathmode












5















I read everywhere that tiny, etc. does not work in mathmode. When I use it in my code, I also get a warning Command tiny invalid in math mode. But in the output it nevertheless works. At least in some places.



I suppose on other machines this will not work, so I would like to not use these commands in math mode. But, all other commands to make small fonts in mathemode do not work as well as tiny does. E.g. in the following MWE



documentclass{scrbook}
begin{document}
$M_{begin{array}{c}2\2end{array}2A}$
$M_{tinybegin{array}{c}2\2end{array}2A}$
$M_{scriptsizebegin{array}{c}2\2end{array}2A}$
$M_{scriptstylebegin{array}{c}2\2end{array}2A}$
$M_{scriptscriptstylebegin{array}{c}2\2end{array}2A}$
end{document}


enter image description here



The output I want, is the second. I have a subscript consisting of an array, and this array shall have small numbers.
But tiny is the only command which accomplishes that.



Now to my questions:




  1. How do I make small subscripts as in the second example without the use of tiny.

  2. Why does tiny work for the array-subscript, but not for the standard subscript.

  3. Why does scriptscriptstyle work for the standard subscript, but not for the array-subscript.




This question is not a duplicate to
Size commands do not work in mathmode
since I am also asking why tiny works, although it is written everywhere that it is not working (and furthermore, @egreg said it is no duplicate).










share|improve this question




















  • 1





    @DũngVũ tiny is a switch and should not be misused as an environment.

    – Johannes_B
    Dec 3 '18 at 10:19











  • @Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.

    – JouleV
    Dec 3 '18 at 10:21






  • 1





    @Johannes_B actually every switch may be used as an environment by design.

    – David Carlisle
    Dec 3 '18 at 11:12






  • 3





    Possible duplicate of Size commands do not work in mathmode

    – Stefan Pinnow
    Dec 3 '18 at 11:19






  • 2





    No, it's not a duplicate.

    – egreg
    Dec 3 '18 at 13:08
















5















I read everywhere that tiny, etc. does not work in mathmode. When I use it in my code, I also get a warning Command tiny invalid in math mode. But in the output it nevertheless works. At least in some places.



I suppose on other machines this will not work, so I would like to not use these commands in math mode. But, all other commands to make small fonts in mathemode do not work as well as tiny does. E.g. in the following MWE



documentclass{scrbook}
begin{document}
$M_{begin{array}{c}2\2end{array}2A}$
$M_{tinybegin{array}{c}2\2end{array}2A}$
$M_{scriptsizebegin{array}{c}2\2end{array}2A}$
$M_{scriptstylebegin{array}{c}2\2end{array}2A}$
$M_{scriptscriptstylebegin{array}{c}2\2end{array}2A}$
end{document}


enter image description here



The output I want, is the second. I have a subscript consisting of an array, and this array shall have small numbers.
But tiny is the only command which accomplishes that.



Now to my questions:




  1. How do I make small subscripts as in the second example without the use of tiny.

  2. Why does tiny work for the array-subscript, but not for the standard subscript.

  3. Why does scriptscriptstyle work for the standard subscript, but not for the array-subscript.




This question is not a duplicate to
Size commands do not work in mathmode
since I am also asking why tiny works, although it is written everywhere that it is not working (and furthermore, @egreg said it is no duplicate).










share|improve this question




















  • 1





    @DũngVũ tiny is a switch and should not be misused as an environment.

    – Johannes_B
    Dec 3 '18 at 10:19











  • @Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.

    – JouleV
    Dec 3 '18 at 10:21






  • 1





    @Johannes_B actually every switch may be used as an environment by design.

    – David Carlisle
    Dec 3 '18 at 11:12






  • 3





    Possible duplicate of Size commands do not work in mathmode

    – Stefan Pinnow
    Dec 3 '18 at 11:19






  • 2





    No, it's not a duplicate.

    – egreg
    Dec 3 '18 at 13:08














5












5








5








I read everywhere that tiny, etc. does not work in mathmode. When I use it in my code, I also get a warning Command tiny invalid in math mode. But in the output it nevertheless works. At least in some places.



I suppose on other machines this will not work, so I would like to not use these commands in math mode. But, all other commands to make small fonts in mathemode do not work as well as tiny does. E.g. in the following MWE



documentclass{scrbook}
begin{document}
$M_{begin{array}{c}2\2end{array}2A}$
$M_{tinybegin{array}{c}2\2end{array}2A}$
$M_{scriptsizebegin{array}{c}2\2end{array}2A}$
$M_{scriptstylebegin{array}{c}2\2end{array}2A}$
$M_{scriptscriptstylebegin{array}{c}2\2end{array}2A}$
end{document}


enter image description here



The output I want, is the second. I have a subscript consisting of an array, and this array shall have small numbers.
But tiny is the only command which accomplishes that.



Now to my questions:




  1. How do I make small subscripts as in the second example without the use of tiny.

  2. Why does tiny work for the array-subscript, but not for the standard subscript.

  3. Why does scriptscriptstyle work for the standard subscript, but not for the array-subscript.




This question is not a duplicate to
Size commands do not work in mathmode
since I am also asking why tiny works, although it is written everywhere that it is not working (and furthermore, @egreg said it is no duplicate).










share|improve this question
















I read everywhere that tiny, etc. does not work in mathmode. When I use it in my code, I also get a warning Command tiny invalid in math mode. But in the output it nevertheless works. At least in some places.



I suppose on other machines this will not work, so I would like to not use these commands in math mode. But, all other commands to make small fonts in mathemode do not work as well as tiny does. E.g. in the following MWE



documentclass{scrbook}
begin{document}
$M_{begin{array}{c}2\2end{array}2A}$
$M_{tinybegin{array}{c}2\2end{array}2A}$
$M_{scriptsizebegin{array}{c}2\2end{array}2A}$
$M_{scriptstylebegin{array}{c}2\2end{array}2A}$
$M_{scriptscriptstylebegin{array}{c}2\2end{array}2A}$
end{document}


enter image description here



The output I want, is the second. I have a subscript consisting of an array, and this array shall have small numbers.
But tiny is the only command which accomplishes that.



Now to my questions:




  1. How do I make small subscripts as in the second example without the use of tiny.

  2. Why does tiny work for the array-subscript, but not for the standard subscript.

  3. Why does scriptscriptstyle work for the standard subscript, but not for the array-subscript.




This question is not a duplicate to
Size commands do not work in mathmode
since I am also asking why tiny works, although it is written everywhere that it is not working (and furthermore, @egreg said it is no duplicate).







math-mode fontsize






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 4 '18 at 9:32







tommsch

















asked Dec 3 '18 at 10:17









tommschtommsch

24516




24516








  • 1





    @DũngVũ tiny is a switch and should not be misused as an environment.

    – Johannes_B
    Dec 3 '18 at 10:19











  • @Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.

    – JouleV
    Dec 3 '18 at 10:21






  • 1





    @Johannes_B actually every switch may be used as an environment by design.

    – David Carlisle
    Dec 3 '18 at 11:12






  • 3





    Possible duplicate of Size commands do not work in mathmode

    – Stefan Pinnow
    Dec 3 '18 at 11:19






  • 2





    No, it's not a duplicate.

    – egreg
    Dec 3 '18 at 13:08














  • 1





    @DũngVũ tiny is a switch and should not be misused as an environment.

    – Johannes_B
    Dec 3 '18 at 10:19











  • @Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.

    – JouleV
    Dec 3 '18 at 10:21






  • 1





    @Johannes_B actually every switch may be used as an environment by design.

    – David Carlisle
    Dec 3 '18 at 11:12






  • 3





    Possible duplicate of Size commands do not work in mathmode

    – Stefan Pinnow
    Dec 3 '18 at 11:19






  • 2





    No, it's not a duplicate.

    – egreg
    Dec 3 '18 at 13:08








1




1





@DũngVũ tiny is a switch and should not be misused as an environment.

– Johannes_B
Dec 3 '18 at 10:19





@DũngVũ tiny is a switch and should not be misused as an environment.

– Johannes_B
Dec 3 '18 at 10:19













@Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.

– JouleV
Dec 3 '18 at 10:21





@Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.

– JouleV
Dec 3 '18 at 10:21




1




1





@Johannes_B actually every switch may be used as an environment by design.

– David Carlisle
Dec 3 '18 at 11:12





@Johannes_B actually every switch may be used as an environment by design.

– David Carlisle
Dec 3 '18 at 11:12




3




3





Possible duplicate of Size commands do not work in mathmode

– Stefan Pinnow
Dec 3 '18 at 11:19





Possible duplicate of Size commands do not work in mathmode

– Stefan Pinnow
Dec 3 '18 at 11:19




2




2





No, it's not a duplicate.

– egreg
Dec 3 '18 at 13:08





No, it's not a duplicate.

– egreg
Dec 3 '18 at 13:08










3 Answers
3






active

oldest

votes


















8














Size commands do not work in math mode. However (some) size commands set up math so if you enter a new math expression from text while the size change is in force, you get math of a matching size. Internally array is an halign in which each cell is surrounded by $...$ so in fact using array is like using mbox{empty text $ matrix cell$} so the entries pick up the size change more or less by accident.



documentclass{scrbook}
usepackage{amsmath}
begin{document}
$M_{begin{smallmatrix}2\2end{smallmatrix}2A}$

end{document}





share|improve this answer
























  • smallmatrix always uses scriptstyle

    – egreg
    Dec 3 '18 at 13:14











  • @egreg, I know, but it's in a subscript so that seems good

    – David Carlisle
    Dec 3 '18 at 13:45



















5














You could define a tinymatrix environment modeled on smallmatrix:



documentclass{article}
usepackage{amsmath}

makeatletter
% from amsmath.sty, line 960:
newenvironment{tinymatrix}{null,vcenterbgroup
Let@restore@math@crdefault@tag
baselineskip4ex@ lineskip1.2ex@ lineskiplimitlineskip
ialignbgrouphfil$m@thscriptscriptstyle##$hfil&&thickspacehfil
$m@thscriptscriptstyle##$hfilcrcr
}{%
crcregroupegroup,%
}
makeatother

newcommand{di}[1]{begin{tinymatrix}#1end{tinymatrix}}

begin{document}

[
M_{di{2\2}2A}
]

end{document}


enter image description here






share|improve this answer































    4














    A simple way to change the font size in math mode is to put the size-changing command inside a mbox, for example:



    documentclass[varwidth, preview]{standalone}
    usepackage[T1]{fontenc} % Or unicode-math
    usepackage[utf8]{inputenc} % The default since 2018.

    newcommandmscriptsize[1]{mbox{scriptsizeensuremath{#1}}}
    newcommandmtiny[1]{mbox{tinyensuremath{#1}}}

    begin{document}
    ( x mscriptsize{y} mtiny{omega} )
    end{document}


    x y ω



    You might want only the braces if you need a long expression to wrap.



    You can also use text from amsmath to insert arbitrary text-mode commands within math mode, such as text{tinyitshape x}.






    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%2f462947%2ftiny-etc-in-mathmode%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      8














      Size commands do not work in math mode. However (some) size commands set up math so if you enter a new math expression from text while the size change is in force, you get math of a matching size. Internally array is an halign in which each cell is surrounded by $...$ so in fact using array is like using mbox{empty text $ matrix cell$} so the entries pick up the size change more or less by accident.



      documentclass{scrbook}
      usepackage{amsmath}
      begin{document}
      $M_{begin{smallmatrix}2\2end{smallmatrix}2A}$

      end{document}





      share|improve this answer
























      • smallmatrix always uses scriptstyle

        – egreg
        Dec 3 '18 at 13:14











      • @egreg, I know, but it's in a subscript so that seems good

        – David Carlisle
        Dec 3 '18 at 13:45
















      8














      Size commands do not work in math mode. However (some) size commands set up math so if you enter a new math expression from text while the size change is in force, you get math of a matching size. Internally array is an halign in which each cell is surrounded by $...$ so in fact using array is like using mbox{empty text $ matrix cell$} so the entries pick up the size change more or less by accident.



      documentclass{scrbook}
      usepackage{amsmath}
      begin{document}
      $M_{begin{smallmatrix}2\2end{smallmatrix}2A}$

      end{document}





      share|improve this answer
























      • smallmatrix always uses scriptstyle

        – egreg
        Dec 3 '18 at 13:14











      • @egreg, I know, but it's in a subscript so that seems good

        – David Carlisle
        Dec 3 '18 at 13:45














      8












      8








      8







      Size commands do not work in math mode. However (some) size commands set up math so if you enter a new math expression from text while the size change is in force, you get math of a matching size. Internally array is an halign in which each cell is surrounded by $...$ so in fact using array is like using mbox{empty text $ matrix cell$} so the entries pick up the size change more or less by accident.



      documentclass{scrbook}
      usepackage{amsmath}
      begin{document}
      $M_{begin{smallmatrix}2\2end{smallmatrix}2A}$

      end{document}





      share|improve this answer













      Size commands do not work in math mode. However (some) size commands set up math so if you enter a new math expression from text while the size change is in force, you get math of a matching size. Internally array is an halign in which each cell is surrounded by $...$ so in fact using array is like using mbox{empty text $ matrix cell$} so the entries pick up the size change more or less by accident.



      documentclass{scrbook}
      usepackage{amsmath}
      begin{document}
      $M_{begin{smallmatrix}2\2end{smallmatrix}2A}$

      end{document}






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 3 '18 at 11:11









      David CarlisleDavid Carlisle

      487k4111271871




      487k4111271871













      • smallmatrix always uses scriptstyle

        – egreg
        Dec 3 '18 at 13:14











      • @egreg, I know, but it's in a subscript so that seems good

        – David Carlisle
        Dec 3 '18 at 13:45



















      • smallmatrix always uses scriptstyle

        – egreg
        Dec 3 '18 at 13:14











      • @egreg, I know, but it's in a subscript so that seems good

        – David Carlisle
        Dec 3 '18 at 13:45

















      smallmatrix always uses scriptstyle

      – egreg
      Dec 3 '18 at 13:14





      smallmatrix always uses scriptstyle

      – egreg
      Dec 3 '18 at 13:14













      @egreg, I know, but it's in a subscript so that seems good

      – David Carlisle
      Dec 3 '18 at 13:45





      @egreg, I know, but it's in a subscript so that seems good

      – David Carlisle
      Dec 3 '18 at 13:45











      5














      You could define a tinymatrix environment modeled on smallmatrix:



      documentclass{article}
      usepackage{amsmath}

      makeatletter
      % from amsmath.sty, line 960:
      newenvironment{tinymatrix}{null,vcenterbgroup
      Let@restore@math@crdefault@tag
      baselineskip4ex@ lineskip1.2ex@ lineskiplimitlineskip
      ialignbgrouphfil$m@thscriptscriptstyle##$hfil&&thickspacehfil
      $m@thscriptscriptstyle##$hfilcrcr
      }{%
      crcregroupegroup,%
      }
      makeatother

      newcommand{di}[1]{begin{tinymatrix}#1end{tinymatrix}}

      begin{document}

      [
      M_{di{2\2}2A}
      ]

      end{document}


      enter image description here






      share|improve this answer




























        5














        You could define a tinymatrix environment modeled on smallmatrix:



        documentclass{article}
        usepackage{amsmath}

        makeatletter
        % from amsmath.sty, line 960:
        newenvironment{tinymatrix}{null,vcenterbgroup
        Let@restore@math@crdefault@tag
        baselineskip4ex@ lineskip1.2ex@ lineskiplimitlineskip
        ialignbgrouphfil$m@thscriptscriptstyle##$hfil&&thickspacehfil
        $m@thscriptscriptstyle##$hfilcrcr
        }{%
        crcregroupegroup,%
        }
        makeatother

        newcommand{di}[1]{begin{tinymatrix}#1end{tinymatrix}}

        begin{document}

        [
        M_{di{2\2}2A}
        ]

        end{document}


        enter image description here






        share|improve this answer


























          5












          5








          5







          You could define a tinymatrix environment modeled on smallmatrix:



          documentclass{article}
          usepackage{amsmath}

          makeatletter
          % from amsmath.sty, line 960:
          newenvironment{tinymatrix}{null,vcenterbgroup
          Let@restore@math@crdefault@tag
          baselineskip4ex@ lineskip1.2ex@ lineskiplimitlineskip
          ialignbgrouphfil$m@thscriptscriptstyle##$hfil&&thickspacehfil
          $m@thscriptscriptstyle##$hfilcrcr
          }{%
          crcregroupegroup,%
          }
          makeatother

          newcommand{di}[1]{begin{tinymatrix}#1end{tinymatrix}}

          begin{document}

          [
          M_{di{2\2}2A}
          ]

          end{document}


          enter image description here






          share|improve this answer













          You could define a tinymatrix environment modeled on smallmatrix:



          documentclass{article}
          usepackage{amsmath}

          makeatletter
          % from amsmath.sty, line 960:
          newenvironment{tinymatrix}{null,vcenterbgroup
          Let@restore@math@crdefault@tag
          baselineskip4ex@ lineskip1.2ex@ lineskiplimitlineskip
          ialignbgrouphfil$m@thscriptscriptstyle##$hfil&&thickspacehfil
          $m@thscriptscriptstyle##$hfilcrcr
          }{%
          crcregroupegroup,%
          }
          makeatother

          newcommand{di}[1]{begin{tinymatrix}#1end{tinymatrix}}

          begin{document}

          [
          M_{di{2\2}2A}
          ]

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 3 '18 at 13:07









          egregegreg

          716k8619003188




          716k8619003188























              4














              A simple way to change the font size in math mode is to put the size-changing command inside a mbox, for example:



              documentclass[varwidth, preview]{standalone}
              usepackage[T1]{fontenc} % Or unicode-math
              usepackage[utf8]{inputenc} % The default since 2018.

              newcommandmscriptsize[1]{mbox{scriptsizeensuremath{#1}}}
              newcommandmtiny[1]{mbox{tinyensuremath{#1}}}

              begin{document}
              ( x mscriptsize{y} mtiny{omega} )
              end{document}


              x y ω



              You might want only the braces if you need a long expression to wrap.



              You can also use text from amsmath to insert arbitrary text-mode commands within math mode, such as text{tinyitshape x}.






              share|improve this answer






























                4














                A simple way to change the font size in math mode is to put the size-changing command inside a mbox, for example:



                documentclass[varwidth, preview]{standalone}
                usepackage[T1]{fontenc} % Or unicode-math
                usepackage[utf8]{inputenc} % The default since 2018.

                newcommandmscriptsize[1]{mbox{scriptsizeensuremath{#1}}}
                newcommandmtiny[1]{mbox{tinyensuremath{#1}}}

                begin{document}
                ( x mscriptsize{y} mtiny{omega} )
                end{document}


                x y ω



                You might want only the braces if you need a long expression to wrap.



                You can also use text from amsmath to insert arbitrary text-mode commands within math mode, such as text{tinyitshape x}.






                share|improve this answer




























                  4












                  4








                  4







                  A simple way to change the font size in math mode is to put the size-changing command inside a mbox, for example:



                  documentclass[varwidth, preview]{standalone}
                  usepackage[T1]{fontenc} % Or unicode-math
                  usepackage[utf8]{inputenc} % The default since 2018.

                  newcommandmscriptsize[1]{mbox{scriptsizeensuremath{#1}}}
                  newcommandmtiny[1]{mbox{tinyensuremath{#1}}}

                  begin{document}
                  ( x mscriptsize{y} mtiny{omega} )
                  end{document}


                  x y ω



                  You might want only the braces if you need a long expression to wrap.



                  You can also use text from amsmath to insert arbitrary text-mode commands within math mode, such as text{tinyitshape x}.






                  share|improve this answer















                  A simple way to change the font size in math mode is to put the size-changing command inside a mbox, for example:



                  documentclass[varwidth, preview]{standalone}
                  usepackage[T1]{fontenc} % Or unicode-math
                  usepackage[utf8]{inputenc} % The default since 2018.

                  newcommandmscriptsize[1]{mbox{scriptsizeensuremath{#1}}}
                  newcommandmtiny[1]{mbox{tinyensuremath{#1}}}

                  begin{document}
                  ( x mscriptsize{y} mtiny{omega} )
                  end{document}


                  x y ω



                  You might want only the braces if you need a long expression to wrap.



                  You can also use text from amsmath to insert arbitrary text-mode commands within math mode, such as text{tinyitshape x}.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 3 '18 at 23:37

























                  answered Dec 3 '18 at 14:54









                  DavislorDavislor

                  5,7871127




                  5,7871127






























                      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%2f462947%2ftiny-etc-in-mathmode%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

                      Plaza Victoria

                      Puebla de Zaragoza

                      Musa