[Top][All Lists]

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

Re: [AUCTeX-devel] paragraph-start in modes other than latex

From: Arash Esbati
Subject: Re: [AUCTeX-devel] paragraph-start in modes other than latex
Date: Sun, 02 Apr 2017 22:24:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2

2017-04-02 20:41 +0900 Ikumi Keita <address@hidden>:

> I thought of checking `paragraph-start' in modes other than latex and
> some questions came to my mind.  Could you see the following topics?
> A. plain-tex mode
> This is a quote from plain-tex.el:
> ----------------------------------------------------------------------
>   (setq paragraph-start
>       (concat
>        "\\(^[ \t]*$"
>        "\\|" (regexp-quote TeX-esc) "par\\|"
>        "^[ \t]*"
>        (regexp-quote TeX-esc)
>        "\\("
>        "begin\\|end\\|part\\|chapter\\|"
>        "section\\|subsection\\|subsubsection\\|"
>        "paragraph\\|include\\|includeonly\\|"
>        "tableofcontents\\|appendix\\|label\\|caption\\|"
>        "\\[\\|\\]"                    ; display math delimitors
>        "\\)"
>        "\\|"
>        "^[ \t]*\\$\\$"                ; display math delimitor
>        "\\)" ))
> ----------------------------------------------------------------------
> I know almost nothing about plain TeX commands.
> (1) It seems that "\b" is necessary as well.
> (2) Macros "begin", "end", "part" and so on are treated as paragraph
> starters.  Are these macros available not only in LaTeX but also plain
> TeX?  Similar question goes for "\[" and "\]" as display math
> delimiters.

Hi Keita,

Not being a plain user, I would assume that for plain users the
reference implementation for macros is manmac.tex used for texbook.tex
beside plain format itself.  In plain.tex, you find \beginsection, in
manmac.tex, you see \begindisplay, \begintt and others
incl. corresponding \end<macro>.  Hence, I'm not sure if adding \b would
be a good idea for plain TeX.

I presume that other macros like tableofcontents and caption are sort of
"just there" in case users define them.  "\\[\\|\\]" can probably be
removed as display math in plain is always $$ (I would say just not
removed after copy/pasting from latex.el or so).  OTOH, I'm missing item
and itemitem.

> (3) The doc string of `paragraph-start' says "This is matched against
> the text at the left margin, which is not necessarily the beginning of
> the line, so it should never use "^" as an anchor."  However, the
> above quote contains explicit "^".  Is this OK?

I don't see the necessity for the anchor as well.

> (4) I'm afraid that `paragraph-separate' should also undergo review.

I haven't checked, but I trust you are right.

> B. texinfo mode
> This is a quote from texinfo.el:
> ----------------------------------------------------------------------
>   (set (make-local-variable 'paragraph-start)
>        (concat "\b\\|address@hidden \n]\\|" paragraph-start))
> ----------------------------------------------------------------------
> I know little about TeXinfo.
> (1) This contains "\b", not "\\b", in it.  String literal "\b" is the
> same as "\C-h".  Does a texinfo file sometimes contain raw ^H bytes in
> it?

Maybe you can raise this question in emacs-devel or so.  I can't tell.

> (2) It also contains explicit "^".  Is this OK?
> (3) It seems that `paragraph-separate' should also be reviewed, too.

See above.

HTH.  Best, Arash

reply via email to

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