Skip to content

Commit

Permalink
Updates to get working with July 2020 PTX
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchkeller committed Jul 10, 2020
1 parent 7589185 commit 5b39978
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,17 @@ pg:

apc-extraction:
install -d $(WWOUT)
-rm $(WWOUT)/webwork-extraction.xml
-rm $(WWOUT)/webwork-representations.ptx
-rm $(WWOUT)/webwork-*-image*
PYTHONWARNINGS=module $(MB)/script/mbx -v -c webwork -d $(WWOUT) -s $(SERVER) $(MAINFILE)
PYTHONWARNINGS=module $(MB)/pretext/pretext -c webwork -d $(WWOUT) -s $(SERVER) $(MAINFILE)
cd $(WWOUT); \
gif2png -O *.gif

# Make a new PTX file from the source tree, with webwork elements replaced
# by the webwork-reps from webwork-extraction.xml. (So run the above at
# least once first.) Subsequent templates are applied to the result.

apc-merge:
cd $(WWOUT); \
xsltproc -xinclude --stringparam webwork.extraction $(WWOUT)/webwork-extraction.xml $(MBXSL)/pretext-merge.xsl $(MAINFILE) > apc-merge.ptx

# HTML output
# Output lands in the subdirectory: $(HTMLOUT)
# Remove the entire $(HTMLOUT)/knowl directory because of how PTX now
# seems to make a knowl for everything and rm throws an error.
html: apc-merge
html:
install -d $(HTMLOUT)
-rm -rf $(HTMLOUT)/knowl
install -d $(HTMLOUT)/knowl
Expand All @@ -146,7 +138,7 @@ html: apc-merge
cp -a $(IMAGESSRC) $(HTMLOUT)
cp -a $(PRJSRC)/interactives $(HTMLOUT)
cd $(HTMLOUT); \
xsltproc -xinclude $(MBUSR)/apc-html.xsl $(WWOUT)/apc-merge.ptx
xsltproc -xinclude -stringparam publisher $(PRJ)/pub/html.xml $(MBUSR)/apc-html.xsl $(MAINFILE)

# make all the image files in svg format
images:
Expand Down
6 changes: 6 additions & 0 deletions pub/html.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<publication>
<source webwork-problems="../output/webwork-extraction/webwork-representations.ptx"/>
<html>
<css colors="blue_grey" />
</html>
</publication>
2 changes: 1 addition & 1 deletion src/frontmatter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
<preface xml:id="preface-for-instructors">
<title>Instructors! Read this!</title>
<p>
This book is different. Before you read further, first read <xref ref="preface-for-students" text="title"><q>Students! Read this!</q></xref> as well as <xref ref="preface-our-goals" text="title"><q>Our Goals</q></xref>.
This book is different. Before you read further, first read <xref ref="preface-for-students" text="custom"><q>Students! Read this!</q></xref> as well as <xref ref="preface-our-goals" text="custom"><q>Our Goals</q></xref>.
</p>

<p>
Expand Down
6 changes: 1 addition & 5 deletions xsl/apc-html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!-- Assumes current file is in mathbook/user, so it must be copied there -->
<xsl:import href="../xsl/mathbook-html.xsl" />
<xsl:import href="../xsl/pretext-html.xsl" />
<!-- Assumes next file can be found in mathbook/user, so it must be copied there -->
<!--<xsl:import href="acs-common.xsl" />-->

Expand All @@ -43,10 +43,6 @@
<xsl:param name="project.answer" select="'no'" />
<xsl:param name="project.solution" select="'no'" />

<!-- Specify the color scheme to use for HTML -->
<xsl:param name="debug.colors" select="'blue_grey'" /> <!-- this is what we use for ACS -->


<!-- Specify options for WeBWorK exercises -->
<xsl:param name="webwork.divisional.static" select="'no'" />
<xsl:param name="html.knowl.exercise.sectional" select="'no'" />
Expand Down

0 comments on commit 5b39978

Please sign in to comment.