Making your own Open Logic Textbook

I’ve started teaching Phil 310 (Intermediate Logic) at McGill, and am using the OLP for the first time myself.  Here’s what I’ve done so far to adapt it for my class.

The standard, complete compile is of course intended just as a record of what’s in the text, and isn’t meant to be used by itself. So I’ve made separate “driver” LaTeX files that includes only what I want to be in the text, in the order I want it, and with the conventions, notation, formatting I want.  It’s on my github. In order to compile, it has to be placed in the right location. If you want to follow along, find the courses/ subdirectory of your own clone of the complete OLT, and then clone/download to phil310 repository there.  There should now be a subdirectory courses/phil310/ that contains the files.

phil310-letter.tex is the file you want to run through pdflatex to produce a PDF of the book.  There’s also a version phil310-ebook.pdf formatted for on-screen reading. It’ll change as I add more content to it, and clean it up as I go along.  But it’ll always have the following ingredients:

Layout setup. I’m using the memoir class with letterpaper option, and then some font selection packages (mathpazo for Palatino and Palatino math fonts, helvetica for Helvetica sans-serif). You could include all kinds of customization using memoir’s commands here, from the way chapter headings are styled, to page layout, etc.

You have to tell OLP where to find all the texts, in this case, two directories up:


You also have to include all the OLP commands.


The file open-logic.sty also includes the definitions of all theorem and other environments (it lives in \olpath/open-logic-envs.sty). If you wanted to change these, you would copy the entire file into this directory and name it phil310-envs.sty. If this file exists in the current directory, it will be loaded instead of the default.

Right now the mechanism for making problems appear not in the text, but at the end of a chapter isn’t working right yet.  Until it does, I have a bunch of commands in here that move problems to an appendix, with headers per chapter.

Then comes the content itself, after \begin{document}. First, a title page, a table of contents, and a preface (which is essentially the content of my course outline) which is included from preface.tex.

The actual content of the book goes between \mainmatter and \endmatter. For now, I’m just including entire parts, but I’ll probably be more selective as the course goes on.  Instead of including an entire part


you could include just a chapter


or even every section individually. If you do that, you might also include your own \part and \chapter commands. You can add you own content here as well, either directly in the file or using simple \include‘s if your files live in this directory, or \olimport if you’ve added files to the directory tree of your local OLT clone.  You can also put the \olimport‘s into separate files which you then \include in the main file. This way, you can use \includeonly in the preamble to produce a PDF of only part of the book, but with page numbering etc. consistent with a full version–useful if you want to pass out reading materials as the course progresses.

Customization of tokens, symbols, and setting up selective compilation is done in phil310-config.sty, which is loaded in addition to, and after the default \olpath/open-logic-config.sty.  So here, only include things you want to be different from the defaults.  So far I’ve just changed the truth values to T and F from 1 and 0, made ↔ a defined operator, and set it up so that when there are proofs by induction on formulas, the cases for ∧ and ∀ are left as exercises.