[Top][All Lists]

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

Re: [AUCTeX] is it possible to insert such a symbol?

From: peng shao
Subject: Re: [AUCTeX] is it possible to insert such a symbol?
Date: Thu, 23 Apr 2009 22:49:47 +0000

On Thu, Apr 23, 2009 at 5:21 PM, Ralf Angeli <address@hidden> wrote:
> * peng shao (2009-04-23) writes:
>> On Wed, Apr 22, 2009 at 8:27 PM, Ralf Angeli <address@hidden> wrote:
>>> * peng shao (2009-04-22) writes:
>>> > $your cursor here$<++>
>>> > and by pressing ctrl+j you can move your cursor to the position <++>.
>>> How is this used?  Is the idea that point is first put inside the dollar
>>> signs for editing math and then typing C-j or C-TAB respectively to jump
>>> out of it for continuing editing subsequent text?
> [...]
>> Thank you very much for your reply, yes what I desired is exactly the
>> function as you mentioned. I like this function because sometimes I
>> need to insert a complicated formula frequently, and in this formula
>> there are many coefficients to be completed. So such function makes me
>> jump from the position of one coefficient to another easily.
> I'm still not sure I understand correctly.  Do you mean you are writing
> text like the following (taken from circ.tex) and then want to jump from
> one $...$ construct to the next?
> | Der Wert $y$ läßt sich darstellen als Summe einer ganzen Zahl $e$ und
> | einem Wert $f$ mit $-0.5 \leq f < 0.5$. Der Wertebereich von $f$ ist
> | so gewählt worden, damit $e$ einen auf ganze Zahlen gerundeten Wert
> | für $y$ darstellt.
> In such a text it would probably be better to just type e.g. `$ y $'
> instead of `$ $ <back> y <forward>'.  For longer constructs (like the
> one in the second line it might make more sense to insert both dollar
> signs first in order to prevent color bleed from fontification.
> However, if you write the stuff within $...$ you'll likely end up with
> point at the end of the construct (just before the closing $ and then a
> jump point right after the $ won't help you much.  So I'm still a bit
> confused about how this would help.
> It's a bit of a pity that $...$ is not a parenthetical construct because
> if it were you could jump to its end with `C-c }' (aka `up-list').  But
> you could manually set a mark at the end of the $...$ construct with
> `C-SPC' and then jump to the position of the mark with `C-x C-x' when
> you are done editing your math.
> --
> Ralf
Dear Ralf:

Sorry for my confusing expression, English is not my native language.
Now please let me explain more about my expection:

When I press C-c C-e, I was leaded to choose environment, for example
I choose equation, so after RET I got

  'cursor is here'

Please note that, after typing equations such as f(x)=x^2 , I want to
move my cursor to the position x  to continue my editing, and to
archieve this, I have to press C-f C-e C-f( I am not quite familar
with emacs so may be there are some easier ways to archieve this).
This is a little troublesome for me.

Instead I wish, if possible, I can obtain an equation environment like:

  'cursor is here'

in which, a special "jump symbol" is put at the position of S( the
position of this symbol can be modified by the users), so that if the
user presses
a simple buttom such as ctrl+j, or ctrl+tab, then the cursor will be
moved immediately to the position of this symbol. Though this seems to
unnecessary for such simple example, it turns to be quite helpful in
some cases. Such as, I use a commutative diagram very frequently, so
naturally i want to define an environment or macro. Then by pressing
C-c C-e myenvironment RET
I obtain on the screen:

   address@hidden|-->} ’[dr] ^A
        ’[rr]+f*{\bullet} ^f  [drrr] ^c
              & {B} & {\circ} & {\circ} \\
{\circ} & {\circ} & {C} & {\circ} }

What I want to do, is just to fill some contents on A, B, C. If I have
"jump symbol" on the positions of A,B,C, then it is very easy for me
jump between them---rathen then move the cursor munually.

What I expect more is that after C-c C-e equation RET I wish I could get

\label{eq:"cursor here"}
"jump symbol"
"jump symbol"

Since sometimes I prefer to given a special name to some equations so
that I can remember them easily.

In some other Tex editors, as far as I know, such as WinEdt,
VIM(VIM-latex), Texworks,  this function is widely used. I do not know
if there are some better or at least equally good ways to realize such
function in auctex. But customization of such function is really
easy in those editors, for example in winedt the jump symbol is called
a "bullet", and can be represented simply by a % in macro; in
vim-latex it is
<++>, and in texworks it is just a dot, and even you can very easily
tell the editor where you should put your cursor after running a macro
, for example, the following sentence


in configuration file of texworks this means that by completion or
running a macro you can get an equation environment in which the
is put at the position #INS#, and there is also a jump symbol • for
you to jump out of environment to somewhere you wish.

I am still a very newbie on emacs/auctex, and recently I was trying to
learn lisp languange since I could even hardly understand
how to customize a "user option" mentioned in the manual... so to
realize this kind of function is definitely more than impossible for
me at present.
Anyway, if my question is too trivial, or too weired as a request, I
beg your apologize for taking up your time.... Thank you Ralf and



reply via email to

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