5

EDIT: Question solved. Answer below.

I would like to be able to do this sort of thing with my examples:


1 Mathematical Logic

Theorem 1.1 blahblah

Definition 1.2 blahblah

Theorem 1.3 blahblah

Example 1.3.1

Example 1.3.2

Definition 1.4


where the examples are "associated" with that theorem. They don't actually have to be linked together - just want the numbering to look like that.

Here's a MWE

\documentclass[a4 paper,11pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[pdftex]{graphicx}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage{dsfont}
\usepackage{amsthm}
\usepackage[usenames, dvipsnames]{xcolor}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{mathrsfs}
\newcommand{\spacing}[1]{\phantom{space}}
\newcommand{\tourlakislogic}[1]{\textcolor{NavyBlue}{\footnotesize Source: George Tourlakis -  \emph{Mathematical Logic} (2008)} \vspace{4 mm} \normalsize}

\title{Foundations}
\author{Chris Middleton}

\begin{document}
\maketitle

\newtheorem{thm}{Theorem}[section]

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}

\newtheorem{axiom}[thm]{Axiom}

\theoremstyle{remark}
\newtheorem*{rmk}{Remark}

\theoremstyle{definition}
\newtheorem*{exmpl}{Example}

\section{Mathematical Logic}

\begin{defn}[alphabet]
\label{alphabet}
We denote by $\mathcal{V}$ the \textbf{alphabet} consisting of

(A1) symbols for \textbf{Boolean variables} $$ p, q, r, \ldots $$
(A2) symbols for verum (true) and falsum (false), respectively $$\top \text{ and } \bot$$
(A3) brackets $$( \text{ and } )$$
(A4) Boolean \textbf{connectives} $$\neg, \wedge, \vee, \rightarrow, \equiv$$
We will use boldface letters \textbf{p} and \textbf{q} to stand for variables in formulas in which one could substitute any number of actual variables in their place.
\end{defn} 

\tourlakislogic \spacing

\begin{rmk}
We will say "variables" in place of "symbols for variables".
\end{rmk}

\spacing

\begin{defn}[string]
We call a \textbf{string} (or word or expression), over a given alphabet, any ordered sequence of the alphabet's symbols, written adjacent to each other without any visible separators (such as spaces, commas, etc.).
\end{defn}

\tourlakislogic \spacing

\begin{exmpl}
$aabba$ is a string of symbols over the alphabet $\{a,b,c,0,1,2,3\}$. Note that not all symbols in the alphabet need be used.
\end{exmpl}

And here's what it currently looks like: screenshot

7

Yes; declare example as \newtheorem{exmpl}{Example}[thm]; then it will be "numbered subordinately" to the thm counter, which all your theorems follow. It would have been more difficult if you had wanted the theorem types numbered independently but the examples to follow the previous theorem's numbers regardless.

2
%\newtheorem*{exmpl}{Example}
\newtheorem{exmpl}{Example}[thm]

should be enough.

  • 1
    Thanks! You both had the right answer - just checking Ryan's since it has a little more explanation in case anyone else wanders onto this page. – AmadeusDrZaius May 11 '13 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.