Place a given symbol inside cup like uplus

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











up vote
2
down vote

favorite












does any know how I can create a command that places a symbol given as an argument inside cup?



For instance, the command uplus has the symbol '+' inside cup.
I would like to be able to place any given symbol inside cup (in special, the letter 'k').
An important issue is that the size of the symbol must respect the superscript math mode. Actually, the size of this symbol has to be a bit smaller, so as is '+' inside cup in uplus.



The figure below explains better what I am talking about.



enter image description here



I would like to obtain something similar to the second (from left to right) case.



Thanks in advance!










share|improve this question





















  • Duplicate? tex.stackexchange.com/questions/243478/…
    – Steven B. Segletes
    3 hours ago










  • I don't think so. My question is a little different.
    – Alexsander Melo
    26 mins ago














up vote
2
down vote

favorite












does any know how I can create a command that places a symbol given as an argument inside cup?



For instance, the command uplus has the symbol '+' inside cup.
I would like to be able to place any given symbol inside cup (in special, the letter 'k').
An important issue is that the size of the symbol must respect the superscript math mode. Actually, the size of this symbol has to be a bit smaller, so as is '+' inside cup in uplus.



The figure below explains better what I am talking about.



enter image description here



I would like to obtain something similar to the second (from left to right) case.



Thanks in advance!










share|improve this question





















  • Duplicate? tex.stackexchange.com/questions/243478/…
    – Steven B. Segletes
    3 hours ago










  • I don't think so. My question is a little different.
    – Alexsander Melo
    26 mins ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











does any know how I can create a command that places a symbol given as an argument inside cup?



For instance, the command uplus has the symbol '+' inside cup.
I would like to be able to place any given symbol inside cup (in special, the letter 'k').
An important issue is that the size of the symbol must respect the superscript math mode. Actually, the size of this symbol has to be a bit smaller, so as is '+' inside cup in uplus.



The figure below explains better what I am talking about.



enter image description here



I would like to obtain something similar to the second (from left to right) case.



Thanks in advance!










share|improve this question













does any know how I can create a command that places a symbol given as an argument inside cup?



For instance, the command uplus has the symbol '+' inside cup.
I would like to be able to place any given symbol inside cup (in special, the letter 'k').
An important issue is that the size of the symbol must respect the superscript math mode. Actually, the size of this symbol has to be a bit smaller, so as is '+' inside cup in uplus.



The figure below explains better what I am talking about.



enter image description here



I would like to obtain something similar to the second (from left to right) case.



Thanks in advance!







math-mode macros superscripts






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Alexsander Melo

234




234











  • Duplicate? tex.stackexchange.com/questions/243478/…
    – Steven B. Segletes
    3 hours ago










  • I don't think so. My question is a little different.
    – Alexsander Melo
    26 mins ago
















  • Duplicate? tex.stackexchange.com/questions/243478/…
    – Steven B. Segletes
    3 hours ago










  • I don't think so. My question is a little different.
    – Alexsander Melo
    26 mins ago















Duplicate? tex.stackexchange.com/questions/243478/…
– Steven B. Segletes
3 hours ago




Duplicate? tex.stackexchange.com/questions/243478/…
– Steven B. Segletes
3 hours ago












I don't think so. My question is a little different.
– Alexsander Melo
26 mins ago




I don't think so. My question is a little different.
– Alexsander Melo
26 mins ago










2 Answers
2






active

oldest

votes

















up vote
4
down vote













The stackinset command froom stackengine can do that:



documentclass[border = 2pt]standalone

usepackagestackengine %
newcommandcupkstackMathstackinsetc0exc0.2exscriptscriptstyle kscriptstylecup

begindocument

$B^cupk $

enddocument


enter image description here






