No packahe can predict all possible requirements, but you
have \newcommand to fall back on:
\newcommand{\Time}[3]{%
\SI{#1}{\hour}~\SI{#2}{\minute}~\SI{#3}{\second}%
}
...
The time elapsed was \Time{1}{23}{45}...
...
But perhaps I have misunderstood your requirement.
Dan
To reply by email, change LookInSig to luecking
I've been asked to look at pretty much this idea for siunitx version
2. The existing feature request includes days, but I'd imagine
something flexible should be available. Hopefully this will make the
beta version of siuntix 2 at the end of the month.
--
Joseph Wright
Further to that, can I ask for some thoughts on input syntax. As I
said, I've been asked to cover "days-hours-minute-seconds" input, with
the initial suggestion:
\dhms{<days>;<hours>;<minutes>;<seconds>}
by analogy with \ang. I thing perhaps "\timeinterval" or "\timeperiod"
is a clearer function name, but other suggestions are welcome. On the
input syntax, I can go for either one argument (as above) or four:
\dhms{<days>}{<hours>}{<minutes>}{<seconds>}
I find the \ang syntax (using one argument) quite readable: other
opinions?
In terms of output, as well as
1\,day 2\,h 3\,min 4.5\,s
I've also been asked to do "astronomy style"
1^{d} 2^{h} 3^{m} 4.^{s}5
which should be easy enough. Any other things I should be aware of? (I
am pretty sure this will be in version 2: mainly a copy-paster of the
existing \ang code but with new options.)
--
Joseph Wright
Antony
On Apr 7, 9:49 am, Joseph Wright <joseph.wri...@morningstar2.co.uk>
Joseph
Maybe a bit offtopic. What about a separate package for time and
dates? Every country has its own way of writing it and then you also
find scientific groupings such as the astronomical people that has
their own way of doing it.
There is the isodate package. Maybe you and Harald Harders can work
together and add time formatting to the package. It already contain a
lot of locale spesific formating.
I have also proposed a date kernel for Latex a long time ago
http://groups.google.com/group/comp.text.tex/msg/95dc97ca593e9b7f
This can add some date calculation and calender generation
capabilities to such as package. With eTeX it can be done a lot more
simpler than my original example
Regards
Danie Els
Hello Danie,
It's a good question: I get some very "unusual" requests for siunitx,
and picking a good "line" is not always easy. As well as the time
question, I've also been asked to look at geographical co-ordinates
(which need leading zeros in numbers and N/S/E/W). Even if I do these
separately, I'd still like to have some of the "core" of siunitx
available (things like the printing routine). I'll have to think about
it.
--
Joseph Wright
I agree to Antony's opinion that \timeperiod is a fine name and it should
follow the \ang syntax.
If the "upper" values (days, etc.) should not be needed the 2 possibilities
omitting (\timeperiod{m;s}) or leaving the arguments empty
(\timeperiod{;;m;s}) should be acceptable from my point of view.
Regards
Stefan