Skip to content

Commit d2c2dea

Browse files
committed
updating changes.md to list exercises
1 parent 80ee5dd commit d2c2dea

File tree

10 files changed

+71
-472
lines changed

10 files changed

+71
-472
lines changed

apexNotes.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
15.1 F6 color
1111

1212

13+
apptools ?
1314

1415

1516
Ally complains that "This HTML file contains an invalid heading structure"
16-
(image?) directories in Windows use a separator \ which becomes %5C in html, and breaks
1717

1818

1919
../LaTeXML/bin/latexmlpost --split --destination=xmlonly/index.xml --format=xml Calculus.xml
@@ -74,8 +74,6 @@ Should the notebook be distributed with the text? Eventually. CC-BY-NC, same a
7474

7575

7676
My to do:
77-
new toggle trig?
78-
new toggle applied?
7977
ragged bottom?
8078
pdfsizeopt to python 3? or just get it working again?
8179
tocbibind?

changes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ Changes for the 2020-07 version:
1212

1313
* Anthony Bevelacqua and John Collings contributed several exercises.
1414

15+
* New exercises include: 5.4#65, 6.3#18,
16+
7.1#33-37, 7.3#31, 7.4#3-4, 7.4#41, 7.5#53-55,
17+
8.1#53-56, 8.2#41, 8.3#27, 8.4#33-34, 8.4#39, 8.6#47-48,
18+
9.1#52-53, 9.2#54-55, 9.3#15, 9.4#34, 9.5#27-28, 9.6#27, 10.3#51.
19+
Those in 6.3, 7.4, and 8.4 have subsequent exercises whose numbering has consequently changed.
20+
21+
1522
* All known errata (31+) have been fixed.
1623

1724
* After a fair bit of work (and some sweeping under the rug), we are down to two overfull hboxes and 10 undervull vboxes.

headers/APEX_format.tex

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,14 @@
397397
\newcommand{\printproblems}{\exercisesubsubsection{Problems}}
398398
\newcommand{\printreview}{\exercisesubsubsection{Review}}
399399

400-
%\newlist{sectionexercises}{enumerate}{1}
401-
%\setlist[sectionexercises]{label=\arabic*.,resume,leftmargin=1.5em}
400+
\newlist{sectionexercises}{enumerate}{1}
401+
\newcounter{saveexercisenum}[section]
402+
\setlist[sectionexercises]{
403+
label=\arabic*.,
404+
leftmargin=1.5em,
405+
before=\setcounter{sectionexercisesi}{\value{saveexercisenum}},
406+
after=\setcounter{saveexercisenum}{\value{sectionexercisesi}},
407+
}
402408

403409
\newcommand{\printexercises}[1]{%
404410
\writeToAnsFile{#1}% writeToAnsFile in sty
@@ -409,10 +415,6 @@
409415
\small%
410416
\bigskip%
411417
\begin{multicols}{2}%
412-
% \restartlist{sectionexercises}
413-
% \setcounter{sectionexercisesi}{0}
414-
\restartlist{enumerate}
415-
\setcounter{enumi}{0}
416418
\renewcommand{\Itemautorefname}{Ex\-er\-cise}% local b/c multicols = good
417419
\input{#1}%
418420
\closeenumerate%
@@ -429,8 +431,14 @@
429431
\openout\answrite=\jobname.answers
430432

431433
\newcommand{\writeToAnsFile}[1]{%
432-
\immediate\write\answrite{%
433-
\noexpand\answersForSection{\arabic{chapter}}{\arabic{section}}{#1}%
434+
\ifbool{latexml}{%
435+
\immediate\write\answrite{%
436+
\answersForSection{\arabic{chapter}}{\arabic{section}}{#1}%
437+
}%
438+
}{% in LaTeXML, \noexpand\answersForSection becomes a literal \relax
439+
\immediate\write\answrite{%
440+
\noexpand\answersForSection{\arabic{chapter}}{\arabic{section}}{#1}%
441+
}%
434442
}%
435443
}
436444

@@ -454,52 +462,46 @@
454462
% doesn't work?
455463
}
456464

457-
\newcommand*{\enumenv}{enumerate}
458-
%\newcommand*{\exerenv}{sectionexercises}
465+
\newcommand*{\exerenv}{sectionexercises}
459466

460467
\makeatletter
461468
\newcommand{\openenumerate}{%
462-
% \ifx\@currenvir\exerenv\else%
463-
% \begin{sectionexercises}
464-
\ifx\@currenvir\enumenv\else%
465-
\begin{enumerate}[leftmargin=1.5em,resume=exercises\thesection]%
469+
\ifx\@currenvir\exerenv\else%
470+
\begin{sectionexercises}
471+
\ifbool{latexml}{\setcounter{sectionexercisesi}{\value{saveexercisenum}}}{}%
466472
\fi%
467473
}
468474
\newcommand{\closeenumerate}{
469-
% \ifx\@currenvir\exerenv%
470-
% \end{sectionexercises}
471-
\ifx\@currenvir\enumenv%
472-
\end{enumerate}%
475+
\ifx\@currenvir\exerenv%
476+
\ifbool{latexml}{\setcounter{saveexercisenum}{\value{sectionexercisesi}}}{}%
477+
\end{sectionexercises}
473478
\fi%
474479
}
475480
\makeatother
476481
\newcommand{\closeenumerateinquestions}{\closeenumerate}
477482

478483
\newenvironment{exerciseset}[2]{%
479-
\stepcounter{enumi}%
480-
% \stepcounter{sectionexercisesi}
484+
\stepcounter{sectionexercisesi}
481485
\stepcounter{exercisesetcounter}%
482-
\ifnumodd{\value{enumi}}{}{%
486+
\ifnumodd{\value{sectionexercisesi}}{}{%
483487
\PackageInfo{apex}{%
484-
Exercise set \theexercisesetcounter\space begins with \arabic{enumi}%
488+
Exercise set \theexercisesetcounter\space begins with \arabic{sectionexercisesi}%
485489
}%
486490
}%
487491
\pagebreak[1]%
488492
{%
489493
\setlist[enumerate,1]{label=(\alph*)}%
490-
% \noindent#1 \arabic{sectionexercisesi}--\ref*{enumiatendof\theexercisesetcounter}#2%
491-
\noindent#1 \arabic{enumi}--\ref*{enumiatendof\theexercisesetcounter}#2%
494+
\noindent#1 \arabic{sectionexercisesi}--\ref*{enumiatendof\theexercisesetcounter}#2%
492495
}%
493-
% \addtocounter{sectionexercisesi}{-1}\ignorespaces%
494-
\addtocounter{enumi}{-1}\ignorespaces%
496+
\addtocounter{sectionexercisesi}{-1}\ignorespaces%
495497
\nopagebreak%
496498
}{%
497499
\label{enumiatendof\theexercisesetcounter}%
498500
\closeenumerate%
499501
\pagebreak[1]%
500-
\ifnumodd{\value{enumi}}{%
502+
\ifnumodd{\value{sectionexercisesi}}{%
501503
\PackageInfo{apex}{%
502-
Exercise set \theexercisesetcounter\space ends with \arabic{enumi}%
504+
Exercise set \theexercisesetcounter\space ends with \arabic{sectionexercisesi}%
503505
}%
504506
}{}%
505507
}
@@ -527,9 +529,6 @@
527529
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
528530

529531
\newcommand{\printsolutions}[2][\jobname]{%
530-
%\showans\answrite
531-
% showans will write the contents of Calculus.answers to the log
532-
% in latexml, this needs to happen before closing
533532
\immediate\closeout\answrite%
534533
\inanswersection\exercisegeometry%
535534
\pagestyle{exercise}%

headers/apex_style.sty.ltxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ DefPrimitive('\showans Number',sub {
138138
my $filename = LookupValue('output_file:' . $port);
139139
my $handle = $filename . '_contents';
140140
my $contents = LookupValue($handle);
141-
print STDERR "Current $filename contents:\n$contents\n\n";
141+
print STDERR "\n\nCurrent $filename contents:\n$contents\n\n";
142142
return;
143143
});
144144

lab/newcounter/newcounter.tex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
\documentclass{article}
2+
\newcounter{mycounter}[section]
3+
\begin{document}
4+
5+
\stepcounter{mycounter}
6+
mycounter: \arabic{mycounter}
7+
8+
\section{section}
9+
10+
mycounter: \arabic{mycounter}
11+
12+
\end{document}

standalone.tex

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,17 @@
1717
\usetwoDgraphics
1818
%\usethreeDgraphics
1919

20-
\renewcommand{\printexercises}[1]{}
21-
\renewcommand{\printsolutions}[1]{}
22-
2320
\begin{document}
2421

2522
\frontmatter
2623

27-
%\input{text/front_matter_and_cover}
28-
\label{lxApexTOC}
29-
\tableofcontents
30-
\input{text/title_page}
31-
\input{text/copyright_page}
32-
\addtocontents{toc}{\protect\thispagestyle{empty}}%
33-
\input{text/preface}
24+
\input{text/front_matter_and_cover}
25+
% \label{lxApexTOC}
26+
% \tableofcontents
27+
% \input{text/title_page}
28+
% \input{text/copyright_page}
29+
%\addtocontents{toc}{\protect\thispagestyle{empty}}%
30+
%\input{text/preface}
3431

3532
\mainmatter
3633

@@ -51,8 +48,7 @@ \section{The section}
5148
This is my key idea.
5249
\end{keyidea}
5350

54-
\mfigure[scale=.6]{0in}{A topographical map displays elevation by drawing contour lines, along with the elevation is constant.\\ \tiny Sample taken from the public domain USGS Digital Raster Graphics, \texttt{http://topmaps.usgs.gove/drg/}.}{fig:topomap}{figures/raw/MT_ChromeMountain_topo_smallx}
55-
51+
% todo tikz matrices see https://github.com/brucemiller/LaTeXML/issues/794
5652
%\begin{tikzpicture}
5753
% \matrix[row sep=1mm,column sep=3mm,ampersand replacement=\&]{
5854
% \&\&\& \node (tp1) {$-2$}; \&\& \node (tp2) {$2$}; \\[-1ex]
@@ -73,6 +69,7 @@ \section{The section}
7369
This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example. This is my example.
7470
\end{example}
7571

72+
% todo tikz left color see https://github.com/brucemiller/LaTeXML/issues/1168
7673
% this happens alot
7774
%\begin{tikzpicture}[x=.3cm,y=.3cm,>=stealth]
7875
%\begin{scope}[xscale=2]
@@ -120,14 +117,18 @@ \section{The section}
120117
\end{tikzpicture}
121118
\end{center}
122119

123-
% this works fine
120+
% this works fine; I just want an index to make sure that shows correctly
124121
At one point we define $a_\mathrm{T}$
125122
\index{at@$a_{\mathrm{T}}$}\index{unit tangent vector!at@$a_{\mathrm{T}}$}%
126123

127124
\printexercises{exercises/14_04_exercises}
128125

129126
\appendix
130127

128+
\showans\answrite
129+
% showans will write the contents of Calculus.answers to the log
130+
% in latexml, this needs to happen before closing
131+
131132
\printsolutions{Standalone Solutions To All Problems}
132133

133134
\printindex

0 commit comments

Comments
 (0)