Chemmacros reaction(s) environment doesn't display the first reactant if enclosed in square brackets











up vote
0
down vote

favorite












When typing reactions starting with coordinating compounds, I noticed that when the first reactant starts with "[" in both reaction and reactions environments the part enclosed in square brackets isn't rendered correctly:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



Neither pdflatex, nor xelatex show any error messages. Empirically I discovered that adding a pair of square brackets to the reaction(s) environment solves the problem:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



I'm also curious why begin{reaction} actually works – maybe there are some arguments that reaction(s) environment expects?










share|improve this question






















  • not specific to the reaction environment. it's just how latex works. see e.g. Error with square bracket in table or just try documentclass{article}begin{document}begin{figure}[Test]end{figure}end{document} and you will get an error about unknown positional arguments.
    – Troy
    Dec 4 at 17:07












  • @Troy I see. So, what do you think would be the best course of action here: leave a couple of empty brackets every time, use {[} for the first complex, or something else? Also I find it weird that compilers don't complain at all as if ML6 were a valid argument.
    – andselisk
    Dec 4 at 17:53






  • 1




    in this case, I would do since it seems to be the quickest way to do it. I don't think one has any advantage (apart from flow of typing) over the other. maybe Clemens would have something to say regarding your second statement.
    – Troy
    Dec 4 at 18:26















up vote
0
down vote

favorite












When typing reactions starting with coordinating compounds, I noticed that when the first reactant starts with "[" in both reaction and reactions environments the part enclosed in square brackets isn't rendered correctly:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



Neither pdflatex, nor xelatex show any error messages. Empirically I discovered that adding a pair of square brackets to the reaction(s) environment solves the problem:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



I'm also curious why begin{reaction} actually works – maybe there are some arguments that reaction(s) environment expects?










share|improve this question






















  • not specific to the reaction environment. it's just how latex works. see e.g. Error with square bracket in table or just try documentclass{article}begin{document}begin{figure}[Test]end{figure}end{document} and you will get an error about unknown positional arguments.
    – Troy
    Dec 4 at 17:07












  • @Troy I see. So, what do you think would be the best course of action here: leave a couple of empty brackets every time, use {[} for the first complex, or something else? Also I find it weird that compilers don't complain at all as if ML6 were a valid argument.
    – andselisk
    Dec 4 at 17:53






  • 1




    in this case, I would do since it seems to be the quickest way to do it. I don't think one has any advantage (apart from flow of typing) over the other. maybe Clemens would have something to say regarding your second statement.
    – Troy
    Dec 4 at 18:26













up vote
0
down vote

favorite









up vote
0
down vote

favorite











When typing reactions starting with coordinating compounds, I noticed that when the first reactant starts with "[" in both reaction and reactions environments the part enclosed in square brackets isn't rendered correctly:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



Neither pdflatex, nor xelatex show any error messages. Empirically I discovered that adding a pair of square brackets to the reaction(s) environment solves the problem:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



I'm also curious why begin{reaction} actually works – maybe there are some arguments that reaction(s) environment expects?










share|improve this question













When typing reactions starting with coordinating compounds, I noticed that when the first reactant starts with "[" in both reaction and reactions environments the part enclosed in square brackets isn't rendered correctly:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



Neither pdflatex, nor xelatex show any error messages. Empirically I discovered that adding a pair of square brackets to the reaction(s) environment solves the problem:



documentclass{article}
usepackage{chemmacros}
chemsetup{modules = all}

begin{document}

begin{reaction}
[ML6]A <=> [ML6]+ + A-
end{reaction}

end{document}


enter image description here



I'm also curious why begin{reaction} actually works – maybe there are some arguments that reaction(s) environment expects?







chemistry chemmacros chemformula






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 4 at 14:59









andselisk

6662621




6662621












  • not specific to the reaction environment. it's just how latex works. see e.g. Error with square bracket in table or just try documentclass{article}begin{document}begin{figure}[Test]end{figure}end{document} and you will get an error about unknown positional arguments.
    – Troy
    Dec 4 at 17:07












  • @Troy I see. So, what do you think would be the best course of action here: leave a couple of empty brackets every time, use {[} for the first complex, or something else? Also I find it weird that compilers don't complain at all as if ML6 were a valid argument.
    – andselisk
    Dec 4 at 17:53






  • 1




    in this case, I would do since it seems to be the quickest way to do it. I don't think one has any advantage (apart from flow of typing) over the other. maybe Clemens would have something to say regarding your second statement.
    – Troy
    Dec 4 at 18:26


















  • not specific to the reaction environment. it's just how latex works. see e.g. Error with square bracket in table or just try documentclass{article}begin{document}begin{figure}[Test]end{figure}end{document} and you will get an error about unknown positional arguments.
    – Troy
    Dec 4 at 17:07












  • @Troy I see. So, what do you think would be the best course of action here: leave a couple of empty brackets every time, use {[} for the first complex, or something else? Also I find it weird that compilers don't complain at all as if ML6 were a valid argument.
    – andselisk
    Dec 4 at 17:53






  • 1




    in this case, I would do since it seems to be the quickest way to do it. I don't think one has any advantage (apart from flow of typing) over the other. maybe Clemens would have something to say regarding your second statement.
    – Troy
    Dec 4 at 18:26
















not specific to the reaction environment. it's just how latex works. see e.g. Error with square bracket in table or just try documentclass{article}begin{document}begin{figure}[Test]end{figure}end{document} and you will get an error about unknown positional arguments.
– Troy
Dec 4 at 17:07






not specific to the reaction environment. it's just how latex works. see e.g. Error with square bracket in table or just try documentclass{article}begin{document}begin{figure}[Test]end{figure}end{document} and you will get an error about unknown positional arguments.
– Troy
Dec 4 at 17:07














@Troy I see. So, what do you think would be the best course of action here: leave a couple of empty brackets every time, use {[} for the first complex, or something else? Also I find it weird that compilers don't complain at all as if ML6 were a valid argument.
– andselisk
Dec 4 at 17:53




@Troy I see. So, what do you think would be the best course of action here: leave a couple of empty brackets every time, use {[} for the first complex, or something else? Also I find it weird that compilers don't complain at all as if ML6 were a valid argument.
– andselisk
Dec 4 at 17:53




1




1




in this case, I would do since it seems to be the quickest way to do it. I don't think one has any advantage (apart from flow of typing) over the other. maybe Clemens would have something to say regarding your second statement.
– Troy
Dec 4 at 18:26




in this case, I would do since it seems to be the quickest way to do it. I don't think one has any advantage (apart from flow of typing) over the other. maybe Clemens would have something to say regarding your second statement.
– Troy
Dec 4 at 18:26















active

oldest

votes











Your Answer








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

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

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463159%2fchemmacros-reactions-environment-doesnt-display-the-first-reactant-if-enclose%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f463159%2fchemmacros-reactions-environment-doesnt-display-the-first-reactant-if-enclose%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

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?