Am 24.11.2011 um 13:36 schrieb
On Monday, 21 November 2011 20:52, Hans Hagen wrote:
Over the weekend I've discovered a couple more problems with \unit so I'll make up some test cases and desired output and post it in a few days.
ok, I'll wait for that then
Hans, all,
I attach a document (source and PDF) with some \unit test cases that don't currently work (even with the most recent beta). It also has a number of suggestions for improvement. Some of this should be construed as personal opinion, but hopefully it isn't too controversial.
Nice summary, you should write a My Way about units once this things are fixed. A few comments from me: \type{1234}\tex{unit}\arg{m} should print equivalently to \tex{unit}\arg{1234m} and \tex{unit}\arg{1234 m}. (I have a lot of text that uses a \tex{unit} macro like that.) Maybe it’s possible with MkIV to check if the text before the \unit command was a number but of the number is part of the unit them put in the command, such things are always tricky with TeX and it’s better to force users to use proper input. Within \type{phys-dim.lua} all the units and all the prefixes seem to have capitalised names; in fact, they should be all lowercase (even when they are named after some person). The exception is Celsius. I think this is a feature because Hans saves also a lowercase version of all keywords and you can use both as input. I wonder whether \tex{unit} should only parse and format units, and have another macro \tex{quan} or \tex{quantity} to handle number+unit combinations (obviously using \tex{digit} and \tex{unit}). Please don’t suggest this, one of the nice features is that you don’t have to care which command you need but it would be nice to drop the old formatting options for \digits in the \unit command. Wolfgang