Closed Xiao-Chenguang closed 1 month ago
Thanks for this! Can I ask why this is not expected behaviour? I generally like to have all parentheses indented (at least in math mode, see #28 for a related issue in text mode). I understand that this is not everyone's preference, but I hope to avoid introducing too much complexity or competing standards within tex-fmt.
Sorry for the confusing in my descreption. indeed #28 is exactly the case I encounter. I understant your point of the format of parentness, let's close in support of #28
I have some open bracket in my document like ( e.g.
\big(
in math mode, it turn out the tex-fmt count it as sign of increase indent. This is not expected behaviour, and seems to be related to https://github.com/WGUNDERWOOD/tex-fmt/blob/19e0bbdbab275b20dd20cfc7ed8cf4ab5a7cce2e/src/indent.rs#L65-L69 and https://github.com/WGUNDERWOOD/tex-fmt/blob/19e0bbdbab275b20dd20cfc7ed8cf4ab5a7cce2e/src/indent.rs#L79-L84 The code use the bracket match as sign of indent, which is not always true.