unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* LaTeX reformat
@ 2004-01-08 20:57 David Rasmussen
  2004-01-08 21:31 ` Patrick Drechsler
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: David Rasmussen @ 2004-01-08 20:57 UTC (permalink / raw)


In plain emacs (I am not using AucTeX as I have not been able to find it 
anywhere), I use "Auto Fill", to make it wrap lines automatically. When 
I have fiddled around with the text a bit, the automatically inserted 
newlines are at random places so the text looks broken up (in emacs).

A way to solve this, is to delete the now extraneous newline, and then 
go to the end of the line, and press space. This causes the whole line 
to get reformatted.

But it would be nice if I could just mark an entire region and reformat 
it, so that newlines were at the right places, and lines wrapped 
naturally. What is the command for this?

/David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 20:57 LaTeX reformat David Rasmussen
@ 2004-01-08 21:31 ` Patrick Drechsler
  2004-01-08 21:53 ` David Kastrup
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Patrick Drechsler @ 2004-01-08 21:31 UTC (permalink / raw)


Hi David,

David Rasmussen wrote on 08 Jan 2004 21:57:42 MET:

> In plain emacs (I am not using AucTeX as I have not been able
> to find it anywhere),

The so called beta is considerably stable:

ftp://ftp.gnu.org/pub/gnu/auctex/

ftp://ftp.dante.de/tex-archive/support/auctex/

Cheers,

Patrick
-- 
When I got my first television set, I stopped caring
so much about having close relationships.  
                  --Andy Warhol

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 20:57 LaTeX reformat David Rasmussen
  2004-01-08 21:31 ` Patrick Drechsler
@ 2004-01-08 21:53 ` David Kastrup
  2004-01-08 21:54   ` David Rasmussen
  2004-01-08 22:43 ` Stefan Monnier
  2004-01-08 22:54 ` Klaus Uhl
  3 siblings, 1 reply; 10+ messages in thread
From: David Kastrup @ 2004-01-08 21:53 UTC (permalink / raw)


David Rasmussen <david.rasmussen@gmx.net> writes:

> In plain emacs (I am not using AucTeX as I have not been able to find
> it anywhere),

CTAN:support/auctex

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 21:53 ` David Kastrup
@ 2004-01-08 21:54   ` David Rasmussen
  0 siblings, 0 replies; 10+ messages in thread
From: David Rasmussen @ 2004-01-08 21:54 UTC (permalink / raw)


David Kastrup wrote:
> 
> CTAN:support/auctex
> 

Thanks :)

Next problem is how do the same task with AucTeX (and to install it, 
since I've never used it. I will look into that.

/David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 20:57 LaTeX reformat David Rasmussen
  2004-01-08 21:31 ` Patrick Drechsler
  2004-01-08 21:53 ` David Kastrup
@ 2004-01-08 22:43 ` Stefan Monnier
  2004-01-08 22:54 ` Klaus Uhl
  3 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2004-01-08 22:43 UTC (permalink / raw)


> anywhere), I use "Auto Fill", to make it wrap lines
> automatically. When I have fiddled around with the text a bit, the
> automatically inserted newlines are at random places so the text looks
> broken up (in emacs).

How about M-q ?
Or maybe M-x fill-region ?


        Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 20:57 LaTeX reformat David Rasmussen
                   ` (2 preceding siblings ...)
  2004-01-08 22:43 ` Stefan Monnier
@ 2004-01-08 22:54 ` Klaus Uhl
  2004-01-08 23:02   ` Stefan Monnier
  3 siblings, 1 reply; 10+ messages in thread
From: Klaus Uhl @ 2004-01-08 22:54 UTC (permalink / raw)


David Rasmussen <david.rasmussen@gmx.net> writes:

> In plain emacs (I am not using AucTeX as I have not been able to find
> it anywhere), I use "Auto Fill", to make it wrap lines
> automatically. When I have fiddled around with the text a bit, the
> automatically inserted newlines are at random places so the text looks
> broken up (in emacs).
> 
> A way to solve this, is to delete the now extraneous newline, and then
> go to the end of the line, and press space. This causes the whole line
> to get reformatted.

You can use M-q to reformat a single paragraph. This is no AucTeX
command but a general emacs command (fill-paragraph) so it also works
in simple text mode (e.g. I also used it to format this message).

> But it would be nice if I could just mark an entire region and
> reformat it, so that newlines were at the right places, and lines
> wrapped naturally. What is the command for this?

There is also an emacs command fill-region (type M-x fill-region) but
I am not sure if it is bound to a shortcut by default. If you often
need to reformat regions that cover more than one paragraph you can
also define your own key binding for this command. Put the line

(global-set-key '(meta w) 'fill-region)

somewhere into your .emacs file and you have bound fill-region to the
key sequence M-w.

Remark: Many keyboards (especially those of PCs) do not have a
separate meta key. On those computers you can try to type ALT-q
instead of M-q if this is configured for your X-Server. Otherwise you
can always use the sequence ESC q (i.e. press _and_ release the escape
key and then press the w key) as a replacement for M-q.

