Mailing List Archive

Support open source code!


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

Re: AUC-tex and \index



>>>>> "Rainer" == Rainer Mager <rvm@example.com> writes:

    Rainer> What I'd like to have is something like:

            This is a sentence, and now I wan to add an index entry for
                    \index{the next words, as in index entry}%
            the next words.

    Rainer> The indention on the \index entries makes the text
    Rainer> readable.  The problem is that if I do the above with
    Rainer> AUC-tex and the format the paragraph it will do this:

            This is a sentence, and now I wan to add an index entry for
                    \index{the next words, as in index entry}%
                    the next words.

    Rainer> So if there are setences after the ending above, they will
    Rainer> all be indented, I don't want this.  Any ideas on this?

You picked a bad one.  It looks like AUC-TeX's algorithm for handling
indentation is "look at the line above, and indent relative."  This
makes a lot of sense for simply handling LaTeX environments and stuff
like that.  So you get the same problem with any indented text.  My
guess is that making AUC-TeX compatible with your style would either
break environment formatting completely, require a complete rewrite of
reformatting, or require a complete redesign of the indentation code.

The only hope I can see is fiddling with the lisp variables
"paragraph-separate" and "paragraph-start".  I bet if you prepend 
"[ \t]*\\\\\\|" (Emacs LISP doesn't stand for "lots of irritating
single parentheses", it's "lots of irritating slash punctuation") to
"paragraph-start," it will fix your problem.  I can think of a couple
of cases where it will intermittently break within-environment
reformatting (ie, when you've changed the nesting level and an
internal line happens to start with a TeX macro).  This is
sufficiently rare I think you needn't worry about it.  What else it
will break I don't know....  Worry about that instead ;-)

Good luck.  Next week I'll have time to look at it; I'll try to make
the meeting Sunday---maybe we can play with it then---but my spare
time for the next three days has been preempted by a funeral for a
member of my church.  :-(

Ciao.
Steve


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links