LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2009, 03:57 PM   #1
jumanjininja
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Rep: Reputation: 0
Numbering sections in Latex


Hi all..

I'm new to LATEX. I want to enter some theorems and corollaries in latex. I learned that it is possible to number them using this statement:

\newtheorem{theorem}{Theorem}[counter]

My question is that if I want to start the numbering the theorems from say 0.35 how will I set the counter to that value. I'm able to set and increment the counter values only by integers and not by float values.

Your help is highly appreciated. Thanks!!
 
Old 08-30-2009, 08:15 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
You should not try to use a fractional, but keep the theorem counter as integer, and precede this counter with another value., like:

Code:
\newcounter{bar}
\newtheorem{law}{Law}[bar]
\begin{law}
It always seems to go wrong
\end{law}
\addtocounter{bar}{2}
\begin{law}
This one is right
\end{law}
Which produces:

Law 0.1 It always seems to go wrong
Law 2.2 This one is right


Alternatively, you can include the chapter or section number as part of you theorem counter:
Code:
\newtheorem{law}{Law}[chapter]
starts with Law 1.1.

See this page: http://www.personal.ceu.hu/tex/counters.htm on counters.

jlinkels
 
Old 09-01-2009, 07:14 PM   #3
jumanjininja
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply. That was useful!
 
Old 09-01-2009, 07:42 PM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
You are welcome and if you press the 'thumbs up' icon in the lower right hand corner of your post, my 'thanked' count increases by one. Thanks!

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LaTeX forum / Where to ask LaTeX questions? max_sipos Linux - Software 2 12-21-2011 12:01 PM
how can I get these sections in Tasksel? kuertensun Debian 1 06-29-2005 08:31 PM
LaTeX commands: texi2pdf, latex, dvipdf kaon Linux - Software 7 01-23-2005 03:32 PM
Linker Sections DylanDylan Linux - General 0 07-19-2004 04:26 AM
New links sections jeremy LQ Suggestions & Feedback 4 01-20-2003 09:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration