Great, Geoff, hang on for the ride! You might want to get comfortable with the
pretext/pretext script in a Python virtual environment - I won't be much help
with VSCode, CLI, etc. And certain things are easier.
First step: can we all think of a name for some "span-like", phrase/word-level
markup, that is better than "reveal"? Its a verb, and Oscar is already making
nouns from it. ;-) It'd be nice to reserve "reveal" for switches and actions,
etc. A noun like "curtain"? As in "reveal what is behind the curtain"? No, I
am not serious, but the intent is clear? "veil"? Check a thesaurus (or AI, I
guess).
Geoff (and anybody else who might want to play along!):
1. Begin with markup. Always begin with the markup. Put some "reveal"
elements into the sample article (or some better name). Wrap words, phrases,
maybe 2.5 sentences, include some #m inside, maybe an #em. Several examples:
simple to tortuous. Use the sample article (yes it takes a few seconds to build)
because you are going to make sure you don't wreck anything else.
2. In xsl/pretext-common.xsl add a new template definition. It should "match"
#reveal and all it should do is "apply-templates" to its children. I'm being a
bit vague here intentionally, since getting this right illustrates all sorts of
basic principles. See if poking around the code helps.
3. Done correctly, nothing will happen. :-( This will be the "base" behavior.
How can you test? Build the sample article as a LaTeX file (a switch for the
script) and as HTML, while on master. Do it again in a new directory with your
changes from (2). ('git stash save' and 'git stash pop' can be useful, or make
a commit, switch branches and "amend" the commit as you go. Even better, make
"old-dir" before you start changing code.)
Do a "git diff old-dir new-dir" (make sure your directories are in /tmp, or
similar, not under a directory ruled by git). You will see an obvious small
change in each case, and should see no substantive changes otherwise.
4. No need for a PR yet. Post your new template here.
Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
pretext-dev...@googlegroups.com <mailto:
pretext-
>
dev+uns...@googlegroups.com>.
> dev/5e74d13e-edda-4ae5-8670-a6da1f9e33d5n%
40googlegroups.com <https://
>
groups.google.com/d/msgid/pretext-dev/5e74d13e-edda-4ae5-8670-
> a6da1f9e33d5n%
40googlegroups.com?utm_medium=email&utm_source=footer>.