try to infer the list layout style whilte rendering the refactored code.
changed to allow macros in the string to be parsed.