Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertical skip after figures; change radio buttons to drop-down #310

Merged
merged 4 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions ptx/sec_deriv_interpret.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,9 @@

<exercise label="ex-deriv-interpret-graph-1">
<webwork xml:id="webwork-ex-deriv-interpret-graph-1">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$h=non_zero_random(-2,2,1);
$k=non_zero_random(-2,2,1);
Expand All @@ -1173,10 +1176,10 @@
$fright=min($fright,4);
$fpleft=max($fpleft,-4);
$fpright=min($fpright,4);
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],0);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],0,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down Expand Up @@ -1222,6 +1225,9 @@

<exercise label="ex-deriv-interpret-graph-2">
<webwork xml:id="webwork-ex-deriv-interpret-graph-2">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
($r,$s,$t)=num_sort((-3..3)[NchooseK(7,3)]);
$a=non_zero_random(-1,1,0.05);
Expand All @@ -1239,10 +1245,10 @@
$ymax=max(5,map{Round($_)+1}(@cv));
$infl=($r+$s+$t)/3;
$inflval=$fp-&gt;eval(x=&gt;$infl);
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],1);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],1,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down Expand Up @@ -1290,11 +1296,14 @@

<exercise label="ex-deriv-interpret-graph-3">
<webwork xml:id="webwork-ex-deriv-interpret-graph-3">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],1);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],1,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down Expand Up @@ -1340,6 +1349,9 @@

<exercise label="ex-deriv-interpret-graph-4">
<webwork xml:id="webwork-ex-deriv-interpret-graph-4">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$h=random(-2,2,1);
$p=random(2,4,1);
Expand All @@ -1348,10 +1360,10 @@
$fp=$f-&gt;D('x');
$ymin=-max(int(pi/$p),1)-1;
$ymax=max(int(pi/$p),1)+1;
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],1);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],1,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down
7 changes: 5 additions & 2 deletions ptx/sec_differentials.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -1813,13 +1813,16 @@
<!-- Exercise 37: Compare errors in wall measurements from previous exercises -->
<exercise label="ex-differentials-survey-4">
<webwork xml:id="webwork-ex-differentials-survey-4">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$buttons = RadioButtons(
$buttons = DropDown(
[
'Right triangle at 25 feet',
'Right triangle at 100 feet',
'Isosceles triangle at 50 feet',
],2);
],2,showInStatic=&gt;0);
</pg-code>
<statement>
<p>
Expand Down
4 changes: 4 additions & 0 deletions xsl/apex-latex-print-color.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
<xsl:text>coltitle=black, fonttitle=\bfseries, attach title to upper, after title={\space},left=1pt,</xsl:text>
</xsl:template>

<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=\baselineskip</xsl:text>
</xsl:template>

<xsl:template match="example" mode="tcb-style">
<xsl:text>blockspacingstyle, after title={\space}, before upper ={\setparstyle}, &#xa; </xsl:text>
<xsl:text>fonttitle=\normalfont\bfseries, colback=white, colframe=black, colbacktitle=white, coltitle=black,
Expand Down
4 changes: 4 additions & 0 deletions xsl/apex-latex-print-style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
<xsl:text>coltitle=black, fonttitle=\bfseries, attach title to upper, after title={\space},left=1pt,</xsl:text>
</xsl:template>

<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=\baselineskip</xsl:text>
</xsl:template>

<xsl:template match="example" mode="tcb-style">
<xsl:text>blockspacingstyle, after title={\space}, before upper ={\setparstyle}, &#xa; </xsl:text>
<xsl:text>fonttitle=\normalfont\bfseries, colback=white, colframe=black, colbacktitle=white, coltitle=black,
Expand Down
4 changes: 4 additions & 0 deletions xsl/apex-latex-style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
<xsl:text>coltitle=black, fonttitle=\bfseries, attach title to upper, after title={\space},left=1pt,</xsl:text>
</xsl:template>

<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=\baselineskip</xsl:text>
</xsl:template>

<xsl:template match="example" mode="tcb-style">
<xsl:text>blockspacingstyle, after title={\space}, before upper ={\setparstyle},&#xa; </xsl:text>
<xsl:text>fonttitle=\normalfont\bfseries, colback=white, colframe=black, colbacktitle=white, coltitle=black,
Expand Down