Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-19 Thread Jean-Marc Lasgouttes
In the physics department they had a defined format for TeX files. This can be compared to our coding rules for C++. In the TeX world LyX is a very small player, so I can understand that people don't care about a TeX format preferred by LyX and therefore think that tex2lyx cannot assume any

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-19 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: In this particular example, I used \renewcommand, but as you know, many people would have used \def, which defeats your patch. How that? Do you have an example? All \def commands are output as they are. I am not sure what exact set of defining commands should be

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-19 Thread Jean-Marc Lasgouttes
Uwe Stöhr writes: > Jean-Marc Lasgouttes schrieb: > >>> I'll send an example instead, where one wants to redefine \lyxarrow. Try >>> exporting and reimporting and see what happens. This show that >>> filtering lyx commands based on their name is not the panacea you make >>> it to be, and that fil

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-18 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: I'll send an example instead, where one wants to redefine \lyxarrow. Try exporting and reimporting and see what happens. This show that filtering lyx commands based on their name is not the panacea you make it to be, and that filtering based on tags in the source ha

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-18 Thread Jean-Marc Lasgouttes
Jean-Marc Lasgouttes writes: > I'll send an example instead, where one wants to redefine \lyxarrow. Try > exporting and reimporting and see what happens. This show that > filtering lyx commands based on their name is not the panacea you make > it to be, and that filtering based on tags in the sour

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-18 Thread Jean-Marc Lasgouttes
Uwe Stöhr writes: >> OK I will not bother you with tex2lyx anymore. > > You never bothered me. Every comment is welcome and I have changed > many things you suggested. I only disagree with you in this certain > point and hope that I've said it without being offending. I do not have much time to

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-17 Thread Uwe Stöhr
> OK I will not bother you with tex2lyx anymore. You never bothered me. Every comment is welcome and I have changed many things you suggested. I only disagree with you in this certain point and hope that I've said it without being offending. regards Uwe

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Jean-Marc Lasgouttes
Please no more comment issues and clever meant assumptions. The user is free to modify TeX-files as he wants. When they are valid LaTeX, tex2lyx has to import them so that they are afterwards compilable. My solution does this because nothing is assumed, it only reads line by line what is in

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Uwe Stöhr
Abdelrazak Younes schrieb: The file format will always be current. LyX will read the LaTeX file, fill in a Buffer structure and then save the Buffer into a lyx file. This would indeed be the best solution. regards Uwe

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Uwe Stöhr
OK, I see what you mean now. It would be a good idea to chage all of our definitions to use \providecommand. Yes, but this doesn't solve the problem that tex2lyx doesn't recognize them. >> Take for example the case that I send a TeX file created by LyX to a >> colleague. He's editing the file an

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Jean-Marc Lasgouttes
Uwe Stöhr writes: > in the preamble (this is what I meant with more than one). But LyX > adds them additionally automatically to the preamble. The LaTeX error > you get when you want compile the document is that \lyxline and > \lyxarrow are already define. OK, I see what you mean now. It would be

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: Abdelrazak Younes writes: Can you be a bit more precise please? When tex2lyx is integrated in the lyx executable, how does it improves the current situation? The file format will always be current. LyX will read the LaTeX file, fill in a Buffer structure a

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Jean-Marc Lasgouttes
Abdelrazak Younes writes: >> Can you be a bit more precise please? When tex2lyx is integrated in >> the lyx executable, how does it improves the current situation? > > The file format will always be current. LyX will read the LaTeX file, > fill in a Buffer structure and then save the Buffer into a

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Abdelrazak Younes
Uwe Stöhr wrote: Abdelrazak Younes schrieb: But that's what I'm currently doing. tex2lyx needs to be updated with most of the fileformat changes. This cannot be changed. This *can* be changed. Instead of writing a lyx file, tex2lyx should ask LyX to write it with current format. How should

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Uwe Stöhr
Abdelrazak Younes schrieb: But that's what I'm currently doing. tex2lyx needs to be updated with most of the fileformat changes. This cannot be changed. This *can* be changed. Instead of writing a lyx file, tex2lyx should ask LyX to write it with current format. How should that be done? Sho

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-16 Thread Abdelrazak Younes
Uwe Stöhr wrote: > 1/ one has to remember to update tex2lyx But that's what I'm currently doing. tex2lyx needs to be updated with most of the fileformat changes. This cannot be changed. This *can* be changed. Instead of writing a lyx file, tex2lyx should ask LyX to write it with current form

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-15 Thread rgheck
Uwe Stöhr wrote: >>Take the tex2lyx test file "test-insets.tex" that you find in branch, >>import it and compile the result as PDF -> this fails. > > Hmm, I just tried it and it worked... What error do you get? This doesn't work with LyX 1.6.3's tex2lyx. After importing the file, you h

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-15 Thread Uwe Stöhr
>>Take the tex2lyx test file "test-insets.tex" that you find in branch, >>import it and compile the result as PDF -> this fails. > > Hmm, I just tried it and it worked... What error do you get? This doesn't work with LyX 1.6.3's tex2lyx. After importing the file, you have the LyX-specifi

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-15 Thread Jean-Marc Lasgouttes
Le 15/06/2009 21:46, Uwe Stöhr a écrit : Take the tex2lyx test file "test-insets.tex" that you find in branch, import it and compile the result as PDF -> this fails. Hmm, I just tried it and it worked... What error do you get? The reason was that tex2lyx tries to recognize LyX-specific settin

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-15 Thread Uwe Stöhr
> Concerning this last point: could you explain what did not work in the > previous version? Take the tex2lyx test file "test-insets.tex" that you find in branch, import it and compile the result as PDF -> this fails. The reason was that tex2lyx tries to recognize LyX-specific settings by the c

Re: r30103 - lyx-devel/trunk/src/tex2lyx

2009-06-15 Thread Jean-Marc Lasgouttes
Le 15/06/2009 02:16, uwesto...@lyx.org a écrit : Log: tex2lyx/preamble.cpp: - better whitespace preamble output (still not perfect) - support for fileformat 258 - proper solution how to treat LyX specific preamble stuff; this solves long standing issues (the old solution failed when more than on