Chemmacros arrow in Tikz node

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











up vote
3
down vote

favorite












I want to use Chemmacros inside a tikz node but the arrow of the reaction is disturbed by the line before the node. My example work fine if I use mhchem (ceA -> B) instead of chemmacros. My MWE



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]chA -> B;
endtikzpicture
enddocument


strange_arrow
Look and the end of the chemmacros arrow.










share|improve this question



















  • 2




    Not surprising since you are nesting tikzpictures. Please avoid putting chmemmacros into nodes of tikzpictures.
    – marmot
    Aug 19 at 15:42














up vote
3
down vote

favorite












I want to use Chemmacros inside a tikz node but the arrow of the reaction is disturbed by the line before the node. My example work fine if I use mhchem (ceA -> B) instead of chemmacros. My MWE



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]chA -> B;
endtikzpicture
enddocument


strange_arrow
Look and the end of the chemmacros arrow.










share|improve this question



















  • 2




    Not surprising since you are nesting tikzpictures. Please avoid putting chmemmacros into nodes of tikzpictures.
    – marmot
    Aug 19 at 15:42












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I want to use Chemmacros inside a tikz node but the arrow of the reaction is disturbed by the line before the node. My example work fine if I use mhchem (ceA -> B) instead of chemmacros. My MWE



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]chA -> B;
endtikzpicture
enddocument


strange_arrow
Look and the end of the chemmacros arrow.










share|improve this question















I want to use Chemmacros inside a tikz node but the arrow of the reaction is disturbed by the line before the node. My example work fine if I use mhchem (ceA -> B) instead of chemmacros. My MWE



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]chA -> B;
endtikzpicture
enddocument


strange_arrow
Look and the end of the chemmacros arrow.







tikz-pgf chemmacros






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 19 at 17:04









current_user

2,5741428




2,5741428










asked Aug 19 at 15:32









jrivet

463




463







  • 2




    Not surprising since you are nesting tikzpictures. Please avoid putting chmemmacros into nodes of tikzpictures.
    – marmot
    Aug 19 at 15:42












  • 2




    Not surprising since you are nesting tikzpictures. Please avoid putting chmemmacros into nodes of tikzpictures.
    – marmot
    Aug 19 at 15:42







2




2




Not surprising since you are nesting tikzpictures. Please avoid putting chmemmacros into nodes of tikzpictures.
– marmot
Aug 19 at 15:42




Not surprising since you are nesting tikzpictures. Please avoid putting chmemmacros into nodes of tikzpictures.
– marmot
Aug 19 at 15:42










2 Answers
2






active

oldest

votes

















up vote
3
down vote













I understand the problem. One solution:



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
newsaveboxmybox
sboxmybox%
ch2 H+ aq + 2 e- -> H2 gas

begintikzpicture
draw[->] (0,0) -- ++(1,1) node[anchor=west]
useboxmybox;
endtikzpicture
enddocument


like is explain here nesting tikzpicture






share|improve this answer




















  • Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
    – marmot
    Aug 19 at 22:26

















up vote
2
down vote













Is that ok, too?