share|improve this answer



























    up vote
    3
    down vote













    We need fully scalable fonts for this, so fix-cm if the document is in the standard Computer Modern font. It is not necessary if other fonts are chosen.



    RequirePackagefix-cm
    documentclassarticle
    usepackageamsmath

    makeatletter
    DeclareRobustCommandvcup[1]%
    mathbinvphantomcupmathpalettevcup@#1%

    newcommandvcup@[2]%
    ooalign%
    $m@th#1cup$cr
    hidewidth
    raisebox%
    dimexprdepth+demote@#1dimexpr1.5ptrelaxrelax
    fontsizedemote@#1dimexprf@size ptz@selectfontcheck@mathfonts
    $m@th#2$%
    hidewidthcr
    %

    newcommanddemote@[1]%
    ifx#1displaystyle 0.7
    elseifx#1textstyle 0.7
    elseifx#1scriptstyle 0.5
    else 0.4fififi

    makeatother

    begindocument

    $AvcupkB^vcupk$

    $uplusscriptstyleuplusscriptscriptstyleuplus$
    $vcupkscriptstylevcupkscriptscriptstylevcupk$
    $vcupyscriptstylevcupyscriptscriptstylevcupy$
    $vcupgscriptstylevcupgscriptscriptstylevcupg$

    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%2f458063%2fplace-a-given-symbol-inside-cup-like-uplus%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      4
      down vote













      The stackinset command froom stackengine can do that:



      documentclass[border = 2pt]standalone

      usepackagestackengine %
      newcommandcupkstackMathstackinsetc0exc0.2exscriptscriptstyle kscriptstylecup

      begindocument

      $B^cupk $

      enddocument


      enter image description here






      share|improve this answer
























        up vote
        4
        down vote













        The stackinset command froom stackengine can do that:



        documentclass[border = 2pt]standalone

        usepackagestackengine %
        newcommandcupkstackMathstackinsetc0exc0.2exscriptscriptstyle kscriptstylecup

        begindocument

        $B^cupk $

        enddocument


        enter image description here






        share|improve this answer






















          up vote
          4
          down vote










          up vote
          4
          down vote









          The stackinset command froom stackengine can do that:



          documentclass[border = 2pt]standalone

          usepackagestackengine %
          newcommandcupkstackMathstackinsetc0exc0.2exscriptscriptstyle kscriptstylecup

          begindocument

          $B^cupk $

          enddocument


          enter image description here






          share|improve this answer












          The stackinset command froom stackengine can do that:



          documentclass[border = 2pt]standalone

          usepackagestackengine %
          newcommandcupkstackMathstackinsetc0exc0.2exscriptscriptstyle kscriptstylecup

          begindocument

          $B^cupk $

          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 3 hours ago









          Bernard

          160k766192




          160k766192




















              up vote
              3
              down vote













              We need fully scalable fonts for this, so fix-cm if the document is in the standard Computer Modern font. It is not necessary if other fonts are chosen.



              RequirePackagefix-cm
              documentclassarticle
              usepackageamsmath

              makeatletter
              DeclareRobustCommandvcup[1]%
              mathbinvphantomcupmathpalettevcup@#1%

              newcommandvcup@[2]%
              ooalign%
              $m@th#1cup$cr
              hidewidth
              raisebox%
              dimexprdepth+demote@#1dimexpr1.5ptrelaxrelax
              fontsizedemote@#1dimexprf@size ptz@selectfontcheck@mathfonts
              $m@th#2$%
              hidewidthcr
              %

              newcommanddemote@[1]%
              ifx#1displaystyle 0.7
              elseifx#1textstyle 0.7
              elseifx#1scriptstyle 0.5
              else 0.4fififi

              makeatother

              begindocument

              $AvcupkB^vcupk$

              $uplusscriptstyleuplusscriptscriptstyleuplus$
              $vcupkscriptstylevcupkscriptscriptstylevcupk$
              $vcupyscriptstylevcupyscriptscriptstylevcupy$
              $vcupgscriptstylevcupgscriptscriptstylevcupg$

              enddocument


              enter image description here






              share|improve this answer
























                up vote
                3
                down vote













                We need fully scalable fonts for this, so fix-cm if the document is in the standard Computer Modern font. It is not necessary if other fonts are chosen.



                RequirePackagefix-cm
                documentclassarticle
                usepackageamsmath

                makeatletter
                DeclareRobustCommandvcup[1]%
                mathbinvphantomcupmathpalettevcup@#1%

                newcommandvcup@[2]%
                ooalign%
                $m@th#1cup$cr
                hidewidth
                raisebox%
                dimexprdepth+demote@#1dimexpr1.5ptrelaxrelax
                fontsizedemote@#1dimexprf@size ptz@selectfontcheck@mathfonts
                $m@th#2$%
                hidewidthcr
                %

                newcommanddemote@[1]%
                ifx#1displaystyle 0.7
                elseifx#1textstyle 0.7
                elseifx#1scriptstyle 0.5
                else 0.4fififi

                makeatother

                begindocument

                $AvcupkB^vcupk$

                $uplusscriptstyleuplusscriptscriptstyleuplus$
                $vcupkscriptstylevcupkscriptscriptstylevcupk$
                $vcupyscriptstylevcupyscriptscriptstylevcupy$
                $vcupgscriptstylevcupgscriptscriptstylevcupg$

                enddocument


                enter image description here






                share|improve this answer






















                  up vote
                  3
                  down vote










                  up vote
                  3
                  down vote









                  We need fully scalable fonts for this, so fix-cm if the document is in the standard Computer Modern font. It is not necessary if other fonts are chosen.



                  RequirePackagefix-cm
                  documentclassarticle
                  usepackageamsmath

                  makeatletter
                  DeclareRobustCommandvcup[1]%
                  mathbinvphantomcupmathpalettevcup@#1%

                  newcommandvcup@[2]%
                  ooalign%
                  $m@th#1cup$cr
                  hidewidth
                  raisebox%
                  dimexprdepth+demote@#1dimexpr1.5ptrelaxrelax
                  fontsizedemote@#1dimexprf@size ptz@selectfontcheck@mathfonts
                  $m@th#2$%
                  hidewidthcr
                  %

                  newcommanddemote@[1]%
                  ifx#1displaystyle 0.7
                  elseifx#1textstyle 0.7
                  elseifx#1scriptstyle 0.5
                  else 0.4fififi

                  makeatother

                  begindocument

                  $AvcupkB^vcupk$

                  $uplusscriptstyleuplusscriptscriptstyleuplus$
                  $vcupkscriptstylevcupkscriptscriptstylevcupk$
                  $vcupyscriptstylevcupyscriptscriptstylevcupy$
                  $vcupgscriptstylevcupgscriptscriptstylevcupg$

                  enddocument


                  enter image description here






                  share|improve this answer












                  We need fully scalable fonts for this, so fix-cm if the document is in the standard Computer Modern font. It is not necessary if other fonts are chosen.



                  RequirePackagefix-cm
                  documentclassarticle
                  usepackageamsmath

                  makeatletter
                  DeclareRobustCommandvcup[1]%
                  mathbinvphantomcupmathpalettevcup@#1%

                  newcommandvcup@[2]%
                  ooalign%
                  $m@th#1cup$cr
                  hidewidth
                  raisebox%
                  dimexprdepth+demote@#1dimexpr1.5ptrelaxrelax
                  fontsizedemote@#1dimexprf@size ptz@selectfontcheck@mathfonts
                  $m@th#2$%
                  hidewidthcr
                  %

                  newcommanddemote@[1]%
                  ifx#1displaystyle 0.7
                  elseifx#1textstyle 0.7
                  elseifx#1scriptstyle 0.5
                  else 0.4fififi

                  makeatother

                  begindocument

                  $AvcupkB^vcupk$

                  $uplusscriptstyleuplusscriptscriptstyleuplus$
                  $vcupkscriptstylevcupkscriptscriptstylevcupk$
                  $vcupyscriptstylevcupyscriptscriptstylevcupy$
                  $vcupgscriptstylevcupgscriptscriptstylevcupg$

                  enddocument


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 3 hours ago









                  egreg

                  694k8518443099




                  694k8518443099



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458063%2fplace-a-given-symbol-inside-cup-like-uplus%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      Long meetings (6-7 hours a day): Being “babysat” by supervisor

                      Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                      Confectionery