From: Ryszard K. <ry...@bi...> - 2005-10-03 14:26:46
|
Hello Tom! I spent a few hours yesterday looking at Hyperlatex source code. I did several tests, trying to understand how paragraphs are processed. I have not found a solutiion yet still I I have a few remarks: 1. Inspecting somebody else's source code is not the easiest thing under the Sun :-) 2. Before thinking about the problem of paragraphs under list-like environments we should first solve it for plain texts. It happens that the following simple document: \documentclass[12pt]{article} \begin{document} A paragraph. \par Another paragraph. \end{document} does not generate a <p>. I've checked by introducing (if (string= hyperlatex-command-name "par") (message "par")) before (delete-region hyperlatex-command-start (point)) in hypelatex.el's function hyperlatex-format-special-char That this particular place is visited twice with a \par. I don't know yet if it's for purpose. 3. By introducing (hyperlatex-write-region (point-min) (point-max) "A FILE") before (hyperlatex-final-substitutions) in hyperlatex.el's function hyperlatex-finish-node I could see that the paragraphs have already disapeared from the code produced for the above source document. 4. A sequence of empty lines and \par-s means a \par in TeX; Hyperlatex should pass this test whatever solution for processing paragraphs is found. 5. We can find the following sentences in The TeXbook (excerpts from Chapter 13): Things that do not have a vertical orientation cause the mode to switch automatically from vertical to horizontal. ... horizontal mode is for making paragraphs .. vertical mode is between paragraphs A letter or a digit (unless redefined) start a horizontal mode. An empty line ends a paragraph (TeX goes to vertical mode). Hyperlatex should follow TeX's line of switching between horizontal and vertical modes. 6. The final </p> is not generated, no matter is it \par or an empty line that is used in the above source code. 7. A side-problem. I am afraid that characters with ASCII codes above 128, that is, extra national characters in European languages, in ISO and Windows encodings, can be misinterpreted. I've found that Hyperlatex uses 128+ord(x) convention for representing its metacharacters. If characters in the source document, of codes above 128, are not protected (by recoding them down to below 128) then they may be considered metacharacters. By now, my sources in Polish have been procecessed correctly still I don't know whether people in other European countries are as lucky as I am. Tom, sorry that I haven't found a solution for the parapraph problem yet. I miss a general description of how a source code is processed by Hyperlatex (Oh, should hyperlatex.el by written in literate style...) Can you send me a brief descripiton, just a few main points, what, when and why is done in Hypertatex.el? Or, do you know how to cure situation for plain text documents? Greetings Rysiek |