RunestoneInteractive / thinkcspy

How to Think Like a Computer Scientist, Interactive Edition
https://runestone.academy/ns/books/published/thinkcspy/index.html
Other
108 stars 191 forks source link

Resolves #219 #226

Closed dsanders12 closed 2 years ago

dsanders12 commented 2 years ago

Changes all instances of non-PreTeXt tags and to PreTeXt tags and , respectively.

bnmnetp commented 2 years ago

When we run into things like this it is great to fix it like you did. I just went back to the docutils2ptx.xsl file and added these transformations so that the next time someone does a conversion they won't have to.

    <xsl:template match="tip">
        <note>
            <xsl:apply-templates select="node()|@ids" />
        </note>
    </xsl:template>

    <xsl:template match="caution">
        <warning>
            <xsl:apply-templates select="node()|@ids" />
        </warning>
    </xsl:template>

If you have an interest in xsl it is a powerful language for doing transformations like this.