Thanks,
xyz
don't do it like this, use siunitx for proper unit handling
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
use upgreek
Thank you! That's what I was looking for.
There's one small problem in that \SI{}{} doesn't work too well in headings
(and tables of contents etc). Especially if they're being converted to PDF
indices using hyperref. Is there a workaround for this, short of just
avoiding siunitx in headings?
Theo
Better idea if you ask the author directly. Not sure if he reads all
entries on ctt, so it might be an idea to send him an email.
What is wrong with them in headings and TOC? I don't see much of a
problem with it (hyperref aside)
/daleif
Well, I do (unless I'm away, and even then try to keep up). I wonder
what is meant by "does not work". You'll notice that there is
deliberately an example in the manual of a unit in a heading:
%\subsection{Why do most of the examples use
% \texorpdfstring{\si{\joule\per\mole\per\kelvin}}{J mol-1 K-1}?}
Note that you have to use \texorpdfstring for things to work with hyperref.
--
Joseph Wright
Dou you think it's possible to write variants of \SI and \si that are
purely expandable and whose expansion consists of plain strings? These
variants could then be used for \pdfstringdefDisableCommands.
--
Change “LookInSig” to “tcalveu” to answer by mail.
Possibly by bailing out of processing things and simply using
more-or-less direct direct output. I'm working on siunitx v2 as I write,
so I might look at it in that context.
--
Joseph Wright
Okay, I have a couple of possible solutions to this. I can either
arrange for
\si{\joule\per\mole}
to turn into
J/mol
or
joule per mole
(You can't have super/subscripts in PDF bookmarks very easily). In
neither is the bookmark going to match the printed output (at least with
the default settings).
Thoughts?
--
Joseph Wright
Ah, that's I think what I was missing. Otherwise for:
\section{\SI{1}{\nano\henry}}
I get errors like:
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `\SI' on input line 13.
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `\nano' on input line 13.
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `\henry' on input line 13.
And the contents of \SI don't get typeset at all even if, as in this
example, the output needs no special formatting or non-ASCII characters.
Theo
> And the contents of \SI don't get typeset at all even if, as in this
> example, the output needs no special formatting or non-ASCII characters.
>
> Theo
This is fixed in the experimental version 2 code. It's not so easy to
port back to the current release version. If you want to try out a
snapshot of the new code, it's on my blog (http://www.texdev.net).
--
Joseph Wright
Set the mathsmu and textmu options to the appropriate symbol.
--
Joseph Wright
> And how can I get the mu symbol that comes with the font? I can
> directly enter it as a Unicode symbol in XeTeX.
\textmu ?
You'll need the textcomp package in LaTeX or the xunicode package in XeLaTeX.
Will
> Set the mathsmu and textmu options to the appropriate symbol.
Thanks. I looked in the wrong place in the manual.
--Tobias