[texhax] Re-defining \.{}

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Oct 13 20:11:03 CEST 2011


On Thu, Oct 13, 2011 at 02:29:05PM +0100, Simmie, John wrote:

> Phil Taylor kindly redefined the $\mathrm{...\dot{X}...}$ command for me
> to emphasise the period 
> over a chemical element name which indicates an unpaired electron.
> 
> In the preamble he suggests
> 
> \let \canonicaldot = \dot
> \let \canonicalperiod = \.
> \def \dot #1{{\bf \canonicaldot {\rm #1}}} \message {\meaning \.}
> 
> 
> But occasionally one uses the same convention outside of math mode, for
> example
>  to show a hydroxyl radical  \.{O}H 
> 
> Is there a relatively simple one-time fix for this latter? 
> This       \bf{\.{O}}H    would do but is somewhat clunky

\def\.#1{%
  \ensuremath{\mathrm{\dot{#1}}}%
}

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list