-- 

                 God is real ...
\|/ ____ \|/     ... unless declared integer.
"@'/ ,. \`@"     
\_| \__/ |_/     Mail me : news@u-h-l.de
   \__U_/        WWW     : www.u-h-l.de
                 PGP     : Look at your favourite PGP-keyserver

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 22:54 ` Klaus Uhl
@ 2004-01-08 23:02   ` Stefan Monnier
  2004-01-08 23:23     ` Klaus Uhl
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2004-01-08 23:02 UTC (permalink / raw)


> (global-set-key '(meta w) 'fill-region)

Since this is an Emacs newsgroup, it's better to use a syntax that is not
XEmacs-specific:

  (global-set-key [(meta ?w)] 'fill-region)

Note that M-w is by default bound to "kill-ring-save" (aka "copy" for
people used cut/copy/paste), so you may prefer another binding.


        Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 23:02   ` Stefan Monnier
@ 2004-01-08 23:23     ` Klaus Uhl
  2004-01-09 11:56       ` Paolo Gianrossi
  0 siblings, 1 reply; 10+ messages in thread
From: Klaus Uhl @ 2004-01-08 23:23 UTC (permalink / raw)


Stefan Monnier <monnier@iro.umontreal.ca> writes:

> > (global-set-key '(meta w) 'fill-region)
> 
> Since this is an Emacs newsgroup, it's better to use a syntax that is not
> XEmacs-specific:
> 
>   (global-set-key [(meta ?w)] 'fill-region)

I am sorry for that mistake. I think I will have to buy or print out
the "GNU Emacs Manual" somewhen since I don't like to read on the
screen if I can have a hardcopy.

-- 

                 God is real ...
\|/ ____ \|/     ... unless declared integer.
"@'/ ,. \`@"     
\_| \__/ |_/     Mail me : news@u-h-l.de
   \__U_/        WWW     : www.u-h-l.de
                 PGP     : Look at your favourite PGP-keyserver

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-08 23:23     ` Klaus Uhl
@ 2004-01-09 11:56       ` Paolo Gianrossi
  2004-01-10 22:36         ` LEE Sau Dan
  0 siblings, 1 reply; 10+ messages in thread
From: Paolo Gianrossi @ 2004-01-09 11:56 UTC (permalink / raw)


Klaus Uhl <news@u-h-l.de> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> > > (global-set-key '(meta w) 'fill-region)
> > 
> > Since this is an Emacs newsgroup, it's better to use a syntax that is not
> > XEmacs-specific:
> > 
> >   (global-set-key [(meta ?w)] 'fill-region)
> 
> I am sorry for that mistake. I think I will have to buy or print out
> the "GNU Emacs Manual" somewhen since I don't like to read on the
> screen if I can have a hardcopy.

You should buy it: it's a must, it's really useful, it's just 45 bucks and it
helps free software...

Moreover, it's around 600 pages, something not really confortable to use on
letter-size unbind paper.. :)

cheers 
paolino

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: LaTeX reformat
  2004-01-09 11:56       ` Paolo Gianrossi
@ 2004-01-10 22:36         ` LEE Sau Dan
  0 siblings, 0 replies; 10+ messages in thread
From: LEE Sau Dan @ 2004-01-10 22:36 UTC (permalink / raw)


>>>>> "Paolo" == Paolo Gianrossi <paolino.gnu@disi.unige.it> writes:

    >> I am sorry for that mistake. I think I will have to buy or
    >> print out the "GNU Emacs Manual" somewhen since I don't like to
    >> read on the screen if I can have a hardcopy.

    Paolo> You should buy it: it's a must, it's really useful, it's
    Paolo> just 45 bucks and it helps free software...

45 bucks is not cheap.


    Paolo> Moreover, it's around 600 pages, 

So, it's environmentally unfriendly.

If  you want  to  help FSF,  donate  the money  without  asking for  a
hardcopy.  That helps the environment in addition.


Isn't the manual available in Info form?  I find Info files to be very
pleasant  to read  on  screen.  I  just  need to  sit  back and  press
<space>.   (Try using  white  text on  a  black background!   Computer
displays aren't  paper.  Pretending that the computer  screen is paper
is stupid.   Black on white  on the light-emiting screen  is nonsense.
(Bold-black on white is a  bit better, though.)  A white background is
simply tiring to read.  Before you ask, try "emacs -rv".)


-- 
Lee Sau Dan                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-01-10 22:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08 20:57 LaTeX reformat David Rasmussen
2004-01-08 21:31 ` Patrick Drechsler
2004-01-08 21:53 ` David Kastrup
2004-01-08 21:54   ` David Rasmussen
2004-01-08 22:43 ` Stefan Monnier
2004-01-08 22:54 ` Klaus Uhl
2004-01-08 23:02   ` Stefan Monnier
2004-01-08 23:23     ` Klaus Uhl
2004-01-09 11:56       ` Paolo Gianrossi
2004-01-10 22:36         ` LEE Sau Dan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).