Roberto Gorjão wrote:
Hi all,

I would like to learn a bit more of LaTeX. I found surprising that we couldn't edit latex code directly on LyX at source view... Being used to web page visual editors, I was expecting that the source viewer would function like a "code mode" that we could choose as an alternative to the normal "design mode", as happens with dreamweaver, for instance. I know that we can edit LaTeX with the ERT command and at the preamble, but it isn't really the same as a "code mode".

As I'm already used to code web languages (HTML, CSS, JavaScript, PHP) using Eclipse I was happy to find about the TeXlipse plugin. But it seems far less complete than LEd or TeXnic. I would like to know what's your opinion about the best strategy and tools to learn and work directly on LaTeX while keep using LyX for text creation. Something like having dreamweavers' "design mode" and "code mode" at the same time.


This is really a question for the developers, but here's my uninformed opinion. Most of a LyX document is in what you might call an internal representation (what you see when you look at the .lyx file). LyX converts that to LaTeX when you view source. I think it would be fairly easy to allow you to edit LaTeX code that came from the preamble or ERT boxes (stuff you entered directly), but to do what you want would require that LyX be able to do a reverse conversion (from LaTeX back to LyX) on the fly. Furthermore, it would require considerable defensive coding to make sure that what you entered in the edit window, which might be perfectly valid LaTeX, did not screw up the LyX code upon reverse conversion. So this would IMHO be a huge effort for the developers.

I'm not sure the payoff would be all that great. Typically, I think, the sort of LaTeX tweaking you have in mind is something I would do in preparation for a final draft, not during the writing of the document. So I would be content to export to LaTeX, edit the LaTeX in a simple text editor, and go that route. I would probably use LyX Note boxes to keep track, in the document, of any tweaks I intended to make, to preserve them in the event the final edit was not actually final.

That's less convenient than what you have in mind, but workable. Keep in mind with Dreamweaver (which I also use) that in Dreamweaver you are editing HTML, which is a much simpler language than LaTeX (with a much smaller vocabulary).

Cheers,
Paul

Reply via email to