XeTeX ⇒ What is the command "\U" used for?
What is the command "\U" used for?
The definition works fine in PDFlatex but does not work in either latex or xelatex. I've looked high and low to try to find what it is used for for but have never been able to find it.
Does anyone out there know what \U is for?
I'd like to be able to redefine it but I don't know if it is safe to do so.
Thanks in advance
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
What is the command "\U" used for?
\show\U shows that (if for example fontspec or xltxtra is used) \U is
Code: Select all
\OT1-cmd \U\OT1\U
Stefan
Re: What is the command "\U" used for?
So I guess that means that using T1 in PDFlatex wouldn't give me a problem. Xelatex, on the other hand, should be able to see all accent macros (for unicode) and I suppose that is why it complains about \U
What I'm trying to do is to define isotope shortcuts. In this example uranium-238 would have to be entered using the mhchem package as \ce{^{238}U}. I've tried to condense this down with:
\newcommand{\U}[1]{\ce{^{#1}U}}
so that I only need to define a new command for each element. using \U{238}
makes it far more readable in text and is also easier to type. Now I need to typeset LOTS of isotopes and there are a few of these element symbols which appear to conflict with existing commands (\Re - for rhenium is another example and so is \B for boron).
I could use \Uran{238} or similar but then it wouldn't be the shortest of shorthand anymore.
I could also define a command like \U-238 instead:
\newcommand{\U-238}{\ce{^{238}U}\xspace}
which means would then need to enter a new command for EVERY isotope rather than for just the element (and a huge preamble). But it will at least be faster to type, be readable and unlikely to cause conflict.
Perhaps someone has a better idea for this sort of usage which may not conflict.
EDIT:
I Have now found other errors with this second idea (delimeter like "-" cannot be used in the argument for \newcommand.
This is now a separate question which I will put in a new thread.