Open source books

23 views
Skip to first unread message

Rob Beezer

unread,
Jan 9, 2010, 1:23:10 AM1/9/10
to Course Notes In Numerical Analysis
(I sent this by email last night, but it never made it, since I sent
it from the wrong email account. So here is for posteriety.)

I've joined the Google Group and am including posting this there, so
I'll reply-all this time so everybody knows its there, and just
continue conversations in the group from now on without all the
emails.

Thanks to Steven for making his text available and for so quickly and
easily putting some infrastructure in place.

I don't teach numerical analysis, so I'm unlikely to be a serious
contributor. But I'd love to see more information about Sage's
numerical capabilities in a form undergraduates can use, and I'm very
interested in supporting open textbooks in mathematics. See our draft
grant proposal to the National Science Foundation that just got posted
in the sage-edu Google Group. So I'll help as I can.

I designed my open linear algebra textbook (linear.ups.edu) to be
really customizable from the very beginning. Steven has already dug
around in my sources and figured out what's up. Here's the requested
brain-dump, or maybe its a brain-dribble.

I have lots of LaTeX boolean switches around to control appearance
(one-sided, two-sided), to control content (solutions to exercises, or
not), to control placement (exercises at the very end of the book,
exercises at the end of each chapter). For a "user" they can edit one
file that specifies some or all of these switches and some numerical
values (like print margins). I call this an "edition file." Edit
one, or make a new one, it gets sucked into the laTeX preamble and
stuff happens.

For this project, the best example is what I call "computational
notes." How do you row-reduce a matrix? On a TI-85 calculator, in
Mathematica, in Sage? The idea is that I would set up a list of
capabilities (row reduce, inverse, eigenvalues, etc) and people would
contribute a suite of explanations for their favorite "device." A
user could include all, some, or none of these devices into their
custom PDF edition (presumably an instructor making an edition for
their course).

The second part of this is inspired by Debian's habit of having users
customize their systems by just dropping files (snippets of
configuration settings) into the right places (directories) and the
system locates them and concatenates them. Ideally you could
implement "computational notes" for a new device by just dropping the
right files (one per capability) into the right place. its not quite
that easy, but close.

Anyway, I do not claim to be any sort of TeX "programming" expert.
But what I have works. Maybe it would be way easier with LuaTeX,
which I understand to be a TeX implementaion with an embeded scripting
language (Lua), that is nearing a stable release (maybe). Within my
sources you can look in "fcla-developer.sty" to see what I've cobbled
together.

"fcla-math.sty" is much more tame - a long list of one-liner macros
for notation. It makes for verbose source, but it makes writing
proofs sort of interesting (theorems say you can commute certain
macros, or not). The real payoff is not user-chosen notation, but
instead much fewer headaches when you move to converting TeX to
MathML, or XML or jsMath, or.... The short-term pain is worth it.
Many a time I shook my head and was glad I'd done it that way.

OK, enough. If anybody wants to see my monster Python build script
that creates 10 or 12 editions from the single source (and theorem/
definition flash cards) just holler.

Rob

Jason Grout

unread,
Jan 9, 2010, 1:45:53 AM1/9/10
to numas...@googlegroups.com
Rob Beezer wrote:
> (I sent this by email last night, but it never made it, since I sent
> it from the wrong email account. So here is for posteriety.)
>
> I've joined the Google Group and am including posting this there, so
> I'll reply-all this time so everybody knows its there, and just
> continue conversations in the group from now on without all the
> emails.
>
> Thanks to Steven for making his text available and for so quickly and
> easily putting some infrastructure in place.
>
> I don't teach numerical analysis, so I'm unlikely to be a serious
> contributor. But I'd love to see more information about Sage's
> numerical capabilities in a form undergraduates can use, and I'm very
> interested in supporting open textbooks in mathematics. See our draft
> grant proposal to the National Science Foundation that just got posted
> in the sage-edu Google Group. So I'll help as I can.
>
> I designed my open linear algebra textbook (linear.ups.edu) to be
> really customizable from the very beginning. Steven has already dug
> around in my sources and figured out what's up. Here's the requested
> brain-dump, or maybe its a brain-dribble.
>

I thought you were going to say how you were originally going to provide
notes for lots of different systems, but then finally just decided to
focus on Sage, since it is freely available and open-source :).