documentclass[border=5pt,tikz]standalone
usetikzlibraryarrows
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]A tikz[baseline=-.1cm]draw[>=stealth'](0,0)--+(.6,0) B;
endtikzpicture
enddocument


Screenshot






share|improve this answer




















  • I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
    – jrivet
    Aug 19 at 15:47










  • @jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
    – current_user
    Aug 19 at 15:48










  • My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
    – jrivet
    Aug 19 at 15:52










  • @jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
    – current_user
    Aug 19 at 15:53






  • 1




    @current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
    – Max
    Aug 19 at 18:06










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
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%2f446679%2fchemmacros-arrow-in-tikz-node%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













I understand the problem. One solution:



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
newsaveboxmybox
sboxmybox%
ch2 H+ aq + 2 e- -> H2 gas

begintikzpicture
draw[->] (0,0) -- ++(1,1) node[anchor=west]
useboxmybox;
endtikzpicture
enddocument


like is explain here nesting tikzpicture






share|improve this answer




















  • Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
    – marmot
    Aug 19 at 22:26














up vote
3
down vote













I understand the problem. One solution:



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
newsaveboxmybox
sboxmybox%
ch2 H+ aq + 2 e- -> H2 gas

begintikzpicture
draw[->] (0,0) -- ++(1,1) node[anchor=west]
useboxmybox;
endtikzpicture
enddocument


like is explain here nesting tikzpicture






share|improve this answer




















  • Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
    – marmot
    Aug 19 at 22:26












up vote
3
down vote










up vote
3
down vote









I understand the problem. One solution:



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
newsaveboxmybox
sboxmybox%
ch2 H+ aq + 2 e- -> H2 gas

begintikzpicture
draw[->] (0,0) -- ++(1,1) node[anchor=west]
useboxmybox;
endtikzpicture
enddocument


like is explain here nesting tikzpicture






share|improve this answer












I understand the problem. One solution:



documentclass[10pt,a4paper]article
usepackagechemmacros
usepackagetikz
begindocument
newsaveboxmybox
sboxmybox%
ch2 H+ aq + 2 e- -> H2 gas

begintikzpicture
draw[->] (0,0) -- ++(1,1) node[anchor=west]
useboxmybox;
endtikzpicture
enddocument


like is explain here nesting tikzpicture







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 19 at 16:42









jrivet

463




463











  • Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
    – marmot
    Aug 19 at 22:26
















  • Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
    – marmot
    Aug 19 at 22:26















Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
– marmot
Aug 19 at 22:26




Yes, precisely. +1 Unfortunately your code in your question did not compile. Any chance that in more recent versions of chemmacros you need to do something in addition? Could you perhaps check that and, if it does not work with the updated version, append a solution for that case as well? Others with the same problem might find that useful...
– marmot
Aug 19 at 22:26










up vote
2
down vote













Is that ok, too?



documentclass[border=5pt,tikz]standalone
usetikzlibraryarrows
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]A tikz[baseline=-.1cm]draw[>=stealth'](0,0)--+(.6,0) B;
endtikzpicture
enddocument


Screenshot






share|improve this answer




















  • I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
    – jrivet
    Aug 19 at 15:47










  • @jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
    – current_user
    Aug 19 at 15:48










  • My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
    – jrivet
    Aug 19 at 15:52










  • @jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
    – current_user
    Aug 19 at 15:53






  • 1




    @current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
    – Max
    Aug 19 at 18:06














up vote
2
down vote













Is that ok, too?



documentclass[border=5pt,tikz]standalone
usetikzlibraryarrows
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]A tikz[baseline=-.1cm]draw[>=stealth'](0,0)--+(.6,0) B;
endtikzpicture
enddocument


Screenshot






share|improve this answer




















  • I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
    – jrivet
    Aug 19 at 15:47










  • @jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
    – current_user
    Aug 19 at 15:48










  • My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
    – jrivet
    Aug 19 at 15:52










  • @jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
    – current_user
    Aug 19 at 15:53






  • 1




    @current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
    – Max
    Aug 19 at 18:06












up vote
2
down vote










up vote
2
down vote









Is that ok, too?



documentclass[border=5pt,tikz]standalone
usetikzlibraryarrows
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]A tikz[baseline=-.1cm]draw[>=stealth'](0,0)--+(.6,0) B;
endtikzpicture
enddocument


Screenshot






share|improve this answer












Is that ok, too?



documentclass[border=5pt,tikz]standalone
usetikzlibraryarrows
begindocument
begintikzpicture
draw[->] (0,0) -- ++(1,1)
node[anchor=west]A tikz[baseline=-.1cm]draw[>=stealth'](0,0)--+(.6,0) B;
endtikzpicture
enddocument


Screenshot







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 19 at 15:42









current_user

2,5741428




2,5741428











  • I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
    – jrivet
    Aug 19 at 15:47










  • @jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
    – current_user
    Aug 19 at 15:48










  • My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
    – jrivet
    Aug 19 at 15:52










  • @jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
    – current_user
    Aug 19 at 15:53






  • 1




    @current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
    – Max
    Aug 19 at 18:06
















  • I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
    – jrivet
    Aug 19 at 15:47










  • @jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
    – current_user
    Aug 19 at 15:48










  • My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
    – jrivet
    Aug 19 at 15:52










  • @jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
    – current_user
    Aug 19 at 15:53






  • 1




    @current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
    – Max
    Aug 19 at 18:06















I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
– jrivet
Aug 19 at 15:47




I want to use chemmacros for my chemistry lessons. For example I want to put inside the node: ch2 H+ aq + 2 e^- -> H2 gas or something more complex.
– jrivet
Aug 19 at 15:47












@jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
– current_user
Aug 19 at 15:48




@jrivet: As marmot already mentioned you sholdn't use chemmacros in TikZ-nodes. Try to write it "by hand".
– current_user
Aug 19 at 15:48












My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
– jrivet
Aug 19 at 15:52




My example work fine if I use mhchem (ceA -> B) instead of chemmacros. Can we get arround the difficulty?
– jrivet
Aug 19 at 15:52












@jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
– current_user
Aug 19 at 15:53




@jrivet: If that does work (I didn't tried it since yet) that you can use it. But it's "safer" to do it by hand if there are any problems …
– current_user
Aug 19 at 15:53




1




1




@current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
– Max
Aug 19 at 18:06




@current_user What is the difference between using a tikzpicture environment in a node, and using its inline equivalent tikz in a node?
– Max
Aug 19 at 18:06

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446679%2fchemmacros-arrow-in-tikz-node%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay