Commit e11248a4 authored by Niles Johnson's avatar Niles Johnson

Update to fix a subtle conflict between cleveref, hyperref, and amsart

There are numerous ways to solve the conflict -- this one requires no
new packages (e.g. aliascnt) and avoids having to use a pure tex
redefinition of each new environment counter.
parent e8dcb9b8
......@@ -94,6 +94,7 @@
\theoremstyle{plain} % bold environment name, italic text
\newtheorem{thm}{Theorem}[section]
\crefname{thm}{Theorem}{Theorems}
\newtheorem*{thm*}{Theorem}
\clevertheorem{prop}{Proposition}{Propositions}
\newtheorem*{prop*}{Proposition}
......
No preview for this file type
......@@ -160,13 +160,34 @@ have to prerender unicode -- see \texttt{PageSetup.sty}
The cleveref package includes the environment name with the reference,
such as \cref{thm:atheorem}. This is very useful for when you need to
change the environment type of a result. It is clever about
referencing multiple results at once, such as
\cref{thm:atheorem,lem:btheorem,ctheorem,disp1,disp2}.
referencing multiple results at once, using ``and'' or a range where
appropriate. For example, the environments below are
\cref{defn,disp1,disp2,thm:atheorem,lem:btheorem,thm:ctheorem,prop:foo,lem:foo}.
There are all kinds of ways to customize the list formatting; the
package documentation is the best reference.
I generally prefix my labels with the environment type, to help keep
them straight in my mind, but this is unnecessary.
\begin{defn} This is how to define a definition.
Here's an equation
\begin{equation}\label{disp1}
e = mc^2
\end{equation}
This is the best environment to use for displayed diagrams too, so I
have cleveref just call the environment ``Display''.
For multiline equations, use ``\texttt{align}'' or
``\texttt{align*}'':
\begin{align}\label{disp2}
(x + y)^2 & = (x+y) (x+y) \\
& = x(x+y) + y(x+y) \nonumber\\
& = x^2 + xy + yx + y^2
\end{align}
\begin{defn}\label{defn}
This is how to define a definition.
\end{defn}
And for a theorem and its proof you would type:
......@@ -178,29 +199,22 @@ This is the statement of a theorem.
And this shows that the statement is correct.
\end{proof}
\begin{lem}\label{lem:btheorem}
\begin{thm}\label{lem:btheorem}
another theorem. Try changing it to a lemma.
\end{lem}
\end{thm}
\begin{thm}\label{thm:ctheorem}
a third theorem.
\end{thm}
\begin{prop}\label{ctheorem}
\begin{prop}\label{prop:foo}
a proposition
\end{prop}
Here's an equation
\begin{equation}\label{disp1}
e = mc^2
\end{equation}
This is the best environment to use for displayed diagrams too, so I
have cleveref just call the environment ``Display''.
For multiline equations, use ``\texttt{align}'' or
``\texttt{align*}'':
\begin{lem}\label{lem:foo}
a lemma
\end{lem}
\begin{align}\label{disp2}
(x + y)^2 & = (x+y) (x+y) \\
& = x(x+y) + y(x+y) \nonumber\\
& = x^2 + xy + yx + y^2
\end{align}
\section{About text in tex}
......
......@@ -11,7 +11,7 @@
\contentsline {subsection}{\tocsubsection {}{3.3}{Further comments on text}}{3}{subsection.3.3}
\contentsline {subsection}{\tocsubsection {}{3.4}{Punctuation}}{3}{subsection.3.4}
\contentsline {section}{\tocsection {}{4}{TikZ for more complex drawings}}{3}{section.4}
\contentsline {section}{\tocsection {}{5}{todonotes}}{3}{section.5}
\contentsline {section}{\tocsection {}{5}{todonotes}}{4}{section.5}
\contentsline {section}{\tocsection {}{6}{Bibliography}}{4}{section.6}
\contentsline {section}{\tocsection {}{7}{Wait, there's more!}}{4}{section.7}
\contentsline {section}{\tocsection {}{}{Acknowledgments}}{4}{section*.6}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment