How do you make your own symbol when Detexify fails?Which measurement units should one use in LaTeX?newcommand vs. DeclareMathOperatorsubseteq + circ as a single symbol (“open subset”)The mysteries of mathpaletteProper use of mathchoiceCreate big fat green arrow like in excelSymbol for a “twisted product”?How to make this curly 'R' (ℛ)?A symbol of triangle with “infinite” lengthHow to draw a curly R symbol if can't be found available in packages and available symbolsFinding the package of a Detexify Symbolhow do you write the grad operator?How do you make the in symbol smaller?Detexify couldn't help me find >— and —<, can you?How to make own character map?Detexify-like service where I can paste a symbolHow do you make a big Laplace Transform symbolHow to create your own integral sign with limitsCan't “detexify” this symbol for the exponential functionHow do you make this symbol in math mode?

Lifted its hind leg on or lifted its hind leg towards?

Female=gender counterpart?

How will losing mobility of one hand affect my career as a programmer?

Java - What do constructor type arguments mean when placed *before* the type?

Resetting two CD4017 counters simultaneously, only one resets

For airliners, what prevents wing strikes on landing in bad weather?

Why does this part of the Space Shuttle launch pad seem to be floating in air?

Simple image editor tool to draw a simple box/rectangle in an existing image

How can a jailer prevent the Forge Cleric's Artisan's Blessing from being used?

Is there an wasy way to program in Tikz something like the one in the image?

I2C signal and power over long range (10meter cable)

Have I saved too much for retirement so far?

Greatest common substring

How to check participants in at events?

Can a Bard use an arcane focus?

Should a half Jewish man be discouraged from marrying a Jewess?

How can I successfully establish a nationwide combat training program for a large country?

My boss asked me to take a one-day class, then signs it up as a day off

Is there a good way to store credentials outside of a password manager?

Simulating a probability of 1 of 2^N with less than N random bits

Why Were Madagascar and New Zealand Discovered So Late?

How do I rename a LINUX host without needing to reboot for the rename to take effect?

Calculating the number of days between 2 dates in Excel

Golf game boilerplate



How do you make your own symbol when Detexify fails?


Which measurement units should one use in LaTeX?newcommand vs. DeclareMathOperatorsubseteq + circ as a single symbol (“open subset”)The mysteries of mathpaletteProper use of mathchoiceCreate big fat green arrow like in excelSymbol for a “twisted product”?How to make this curly 'R' (ℛ)?A symbol of triangle with “infinite” lengthHow to draw a curly R symbol if can't be found available in packages and available symbolsFinding the package of a Detexify Symbolhow do you write the grad operator?How do you make the in symbol smaller?Detexify couldn't help me find >— and —<, can you?How to make own character map?Detexify-like service where I can paste a symbolHow do you make a big Laplace Transform symbolHow to create your own integral sign with limitsCan't “detexify” this symbol for the exponential functionHow do you make this symbol in math mode?













32















My first visit to TeX.SX came when I was looking for a symbol for a twisted product:



enter image description here



I knew about Detexify and the Comprehensive LaTeX Symbol List, but I could not find the symbol there. I tried the construction that was obvious to me, namely oversetscriptstyle simtimes, but the sim was much too high. I Googled, and found this solution by @Hendrik Vogt. Thus I learned about smash.



Later I needed the same symbol in a subscript, ultimately learning about mathchoice and ooalign. Since then I have found that many questions on TeX.SX needed similar techniques. I though it would be a good idea to have a single question whose answers gave visitors with modest LaTeX skills general guidelines on constructing new symbols using LaTeX and related systems.



So, how do you make your own symbol when Detexify fails?










share|improve this question
























  • As a way to condense the syntax of mathchoice, see the ThisStyle...SavedStyle... syntax of the scalerel package, first introduced here: tex.stackexchange.com/questions/43978/proper-use-of-mathchoice/…

    – Steven B. Segletes
    Mar 22 at 0:18















32















My first visit to TeX.SX came when I was looking for a symbol for a twisted product:



enter image description here



I knew about Detexify and the Comprehensive LaTeX Symbol List, but I could not find the symbol there. I tried the construction that was obvious to me, namely oversetscriptstyle simtimes, but the sim was much too high. I Googled, and found this solution by @Hendrik Vogt. Thus I learned about smash.



Later I needed the same symbol in a subscript, ultimately learning about mathchoice and ooalign. Since then I have found that many questions on TeX.SX needed similar techniques. I though it would be a good idea to have a single question whose answers gave visitors with modest LaTeX skills general guidelines on constructing new symbols using LaTeX and related systems.



So, how do you make your own symbol when Detexify fails?










