Default value of Section in Latex

In summary: It is also much more powerful than the standard equation editor found in MS Word. It is also the standard for math and physics publications.I'm in NH and it is 8:34pm.Good luck on your report. Keep using LaTeX, it'll be worth it in the end.In summary, the conversation was about a user seeking help with converting Word documents to LaTeX format and changing the default value of the section in LaTeX. A summary of the conversation includes the user's request for help with the default value, suggestions to use subsections, and tips for labeling equations. The conversation ends with the user expressing gratitude and the expert summarizer sharing their experience
  • #1
msoni
6
0
Hello People!

Im new to this forums and didnt really found a specific thread on Latex help.
Im trying to convert word documents into Latex format.

Im a novice in this topic.. was wondering if anyone can help me out.

I have a problem in changing the default value of Section in Latex.
By default it assigns 1 to the first section defined in Latex. How do I change the default value, say from 1 to 1.3.

I would appreciate any help in this regard.

Thanks Much,
Soni.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
\setcounter{subsection}{2}

the 1 comes from the section tag

the .3 comes from the subsection tag

if you set the subsection couter to 2 then then next time you use the subsection tag it will display as three. I'm sure there's another way to do it, but I've always used the above.

Good luck.
 
Last edited:
  • #4
Hey Thanks..
Those links really help...
Still not able to fix that problem I am trying :confused:
 
  • #5
If I'm reading your question correctly then this should have worked:

Code:
\begin{document}

\section{Some Section}
\setcounter{subsection}{2}
\subsection{Some subsection starting at 1.3}

\end{document}

Are you using subsections?
 
  • #6
No no...
Im not using any subsections...
Its the section no. which I want to name it is 1.3

say..

\begin{document}
...
\section{some section title which is 1.3}

after it compile it should print as

" 1.3 Multi dimensional arays"

there are no subsections involved.

Actually this is kinda heading...


I could have just coded as bold font and using :
\textbf{1.3\qquad Multiplication of Vectors by Numbers}

But I don't want to do it that way. If I come across many such headings numbered in similar way in one page... say 1.3, 1.4, 1.5... How do I chage the default section number from 1 to 1.3 and for subsequent sections it can increment as 1.4... 1.5
Those are not subsections! I am using them as sections!


Thanks
 
Last edited:
  • #7
You can't. You can surpress sections and use subsections to number 1.3, 1.4, ... 1.n like this:

\begin{document}
\setcounter{section}{1}
\section*{}
\setcounter{subsection}{2}
\subsection{Label this}
\end{document}

You need to use subsections to append the numbering after the initial chapter section.

Here, this is a section from my dynamics notes:

