Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
168 lines (124 sloc) 4.58 KB
% % The Default OLP Theorems File `open-logic-envs.sty`
% % OpenLogic Project
%
% Description
% ===========
%
% This file contains all theorem and other environments that are meant to
% be configured, changed, or adapted by a user generating their own
% text based on OLP text. **Do not edit this file to customize your
% OLP-derived text!** A file `myversion.tex` adapted from
% `open-logic-complete.tex` (or from any of the contributed example
% master files) will include `myversion-thm.sty` if it exists, and
% otherwise will include this file. So if you'd like to make changes,
% instead **copy this file to `myversion-config.sty` and edit for
% customization**.
\NeedsTeXFormat{LaTeX2e}
% Theorem-like Environments
% -------------------------
% Theorem-like environments are provided for theorem (`thm`),
% definition (`defn`), lemma (`lem`), proposition (`prop`), corollary
% (`cor`), example (`ex`), problem (`prob`), remark (`rem`), and
% convention (`conv`). The definitions make use of the `thmtools`
% package. To change the numbering or style of these environments,
% adjust their definitions. Refer to the [`thmtools`
% documentation](http://www.ctan.org/pkg/thmtools).
\declaretheorem[
style=plain,
name=Theorem,
numberwithin=chapter]{thm}
\declaretheorem[
style=definition,
name=Example,
sibling=thm]{ex}
\declaretheorem[
style=plain,
name=Lemma,
refname={Lemma,Lemmata},
sibling=thm]{lem}
\declaretheorem[
style=plain,
name=Proposition,
sibling=thm]{prop}
\declaretheorem[
style=plain,
name=Corollary,
refname={Corollary,Corollaries},
sibling=thm]{cor}
\declaretheorem[
style=definition,
name=Definition,
sibling=thm]{defn}
\declaretheorem[
style=definition,
name=Problem,
numberwithin=chapter]{prob}
% A wrapper to allow problems with tags, use \begin{probtag}{tags}
\newenvironment{probtag}[1]{\begin{prob}}{\end{prob}}
\declaretheorem[
style=remark,
name=Remark]{rem}
\declaretheorem[
style=remark,
name=Note]{note}
\declaretheorem[
style=remark,
name=Case]{case}
\declaretheorem[
style=remark,
name=Convention]{conv}
% These are the names of the environments that `\cref` adds
% automatically. `thmtools` should do that as well, but sometimes it
% doesn't work, so we set them explicitly. Redefine, e.g., if you
% want references to "Prop. 5.4"
\crefname{thm}{Theorem}{Theorems}
\crefname{ex}{Example}{Examples}
\crefname{defn}{Definition}{Definitions}
\crefname{lem}{Lemma}{Lemmata}
\crefname{prop}{Proposition}{Propositions}
\crefname{prob}{Problem}{Problems}
\crefname{rem}{Remark}{Remarks}
\crefname{figure}{Figure}{Figures}
% Other Enviroments
% -----------------
% OLP texts make use of a number of environments to encapsulate types
% of discursive text. By default, these environments simply print
% their content without any special treatment. If you want to typeset
% any of them differntly, you can change the definition of the
% environment here. E.g., you might want digressions in asmaller font
% and indented. Refer to the \LaTeX\ documentation for how to
% accomplish this.
% OLP will provide two custom mechanisms for treating environments:
% supressing and deferring. Environments can be supressed by
% redefining them as the `comment` environment. For instance, to not
% print any digressions at all, add the lines
% ```
% \let\digress\comment
% \let\enddigress\endcomment
% ```
% after the definition of `digress`.
% - `explain`: Any long and/or informal explanation that's useful for
% novice readers but could be left out
\newenvironment{explain}{}{}
% - `intro`: for comments and comparisions to other introductory
% texts, e.g., regarding terminology, conventions, or proof methods.
\newenvironment{intro}{}{}
% - `pedantic`: for pedantic comments which users may want to exclude.
\newenvironment{pedantic}{}{}
% - `digress`: for digressions
\newenvironment{digress}{}{}
% - `history`: for historical notes and remarks
\newenvironment{history}{\paragraph{Historical Remarks}\par}{}
% - `reading`: for further reading
\newenvironment{reading}{\paragraph{Further Reading}\par}{}
% - `editorial`: for editorial remarks, warnings about missing parts, etc.
\newenvironment{editorial}{\begin{framed}}{\end{framed}}
\excludeenv{editorial} % exclude editorial remarks by default
% - `defish`: for definition-like material, e.g., rules
\newenvironment{defish}{\begin{oframed}\noindent}{\end{oframed}}
% - `derivation`: for derivations, a tabular environment with three
% colums for line number, formula, and justification.
\newenvironment{derivation}{%
~\begin{trivlist}
\item\begin{tabular}{@{}rll@{}}}{
\end{tabular}\end{trivlist}}