share|improve this question
























  • As a way to condense the syntax of mathchoice, see the ThisStyle...SavedStyle... syntax of the scalerel package, first introduced here: tex.stackexchange.com/questions/43978/proper-use-of-mathchoice/…

    – Steven B. Segletes
    Mar 22 at 0:18













32












32








32


16






My first visit to TeX.SX came when I was looking for a symbol for a twisted product:



enter image description here



I knew about Detexify and the Comprehensive LaTeX Symbol List, but I could not find the symbol there. I tried the construction that was obvious to me, namely oversetscriptstyle simtimes, but the sim was much too high. I Googled, and found this solution by @Hendrik Vogt. Thus I learned about smash.



Later I needed the same symbol in a subscript, ultimately learning about mathchoice and ooalign. Since then I have found that many questions on TeX.SX needed similar techniques. I though it would be a good idea to have a single question whose answers gave visitors with modest LaTeX skills general guidelines on constructing new symbols using LaTeX and related systems.



So, how do you make your own symbol when Detexify fails?










share|improve this question
















My first visit to TeX.SX came when I was looking for a symbol for a twisted product:



enter image description here



I knew about Detexify and the Comprehensive LaTeX Symbol List, but I could not find the symbol there. I tried the construction that was obvious to me, namely oversetscriptstyle simtimes, but the sim was much too high. I Googled, and found this solution by @Hendrik Vogt. Thus I learned about smash.



Later I needed the same symbol in a subscript, ultimately learning about mathchoice and ooalign. Since then I have found that many questions on TeX.SX needed similar techniques. I though it would be a good idea to have a single question whose answers gave visitors with modest LaTeX skills general guidelines on constructing new symbols using LaTeX and related systems.



So, how do you make your own symbol when Detexify fails?







math-mode symbols math-operators






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 at 20:44







Sandy G

















asked Mar 21 at 20:27









Sandy GSandy G

4,2151633




4,2151633












  • As a way to condense the syntax of mathchoice, see the ThisStyle...SavedStyle... syntax of the scalerel package, first introduced here: tex.stackexchange.com/questions/43978/proper-use-of-mathchoice/…

    – Steven B. Segletes
    Mar 22 at 0:18

















  • As a way to condense the syntax of mathchoice, see the ThisStyle...SavedStyle... syntax of the scalerel package, first introduced here: tex.stackexchange.com/questions/43978/proper-use-of-mathchoice/…

    – Steven B. Segletes
    Mar 22 at 0:18
















As a way to condense the syntax of mathchoice, see the ThisStyle...SavedStyle... syntax of the scalerel package, first introduced here: tex.stackexchange.com/questions/43978/proper-use-of-mathchoice/…

– Steven B. Segletes
Mar 22 at 0:18





As a way to condense the syntax of mathchoice, see the ThisStyle...SavedStyle... syntax of the scalerel package, first introduced here: tex.stackexchange.com/questions/43978/proper-use-of-mathchoice/…

– Steven B. Segletes
Mar 22 at 0:18










3 Answers
3






active

oldest

votes


















38














If it's really not in Detexify, check the Comprehensive LaTeX Symbol List to see if your symbol can be found in an existing package. Note, The Comprehensive List is long! Over 300 pages. But it is searchable, well-organized, and has a good table of contents and index.



If that doesn't help, it may be time to design your own symbol. It's probably best to give your new symbol a name so it can be used repeatedly and transported more easily into another document.



If your symbol will be used as an operator with limits (like an integral or summation), you should use the DeclareMathOperator or DeclareMathOperator* command. Both of these use the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle. To illustrate:



DeclareMathOperator*squareopsquare
DeclareMathOperatortriangleopbigtriangleup


[Note that square uses the amssymb package.]



Then the code



[
squareop_n=1^infty a_n qquad triangleop_n=1^infty a_n
]


will produce the following output:



enter image description here



More information on DeclareMathOperator can be found in this answer by @Andrew Swann.



If your symbol is not going to be used in that fashion, you should probably use newcommand.



If your symbol is a math symbol: Is it a binary operator (such as + or times)? A binary relation (such as < or leq)? Or an ordinary math symbol (such as ! or infty)? The spacing is different for each case. Compare the three versions for the symbol times:



newcommandreltimesmathreltimes
newcommandbintimesmathbintimes
newcommandchrtimestimes


Then noindent $areltimes b newline abintimes b newline achrtimes b$ will produce the output:



enter image description here



Note the extra set of curly braces in chrtimes. If you remove them you'll get the same output as mathbintimes, since times is by default a binary operator. You can enclose most math symbols in to turn them into ordinary math symbols.



Typically, binary relations have slightly more space than binary operators, and significantly more than ordinary symbols. However, the spacing changes when these appear as sub- or superscripts. All three examples above will look like A_atimes b if placed in a subscript.



