[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro to exclude from filling

From: Arash Esbati
Subject: Re: Macro to exclude from filling
Date: Sat, 20 Nov 2021 13:02:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Keita,

Ikumi Keita <> writes:

>>>>>> Arash Esbati <> 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---
  ab & cd & ef \\
  gh & ij & kl \tabularnewline
  mn & op & qr
--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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]