help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: My humble additions to AUCTeX


From: Nicolas Richard
Subject: Re: My humble additions to AUCTeX
Date: Tue, 14 Jan 2014 11:29:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> Do I guess correctly that you did some (or more) LaTeX typesetting, but
> not too much low-level TeX programming, dear Watson? ;)

Indeed : I did some lower level (albeit trivial) TeX programming at some
point, but not recently -- that might explain why I thought the problems
had disappeared. Another reason is that I had changed the syntax class
of backslash character in my .emacs (I made it ".", i.e. punctuation),
which explains why I use C-M-f (but that doesn't address most of the
points you raised).

> Imagine this: <!>\these\are\four\tokens, where <!> denotes the point.
> Then, C-M-f moves too far; I want to move by one token (i.e. to get
> \these<!>\are\four\tokens), not by a whole string of them at the same
> level of curly braces.

In order to move by token, I made one further change this morning in my
local setup:
(modify-syntax-entry ?\\ ". p" LaTeX-mode-syntax-table)
which lets C-M-b skip the backslash ("p" here means "prefix").

> Also, I want to level up the word commands to token-aware commands.
> Imagine this: \these\are\four\tokens<!>.  Now, if you press M-DEL, the
> backslash does not get deleted; if I made its syntax "word", pressing
> M-DEL would kill *everything* shown here. And I want to be able to kill
> just the string "\tokens" with one keystroke.

C-M-b C-M-k would work with the above modification. Not exactly "one
keystroke", indeed, but close enough for me.

> Last but not least, I aim at commands to work on matching pairs of
> \left...\right, \bigl...\bigr etc. delimiters.  Therefore, I want to be
> able to walk through the text token by token.  (I did look into
> smartparen, and it doesn't seem to be sophisticated enough to do what I
> need.)

To work around that problem, I write this:
\paren{foobar} or \paren*{foobar}
which gives (foobar) (Starred version says to adapt height to the content)
It's as simple as loading mathtools and having
\DeclarePairedDelimiter{\paren}{(}{)}
in the preamble.

-- 
Nico.



reply via email to

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