Many new symbols can be created by modifying or combining existing symbols. To rotate, scale or reflect existing symbols, use the graphicx or graphics package. Documentation is here. The commands are rotatebox, scalebox, resizebox and reflectbox.



For example, if you want a cong symbol (≅), but with the tilde reversed, the reflectbox command from graphicx can be used. The code



newcommandbackcongmathrelreflectbox$cong$


will produce the desired effect with the code $Abackcong B$.



enter image description here



If you try using this code in a subscript (for example, $X_Abackcong B$), the new symbol will not scale down as it should. This is resolved below below using mathchoice.



To combine multiple symbols (math or text) the ooalign command can be used. @egreg has a detailed explanation here. The basic idea is that ooalign creates a one-column table, with all rows superimposed on one another, and no padding outside the column. Each row of the "table" ends with cr. Entries can be centered in the column using hfil.



For example, to produce



enter image description here



we superimpose a circ symbol with a text T character. The command



newcommandTcircmathbin%
ooalignhfil$circ$hfilcrhfil Thfilcr%



together with $ATcirc B$ produces the output.



To make sure your symbol looks right whether it's displayed, inline, script or scriptscript, you can use mathchoice. (Note mathpalette (explained here by @egreg and @Werner) can be used when the four versions are identical except for style.)



mathchoice
<do this if called in displaystyle>
<do this if called in textstyle>
<do this if called in scriptstyle>
<do this if called in scriptscriptstyle>


The above code will produce the corresponding output for each of the four math styles.



To illustrate, here is a solution to the twisted product question that will adjust to scripts and scriptscripts.



newcommandtwprodmathbinmathchoice%
ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
ooalignhfilraisebox.85exmbox$scriptscriptstylesim$hfilcrhfil$scriptstyletimes$hfilcr%
ooalignhfilraisebox.65exscalebox.8$scriptscriptstylesim$hfilcrhfil$scriptscriptstyletimes$hfilcr%



enter image description here



S^2twprod S^2 quad F_S^2twprod S^2 quad F_K_S^2twprod S^2


I downsized the sim in each style so it fit better over the times.



Similar effects can be obtained using stackengine. Documentation is here.



If you can't create your symbol by combining or modifying others, you can design your symbol from scratch using tikz, together with the ideas above. Here is an example by @marmot.






