--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/cb1866a0-8aac-4cae-a210-9a7d0c695e21n%40googlegroups.com.
Hi Mike,
I've written a pretext-mode for myself that I'd be happy to share if you are interested.
It will come with a couple of caveats:
My pretext-mode recognizes s"<" as the beginning of a tag, prompts for the tag and try to do something intelligent with it. For example, if I type "<section" it prompts for an xml:id label and a title then inserts the following:
<section xml:id="SECTIONLabel">
<title>
This Was Typed In Response to a Prompt
</title>
<p>
</p>
</section>
and leaves the cursor between <p> and </p>. It works similarly for most other tags. It is a work in progress so some of these work better than others.
Also it recognizes when you are inside a <math> </math> construct and switches to LaTeX mode to access the AucTeX capabilities.
I miss RefTeX too so I made a stab at it but my efforts were less than satisfactory.
Happy to share if you are interested. Let me know.
-- Bud
You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/YMarLweG2RM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/44153df2-8e16-414c-9d53-8feed371c107%40gmail.com.
Mike,
I've tarred up all of the pertinent files and attached the tarball to this email. It's only about 600KB so I don't expect any problems but if there are let me know and we'll try another method.
I did this by modifying James Clark's xml-mode. I ran "query-replace xml ptx" on them. Otherwise I haven't touched most of them them. Probably some of them aren't even necessary but I haven't investigated that.
The two files you're interested in are ptx-tags.el and ptx-mode.el. ptx-tags.el is pretty self-explanatory. ptx-mode.el is where ptx-mode and all of its supporting functions are defined.
Like I said the documentation is sparse.
To insert a PreTeXt tag just type "<" and respond to any prompts. Functions that insert a tag are usually named ptx-insert-<whatever> but not always. I had already written a few such functions when I decided to standardize.
It does a pretty good job of detecting whether the point is inside or outside of a <math> </math> construct and switching to LaTeX mode when inside. But sometimes it gets confused so C-xt is bound to ptx-toggle-mode.
I hope you find it useful. There are undoubtedly quirks that are tied to the way I write PreTeXt which you'll find confusing and/or mysterious. Don't hesitate to contact me if you have questions.
If you want to contact me directly my email is: budb...@gmail.com
-- Bud
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/CADYavpxv1Y88Q8y652toATnczxfmNOznCNYsmnhz6NCxHpdLXw%40mail.gmail.com.