2

With the chemmacro package, I am able to format Ka, pKa correctly (with the \Ka \pKa command).

I would like to be able to do the same thing with the ionic product of water (Ke and pKe in French) but I can't do it. In the documentation, I understood that a semblance of formatting was possible using the \p{Ke} command but the rendering is not good as you can see in the image.

pKe

How can I get the same formatting as Ka/pKa with other texts (in my case Ke and pKe)?

Thanks

1 Answer 1

3

You can create a new constant \Ke with

\NewChemEqConstant{\Ke}{K-eau}{\mathrm{e}}

And use \p{\Ke}:

\[ \pH = \tfrac{1}{2} \bigl( \p{\Ke} + \pKa + \log C_0 \bigr) \]

But in your case, its better to keep \Kw and define the proper translation:

\DeclareChemTranslation{K-water}{french}{\mathrm{e}}

The language is automatically detected with babel or polyglossia (or can be forced with \chemsetup{language=french}).

Full example:

\documentclass{article}

\usepackage[french]{babel}

\usepackage{chemmacros}
\DeclareChemTranslation{K-water}{french}{\mathrm{e}}

\begin{document}

\[ \pH = \tfrac{1}{2} \bigl( \p{\Kw} + \pKa + \log C_0 \bigr) \]

\end{document}

full example

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .