LaTeX forum ⇒ Math & Science ⇒ Typesetting a Line over Text Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
hoytesara
Posts: 13
Joined: Sat Feb 18, 2012 10:46 am

Typesetting a Line over Text

In my thesis I need to have a line over the formulas for some of my complexes to denote which atoms are coordinated to the metal, as shown in the above image. How do I go about typesetting this?
Attachments
overbracket.png (20.81 KiB) Viewed 3377 times

Tags:

Stefan Kottwitz
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm
Hi,

welcome to the board!

You could use the mathtools package and the command \overbracket. For example:

\documentclass{article}\usepackage{mathtools}\begin{document}$\overbracket{\text{Formula}}$  \end{document}

You can adjust it by giving values to the optional arguments, the syntax is

\overbracket[line thickness][bracket height]{formula}

Stefan

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
You could also misuse chemmacros' \redox command:

\documentclass{article}\usepackage{chemmacros}\begin{document} \ch{[\OX{a,Pt}(CH2)CH=CH\OX{b,C}(CH2)2(dppp)]}\redox(a,b){} \end{document}

lineover.png (5.09 KiB) Viewed 3367 times

Regards
site moderator & package author

hoytesara
Posts: 13
Joined: Sat Feb 18, 2012 10:46 am
The \redox command suits perfectly. However, in order to make everything work properly, I had to modify things slightly. What I ended up going with was:

\documentclass{article}\usepackage{chemmacros}\usepackage[version=3]{mhchem}\usetikzlibrary{calc}\begin{document} \ce{[\OX{a,Pt}(CH2)CH=CH\OX{b,C}(CH2)2(dppp)]}\redox(a,b){} \end{document}

Thanks!

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
Didn't it work without \usetikzlibrary{calc}? That would mean you must have an old (and obviously buggy) version of chemmacros.
site moderator & package author