search-replace

search-replace

Post by Teis Schni » Fri, 08 Oct 2004 01:17:24


Hello there,

I am running emacs 21.2.1, and i have just importet a (very) long textformat
that I would like to typeset in LaTeX.

The problem is, that my imported text has some forced linebreakings, that I
would like to keep when typesetting in latex.

For instance, this is what I have imported, and would like to keep in LaTeX:

Hello, hello hello my name is bla bla bla yank yoink
buhu wuu weeee tralalalalej bom bom

Somehov I want to put \\ after EVERY line (i.e., more than 10000 lines), so
my textdocument becomes

Hello, hello hello my name is bla bla bla yank yoink \\
buhu wuu weeee tralalalalej bom bom\\

Is it possible to search for linebreaks and insert \\ after every line?

Thx for your help!
Teis
 
 
 

search-replace

Post by William Xu » Fri, 08 Oct 2004 05:27:07

"Teis Schnipper" < XXXX@XXXXX.COM > writes:


Yes.

C-@ ;; mark region
M-x replace-regexp C-q C-j RET \\\\ C-q C-j RET

I don't much about TeX, and i'm wondering whether there's something similar
as "<pre> </pre>" of html, which would ignore the mess "\\".

--
William Xuuu
Humans remove heyyy_ from the email address to reply.

 
 
 

search-replace

Post by brotherel » Fri, 08 Oct 2004 06:17:53

William Xuuu < XXXX@XXXXX.COM > writes:


\obeylines might do just that.

Ulrich
--
Neun auf viertem Platz bedeutet:
Im Behter ist kein Fisch.
 
 
 

search-replace

Post by Teis Schni » Fri, 08 Oct 2004 06:23:27

Thank you for your help. You're right - it looks not very elegant, but at
least it works now c",)

kind regards
Teis

"William Xuuu" < XXXX@XXXXX.COM > skrev i en meddelelse

similar