mhchem - bold part of equation typeset with ceMhchem with decimal ratiosMacro's in mhchem?Using the mhchem and chemfig packages in conjunctionLine Break with mhchemraising subscript with mhchemHow to redefine the ce-command in oder to force a specific font?Undefined control sequence with mhchemmhchem wrong subscriptmhchem - make font bold in ce environmentUndefined control sequence with mhchem package

Why is the UH-60 tail rotor canted?

Killing a star safely

Was US film used in Luna 3?

What rules turn any attack that hits a given target into a critical hit?

What kind of world would drive brains to evolve high-throughput sensory?

Is it OK to accept a job opportunity while planning on not taking it?

Why did modems have speakers?

Xcode 10.3 Installation

Why did computer video outputs go from digital to analog, then back to digital?

how to add 1 milliseconds on a datetime string?

Can a creature sustain itself by eating its own severed body parts?

How to apply dcolumn in my longtable case? Need help

Is the apartment I want to rent a scam?

Is it ethical to tell my teaching assistant that I like him?

Adding gears to my grandson's 12" bike

Chemistry Riddle

On the history of Haar measure

Does starting a profile in Mon Projet mean I applied to enter or remain in Canada?

Would using carbon dioxide as fuel work to reduce the greenhouse effect?

Pass USB 3.0 connection through D-SUB connector

Are there any documented cases of extinction of a species of fungus?

Strange LED behavior: Why is there a voltage over the LED with only one wire connected to it?

Does Impedance Matching Imply any Practical RF Transmitter Must Waste >=50% of Energy?

How can I print a 1 cm overhang with minimal supports?



mhchem - bold part of equation typeset with ce


Mhchem with decimal ratiosMacro's in mhchem?Using the mhchem and chemfig packages in conjunctionLine Break with mhchemraising subscript with mhchemHow to redefine the ce-command in oder to force a specific font?Undefined control sequence with mhchemmhchem wrong subscriptmhchem - make font bold in ce environmentUndefined control sequence with mhchem package






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








5















I'm trying to typeset a chemical equation using the mhchem package, and I want to bold just one part of the equation (to emphasize the product, in this case).



If I type cea A + b B -> c textbfC + d D, then that produces a A + b B → c C + d D. That's perfectly fine, of course. But I cannot put any more complex chemical formulas within the textbf command. If I enter, for example, ceNH3(g) + HCl(g) -> textbfNH4Cl(s), ammonium chloride is typeset as NH4Cl(s), without the subscript.



I tried writing the subscript manually (NH_4Cl), but $ceNH3(g) + HCl(g) -> textbfNH_4Cl(s)$ did not work, and instead gave me a bunch of errors (missing $, extra } or forgotten $, missing , and missing ).




I'm pretty new here so I'm not exactly sure how this MWE thing works — I don't have much that works, but as far as I can tell the code I was using to try things out seems to be pretty close to a MWE. Please let me know if I should provide anything else.



documentclassarticle

usepackage[version=4]mhchem

begindocument

cea A + b B -> c C + d D

cea A + b B -> c textbfC + d D

ceNH3(g) + HCl(g) -> textbfNH4Cl(s)

enddocument