share|improve this answer
































    11














    I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:



    • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.

    • Use relative length scales for the line widths.

    • Consider using the baseline option.

    An example is given in this post:



    documentclassarticle
    usepackagetikz
    newcommandinftrianbegintikzpicture[baseline=-0.25em]
    draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
    endtikzpicture
    begindocument
    ABC inftrian DEF
    enddocument


    enter image description here



    You can combine this with all that has been said in Sandy G's nice answer about mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.






    share|improve this answer
































      10














      Another possibility with the stackinset command, from stackengine:



      documentclass[border = 2pt]standalone

      usepackagestackengine, graphicx %

      newcommandsimtimesstackMathmathbinmathchoice%
      stackinsetc0exc0.9exscalebox 0.67$sim $times%
      stackinsetc0exc0.9exscalebox 0.67$sim $times%
      stackinsetc0exc0.7exscalebox 0.67$scriptstylesim $scriptstyletimes%
      stackinsetc0exc0.6exscalebox 0.67$scriptscriptstylesim $scriptscriptstyletimes%


      begindocument

      $ S^2 simtimes S^2 quad F_S^2 simtimes S^2 quad F_K_S^2 simtimes S^2$

      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',
        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%2f480768%2fhow-do-you-make-your-own-symbol-when-detexify-fails%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









        38














        If it's really not in Detexify, check the Comprehensive LaTeX Symbol List to see if your symbol can be found in an existing package. Note, The Comprehensive List is long! Over 300 pages. But it is searchable, well-organized, and has a good table of contents and index.



        If that doesn't help, it may be time to design your own symbol. It's probably best to give your new symbol a name so it can be used repeatedly and transported more easily into another document.



        If your symbol will be used as an operator with limits (like an integral or summation), you should use the DeclareMathOperator or DeclareMathOperator* command. Both of these use the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle. To illustrate:



        DeclareMathOperator*squareopsquare
        DeclareMathOperatortriangleopbigtriangleup


        [Note that square uses the amssymb package.]



        Then the code



        [
        squareop_n=1^infty a_n qquad triangleop_n=1^infty a_n
        ]


        will produce the following output:



        enter image description here



        More information on DeclareMathOperator can be found in this answer by @Andrew Swann.



        If your symbol is not going to be used in that fashion, you should probably use newcommand.



        If your symbol is a math symbol: Is it a binary operator (such as + or times)? A binary relation (such as < or leq)? Or an ordinary math symbol (such as ! or infty)? The spacing is different for each case. Compare the three versions for the symbol times:



        newcommandreltimesmathreltimes
        newcommandbintimesmathbintimes
        newcommandchrtimestimes


        Then noindent $areltimes b newline abintimes b newline achrtimes b$ will produce the output:



        enter image description here



        Note the extra set of curly braces in chrtimes. If you remove them you'll get the same output as mathbintimes, since times is by default a binary operator. You can enclose most math symbols in to turn them into ordinary math symbols.



        Typically, binary relations have slightly more space than binary operators, and significantly more than ordinary symbols. However, the spacing changes when these appear as sub- or superscripts. All three examples above will look like A_atimes b if placed in a subscript.



        Many new symbols can be created by modifying or combining existing symbols. To rotate, scale or reflect existing symbols, use the graphicx or graphics package. Documentation is here. The commands are rotatebox, scalebox, resizebox and reflectbox.



        For example, if you want a cong symbol (≅), but with the tilde reversed, the reflectbox command from graphicx can be used. The code



        newcommandbackcongmathrelreflectbox$cong$


        will produce the desired effect with the code $Abackcong B$.



        enter image description here



        If you try using this code in a subscript (for example, $X_Abackcong B$), the new symbol will not scale down as it should. This is resolved below below using mathchoice.



        To combine multiple symbols (math or text) the ooalign command can be used. @egreg has a detailed explanation here. The basic idea is that ooalign creates a one-column table, with all rows superimposed on one another, and no padding outside the column. Each row of the "table" ends with cr. Entries can be centered in the column using hfil.



        For example, to produce



        enter image description here



        we superimpose a circ symbol with a text T character. The command



        newcommandTcircmathbin%
        ooalignhfil$circ$hfilcrhfil Thfilcr%



        together with $ATcirc B$ produces the output.



        To make sure your symbol looks right whether it's displayed, inline, script or scriptscript, you can use mathchoice. (Note mathpalette (explained here by @egreg and @Werner) can be used when the four versions are identical except for style.)



        mathchoice
        <do this if called in displaystyle>
        <do this if called in textstyle>
        <do this if called in scriptstyle>
        <do this if called in scriptscriptstyle>


        The above code will produce the corresponding output for each of the four math styles.



        To illustrate, here is a solution to the twisted product question that will adjust to scripts and scriptscripts.



        newcommandtwprodmathbinmathchoice%
        ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
        ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
        ooalignhfilraisebox.85exmbox$scriptscriptstylesim$hfilcrhfil$scriptstyletimes$hfilcr%
        ooalignhfilraisebox.65exscalebox.8$scriptscriptstylesim$hfilcrhfil$scriptscriptstyletimes$hfilcr%



        enter image description here



        S^2twprod S^2 quad F_S^2twprod S^2 quad F_K_S^2twprod S^2


        I downsized the sim in each style so it fit better over the times.



        Similar effects can be obtained using stackengine. Documentation is here.



        If you can't create your symbol by combining or modifying others, you can design your symbol from scratch using tikz, together with the ideas above. Here is an example by @marmot.






        share|improve this answer





























          38














          If it's really not in Detexify, check the Comprehensive LaTeX Symbol List to see if your symbol can be found in an existing package. Note, The Comprehensive List is long! Over 300 pages. But it is searchable, well-organized, and has a good table of contents and index.



          If that doesn't help, it may be time to design your own symbol. It's probably best to give your new symbol a name so it can be used repeatedly and transported more easily into another document.



          If your symbol will be used as an operator with limits (like an integral or summation), you should use the DeclareMathOperator or DeclareMathOperator* command. Both of these use the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle. To illustrate:



          DeclareMathOperator*squareopsquare
          DeclareMathOperatortriangleopbigtriangleup


          [Note that square uses the amssymb package.]



          Then the code



          [
          squareop_n=1^infty a_n qquad triangleop_n=1^infty a_n
          ]


          will produce the following output:



          enter image description here



          More information on DeclareMathOperator can be found in this answer by @Andrew Swann.



          If your symbol is not going to be used in that fashion, you should probably use newcommand.



          If your symbol is a math symbol: Is it a binary operator (such as + or times)? A binary relation (such as < or leq)? Or an ordinary math symbol (such as ! or infty)? The spacing is different for each case. Compare the three versions for the symbol times:



          newcommandreltimesmathreltimes
          newcommandbintimesmathbintimes
          newcommandchrtimestimes


          Then noindent $areltimes b newline abintimes b newline achrtimes b$ will produce the output:



          enter image description here



          Note the extra set of curly braces in chrtimes. If you remove them you'll get the same output as mathbintimes, since times is by default a binary operator. You can enclose most math symbols in to turn them into ordinary math symbols.



          Typically, binary relations have slightly more space than binary operators, and significantly more than ordinary symbols. However, the spacing changes when these appear as sub- or superscripts. All three examples above will look like A_atimes b if placed in a subscript.



          Many new symbols can be created by modifying or combining existing symbols. To rotate, scale or reflect existing symbols, use the graphicx or graphics package. Documentation is here. The commands are rotatebox, scalebox, resizebox and reflectbox.



          For example, if you want a cong symbol (≅), but with the tilde reversed, the reflectbox command from graphicx can be used. The code



          newcommandbackcongmathrelreflectbox$cong$


          will produce the desired effect with the code $Abackcong B$.



          enter image description here



          If you try using this code in a subscript (for example, $X_Abackcong B$), the new symbol will not scale down as it should. This is resolved below below using mathchoice.



          To combine multiple symbols (math or text) the ooalign command can be used. @egreg has a detailed explanation here. The basic idea is that ooalign creates a one-column table, with all rows superimposed on one another, and no padding outside the column. Each row of the "table" ends with cr. Entries can be centered in the column using hfil.



          For example, to produce



          enter image description here



          we superimpose a circ symbol with a text T character. The command



          newcommandTcircmathbin%
          ooalignhfil$circ$hfilcrhfil Thfilcr%



          together with $ATcirc B$ produces the output.



          To make sure your symbol looks right whether it's displayed, inline, script or scriptscript, you can use mathchoice. (Note mathpalette (explained here by @egreg and @Werner) can be used when the four versions are identical except for style.)



          mathchoice
          <do this if called in displaystyle>
          <do this if called in textstyle>
          <do this if called in scriptstyle>
          <do this if called in scriptscriptstyle>


          The above code will produce the corresponding output for each of the four math styles.



          To illustrate, here is a solution to the twisted product question that will adjust to scripts and scriptscripts.



          newcommandtwprodmathbinmathchoice%
          ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
          ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
          ooalignhfilraisebox.85exmbox$scriptscriptstylesim$hfilcrhfil$scriptstyletimes$hfilcr%
          ooalignhfilraisebox.65exscalebox.8$scriptscriptstylesim$hfilcrhfil$scriptscriptstyletimes$hfilcr%



          enter image description here



          S^2twprod S^2 quad F_S^2twprod S^2 quad F_K_S^2twprod S^2


          I downsized the sim in each style so it fit better over the times.



          Similar effects can be obtained using stackengine. Documentation is here.



          If you can't create your symbol by combining or modifying others, you can design your symbol from scratch using tikz, together with the ideas above. Here is an example by @marmot.






          share|improve this answer



























            38












            38








            38







            If it's really not in Detexify, check the Comprehensive LaTeX Symbol List to see if your symbol can be found in an existing package. Note, The Comprehensive List is long! Over 300 pages. But it is searchable, well-organized, and has a good table of contents and index.



            If that doesn't help, it may be time to design your own symbol. It's probably best to give your new symbol a name so it can be used repeatedly and transported more easily into another document.



            If your symbol will be used as an operator with limits (like an integral or summation), you should use the DeclareMathOperator or DeclareMathOperator* command. Both of these use the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle. To illustrate:



            DeclareMathOperator*squareopsquare
            DeclareMathOperatortriangleopbigtriangleup


            [Note that square uses the amssymb package.]



            Then the code



            [
            squareop_n=1^infty a_n qquad triangleop_n=1^infty a_n
            ]


            will produce the following output:



            enter image description here



            More information on DeclareMathOperator can be found in this answer by @Andrew Swann.



            If your symbol is not going to be used in that fashion, you should probably use newcommand.



            If your symbol is a math symbol: Is it a binary operator (such as + or times)? A binary relation (such as < or leq)? Or an ordinary math symbol (such as ! or infty)? The spacing is different for each case. Compare the three versions for the symbol times:



            newcommandreltimesmathreltimes
            newcommandbintimesmathbintimes
            newcommandchrtimestimes


            Then noindent $areltimes b newline abintimes b newline achrtimes b$ will produce the output:



            enter image description here



            Note the extra set of curly braces in chrtimes. If you remove them you'll get the same output as mathbintimes, since times is by default a binary operator. You can enclose most math symbols in to turn them into ordinary math symbols.



            Typically, binary relations have slightly more space than binary operators, and significantly more than ordinary symbols. However, the spacing changes when these appear as sub- or superscripts. All three examples above will look like A_atimes b if placed in a subscript.



            Many new symbols can be created by modifying or combining existing symbols. To rotate, scale or reflect existing symbols, use the graphicx or graphics package. Documentation is here. The commands are rotatebox, scalebox, resizebox and reflectbox.



            For example, if you want a cong symbol (≅), but with the tilde reversed, the reflectbox command from graphicx can be used. The code



            newcommandbackcongmathrelreflectbox$cong$


            will produce the desired effect with the code $Abackcong B$.



            enter image description here



            If you try using this code in a subscript (for example, $X_Abackcong B$), the new symbol will not scale down as it should. This is resolved below below using mathchoice.



            To combine multiple symbols (math or text) the ooalign command can be used. @egreg has a detailed explanation here. The basic idea is that ooalign creates a one-column table, with all rows superimposed on one another, and no padding outside the column. Each row of the "table" ends with cr. Entries can be centered in the column using hfil.



            For example, to produce



            enter image description here



            we superimpose a circ symbol with a text T character. The command



            newcommandTcircmathbin%
            ooalignhfil$circ$hfilcrhfil Thfilcr%



            together with $ATcirc B$ produces the output.



            To make sure your symbol looks right whether it's displayed, inline, script or scriptscript, you can use mathchoice. (Note mathpalette (explained here by @egreg and @Werner) can be used when the four versions are identical except for style.)



            mathchoice
            <do this if called in displaystyle>
            <do this if called in textstyle>
            <do this if called in scriptstyle>
            <do this if called in scriptscriptstyle>


            The above code will produce the corresponding output for each of the four math styles.



            To illustrate, here is a solution to the twisted product question that will adjust to scripts and scriptscripts.



            newcommandtwprodmathbinmathchoice%
            ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
            ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
            ooalignhfilraisebox.85exmbox$scriptscriptstylesim$hfilcrhfil$scriptstyletimes$hfilcr%
            ooalignhfilraisebox.65exscalebox.8$scriptscriptstylesim$hfilcrhfil$scriptscriptstyletimes$hfilcr%



            enter image description here



            S^2twprod S^2 quad F_S^2twprod S^2 quad F_K_S^2twprod S^2


            I downsized the sim in each style so it fit better over the times.



            Similar effects can be obtained using stackengine. Documentation is here.



            If you can't create your symbol by combining or modifying others, you can design your symbol from scratch using tikz, together with the ideas above. Here is an example by @marmot.






            share|improve this answer















            If it's really not in Detexify, check the Comprehensive LaTeX Symbol List to see if your symbol can be found in an existing package. Note, The Comprehensive List is long! Over 300 pages. But it is searchable, well-organized, and has a good table of contents and index.



            If that doesn't help, it may be time to design your own symbol. It's probably best to give your new symbol a name so it can be used repeatedly and transported more easily into another document.



            If your symbol will be used as an operator with limits (like an integral or summation), you should use the DeclareMathOperator or DeclareMathOperator* command. Both of these use the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle. To illustrate:



            DeclareMathOperator*squareopsquare
            DeclareMathOperatortriangleopbigtriangleup


            [Note that square uses the amssymb package.]



            Then the code



            [
            squareop_n=1^infty a_n qquad triangleop_n=1^infty a_n
            ]


            will produce the following output:



            enter image description here



            More information on DeclareMathOperator can be found in this answer by @Andrew Swann.



            If your symbol is not going to be used in that fashion, you should probably use newcommand.



            If your symbol is a math symbol: Is it a binary operator (such as + or times)? A binary relation (such as < or leq)? Or an ordinary math symbol (such as ! or infty)? The spacing is different for each case. Compare the three versions for the symbol times:



            newcommandreltimesmathreltimes
            newcommandbintimesmathbintimes
            newcommandchrtimestimes


            Then noindent $areltimes b newline abintimes b newline achrtimes b$ will produce the output:



            enter image description here



            Note the extra set of curly braces in chrtimes. If you remove them you'll get the same output as mathbintimes, since times is by default a binary operator. You can enclose most math symbols in to turn them into ordinary math symbols.



            Typically, binary relations have slightly more space than binary operators, and significantly more than ordinary symbols. However, the spacing changes when these appear as sub- or superscripts. All three examples above will look like A_atimes b if placed in a subscript.



            Many new symbols can be created by modifying or combining existing symbols. To rotate, scale or reflect existing symbols, use the graphicx or graphics package. Documentation is here. The commands are rotatebox, scalebox, resizebox and reflectbox.



            For example, if you want a cong symbol (≅), but with the tilde reversed, the reflectbox command from graphicx can be used. The code



            newcommandbackcongmathrelreflectbox$cong$


            will produce the desired effect with the code $Abackcong B$.



            enter image description here



            If you try using this code in a subscript (for example, $X_Abackcong B$), the new symbol will not scale down as it should. This is resolved below below using mathchoice.



            To combine multiple symbols (math or text) the ooalign command can be used. @egreg has a detailed explanation here. The basic idea is that ooalign creates a one-column table, with all rows superimposed on one another, and no padding outside the column. Each row of the "table" ends with cr. Entries can be centered in the column using hfil.



            For example, to produce



            enter image description here



            we superimpose a circ symbol with a text T character. The command



            newcommandTcircmathbin%
            ooalignhfil$circ$hfilcrhfil Thfilcr%



            together with $ATcirc B$ produces the output.



            To make sure your symbol looks right whether it's displayed, inline, script or scriptscript, you can use mathchoice. (Note mathpalette (explained here by @egreg and @Werner) can be used when the four versions are identical except for style.)



            mathchoice
            <do this if called in displaystyle>
            <do this if called in textstyle>
            <do this if called in scriptstyle>
            <do this if called in scriptscriptstyle>


            The above code will produce the corresponding output for each of the four math styles.



            To illustrate, here is a solution to the twisted product question that will adjust to scripts and scriptscripts.



            newcommandtwprodmathbinmathchoice%
            ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
            ooalignhfilraisebox1.15exmbox$scriptstylesim$hfilcrhfil$times$hfilcr%
            ooalignhfilraisebox.85exmbox$scriptscriptstylesim$hfilcrhfil$scriptstyletimes$hfilcr%
            ooalignhfilraisebox.65exscalebox.8$scriptscriptstylesim$hfilcrhfil$scriptscriptstyletimes$hfilcr%



            enter image description here



            S^2twprod S^2 quad F_S^2twprod S^2 quad F_K_S^2twprod S^2


            I downsized the sim in each style so it fit better over the times.



            Similar effects can be obtained using stackengine. Documentation is here.



            If you can't create your symbol by combining or modifying others, you can design your symbol from scratch using tikz, together with the ideas above. Here is an example by @marmot.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 22 at 4:19

























            answered Mar 21 at 20:27









            Sandy GSandy G

            4,2151633




            4,2151633





















                11














                I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:



                • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.

                • Use relative length scales for the line widths.

                • Consider using the baseline option.

                An example is given in this post:



                documentclassarticle
                usepackagetikz
                newcommandinftrianbegintikzpicture[baseline=-0.25em]
                draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
                endtikzpicture
                begindocument
                ABC inftrian DEF
                enddocument


                enter image description here



                You can combine this with all that has been said in Sandy G's nice answer about mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.






                share|improve this answer





























                  11














                  I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:



                  • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.

                  • Use relative length scales for the line widths.

                  • Consider using the baseline option.

                  An example is given in this post:



                  documentclassarticle
                  usepackagetikz
                  newcommandinftrianbegintikzpicture[baseline=-0.25em]
                  draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
                  endtikzpicture
                  begindocument
                  ABC inftrian DEF
                  enddocument


                  enter image description here



                  You can combine this with all that has been said in Sandy G's nice answer about mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.






                  share|improve this answer



























                    11












                    11








                    11







                    I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:



                    • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.

                    • Use relative length scales for the line widths.

                    • Consider using the baseline option.

                    An example is given in this post:



                    documentclassarticle
                    usepackagetikz
                    newcommandinftrianbegintikzpicture[baseline=-0.25em]
                    draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
                    endtikzpicture
                    begindocument
                    ABC inftrian DEF
                    enddocument


                    enter image description here



                    You can combine this with all that has been said in Sandy G's nice answer about mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.






                    share|improve this answer















                    I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:



                    • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.

                    • Use relative length scales for the line widths.

                    • Consider using the baseline option.

                    An example is given in this post:



                    documentclassarticle
                    usepackagetikz
                    newcommandinftrianbegintikzpicture[baseline=-0.25em]
                    draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
                    endtikzpicture
                    begindocument
                    ABC inftrian DEF
                    enddocument


                    enter image description here



                    You can combine this with all that has been said in Sandy G's nice answer about mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 22 at 4:02

























                    answered Mar 22 at 2:02









                    marmotmarmot

                    112k5140264




                    112k5140264





















                        10














                        Another possibility with the stackinset command, from stackengine:



                        documentclass[border = 2pt]standalone

                        usepackagestackengine, graphicx %

                        newcommandsimtimesstackMathmathbinmathchoice%
                        stackinsetc0exc0.9exscalebox 0.67$sim $times%
                        stackinsetc0exc0.9exscalebox 0.67$sim $times%
                        stackinsetc0exc0.7exscalebox 0.67$scriptstylesim $scriptstyletimes%
                        stackinsetc0exc0.6exscalebox 0.67$scriptscriptstylesim $scriptscriptstyletimes%


                        begindocument

                        $ S^2 simtimes S^2 quad F_S^2 simtimes S^2 quad F_K_S^2 simtimes S^2$

                        enddocument


                        enter image description here






                        share|improve this answer



























                          10














                          Another possibility with the stackinset command, from stackengine:



                          documentclass[border = 2pt]standalone

                          usepackagestackengine, graphicx %

                          newcommandsimtimesstackMathmathbinmathchoice%
                          stackinsetc0exc0.9exscalebox 0.67$sim $times%
                          stackinsetc0exc0.9exscalebox 0.67$sim $times%
                          stackinsetc0exc0.7exscalebox 0.67$scriptstylesim $scriptstyletimes%
                          stackinsetc0exc0.6exscalebox 0.67$scriptscriptstylesim $scriptscriptstyletimes%


                          begindocument

                          $ S^2 simtimes S^2 quad F_S^2 simtimes S^2 quad F_K_S^2 simtimes S^2$

                          enddocument


                          enter image description here






                          share|improve this answer

























                            10












                            10








                            10







                            Another possibility with the stackinset command, from stackengine:



                            documentclass[border = 2pt]standalone

                            usepackagestackengine, graphicx %

                            newcommandsimtimesstackMathmathbinmathchoice%
                            stackinsetc0exc0.9exscalebox 0.67$sim $times%
                            stackinsetc0exc0.9exscalebox 0.67$sim $times%
                            stackinsetc0exc0.7exscalebox 0.67$scriptstylesim $scriptstyletimes%
                            stackinsetc0exc0.6exscalebox 0.67$scriptscriptstylesim $scriptscriptstyletimes%


                            begindocument

                            $ S^2 simtimes S^2 quad F_S^2 simtimes S^2 quad F_K_S^2 simtimes S^2$

                            enddocument


                            enter image description here






                            share|improve this answer













                            Another possibility with the stackinset command, from stackengine:



                            documentclass[border = 2pt]standalone

                            usepackagestackengine, graphicx %

                            newcommandsimtimesstackMathmathbinmathchoice%
                            stackinsetc0exc0.9exscalebox 0.67$sim $times%
                            stackinsetc0exc0.9exscalebox 0.67$sim $times%
                            stackinsetc0exc0.7exscalebox 0.67$scriptstylesim $scriptstyletimes%
                            stackinsetc0exc0.6exscalebox 0.67$scriptscriptstylesim $scriptscriptstyletimes%


                            begindocument

                            $ S^2 simtimes S^2 quad F_S^2 simtimes S^2 quad F_K_S^2 simtimes S^2$

                            enddocument


                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 21 at 22:51









                            BernardBernard

                            174k776206




                            174k776206



























                                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%2f480768%2fhow-do-you-make-your-own-symbol-when-detexify-fails%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







                                -math-mode, math-operators, symbols

                                Popular posts from this blog

                                Mobil Contents History Mobil brands Former Mobil brands Lukoil transaction Mobil UK Mobil Australia Mobil New Zealand Mobil Greece Mobil in Japan Mobil in Canada Mobil Egypt See also References External links Navigation menuwww.mobil.com"Mobil Corporation"the original"Our Houston campus""Business & Finance: Socony-Vacuum Corp.""Popular Mechanics""Lubrite Technologies""Exxon Mobil campus 'clearly happening'""Toledo Blade - Google News Archive Search""The Lion and the Moose - How 2 Executives Pulled off the Biggest Merger Ever""ExxonMobil Press Release""Lubricants""Archived copy"the original"Mobil 1™ and Mobil Super™ motor oil and synthetic motor oil - Mobil™ Motor Oils""Mobil Delvac""Mobil Industrial website""The State of Competition in Gasoline Marketing: The Effects of Refiner Operations at Retail""Mobil Travel Guide to become Forbes Travel Guide""Hotel Rankings: Forbes Merges with Mobil"the original"Jamieson oil industry history""Mobil news""Caltex pumps for control""Watchdog blocks Caltex bid""Exxon Mobil sells service station network""Mobil Oil New Zealand Limited is New Zealand's oldest oil company, with predecessor companies having first established a presence in the country in 1896""ExxonMobil subsidiaries have a business history in New Zealand stretching back more than 120 years. We are involved in petroleum refining and distribution and the marketing of fuels, lubricants and chemical products""Archived copy"the original"Exxon Mobil to Sell Its Japanese Arm for $3.9 Billion""Gas station merger will end Esso and Mobil's long run in Japan""Esso moves to affiliate itself with PC Optimum, no longer Aeroplan, in loyalty point switch""Mobil brand of gas stations to launch in Canada after deal for 213 Loblaws-owned locations""Mobil Nears Completion of Rebranding 200 Loblaw Gas Stations""Learn about ExxonMobil's operations in Egypt""Petrol and Diesel Service Stations in Egypt - Mobil"Official websiteExxon Mobil corporate websiteMobil Industrial official websiteeeeeeeeDA04275022275790-40000 0001 0860 5061n82045453134887257134887257

                                Frič See also Navigation menuinternal link

                                Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant