Tag Info

Hot answers tagged

12

Pershaps, the chemfig package may help you though it relies on tikz? Here is the first reaction: \documentclass{minimal} \usepackage{chemfig} \begin{document} text before \schemestart \setlewis{4pt}{}{red}\Lewis{0:,\chemfig{@{a}\textcolor{red}{A}}}\hskip4pt\chemfig{@{b}\textcolor{black!40!green}{B}}% \arrow \Lewis{0.,A}% \+\Lewis{4.,B}% ...


12

Yes chemifg is a great tool. But as well as almost every code to picture system the syntax is not trival. Please consider the following example. You can easily see, that chemfig syntax follows a logical and human readable syntax, but will become extremely complex for larger structures. And so far as i can see chemfig is the easiest system for chemical ...


11

Put \mhchemoptions{textfontcommand=\addfontfeature{Numbers=Lining}} inside your document. But: I have never used that package, so I don't know if there is a better way.


11

Perhaps you are trying to place a box around the last equation. One way to do that is to use Aboxed from the mathtools package: \documentclass{article} \usepackage{mathtools} \usepackage{mhchem} \begin{document} \begin{align*} \ce{K_w} &= \ce{[H3O+][OH^-]} \\ -\log \ce{K_w} &= -\log ( \ce{[H3O+][OH^-]} ) \\ -\log \ce{K_w} &= - ( ...


11

The problem is that bookmarks can't handle things like math, colors, or font changes. You can use \texorpdfstring; the first argument will be used in the document and the second one will be used in the bookmarks: \documentclass{article} \usepackage{mhchem} \usepackage{hyperref} \begin{document} \section{\texorpdfstring{\ce{IrO2}}{Ir02}} \end{document}


10

You can simply write it inside the equation and maybe add some horizontal space between with \quad or \qquad: \documentclass{article} \usepackage[version=3]{mhchem} % Package for chemical equation typesetting \usepackage{amssymb} \usepackage{siunitx} \begin{document} \begin{equation} \ce{N2(g) + 3H2(g) -> 2NH3(g)} \qquad \Delta H_{\mathrm{f}}^\circ = ...


10

Update: with version 4.5 (2014/04/08) chemformula has a basic native support for Kröger-Vink notation. It must be enabled with the option kroeger-vink=true: \documentclass{article} \usepackage{chemformula}[2014/04/08] \begin{document} \setchemformula{kroeger-vink} \ch{Al_{Al}^x} \ch{Ni_{Cu}^x} \ch{V_{Cl}^{*}} \ch{Ca_i^{**}} \ch{e'} \ch{Cl_i'} ...


9

can also be put into a macro if it is used multiple times with different elements. \documentclass{article} \usepackage{pst-node} \usepackage[version=3]{mhchem} \usepackage{chemexec} \begin{document} \huge \ce{\rnode{left1}{2\ox{0}{Na}} + \rnode{left2}{\ox{0}{Cl}_2} -> \rnode{right1}{2\ox{+1}{Na}^+} + \rnode{right2}{2\ox{-1}{Cl}^-}} ...


9

The short answer is 'no' at the present time. Products such as ISISDraw/Accelrys Draw or ChemDraw produce binary files, which cannot be read directly by TeX. So any conversion would either require a separate tool or reading a text file format, such as ChemDraw's XML format. By far the most popular file format for journal submission is ChemDraw's .cdx ...


8

The textcase package provides a version of uppercase that is more careful about these things \documentclass{minimal} \usepackage[paperwidth=70mm, paperheight=20mm, left=10pt, top=20pt]{geometry}% \usepackage{textcase} \usepackage[version=3]{mhchem} \begin{document} \MakeTextUppercase{Preparation of \NoCaseChange{\ce{Mn3Ga}}.} \end{document}


8

do not use empty lines in definitions! \newcommand\ncoord[2][0,0]{% \tikz[remember picture,overlay]{\path (#1) coordinate (#2);}} or at least \newcommand\ncoord[2][0,0]{% \tikz[remember picture,overlay]{\path (#1) coordinate (#2);}% }


8

Edit: mhchem version 3.16 includes the fix shown below. Update will be available in a few days. (This redefinition requires the current version of mhchem, not the one in texlive 2012) \documentclass{article} \usepackage{amsmath} \usepackage{mhchem} \makeatletter \def\mhchem@cee@i#1\\#2#3\mhchem@ENDEND{% \ifx\mhchem@END#2% ...


8

Techically, ( and ) are not letters, so they won't participate to hyphenation. You can make them acceptable with the following trick, which should have no adverse effect with normal input: \lccode`\(=`\( \lccode`\)=`\) \hyphenation{poly(ethylene-glycol)} A different strategy could be to define a macro: \newcommand{\Q}[1]{(\nobreak\hspace{0pt}#1)} ...


8

I suggest to take a look to the new package chemmacros that was uploaded yesterday on CTAN and should be in TeX Live in the next update. The examples on pages 9 and 10 seem to be what you need.


7

Another answer because I misunderstood your question. Digging around in the source code there are several macros which effect the length of the arrows. From mhchem.sty we have \newcommand*\mhchem@xlongrightshortleftharpoons[2][]{\mathrel{% \sbox{\mhchem@arrows@box}% {$\mkern9mu\ext@arrow 3399\mhchem@leftharpoondownfill@% ...


7

The argument of mhchem's \ce already is a "hidden math mode". \ce{\bfseries B} will give ! LaTeX Error: Command \bfseries invalid in math mode. Try \ensuremath instead: \documentclass[12pt,letterpaper]{article} \usepackage{amssymb,mathtools} \usepackage[version=3]{mhchem} \newcommand{\tphoton}{\ensuremath{\gamma}} \begin{document} \ce{\tphoton} ...


6

It is not possible to draw such schemes with mhchem but as Twig has already noticed chemfig can be used. To expand a bit on Twig's answer and chemfig's possibilities: the \arrow command is the important macro here which is only valid between \schemestart and \schemestop. It has lots of arguments so here is a quick overview: draw an arrow and call the ...


6

You can simply place the non-integer part inside curly brackets \ce{Fe_{97.5}C_{2.5}} As @karlkoeller mentioned in a similar answer (now deleted), the . is a special character inside \ce


6

ChemFig is a great package but I don't believe that you'll gain much in time if you create your schemes with it rather than with ChemDraw. Once you know you're way around ChemFig you're just as fast or slow with it than with ChemDraw (supposing you know your way around that, too), at least that's my experience. There are other points you should consider: ...


6

\documentclass{article} \usepackage{amsmath} \let\xxmathchoice\mathchoice \usepackage{breqn} \let\yymathchoice\mathchoice \usepackage[version=3]{mhchem} \begin{document} \let\mathchoice\xxmathchoice \ce{H2SO4} ... \let\mathchoice\yymathchoice \begin{dmath}... \end{document}


5

Not sure why it happened, but you can fix it by placing the \times around in a $..$. \documentclass[12pt,a4paper]{article} \usepackage[version=3]{mhchem} \begin{document} \ce{K_a \times K_b = K_w} \ce{K_a ${}\times{}$ K_b = K_w} \end{document} To keep the proper math spacing I added {} to make the times a binary operator. Alternatively you could use ...


5

Cancellation of species To elaborate on Canageek's answer, yes, you can use the cancel package with mhchem, however it's a bit tricky. Specifically, using cancel inside the \ce{} environment will break the automagic formatting of mhchem, turning your species italic. There are two ways around this: You can wrap your species in \mathrm and then wrap that ...


5

You could simply enclose \times in braces: \documentclass[12pt,a4paper]{article} \usepackage[version=3]{mhchem} \begin{document} \ce{K_a {\times} K_b = K_w} \end{document}


4

Your code isn't working as it stands: the second line is not in math mode or inside \ce so _ must issue an error. Li_{2}(SO_{4})_{0.5} In the third and fourth line the groups are not balenced but miss a }. After correcting this: \begin{equation} X_{\ce{Li2(SO4)0.5}} \end{equation} \begin{equation} X_{\ce{Li2(SO4)_{0.5}}} \end{equation} the behaviour ...


4

You can define a new command that uses \ce inside \cancel to prevent turning the argument into math mode: \documentclass[11pt, oneside]{article} \usepackage[version=3]{mhchem} % insert chem equations \usepackage{cancel} %strike out text \newcommand\Cancel[1]{\cancel{\ce{#1}}} \begin{document} \begin{align*} \cee{ \Cancel{Mg_{(s)}} + 1/2O_{(g)} + ...


4

OK. Here's a fairly involved way to do this with TikZ that could do with a lot of improvement. I think it could easily be turned into a macro that takes four arguments for the four chunks of the reaction... \documentclass[border=5em]{standalone} \usepackage{tikz} \usepackage[version=3]{mhchem} \usetikzlibrary{calc,positioning} \begin{document} ...


4

You might want to have a look at the chemfig package, particularly at its scheming commands. For details see the chemfig manual, especially part V Reaction Schemes. Below is an example of its usage: \documentclass{article} \usepackage{chemfig,amsmath} \begin{document} \schemestart E\phantom{I} \arrow{<=>[S][$K_S$]} ES\phantom{I} ...


4

I can't test this, as I've not purchased the Lucidia fonts, but using the mhchem manual I've created: \documentclass{minimal} \usepackage[paperwidth=90mm, paperheight=20mm, left=10pt, top=20pt]{geometry} \usepackage[romanfamily=bright-osf,stdmathdigits=true,scale=.9]{lucimatx} \usepackage{mhchem} \mhchemoptions{textfontcommand=\fontfamily{hlh}\selectfont} ...


4

A good trick is the \phantom command which typesets things invisibly: \documentclass[12pt]{article} \usepackage[version=3]{mhchem} \begin{document} \ce{CH2OH + ATP <=>>[\text{Hexokinase}] + \text{glucose 6-phosphate} + ADP + H+} \\ \ce{CH2OH + ATP <=>>[\phantom{\text{Hexokinase}}] + \text{glucose 6-phosphate} + ADP + H+} ...


4

Here is a solution using (my own) chemmacros. It provides the option arrow-ratio=<num> where <num> should be a value between 0 and 1: \documentclass{article} \usepackage{chemmacros} \begin{document} \ch{CH2OH + ATP <=>>[Hexokinase] "glucose~6-phosphate" + ADP + H+} \ch[arrow-ratio=.2]{CH2OH + ATP <=>>[Hexokinase] ...



Only top voted, non community-wiki answers of a minimum length are eligible