share|improve this question




























    5















    I'm trying to typeset a chemical equation using the mhchem package, and I want to bold just one part of the equation (to emphasize the product, in this case).



    If I type cea A + b B -> c textbfC + d D, then that produces a A + b B → c C + d D. That's perfectly fine, of course. But I cannot put any more complex chemical formulas within the textbf command. If I enter, for example, ceNH3(g) + HCl(g) -> textbfNH4Cl(s), ammonium chloride is typeset as NH4Cl(s), without the subscript.



    I tried writing the subscript manually (NH_4Cl), but $ceNH3(g) + HCl(g) -> textbfNH_4Cl(s)$ did not work, and instead gave me a bunch of errors (missing $, extra } or forgotten $, missing , and missing ).




    I'm pretty new here so I'm not exactly sure how this MWE thing works — I don't have much that works, but as far as I can tell the code I was using to try things out seems to be pretty close to a MWE. Please let me know if I should provide anything else.



    documentclassarticle

    usepackage[version=4]mhchem

    begindocument

    cea A + b B -> c C + d D

    cea A + b B -> c textbfC + d D

    ceNH3(g) + HCl(g) -> textbfNH4Cl(s)

    enddocument









    share|improve this question
























      5












      5








      5








      I'm trying to typeset a chemical equation using the mhchem package, and I want to bold just one part of the equation (to emphasize the product, in this case).



      If I type cea A + b B -> c textbfC + d D, then that produces a A + b B → c C + d D. That's perfectly fine, of course. But I cannot put any more complex chemical formulas within the textbf command. If I enter, for example, ceNH3(g) + HCl(g) -> textbfNH4Cl(s), ammonium chloride is typeset as NH4Cl(s), without the subscript.



      I tried writing the subscript manually (NH_4Cl), but $ceNH3(g) + HCl(g) -> textbfNH_4Cl(s)$ did not work, and instead gave me a bunch of errors (missing $, extra } or forgotten $, missing , and missing ).




      I'm pretty new here so I'm not exactly sure how this MWE thing works — I don't have much that works, but as far as I can tell the code I was using to try things out seems to be pretty close to a MWE. Please let me know if I should provide anything else.



      documentclassarticle

      usepackage[version=4]mhchem

      begindocument

      cea A + b B -> c C + d D

      cea A + b B -> c textbfC + d D

      ceNH3(g) + HCl(g) -> textbfNH4Cl(s)

      enddocument









      share|improve this question














      I'm trying to typeset a chemical equation using the mhchem package, and I want to bold just one part of the equation (to emphasize the product, in this case).



      If I type cea A + b B -> c textbfC + d D, then that produces a A + b B → c C + d D. That's perfectly fine, of course. But I cannot put any more complex chemical formulas within the textbf command. If I enter, for example, ceNH3(g) + HCl(g) -> textbfNH4Cl(s), ammonium chloride is typeset as NH4Cl(s), without the subscript.



      I tried writing the subscript manually (NH_4Cl), but $ceNH3(g) + HCl(g) -> textbfNH_4Cl(s)$ did not work, and instead gave me a bunch of errors (missing $, extra } or forgotten $, missing , and missing ).




      I'm pretty new here so I'm not exactly sure how this MWE thing works — I don't have much that works, but as far as I can tell the code I was using to try things out seems to be pretty close to a MWE. Please let me know if I should provide anything else.



      documentclassarticle

      usepackage[version=4]mhchem

      begindocument

      cea A + b B -> c C + d D

      cea A + b B -> c textbfC + d D

      ceNH3(g) + HCl(g) -> textbfNH4Cl(s)

      enddocument






      mhchem






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 14 at 3:20









      GravitronGravitron

      306 bronze badges




      306 bronze badges




















          3 Answers
          3






          active

          oldest

          votes


















          9














          An textbf is a hard break inside a ce. What goes inside textbf's argument is not processed by the mhchem package.



          This is the way to go.



          ceNH3(g) + HCl(g) -> $textbfceNH4Cl$(s)


          Use $ to indicate that you want to escape mhchem parsing (mhchem does the correct guessing that textbf and the next belong together, but using $ is much clearer). Then use textbf, then use ce inside.



          The $ part (or the textbf for that matter) might interrupt the mhchem flow. The succeeding (s) works fine, here, but you might not be always so lucky (for instance, a $textbf4$ would not be recognized as a number).






          share|improve this answer




















          • 1





            Approved! I should have used the same solution as you.

            – Sebastiano
            Jul 14 at 9:23


















          3














          Try



          • using ce in math mode (this dose change the output when you use a text font that looks different from the math font, or in headings, as commented by @mhchem) and

          • using mathbf instead of textbf

          See this example:



          documentclassarticle
          usepackage[version=4]mhchem

          begindocument
          $ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
          ceNH3(g) + HCl(g) -> NH_4Cl(s)
          enddocument


          enter image description here






          share|improve this answer




















          • 2





            Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

            – mhchem
            Jul 14 at 6:21











          • @mhchem thanks. I have updated the answer.

            – Johannes Z
            Jul 14 at 18:00


















          1














          It works flawlessly with chemformula, with the difference that the indeterminate coefficients should be typeset in math.



          documentclassarticle

          usepackagechemformula

          begindocument

          ch$a$ A + $b$ B -> $c$ C + $d$ D

          ch$a$ A + $b$ B -> $c$ textbfC + $d$ D

          chNH3(g) + HCl(g) -> textbfNH4Cl(s)

          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%2f499857%2fmhchem-bold-part-of-equation-typeset-with-ce%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









            9














            An textbf is a hard break inside a ce. What goes inside textbf's argument is not processed by the mhchem package.



            This is the way to go.



            ceNH3(g) + HCl(g) -> $textbfceNH4Cl$(s)


            Use $ to indicate that you want to escape mhchem parsing (mhchem does the correct guessing that textbf and the next belong together, but using $ is much clearer). Then use textbf, then use ce inside.



            The $ part (or the textbf for that matter) might interrupt the mhchem flow. The succeeding (s) works fine, here, but you might not be always so lucky (for instance, a $textbf4$ would not be recognized as a number).






            share|improve this answer




















            • 1





              Approved! I should have used the same solution as you.

              – Sebastiano
              Jul 14 at 9:23















            9














            An textbf is a hard break inside a ce. What goes inside textbf's argument is not processed by the mhchem package.



            This is the way to go.



            ceNH3(g) + HCl(g) -> $textbfceNH4Cl$(s)


            Use $ to indicate that you want to escape mhchem parsing (mhchem does the correct guessing that textbf and the next belong together, but using $ is much clearer). Then use textbf, then use ce inside.



            The $ part (or the textbf for that matter) might interrupt the mhchem flow. The succeeding (s) works fine, here, but you might not be always so lucky (for instance, a $textbf4$ would not be recognized as a number).






            share|improve this answer




















            • 1





              Approved! I should have used the same solution as you.

              – Sebastiano
              Jul 14 at 9:23













            9












            9








            9







            An textbf is a hard break inside a ce. What goes inside textbf's argument is not processed by the mhchem package.



            This is the way to go.



            ceNH3(g) + HCl(g) -> $textbfceNH4Cl$(s)


            Use $ to indicate that you want to escape mhchem parsing (mhchem does the correct guessing that textbf and the next belong together, but using $ is much clearer). Then use textbf, then use ce inside.



            The $ part (or the textbf for that matter) might interrupt the mhchem flow. The succeeding (s) works fine, here, but you might not be always so lucky (for instance, a $textbf4$ would not be recognized as a number).






            share|improve this answer















            An textbf is a hard break inside a ce. What goes inside textbf's argument is not processed by the mhchem package.



            This is the way to go.



            ceNH3(g) + HCl(g) -> $textbfceNH4Cl$(s)


            Use $ to indicate that you want to escape mhchem parsing (mhchem does the correct guessing that textbf and the next belong together, but using $ is much clearer). Then use textbf, then use ce inside.



            The $ part (or the textbf for that matter) might interrupt the mhchem flow. The succeeding (s) works fine, here, but you might not be always so lucky (for instance, a $textbf4$ would not be recognized as a number).







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 14 at 19:13

























            answered Jul 14 at 6:20









            mhchemmhchem

            2,3566 silver badges24 bronze badges




            2,3566 silver badges24 bronze badges







            • 1





              Approved! I should have used the same solution as you.

              – Sebastiano
              Jul 14 at 9:23












            • 1





              Approved! I should have used the same solution as you.

              – Sebastiano
              Jul 14 at 9:23







            1




            1





            Approved! I should have used the same solution as you.

            – Sebastiano
            Jul 14 at 9:23





            Approved! I should have used the same solution as you.

            – Sebastiano
            Jul 14 at 9:23













            3














            Try



            • using ce in math mode (this dose change the output when you use a text font that looks different from the math font, or in headings, as commented by @mhchem) and

            • using mathbf instead of textbf

            See this example:



            documentclassarticle
            usepackage[version=4]mhchem

            begindocument
            $ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
            ceNH3(g) + HCl(g) -> NH_4Cl(s)
            enddocument


            enter image description here






            share|improve this answer




















            • 2





              Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

              – mhchem
              Jul 14 at 6:21











            • @mhchem thanks. I have updated the answer.

              – Johannes Z
              Jul 14 at 18:00















            3














            Try



            • using ce in math mode (this dose change the output when you use a text font that looks different from the math font, or in headings, as commented by @mhchem) and

            • using mathbf instead of textbf

            See this example:



            documentclassarticle
            usepackage[version=4]mhchem

            begindocument
            $ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
            ceNH3(g) + HCl(g) -> NH_4Cl(s)
            enddocument


            enter image description here






            share|improve this answer




















            • 2





              Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

              – mhchem
              Jul 14 at 6:21











            • @mhchem thanks. I have updated the answer.

              – Johannes Z
              Jul 14 at 18:00













            3












            3








            3







            Try



            • using ce in math mode (this dose change the output when you use a text font that looks different from the math font, or in headings, as commented by @mhchem) and

            • using mathbf instead of textbf

            See this example:



            documentclassarticle
            usepackage[version=4]mhchem

            begindocument
            $ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
            ceNH3(g) + HCl(g) -> NH_4Cl(s)
            enddocument


            enter image description here






            share|improve this answer















            Try



            • using ce in math mode (this dose change the output when you use a text font that looks different from the math font, or in headings, as commented by @mhchem) and

            • using mathbf instead of textbf

            See this example:



            documentclassarticle
            usepackage[version=4]mhchem

            begindocument
            $ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
            ceNH3(g) + HCl(g) -> NH_4Cl(s)
            enddocument


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 14 at 17:59

























            answered Jul 14 at 3:43









            Johannes ZJohannes Z

            4043 silver badges13 bronze badges




            4043 silver badges13 bronze badges







            • 2





              Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

              – mhchem
              Jul 14 at 6:21











            • @mhchem thanks. I have updated the answer.

              – Johannes Z
              Jul 14 at 18:00












            • 2





              Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

              – mhchem
              Jul 14 at 6:21











            • @mhchem thanks. I have updated the answer.

              – Johannes Z
              Jul 14 at 18:00







            2




            2





            Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

            – mhchem
            Jul 14 at 6:21





            Using ce in math mode does change the output when you use a text font that looks different from the math font, or in headings.

            – mhchem
            Jul 14 at 6:21













            @mhchem thanks. I have updated the answer.

            – Johannes Z
            Jul 14 at 18:00





            @mhchem thanks. I have updated the answer.

            – Johannes Z
            Jul 14 at 18:00











            1














            It works flawlessly with chemformula, with the difference that the indeterminate coefficients should be typeset in math.



            documentclassarticle

            usepackagechemformula

            begindocument

            ch$a$ A + $b$ B -> $c$ C + $d$ D

            ch$a$ A + $b$ B -> $c$ textbfC + $d$ D

            chNH3(g) + HCl(g) -> textbfNH4Cl(s)

            enddocument


            enter image description here






            share|improve this answer



























              1














              It works flawlessly with chemformula, with the difference that the indeterminate coefficients should be typeset in math.



              documentclassarticle

              usepackagechemformula

              begindocument

              ch$a$ A + $b$ B -> $c$ C + $d$ D

              ch$a$ A + $b$ B -> $c$ textbfC + $d$ D

              chNH3(g) + HCl(g) -> textbfNH4Cl(s)

              enddocument


              enter image description here






              share|improve this answer

























                1












                1








                1







                It works flawlessly with chemformula, with the difference that the indeterminate coefficients should be typeset in math.



                documentclassarticle

                usepackagechemformula

                begindocument

                ch$a$ A + $b$ B -> $c$ C + $d$ D

                ch$a$ A + $b$ B -> $c$ textbfC + $d$ D

                chNH3(g) + HCl(g) -> textbfNH4Cl(s)

                enddocument


                enter image description here






                share|improve this answer













                It works flawlessly with chemformula, with the difference that the indeterminate coefficients should be typeset in math.



                documentclassarticle

                usepackagechemformula

                begindocument

                ch$a$ A + $b$ B -> $c$ C + $d$ D

                ch$a$ A + $b$ B -> $c$ textbfC + $d$ D

                chNH3(g) + HCl(g) -> textbfNH4Cl(s)

                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 14 at 18:11









                egregegreg

                757k90 gold badges1981 silver badges3326 bronze badges




                757k90 gold badges1981 silver badges3326 bronze badges



























                    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%2f499857%2fmhchem-bold-part-of-equation-typeset-with-ce%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

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form