numbering claims/theorems

2,065 views
Skip to first unread message

onewiki

unread,
Mar 26, 2011, 3:20:15 PM3/26/11
to LaTeX Users Group
Hi,
I was wondering if there is a way to create something like "Claim
1' ", "Assumption 2' ". I know how to create the standard ones like
"Assumption 2 ", but how to add the apostrophe? Thanks.

Peter Flynn

unread,
Mar 27, 2011, 4:28:15 PM3/27/11
to latexus...@googlegroups.com

Are these to work as floats, environments, or simple commands like \theorem?
Assuming the last:

\documentclass{article}
\newtheorem{assumption}{Assumption}
\renewcommand{\theassumption}{\arabic{assumption}$^\prime$}
\begin{document}
Stuff
\assumption That all cats are grey at dusk.
First catch your cat\dots
\end{document}

///Peter

Randy Silvers

unread,
Mar 29, 2011, 3:24:10 AM3/29/11
to latexus...@googlegroups.com
I would like to do something similar except a ":" after the number (counter value). The problem w/ the solution is that now when referencing the theorem, the number AND punctuation appear.

How to have

\begin{theorem}
1st stuff
\label{thm:1ststuff}
\end{theorem}

appear as 

"Theorem 1: 1st stuff"

and then

"As in Theorem \ref{thm:1ststuff}, "

appear as

"As in Theorem 1,"

and not as

"As in Theorem 1:,"

Thanks
Randy


Envoyé de mon iPhone
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.

Peter Flynn

unread,
Mar 29, 2011, 10:37:23 AM3/29/11
to latexus...@googlegroups.com
On Tue, Mar 29, 2011 at 8:24 AM, Randy Silvers <rgarth...@gmail.com> wrote:
I would like to do something similar except a ":" after the number (counter value). The problem w/ the solution is that now when referencing the theorem, the number AND punctuation appear.

How to have

\begin{theorem}
1st stuff
\label{thm:1ststuff}
\end{theorem}

What packages or classes are you using? Your example is invalid.
! LaTeX Error: Environment theorem undefined.
 
Or do you mean you want a new environment called theorem?
That's going to need deep surgery because there is already a command called \theorem.
But you could call it something else like thm...

appear as 

"Theorem 1: 1st stuff"

and then

"As in Theorem \ref{thm:1ststuff}, "

appear as

"As in Theorem 1,"

and not as

"As in Theorem 1:,"

\documentclass{article}
\usepackage{varioref}
\newcommand{\theoremname}{Theorem}
\newcounter{thm}
\newenvironment{thm}{%
  \par\medskip\refstepcounter{thm}%
  \noindent\textbf{Theorem \thethm:}\quad}{\par\medskip}
\labelformat{thm}{\theoremname~#1}
\begin{document}
Stuff
\begin{thm}

1st stuff
\label{thm:1ststuff}
\end{thm}
As in \vref{thm:1ststuff}
\end{document}

///Peter

onewiki

unread,
Apr 2, 2011, 6:50:59 PM4/2/11
to LaTeX Users Group
Peter, it works beautifully. Thanks a lot.

A further note, if one needs to do this for one but not all
assumptions, then move \renewcommand{\theassumption}
{\arabic{assumption}$^\prime$} from the preamble to somewhere before
that assumption.

Randy Silvers

unread,
Apr 6, 2011, 4:57:52 AM4/6/11
to latexus...@googlegroups.com
Hi Peter,

Thanks for this. It mostly works for what I want: the format of "Theorem 1: Theorem Title" is perfect and the theorem is referenced as "1" instead of "1:"

However, your solution uses "newcommand" followed by "newcounter" and "newenvironment" and results in "Theorem 1: Theorem Title" being indented.

I would prefer that this not be indented at all. I have tried to omit "\par" or "\medskip" but to no avail.

I have been using "newtheorem" in the theorem package where

\newtheorem{proposition}{Proposition}
\renewcommand{\theproposition}{\arabic{proposition} :}

gives the same spacing except that when it is referenced, the ":" is included.

Thanks,
Randy

--
Reply all
Reply to author
Forward
0 new messages