Demo of Cirru/writer.clj
[[:newline ["a" [:space "b"]] :newline] [:newline [["a" [:space "$"]] [:space "b"]] :newline] [:newline [["a" [:space "$"]] [:space "b"]] :newline] [:newline [["a" [:space [:open "b" :close]]] [:indent :newline ["," [:space "c"]] :unindent]] :newline] [:newline [["a" [:indent :nothing [[:indent :newline "b" :unindent] [:indent :newline "c" :unindent]] :unindent]] [:indent :newline [["d" [:space "$"]] [:space "e"]] :unindent]] :newline]]

a b

a $ b

a $ b

a (b)
  , c

a
    b
    c
  d $ e