Hi Keita, Ikumi Keita <[email protected]> writes:
>>>>>> Arash Esbati <[email protected]> writes: >>> According to the comment, lines ending with `\\' are excluded from >>> filling on purpose, though I'm not sure why. Perhaps for the cases >>> inside environments like tabular, array, align etc.? > >> Ah, I see. Sorry for missing that. While we're at it, should we also >> cater for \newline and \linebreak? Currently, they handled as normal >> macro. It should be easy to add them to the regexp. > >> WDYT? > > Hmm, I'm not sure. If my guess is correct, it wouldn't appropriate to > deal \newline and \linebreak the same way as \\, since they aren't > equivalent in tabular-like environments (that is, alignments are > specified by & signs). For example, > ---------------------------------------------------------------------- > \documentclass{article} > \begin{document} > \begin{tabular}{ccc} > ab & cd & ef \\ > gh & ij & kl \newline > mn & op & qr > \end{tabular} > \end{document} > ---------------------------------------------------------------------- The corresponding macro in tab-like environments is called \tabularnewline. Try: --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} \begin{tabular}{ccc} ab & cd & ef \\ gh & ij & kl \tabularnewline mn & op & qr \end{tabular} \end{document} --8<---------------cut here---------------end--------------->8--- I think we should treat \tabularnewline like \\ and \newline and \linebreak like \par. Does it make sense? > On the other hands, it may be make sense to include lines ending with > \\ in filling outside such environments. You mean check the current environment every time during filling? Best, Arash
