Le Mardi 4 Septembre 2001 19:26, vous avez écrit :
> Hello people, i am a student in engeneering trying to use lyx to write my
> master thesis.
> Although entusiast at the beginning of the journey (leaving "Word" behind
> seemed so attractive) i am now loosing entusiasm over the inability to
> import objects (tables, graphs etc..) from other applications as well as
> the apparent impossibility to really decide where things should go.
>
> Needless to say i am working on a windows 2000 environment.
>
> Example.. i am using SPSS (very advanced statistical program) and it
> produces graphs and tables. Graphs i can export to EPS and therefore have
> them in my lyx document, no problems about that. but what about tables??
> tables dont offer the "export to eps" option and there seem to be no way to
> include them in lyx without COMPLETELY REWRITING THEM (which is not an
> option since i have several tables filled with values). Of course if i open
> Word .. all i have to do is a copy/paste sequence and the table appairs in
> that environmanent as well. .ready to be nicely included.
>
> I have tried alternative approaches.. SPSS offers me to save the table in
> "text mode" which is simply a ASCII formatted table assuming font is NON
> proportional. Needless to say LYX's "no double space, no tab, no double
> enter" basic rule is preventing this to work in any way. I have tried to
> use "LYX CODE" style which i understood as being more liberal about this
> but the results are still awkward.
>
> printing the table to a fake postcript printer and then importing it might
> do the trick. but then i have serious problem "cutting" the resulting eps
> file which always has the dimensions of a damn a4 file and therefore the
> table shows an enourmous and (to my knowledge) unavoidable blank space.
> (Since , of course, there is no "crop" option in lyx.
>
> Should I abandon and go back to Word?

No you don't need, as I understand you can output a text file where lines are 
separated by line break and column by tabs, so if you have something that can 
do advanced replacement (like regular expression, don't what is avaible with 
windows 2000) you can use it to convert you tab-delimited table to a LaTeX 
table.
The replacement you need to do are
- replace the tab by a & wich is the character that delimit two cells in a 
LaTeX tabular
- add \\ at the end of each line except for the last one
- add the following at the begining of you file
\documentclass{article}
\begin{document}
\begin{tabular}
- add the following at the end of your file
\end{tabular}
\end{document}

Now you should have a regular LaTeX file (if I did it right, consult your 
LaTeX documentation if necessary) and just need to use the LyX TeX import to 
get a correct table you can copy in your document.

If you were using Linux I would have tell you to create an awk script but I 
just don't know what you can use under windows 2000.

-- 
Ma femme ? Je ne saurais mieux la comparer à une invention française.
c'est moi qui l'ai trouvée... et ce sont les autres qui en profitent.
Henri Duvernois.

Renaud MICHEL

Reply via email to