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;
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
add a comment |
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
add a comment |
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
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
mhchem
asked Jul 14 at 3:20
GravitronGravitron
306 bronze badges
306 bronze badges
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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).
1
Approved! I should have used the same solution as you.
– Sebastiano
Jul 14 at 9:23
add a comment |
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 oftextbf
See this example:
documentclassarticle
usepackage[version=4]mhchem
begindocument
$ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
ceNH3(g) + HCl(g) -> NH_4Cl(s)
enddocument
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
add a comment |
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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).
1
Approved! I should have used the same solution as you.
– Sebastiano
Jul 14 at 9:23
add a comment |
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).
1
Approved! I should have used the same solution as you.
– Sebastiano
Jul 14 at 9:23
add a comment |
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).
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).
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
add a comment |
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
add a comment |
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 oftextbf
See this example:
documentclassarticle
usepackage[version=4]mhchem
begindocument
$ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
ceNH3(g) + HCl(g) -> NH_4Cl(s)
enddocument
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
add a comment |
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 oftextbf
See this example:
documentclassarticle
usepackage[version=4]mhchem
begindocument
$ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
ceNH3(g) + HCl(g) -> NH_4Cl(s)
enddocument
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
add a comment |
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 oftextbf
See this example:
documentclassarticle
usepackage[version=4]mhchem
begindocument
$ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
ceNH3(g) + HCl(g) -> NH_4Cl(s)
enddocument
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 oftextbf
See this example:
documentclassarticle
usepackage[version=4]mhchem
begindocument
$ceNH3(g) + HCl(g) -> mathbfNH_4Cl(s)$
ceNH3(g) + HCl(g) -> NH_4Cl(s)
enddocument
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
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Jul 14 at 18:11
egregegreg
757k90 gold badges1981 silver badges3326 bronze badges
757k90 gold badges1981 silver badges3326 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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