This question led to a new package:
smartunits
I am currently writing a document that I would like to deploy to both European and American audiences. The problem is, as usual, the choice between imperial vs metric units.
The text is not scientific, and not meant for a scientific audience, so I cannot simply use metric units all the way through and call it a day. Since many of the units are buried in the text, finding them all and changing them is quite cumbersome (even with the use of hidden comments as guiding flags).
What I am looking for is a method to offer the best out of both worlds. I am looking for something that can convert all metric units into imperial and vice versa. The ideal scheme would look like this:
\usepackage{smart_unit_package}
\smart_unit_convert{imperial}
...
\begin{document}
Oscar Wilde's height is said to have been \smart_unit{1.91}{meter}.
\end{document}
Which should hopefully result in:
Oscar Wilde's height is said to have been 6'3''
The idea behind it would be that the units can be controlled from the preamble, without having to alter the text.
Is there such a package available, or is it easily possible to create my own solution (I'm not that great at coding, and have never even tried writing anything in Tex before)?
I took a look at the siunitx package, but there is nothing in there about converting units back and forth.
Edit: As per Joseph Wright's comment, a few more details: The units to convert would, at the minimum, be for weight, length, and time (with the last one optional, but advantageous). The conversion should be from standard metric (kilograms, meters, 24:00 format) to imperial (pounds, feet, 12 AM/PM format).
If I personally were writing a package, I would probably allow for certain command flags (e.g.: kilometer should translate to miles, not to thousands of feet), and body height (say 189 cm) should convert to 6'2'', not to "2 yards".
I realize that getting this right for every possible scenario (body height, mountain height, small distance, large distance, etc. etc.) is somewhat complex (mostly thanks to the weird parts of the imperial system). As to accuracy: Since it is not written for a scientific audience, any rounding up to the decimal point is fine. I.e.: 1 meter can easily convert into 3 feet, even if it is not really exact. Of course, if more accuracy were needed, a roundoff-point would be necessary.
Second edit: A simple hack that I think might also work (even if it's not really elegant), is a way in latex to define two words. For instance:
Oscar Wilde's height is said to have been \twowords{191cm}{6'3''}.
With some possibility of choosing which one gets selected in the preamble. This would force the user to convert everything by himself, but it would allow easy swapping between units, at least.



Um, yes, actually. Because that "one country in the world" is home to 300 million people.
And Latex also wasn't probably made to draw chemical formulas, yet there is a package for it.
– Mark Anderson May 07 '15 at 07:55