$r and $p are preconcatenated to $f to always display a space if $f is not empty, and no space if $f is empty