> For this project, the best example is what I call "computational
> notes." How do you row-reduce a matrix? On a TI-85 calculator, in
> Mathematica, in Sage? The idea is that I would set up a list of
> capabilities (row reduce, inverse, eigenvalues, etc) and people would
> contribute a suite of explanations for their favorite "device." A
> user could include all, some, or none of these devices into their
> custom PDF edition (presumably an instructor making an edition for
> their course).
>
>

This reminds me a *lot* of various internationalization/translation
tools that are used in lots of software projects. I wonder if something
already exists in TeX for easily swapping out snippets of text for other
languages.

Thanks,

Jason

--
Jason Grout
jason...@drake.edu

Rob Beezer

unread,
Jan 9, 2010, 2:54:22 AM1/9/10
to Course Notes In Numerical Analysis

> I thought you were going to say how you were originally going to provide
> notes for lots of different systems, but then finally just decided to
> focus on Sage, since it is freely available and open-source :).

That's exactly where I am right now.

> This reminds me a *lot* of various internationalization/translation
> tools that are used in lots of software projects.  I wonder if something
> already exists in TeX for easily swapping out snippets of text for other
> languages.


Hmm, that's an interesting idea.

Steven Pav

unread,
Jan 10, 2010, 4:02:34 PM1/10/10
to numas...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Beezer wrote:

> I have lots of LaTeX boolean switches around to control appearance
> (one-sided, two-sided), to control content (solutions to exercises, or
> not), to control placement (exercises at the very end of the book,
> exercises at the end of each chapter). For a "user" they can edit one
> file that specifies some or all of these switches and some numerical
> values (like print margins). I call this an "edition file." Edit
> one, or make a new one, it gets sucked into the laTeX preamble and
> stuff happens.
>
> For this project, the best example is what I call "computational
> notes." How do you row-reduce a matrix? On a TI-85 calculator, in
> Mathematica, in Sage? The idea is that I would set up a list of
> capabilities (row reduce, inverse, eigenvalues, etc) and people would
> contribute a suite of explanations for their favorite "device." A
> user could include all, some, or none of these devices into their
> custom PDF edition (presumably an instructor making an edition for
> their course).
>
> The second part of this is inspired by Debian's habit of having users
> customize their systems by just dropping files (snippets of
> configuration settings) into the right places (directories) and the
> system locates them and concatenates them. Ideally you could
> implement "computational notes" for a new device by just dropping the
> right files (one per capability) into the right place. its not quite
> that easy, but close.

thanks, Rob for the brain-dump. (I realize I may have referred to you as 'Bob' in
a previous email. I blame the sleeplessness. you can get me back by calling me
'Stephen';) I have copied Rob's fcla-switches.tex into the styfiles/ directory of
numas and have compiled the text using this package; there are now \hassage,
\hasoctave, and \hasmaple switches available for use in the text.

unfortunately, LaTeX does not do the `right' thing with respect to conditional
compilation with the \ifthenelse operator; \ifthenelse can apparently only take
very simple input, and pukes on long paragraphs with things like \begin{verbatim}
in them. I resorted to the very ugly idiom of
\ifthenelse{\boolean{hasoctave}}{\subimport*{./}{some_octave_paragraph}}{}
bleah; possible ways out of this mess:

* something like the C preprocessor, cpp, which would deal with %ifdef HASOCTAVE;
unfortunately this would make the build less portable (not every system has cpp),
and cpp is for C-like languages, so cpp fiddles with whitespace, etc.
* something like m4 to do the same; again, less portable, and perhaps with bizarre
side effects.
* the current system within latex using \ifthenelse and \imports; this means lots
of files all over the place.
* roll my own using perl or python; always a bad choice.
* wait for LuaTex to magically solve the problem. (I cannot find anywhere what
LuaTex is supposed to do other than 'replace pdfTex')

> OK, enough. If anybody wants to see my monster Python build script
> that creates 10 or 12 editions from the single source (and theorem/
> definition flash cards) just holler.

I prefer to let Make do this, simply because I know Make, and it can figure out
dependencies properly. Figuring out how to build multiple editions is another
matter...


cheers,


- --


- --sep


[[ i hate all boets and bainters -- king george i ]]
[[ steven.e.pav Cmrlj Consultants HOME: 415.865.0801 ]]
[[ sp...@alumni.cmu.edu http://scicomp.ucsd.edu/~spav CELL: 415.606.5099 ]]
[[ woman reverie Eire Verna mow ]]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktKQGoACgkQY/oo76N/MCw3xgCfcLwjblzXngwIxF5oL8q8scOc
KSEAoJElxpQlOAxqOJBg9hZ+ZXZSVv3p
=hypC
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages