From: Ryszard K. <ry...@bi...> - 2005-10-28 09:44:19
|
Dear All, I would like to anounce that I've implemented a solution for the paragraph problem. Although it's very pre-mature at the moment it has started to produce reasonable results. Please compare the test tex source and the generated html, quoted below. The more important thing is that I've learnt the game and I can now drive it. Thus, if the results below happen to be invalid or not like we want them to be they can be reimplemented. The solution is very much in the spirit of HyperLatex that is I do not reimplement TeX. I only need an extra mode-stack. At each recursion level the stack informs about the mode the process is in. The modes, at the moment, can be: vertical, horizontal or paragraph. The definition of an environment must specify whether and how the stack is to be manipulated. For example, itemize enters a higher recursion level and ifequal (defined and used internally by HyperLatex) does not. I follow TeX's view of paragraphs. A \par command or an empty line _ends_ a paragraph. A visible character opens one. The latter may depend on the surrounding context. For example, it seems feasible not to open a paragraph at the beginning of an item. Lot's of things remain to be done. XML insertions pose a little bit of a problem as they are not processed by the standard algorithm. There should be a way of telling whether and how an XML insertion manipulates paragraphs. I want to focus now on this isssue and on math. Unfortunately, I only may spend an hour or two on playing HyperLatex and I estimate that the full job requires some 30-50 hours. I submit the current sources to Tom, in a private letter. Greetings, Rysiek ============================== \begin{document} a \begin{itemize} \item C\par\par D\par E% \item F\begin{itemize} \item G\par\par H \item J \end{itemize} % \end{itemize} \begin{center} c \par d \end{center} e \end{document} =============================== <body> <p>a <ul><li>C<p>D</p> <p>E</p> </li><li>F<ul><li>G<p>H </p> </li><li>J </li></ul> </li></ul> <div align="center"> c <p>d </p> </div> e </p> </body> ============================= |