Main Data History
Show Index Toggle 0 comments
  •  Quick Edit

    • Using the mhchem package in HTML does not print chemical formula.

    • The commands used to modify the bibliography in the header are printed in the HTML text.

    HTML display problems for mhchem and mchemso packages

    Chemical formula do not compile nicely on the HTML page, but they do compile nicely when generating a PDF. The below are examples:


    Cs2ZrSi3O9⋅2.5(H2O) and \ceNa^1+ Again: this won’t format how you like it in the web browser, but it will format correctly when you export.

    The alternative to the mhchem package is to use mathtype. example below:

    \(\mathrm{Cs_{2}ZrSi_{3}O_{9}\cdot 2.5(H_{2}O)}\) and \(\mathrm{Na^{1+}}\)

    You can see that the mhchem package makes it much easier to write, but mathtype looks nice with HTML. I know I can make a newcommand in the header to do this, and sometimes I do when I have the same chemical formula that needs to be typed over and over again.

    To make a newcommand in Authorea:

    1. 1.

      Click the three vertical dots on the upper-right part of the menu bar

    2. 2.

      Click the Quick Edit

    3. 3.

      Click on the Header latex macros

    in the new window/tab that pops up, type a newcommand like: \newcommand{\Naion}{$\mathrm{Na^{1+}}$} This adds the command ‘Naion’, so all you need to do to invoke this command is type \Naion to get \(\mathrm{Na^{1+}}\). It would be much more efficent to use this newcommand when you are typeing the same formula over, and over again; not just for the one time use.

    References: Again, they work when the PDF is compiled, but the HTML does display nicely. The ‘setkeys’ from the header is shown in front of every paragraph. You have to use \setkeys{acs}{articletitle = true} to get the article titles in the references of the PDF. (Northrup 2007) My work-around is to add the ‘setkeys’ header command right before I’m submitting the article, and then comment it out when I done.

    \label{my-label}Adding a Table is Easy
    Structure ZrO6 DI 3MR (º) K BVS Unit-cell Volume (A3) Refined R, wR (%)
    1 0.0002 5.4 - 2068.57 6.98, 9.35
    2 0.0004 6.0 - 2074.23 4.83, 6.24
    3 0.04 2.7 - 2142.52 7.31, 9.33
    4 0.02 4.6 0.80 2094.29 7.76, 10.48
    5 0.003 10.0 0.93 2119.10 5.56, 7.43
    6 0.008 9.0 1.41 2114.00 7.76, 14.46