I'm working on a recipe book. Some of my recipes are in British Imperial units, some in American, some in metric. I want to avoid manual conversion as that can produce errors, but I want the book to use one type of unit throughout.
I also want to specify which, at build time, so I want a switch I can set to which of the three to use. So I have one text, no conditionals, but a function that handles the standardization and conversion.
I know I can do this in LuaLaTeX, but I want to avoid external dependencies.
Question: Can I do this within LaTeX' macro language, within the LaTeX environment as a whole (including new LaTeX3 utilities), or am I stuck with external programming?
(And if there's a choice, what is the preferred approach?)