"Section 1." instead of "Section 1" (dot after "1")

"Section 1." instead of "Section 1" (dot after "1")

Post by Susanne Rogi » Tue, 11 Oct 1994 21:57:29



What do I have to do to get "Section 1." instead of
"Section 1" ?
Also I want "Theorem 1.1." instead of "Theorem 1.1".

I already tried:
\def\thesection{\arabic{section}.}
which works fine when I use \section.
But then I also get "Theorem 1..1"
when I use the theorem environment.

Any hints are appriciated.
Regards,
Susanne

 
 
 

"Section 1." instead of "Section 1" (dot after "1")

Post by Robin Fairbair » Thu, 13 Oct 1994 08:52:56




>What do I have to do to get "Section 1." instead of
>"Section 1" ?
>Also I want "Theorem 1.1." instead of "Theorem 1.1".

>I already tried:
>\def\thesection{\arabic{section}.}
>which works fine when I use \section.
>But then I also get "Theorem 1..1"
>when I use the theorem environment.

The problem is you're not being bold enough.  You also need:

  \renewcommand\thesubsection{\thesection\arabic{subsection}.}

(and so on), and

  \renewcommand\thetheorem{\thesection\arabic{theorem}.}

(and so on).

The problem with all this is that the numbers with trailing full stops
carry over into the labels and hence appear whenever you \ref.  This
may be OK for you, but I would _hate_ it...
--

U of Cambridge Computer Lab, Pembroke St, Cambridge  CB2 3QG, UK
Private page: http://www.cl.cam.ac.uk/users/rf/robin.html

 
 
 

"Section 1." instead of "Section 1" (dot after "1")

Post by Steve Smi » Fri, 14 Oct 1994 23:02:13




> >What do I have to do to get "Section 1." instead of
> >"Section 1" ?
> >Also I want "Theorem 1.1." instead of "Theorem 1.1".

> >I already tried:
> >\def\thesection{\arabic{section}.}
> >which works fine when I use \section.
> >But then I also get "Theorem 1..1"
> >when I use the theorem environment.

> The problem is you're not being bold enough.  You also need:

> \renewcommand\thesubsection{\thesection\arabic{subsection}.}

> (and so on), and

> \renewcommand\thetheorem{\thesection\arabic{theorem}.}

> (and so on).

> The problem with all this is that the numbers with trailing full stops
> carry over into the labels and hence appear whenever you \ref.  This
> may be OK for you, but I would _hate_ it...

The answer is to redefine LaTeX's section and theorem formatting

% From latex.tex



%%% Before:




        \begingroup #6\relax

        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline

                      \protect\numberline{\csname the#1\endcsname}\fi
                    #7}\else


                      {#7}\addcontentsline

                             \protect\numberline{\csname the#1\endcsname}\fi
                       #7}}\fi



      \item[\hskip \labelsep{\bf #1\ #2\ (#3).}]\it}

Steven Smith

 
 
 

"Section 1." instead of "Section 1" (dot after "1")

Post by Donald Arsene » Thu, 13 Oct 1994 09:01:00





>>I already tried:
>>\def\thesection{\arabic{section}.}
>>which works fine when I use \section.
>>But then I also get "Theorem 1..1"
>>when I use the theorem environment.
>The problem is you're not being bold enough.  You also need:

>  \renewcommand\thesubsection{\thesection\arabic{subsection}.}
>  \renewcommand\thetheorem{\thesection\arabic{theorem}.}
>(and so on).

>The problem with all this is that the numbers with trailing full stops
>carry over into the labels and hence appear whenever you \ref.  This
>may be OK for you, but I would _hate_ it...

The problem is you're not being bold enough.  You also need:

\newtheorem{assertion}{I assert}[section]

\def\thesection{\arabic{section}.}

\renewcommand\thesubsection{\thesection\arabic{subsection}.}

\def\theassertion{\thesection\arabic{assertion}.}


 
 
 

"Section 1." instead of "Section 1" (dot after "1")

Post by Susanne Rogi » Fri, 21 Oct 1994 01:15:48


Last week I was asking what I should do to get
"Section 1." instead of "Section 1" (dot after "1")
and also "Theorem 1.2." instead of "Theorem 1.2".
I received several hints to solve the problem using
*2.09 and using latex2e. A big thanks to all who
replied. I will enclose my current solution for*2.09
and latex2e

Thanks again.
I am really astonished that I received so many hints to my problem.
This is a very good newsgroup. Keep up the good work.

Regards,
Susanne

%%%%%%%%%%%%%%%%%%%%  latex2e  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape}

       \item[\hskip \labelsep{\bfseries #1\ #2.\ (#3)}]\itshape}

%%%%%%%%%%%%%%%%%%%%  latex2e  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%  latex 2.09  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%






        \begingroup #6\relax

        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline

                      \protect\numberline{\csname the#1\endcsname}\fi
                    #7}\else


                      {#7}\addcontentsline

                             \protect\numberline{\csname the#1\endcsname}\fi
                       #7}}\fi



      \item[\hskip \labelsep{\bf #1\ #2\ (#3).}]\it}

%%%%%%%%%%%%%%%%%%%%  latex 2.09  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%