use a const string formatter for performance reasons as recommended
in http://www.boost.org/doc/libs/1_54_0/libs/format/doc/format.html#performance
add boost formatters for matrix entries and one-element entries