Section D.3 emacs
Jason Underdown reports on 2016-05-12 that emacs’ nXML mode
works well with a schema, and Mitch Keller reports on 2021-04-18 that specifically a RELAX-NG schema may be used. The two versions of the RELAX-NG schema for PreTeXt can be found at
The first is the “real” version, while the second is an entirely equivalent (compact) syntax that is meant to be a bit more human-readable, so perhaps either may be employed.
On 2021-04-18, Mitch Keller reports success with placing the following
schemas.xmlfile in his PreTeXt source file directories. Note that you may need to adjust the path in the
@uriattribute, and the
@patternattribute implies that Mitch has used a
.ptxsuffix for all his source filenames. If you are already using emacs, you should have no trouble making the necessary adjustments.
<?xml version="1.0"?> <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> <uri pattern="*.ptx" uri="../../mathbook/schema/pretext.rnc"/> </locatingRules>
You simply put your cursor at any point in the document, start a new tag with―Jason Underdown
<and then call the
completion-at-pointfunction (I bound it to the key-chord:
C-<return>) to get a list of possible completions. Or you can start typing a few characters to narrow the list of possibilities. It will also let you know if the element you are trying to insert is invalid.