Code:
%Chapter 13
\setcounter{section}{12}
\newpage
\section{Kinetics of a Particle: Force and acceleration}
\subsection{Newton's Law of Motion}
\begin{itemize}
\item 
\end{itemize}
\subsection{The Equation of Motion}
\begin{itemize}
\item 
\end{itemize}
\subsection{Equation of Motion for a System of Particles}
\begin{itemize}
\item 
\end{itemize}
\subsection{Equation of Motion: Rectangular Coordinates}
\begin{itemize}
\item 
\end{itemize}
\subsection{Equation of Motion: Normal-Tangential Coordinates}
\begin{itemize}
\item 
\end{itemize}
\subsection{Equation of Motion: Cylindrical Coordinates}
\begin{itemize}
\item 
\end{itemize}
\subsection{Central-Force Motion and Space Mechanics}
\begin{itemize}
\item 
\end{itemize}

If you compile the above you will see the output is:

13 Kinetics of a Particle: Force and acceleration
13.1 Newton's Law of Motion
13.2 The Equation of Motion

etc.

Trust me, use the subsections because the compiler knows how to handle them already and it will format everything for you. Compile my dynamics notes (minuse the notes that is) and see what I mean. If you want to surpress the "13 Kinetics of a Particle: Force and acceleration" then use this:

\section*{}
 
  • #8
Awesome! Got it now! Looks like you have worked a lot in Latex...

More I am into it.. the more interesting it becomes.

Next I am having some issues labelling equations ..
I have used \begin{eqnarray}
But the compiler is giving some wiered errors..
will try for some more time.. elz you will
have to come for rescue again! :wink:

Anyways thanks a lot..
going to bed now...its 3:00am now.. I am in Tampa FL
how abt you??
 
  • #9
Im trying to label these equations as 1.1 and 1.2 When I compile the code I get this error mssg:

! Extra Alignment tab has been changed to\cr
<template> \egroup\endtemplate


what does this mean and how do i fix it??



(s + t)A = sA + tA​
s(A + B) = sA + sB​
 
  • #10
Ohhh, linear algebra notes huh?

Add this line somewhere before your \begin{document}:
Code:
\newtheorem{eqn}{Equation}[section]
You probably have a two or three line block below the page layout section and prior to the title section if you're using a latex template (that's where I've seen it with most LaTeX templates).

You can actually place it immediately before the first call of it but try not to do that because you'll be forced to scan the entire doc if you decide to change it.

To get rid of the word "Equation" simply use this:
Code:
\newtheorem{eqn}{}[section]

Ok, to actually use the above do this:
Code:
\begin{eqn}
$(s + t)A = sA + tA$
\end{eqn}
\begin{eqn}
$s(A + B) = sA + sB$
\end{eqn}
Viola numbered equations.

Good luck.
 
Last edited:
  • #11
msoni said:
Awesome! Got it now! Looks like you have worked a lot in Latex...

More I am into it.. the more interesting it becomes.

Next I am having some issues labelling equations ..
I have used \begin{eqnarray}
But the compiler is giving some wiered errors..
will try for some more time.. elz you will
have to come for rescue again! :wink:

Anyways thanks a lot..
going to bed now...its 3:00am now.. I am in Tampa FL
how abt you??

I've used LaTeX a bit more than the average person I'd say. I'm not a professional typesetter by any means but I can put some good looking stuff together with the help of LaTeX. If you can type fast the LaTeX is definately the fastest way to put together a good report. Typing {\bf yadda yadda yadda} is much faster than than using the mouse to select bold font but not quite as fast as ctrl-B. LaTeX typesetting shows its worth when presenting a document with a lot of equations and graphs. Yyping an equation into LaTeX is about 40x faster than using equation editor. Add GNUPlot and use EMACS as your environment then you'll be cruising along. I prepared a physics experiment report for my physics class a few semesters back in the time it took the other students and mine was more than twice as long. LaTeX does most the work for you so you save time instead of fighting with word trying to get data into a table in the correct location. Oh, and if you really want to impress your professor, just drop
Code:
\maketitle
\begin{abstract}The following document was typeset using the \LaTeX\ typesetting evironment.\end{abstract}
\newpage
\tableofcontents
\newpage
below the \begin{document} tag.

Detroit BTW.

Well, good luck. Keep practicing the latex.
 
  • #12
Im trying to enumerate starting from say.. 9 till 15, instead starting from 1 which is default.
I used \usepackage{enumerate} in the declerations and
while enumerating..
\begin{enumerate}[9.]
\item...
\item...
...
...
\end{enumerate}

Insteading of numbering 9 10 11 it either numbers all the points as 9 or at times increments 10 in no. as.. 9 19 29..


where am I going wrong? :confused:
 
  • #13
\begin{enumerate}
\item[9.]some stuff here
\item[10.]some more stuff here
\end{enumerate}
 

1. What is the default value of the section in Latex?

The default value of the section in Latex is \section{title}, which creates a numbered section with a title in the document.

2. Can the default value of the section be changed?

Yes, the default value of the section can be changed by redefining the \section command in the Latex document or by using a package such as titlesec.

3. How can I add a title to a section in Latex?

To add a title to a section in Latex, use the command \section{title}, where "title" is the desired title for the section. This will create a numbered section with the given title in the document.

4. What if I don't want my sections to be numbered in Latex?

If you do not want your sections to be numbered in Latex, you can use the command \section*{title} instead of \section{title}. This will create an unnumbered section with the given title.

5. Can I customize the formatting of my sections in Latex?

Yes, you can customize the formatting of your sections in Latex by using a package such as titlesec or by redefining the \section command. This allows you to change the font, size, and style of your section titles.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
9K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
272
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
31K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
Back
Top