Hi Richard, On Thu, Apr 30, 2009 at 4:13 PM, Richard Heck <rgh...@bobjweil.com> wrote: > Hi, Alex. This is going to seem critical, but it is going to end up being > constructive. See below.
Contrary to my expectations it did not get constructive in the end, so busy people can safely skip the discussion below. > This isn't quite right. You're assuming that whatever needs to be done to > render the new environment can be done in CSS. Even for theorem > environments, this is non-trivial. I suppose you can use advanced stuff, > like the content tag and counters, but browser support for these is still in > its infancy. Simple use cases can be dealt with in CSS. Complex cases can be dealt with in code. That is as it should be, IMHO. > Right. Which means that people who want to use eLyXer for output are > restricted to a subset of LyX's functionality. And they are going to > continue to be, since there is no way of solving this problem short of > writing or borrowing a LaTeX to HTML converter. That is why I don't support > including it within LyX. Anything that is part of LyX ought to support LyX's > full functionality, or at least something close to it. Yes, but see below (sorry, couldn't resist). > See below again. But you can easily to create a LyX document with some > theorem environments, if you want to continue with this approach. Thanks, but I don't want to learn advanced LyX; I am happy to convert the output :D Therefore I would appreciate it if you could send me the sample yourself. The one you used before would be fine. > You can easily create a LyX document with some BibTeX. And if you want to > work on this, then you can probably use the python-bibtex package to parse > the files. Figuring out how the bibliography is supposed to be rendered will > be more difficult, though maybe there's not so much of a need to render it > precisely as BibTeX would. Or maybe you could (optionally?) use the bbl > file. But see below again. Sure, I can create a lot of things but I don't use BibTeX myself, and nobody has cared about it enough to send a sample -- that is why it is not working at the moment. Again, if you cannot be bothered to send me the sample I assume you are not really interested to get it working in HTML form. > There are other problems, too. We have to keep track of which counters are > "linked" and which ones are supposed to be reset when. You could maybe try > (optionally?) using the aux file, which of course has already dealt with all > of that. But see below again. I am not sure I like this solution. It falls outside the scope of the tool in several respects: - a standalone tool, - a single-pass converter, - and a low-resource option. > LyX will always output to plain text, and that's readily importable in Word. > If one wants to output to a format that preserves a good bit of the > formatting, then latex2rtf does a fine job, so long as you don't have too > much math, etc. (I've used that for collaboration myself, so I know.) > Properly configured, which is apparently a challenge on some operating > systems, htlatex will do excellent conversion both to HTML and to ODT, and > plastex does a very good job converting to HTML, though with some limits, > including the fact that all the math is little pictures (though it does > handle cross-references and BibTeX nicely). So there are lots of options. > None of that means the world can't use a better mousetrap. See below. So latex2rtf is fine "as long as you don't have too much math"? So you don't like eLyXer because it doesn't support 100% of the LyX featureset, and then you suggest some tools which support even less features _and_ produce subpar output? No offense, but it is a funny position. I am sure however that there is a valid reasoning behind the contradiction, and would be delighted to hear it. > That depends how much of LyX's source you care to convert. If you want to > handle custom styles, then the problem is the same. Which was my point. Which I don't, I think that has been made clear from the start. That is one of the reasons that eLyXer is lean, and it should stay this way. > So the question is: What do we have to do if we're going to get really good > HTML output for more than fairly simple LyX files, let alone for LyX's full > functionality? Nope, sorry. The question is: do you want to do a reasonable conversion for 99% of your potential users and support their simple needs, or do you want to embark in a hard, difficult, error prone and laborious task? For me the answer is clear. > Getting something workable that does as much as eLyXer now does would be > pretty easy, because we already have access to the complete structure of the > document. Lots of the output code could almost be cut and paste from the > other output routines. The challenge will be to get good rendering of the > math. Addressing other issues, like file splitting, would take some work, > but not too much. Note that we can even get a good TOC this way. Dealing > with cross-references and BibTeX becomes easy, too, because we have all the > information we need ready to hand. (Of course, there will be issues, but you > get my point.) Good luck with that. As Pavel says below, this problem is again orders of magnitude harder than what eLyXer set to solve. And it is both complex and ungrateful, if you plan to support 100% of LyX features. > Alex, do you know C++? I'd be happy to help with this, once exams are over. Sure, I could throw away everything I have done; or I could work to support the growing community of existing eLyXer users. I think the answer is clear. But of course if anyone cares to do it, and do it right, then I will happily withdraw eLyXer and try to help with my very limited C++ skills. I am not holding my breath though. Thanks, Alex.