Discussion:
I: paste latex code into lyx?
Giovanni Bedetti
2009-01-23 11:14:55 UTC
Permalink
What i mean is that i paste LaTeX code and see the layout. I'd like to paste it in the source view.



________________________________
Da: Nikos Alexandris <nikos.alexandris-tepf811R2pK0ugseAHOM+***@public.gmane.org>
A: Giovanni Bedetti <giovanni_bedetti-***@public.gmane.org>
Cc: lyx-users-UqbJ+GOpo4+***@public.gmane.org
Inviato: Venerdì 23 gennaio 2009, 11:37:34
Oggetto: Re: paste latex code into lyx?
How to paste latex code into lyx?
I have to paste little portions of latex from a big document. Importing the whole document is the only way?
Thank you.
Hi Giovanni.

With Ctrl+L you can insert ERT's (look at the manuals for what ERT
means :-). Or, from the Menu > Insert > TeX Code.. Within an ERT box you
can paste latex code and that's it.

I am new in LyX and LaTeX so perhaps there are other ways to do what you
ask.

Kind regards, Nikos
Anders Host-Madsen
2009-01-23 13:54:21 UTC
Permalink
Post by Giovanni Bedetti
What i mean is that i paste LaTeX code and see the layout. I'd like to paste
it in the source view.
I just started using LyX, and I had exactly the same question,
see the list below.
I feel that would be one of the most useful additions to LyX.
I will copy and paste one answer I got from Guenter Milde. Especially c)
I find useful: you can
paste your text into LyX and then convert each equation to math.
Post by Giovanni Bedetti
What you can do is...
a)
Post by Giovanni Bedetti
take the code and make it into a full latex document by adding things,
import to LyX, and then copy and paste, but that seems cumbersome.
b) use the tex2lyx command with option -p on a file with incomplete LaTeX
(you will need to specify the documentclass with -c too),

c) for Math (and only math): paste "normally", select and press Ctrl-M:
LyX will convert it into math in a math-box.

d) for your old LaTeX files: let lyx convert
everything into a lyx file in a batch job.

Loading...