• Re: Amsmath problem

    From Marckus@21:1/5 to All on Sun Jun 23 18:29:40 2024
    Hi!

    If I compile your example I get the same error message too.

    Bla bla $\mathrm{AuCl_4^−}$ and $\mathrm{TOA^+}$

    Whilst disassembling your lines, I get an error code for the -:
    Unicode character − (U+2212) not set up for use with LaTeX.

    Does this help you?

    Cheers
    Marckus

    Am 23.06.2024 um 16:49 schrieb db:
    I wrote this mini-example:

    \documentclass[12pt,fleqn,A4,danish]{article}
    \usepackage{amsmath}
    \usepackage{graphicx}
    \usepackage[text={14cm,20cm},centering]{geometry}
    \begin{document}
    \title{Amsmath problem}
    \author{}
    \date{}
    \maketitle
    Bla bla $\mathrm{AuCl_4^−}$ and $\mathrm{TOA^+}$

    \end{document}

    and get this result:

    ...
    ! Missing { inserted.
    <to be read again>
    \begingroup
    l.10 bla bla $\mathrm{AuCl_4^−}
    $ and $\mathrm{TOA^+}$
    ?

    On a suggestion of a friend I tried ${\mathrm{AuCl_4^−}}$

    with the same result. I also tried his suggestion
    to use mhchem, i.e.

    \ce{[AuCl4]^-}

    and this didn't work either (yes, I did add
    \usepackage{mhchem} )

    This is supposed to work, and does on my
    friend's machine. Could this be a defective
    texlive, or am I really doing something
    wrong?


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Denis_Bitouz=C3=A9?=@21:1/5 to All on Sun Jun 23 20:55:23 2024
    Le 23/06/24 à 14h49, db a écrit :

    I wrote this mini-example:

    \documentclass[12pt,fleqn,A4,danish]{article}
    \usepackage{amsmath}
    \usepackage{graphicx}
    \usepackage[text={14cm,20cm},centering]{geometry}
    \begin{document}
    \title{Amsmath problem}
    \author{}
    \date{}
    \maketitle
    Bla bla $\mathrm{AuCl_4^−}$ and $\mathrm{TOA^+}$

    \end{document}

    The following, relying on `chemformula`, works nicely with an up to
    date TeX Live 2024:

    --8<---------------cut here---------------start------------->8--- \documentclass{article}
    \usepackage{chemformula}
    \begin{document}
    Bla bla \ch{AuCl4^−} and \ch{TOA^+}.
    \end{document}
    --8<---------------cut here---------------end--------------->8---
    --
    Denis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mauro Orlandini@21:1/5 to All on Tue Jun 25 06:41:38 2024
    Il Sun, 23 Jun 2024 14:49:17 -0000 (UTC), db ha scritto:

    \maketitle Bla bla $\mathrm{AuCl_4^−}$ and $\mathrm{TOA^+}$

    The problems comes from the minus sign on the first chemical formula. You
    did not use the keyboard minus sign but the slash symbol.

    Your minus sign: −
    Keyboard minus sign: -

    If you substitute it, then it will work.

    Ciao, Mauro

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)