Is there a way to use printf-style number formatting strings in Latex like %.3f, %d, etc?
I'm loading some data from csv files using the datatool package and would like to have it displayed exactly to my specifications.
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
||||
|
I've no idea about For example:
It gets:
|
|||||||||||
|
|
If you are willing to use LuaTeX
ConTeXt provides a few helper functions so that the above can be written as
If you want, you can easily wrap the above in a macro:
or in ConText as
and then use
|
|||
|
|
%would be pretty awkward for the formatting directive in TeX, so you're not likely to see it done exactly that way – Joseph Wright♦ May 9 '11 at 11:13