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

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

Re: Indent region in LaTeX mode


From: Rodolfo Medina
Subject: Re: Indent region in LaTeX mode
Date: Thu, 27 Aug 2009 12:58:30 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux)

Rodolfo Medina wrote:

>> I want a certain paragraph to be indented and filled, like this:
>>
>> \item{1)} The old lady pulled her spectacles down and looked over them about
>>           the room; then she put them up and looked out under them. She 
>>           or never looked through them for so small a thing as a boy;  were
>>           her state pair, the pride of her heart, and were built for "style,"
>>           not service -- she could have seen through a pair of stove-lids
>>
>> .  I get this easily in text mode with `C-u 10 C-x TAB' and then `M-q'.
>> Instead, in LaTeX mode, `M-q' does not fill the region.  I don't know why it
>> works fine in text mode but not in LaTeX mode.
>>
>> Can anyone suggest a proper code to make those above commands work _also_
>> under LaTeX mode?
>>
>> The issue looks important to me because, just in LaTeX, mode, you can often
>> use such \item environments.



Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> OK, another try! Reduce fill-column to previous value less the
> indentation. Starting in a new and fresh line at first column. There  write
> your text and format it with M-Q. Now cut it as a rectangle and  insert the
> rectangle after the \item or whatever. It will be  automatically indented. Set
> fill-column back to the original value.



That seems to work, thanks.

 "When you must specify a rectangle for a command to work on, you do it
  by putting the mark at one corner and point at the opposite corner."

Then, `C-x r r R' to copy or `C-x r k' to kill it it and `C-x r y' to paste it
at the desired point.

It's not to jump for joy, it's a bit complicated, but it works.  When I think
that in text mode it's very simple... So, another way could be to switch to
text mode, do the job and then switch back to LaTeX mode.

Maybe, then, we needn't become M$ Word users, do we? ;)

Rodolfo


reply via email to

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