Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

definition numbering like the below output, im getting the default numbering only.

1.1 Lemma 1.2. Proposition

how to do this using in latex

coding:

\documentclass[fleqn]{gsm-l}

\usepackage[]{weblink}

\begin{document}

\setcounter{chapter}{0}

\setcounter{section}{0}

\chapter{LINEAR SPACES}

\begin{proposition}

text

\end{proposition}

 \subsection{subsection1}

text

 \begin{lemma}

text
\end{lemma}
\begin{corollary}
 text
\end{corollary}

 \subsection{subsection2}

text

\begin{remark}

 text

\end{remark}

\end{document} 

Output:

Linear Spaces

Proposition 1.0.1. text

1.0.1. Subsection1. text

lemma 1.0.2. text

corollary 1.0.3. text

1.0.2. subsection2. text

remark 1.0.4. text

Expected output:

Linear Spaces

1.0.1. Proposition%its in small caps% text

1.0.2. Subsection1%its in small caps% text

1.0.3. lemma%its in small caps% text

1.0.4. corollary%its in small caps% text

1.0.5. subsection2%its in small caps%. text

1.0.6. Remark%its in small caps% text

without using \newtheorem \newenvironment \theoremstyle \renewcommand

only \newcommand is allowed

weblink

share|improve this question
1  
Under the assumption that this numbering represents <section>.<subsection>.<theorem>, use \renewcommand{\thetheorem}{\thesubsection.\arabic{theorem}}. What about if you have a theorem (or alike) within a section that doesn't have a subsection? –  Werner Aug 23 '13 at 6:18
1  
Can these discussions help? tex.stackexchange.com/q/45817/27635 and tex.stackexchange.com/q/2160/27635 –  karlkoeller Aug 23 '13 at 6:19
    
To avoid further guesswork, can you please provide a minimal working example (MWE) that shows how you define you lemmas and propositions? –  Werner Aug 23 '13 at 11:44

3 Answers 3

up vote 5 down vote accepted

To dfine your theorem-like structures in a consistent way, you can use the amsthm package; the \swapnumbers option gives the numbering and then the title; to get the theorem head in small capitals, you can easily define a new style:

\documentclass{article}
\usepackage{amsthm}
\swapnumbers

\newtheoremstyle{mystyle}
  {\topsep}
  {\topsep}
  {}
  {}
  {\scshape}
  {.}
  {.5em}
  {}
\theoremstyle{mystyle}
\newtheorem{lem}{Lemma}[section]
\newtheorem{pro}[lem]{Proposition}

\begin{document}
\section{Test section one}
\begin{lem}
Your text goes here.
\end{lem}
\begin{pro}
Your text goes here.
\end{pro}
\section{Test section two}
\begin{pro}
Your text goes here.
\end{pro}
\begin{lem}
Your text goes here.
\end{lem}

\end{document}

enter image description here

After the edit to the question, here's an option subject to the imposed constraints: no \newtheoremstyle, no \renewcommand, no \newenvironment (I don't quite understand why these restrictions, specially the one about not using \newenvironment to define environments!; also, weblink uses \newtheorem and \theoremstyle, so why don't you want to use those?):

\documentclass[fleqn]{gsm-l}
\usepackage{weblink}

\let\lemma\relax
\let\corollary\relax
\let\proposition\relax
\let\remark\relax

\newcommand\lemma{%
  \refstepcounter{subsection}%
  \par\noindent\thesubsection.~\textsc{Lemma}.\itshape}
\newcommand\corollary{%
  \refstepcounter{subsection}%
  \par\noindent\thesubsection.~\textsc{Corollary}.\itshape}
\newcommand\proposition{%
  \refstepcounter{subsection}%
  \par\noindent\thesubsection.~\textsc{Proposition}.\itshape}
\newcommand\remark{%
  \refstepcounter{subsection}%
  \par\noindent\thesubsection.~\textsc{Remark}.\itshape}

\begin{document}

\chapter{LINEAR SPACES}

\begin{proposition}
text
\end{proposition}

\subsection{Test subsection one}

text
\begin{lemma}
text
\end{lemma}
\begin{corollary} 
text 
\end{corollary}

\subsection{Test subsection two}
text
\begin{remark}
text
\end{remark}

\end{document}

enter image description here

share|improve this answer
    
hi im edited the post with MWE. can you give me an exact solution –  ravi Aug 24 '13 at 11:00
    
@ravi please see my updated answer. –  Gonzalo Medina Aug 24 '13 at 21:48
    
these are my client restrictions –  ravi Aug 25 '13 at 5:42
1  
@ravi please see my updated answer. –  Gonzalo Medina Aug 25 '13 at 16:04
1  
@ravi please see my updated answer. –  Gonzalo Medina Aug 25 '13 at 18:35
\documentclass{article}
\newcounter{lem}
\newenvironment{lem}{\refstepcounter{lem}\thesection.\thelem~\textsc{Lemma}.}{\\}
\newenvironment{pro}{\refstepcounter{lem}\thesection.\thelem~\textsc{Proposition}.}{\\}
\begin{document}
\section{Section 1}
    This is the examples\\
    \begin{lem}
        Your text go here.
    \end{lem}
    \begin{pro}
        Your text go here.
    \end{pro}
\section{Section 2}
    \begin{pro}
        Your text go here.
    \end{pro}
    \begin{lem}
        Your text go here.
    \end{lem}
\end{document}
share|improve this answer
    
Is it your need? Try it! –  Say OL Aug 23 '13 at 12:33

Try this (or maybe I misunderstood your problem):

\documentclass{article}

\newtheorem{lemma}{Lemma}[subsection] % number within subsections
\newtheorem{propo}[lemma]{Proposition}% reuse number of lemma

\begin{document}

\begin{lemma}{foo}\end{lemma}

\begin{propo}{bar}\end{propo}

\subsection{Subsection}

\begin{lemma}{foo}\end{lemma}
\begin{propo}{bar}\end{propo}
\begin{propo}{bar}\end{propo}
\begin{lemma}{foo}\end{lemma}

\end{document}
share|improve this answer
    
its displays like preposition 0.1... but i need 0.1 Preposition –  ravi Aug 23 '13 at 11:41
    
@Ravi There are no \section commands in the document. That's why the numbering is scr*wed up. –  Marc van Dongen Aug 23 '13 at 12:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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