Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Peter Flynn Newsgroups: comp.text.xml Subject: Re: Schematron questions Date: Sun, 20 May 2018 22:32:52 +0100 Lines: 98 Message-ID: References: <87vabuodmk.fsf@hri.res.in> <871see5kta.fsf@gmail.com> <87sh6u44hh.fsf@gmail.com> <87vabltltf.fsf@gmail.com> <87o9hcuucq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net WfJ4BN6lXUZd8YrmNwkRbAu4rSesnjDVvKVb6XUuDAzAik3Uj/ Cancel-Lock: sha1:kmrgyQxBME3k1ABppaiDCQ8lhhE= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: <87o9hcuucq.fsf@gmail.com> Content-Language: en-US Xref: csiph.com comp.text.xml:899 On 19/05/18 05:45, N. Raghavendra wrote: > Thanks for the advice. I have decided to try PSGML mode again, after a > long gap. I see that the maintainers of the ELPA version have removed > `psgml-ids.el', which seemed useful, for copyright reasons, and have > replaced it with other functions. I hope there is no problem with that. I'm not aware of ever having used it myself. I use C-c C-v to validate documents: that needs onsgmls installing (part of the opensp package) and you need to configure Emacs to create the right command. My .emacs says: (setq sgml-xml-declaration "/usr/local/lib/sgml/sgmlxml.dec") (setq sgml-xml-validate-command "onsgmls -wxml -s -E 5000 %s %s") Finally, you should know that nxml-mode has usurped the xml-mode lock, so the xml-mode in .emacs will not work immediately: you need (autoload 'xml-mode "psgml" "Major mode to edit XML files." t ) (setq auto-mode-alist (cons '("\\.[Xx][Mm][Ll]$" . xml-mode) auto-mode-alist)) You have to type M-x sgml-mode RET to steal the lock back. Then M-x xml-mode will work for the current session. You have to do this each time you start a new Emacs instance...I have not found a way to break nxml's stranglehold. David Megginson has a nice set of fontification colours for xml-mode somewhere. > I am partway through a writing project which will occupy a large part > of my time in the next few years. I am a mathematician, and the > subject of my writing project is some recent work on the foundations > of mathematics. The products of the project will be a collection of > "volumes" on the subject. There will be cross-references between > these volumes. Part of the product will be code in the language of > the proof assistant Coq. I will have to include delimited snippets of > the code in the text. All sounds good. > I could have used LaTeX; I have been using it for the last 28 years, > since the time I was a graduate student, for all my mathematical > writing, and am absolutely comfortable with it, like most > mathematicians are. However, I have always chafed at its non-semantic > aspect. I haven't used LaTeX for authoring since the early 90s: everything has been in SGML and then XML, and transformed to LaTeX for formatting, so its lack of formal structure has not concerned me: it's basically an API to create PDFs. > I have some experience with DocBook, but, for my current purpose, it > has too many elements that are irrelevant. You can remove the bits you don't want from the RNG and recreate a new DTD or Schema. I just ignore them, as I never see them. I also add in some bits I think need correcting, and I shamelessly abuse other bits for my own devious purposes, and pace, Norm, I do owe them a copy of what I have done. > In any case, I have to extend these schemas, to incorporate numbered > statements like "Definition", "Lemma", "Proposition", "Theorem", > "Corollary", and, "Remark", for which I usually use the LaTeX package > `ntheorem'. I also need XML equivalents of the `amsmath' equation > environments, such as `eqnarray', and `split'. Things like `cases', > too. I'll pass on that, as I'm no mathematician. I know roughly what they are, but it would need a mathematician to make such changes. At the risk of being shot down in flames, do all those new elements share a similar content model? That might make things easier to define. > For the mathematics itself, I am planning to use LaTeX markup, > which in the HTML rendition, will be displayed using MathJaX. That sounds to me like a wise decision but others may disagree. > I found the work of the `mathbook' project > http://mathbook.pugetsound.edu/ > very relevant to my work; they deal with many of the above issues. Yes, I was interested in preTeXt when I heard about it. I was hoping it would be an editor, but alas not. > That is the background to my current notion that I have to write my own > schema. I'd still look at modifying DocBook by removing the bits you don't need and writing the new bits along the same lines before making that rather final decision. At least that way you benefit from nearly 30 years of development experience... Either way, please bear in mind that the organisers of the Balisage conference, the MarkupUK conference, and the assorted TUG conferences would always be interested in a paper describing what you have done, once its done (or at least, under way). ///Peter