Page LayoutParagraph numbering

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
ankscorek
Posts: 7
Joined: Sat May 15, 2010 9:18 am

Paragraph numbering

Post by ankscorek »

Hi friends

I am using Kile and i need to use a customised para number

for that i am doing

Code: Select all

\renewcommand\theparagraph{\arabic{paragraph}}
The output is
1 someparagraph starts
2 Another paragraph starts
However i want the ouput like
1. somepara starts
2. another para starts
Please note that the arabic numbers used for numbering the paragraphs are not in bold and it is followed by a "dot."

Incase i want to use a sub para then what should i do
1. This is the main para starting
(a) Sub para starting.....

The sub para numbering (a) to start from below T of the word "This."
i tried enumerate..but the problem is that it has to come like a para. In enum the new line does not begin from below the number as in it does in a paragraph.

Please help!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph numbering

Post by localghost »

For your purpose the enumerate environment seems to be the better solution.


Best regards and welcome to the board
Thorsten
ankscorek
Posts: 7
Joined: Sat May 15, 2010 9:18 am

Re: Paragraph numbering

Post by ankscorek »

The enumerate enviornment is ok but the alignment of the lines in it is a bit problematic

however i want the alignment to be

1. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

i already mentioned it in my post..

please any suggestions to change the enum enviornment to a para style
Last edited by ankscorek on Sat May 15, 2010 12:25 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph numbering

Post by localghost »

I just forgot to mention the enumitem package.
ankscorek
Posts: 7
Joined: Sat May 15, 2010 9:18 am

Re: Paragraph numbering

Post by ankscorek »

Hey Thanks for the enumitem package but it is giving me "enumerate like paragraphs."

i want the enumerate items to be like paragraph

1. This is a paragraph style
which starts from underneath
"1."
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph numbering

Post by localghost »

It can't do any harm to read the package manual.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{enumitem}
\usepackage{blindtext}

\begin{document}
  \begin{enumerate}[fullwidth]
    \item \blindtext
    \begin{enumerate}[fullwidth]
      \item \blindtext
    \end{enumerate}
    \item \blindtext
    \item \blindtext
  \end{enumerate}
\end{document}
ankscorek
Posts: 7
Joined: Sat May 15, 2010 9:18 am

Paragraph numbering

Post by ankscorek »

Oh My God

Ghost thanks for the help

I was in the midst of reading the package manual when your brilliance helped me out.

Thanks it surely does work

and i hope the nested enviornment will also work

Code: Select all

\begin{center}
 \textbf{\underline{INTRODUCTION}}
\end{center} \vspace{0.2in}
Will this also fit in the enumerate enviornment...means i dont want to add this as an \item in the enum enviornment
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph numbering

Post by localghost »

ankscorek wrote:[...]

Code: Select all

\begin{center}
 \textbf{\underline{INTRODUCTION}}
\end{center} \vspace{0.2in}
Will this also fit in the enumerate enviornment...means i dont want to add this as an \item in the enum enviornment
I don't understand what you mean. It might help if you describe what you are aiming at.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{enumitem}
\usepackage{blindtext}

\begin{document}
  \begin{center}
    \textbf{\underline{INTRODUCTION}}
  \end{center}

  \bigskip
  \begin{enumerate}[fullwidth]
    \item \blindtext
    \begin{enumerate}[fullwidth]
      \item \blindtext
    \end{enumerate}
    \item \blindtext
    \item \blindtext
  \end{enumerate}
\end{document}
ankscorek
Posts: 7
Joined: Sat May 15, 2010 9:18 am

Paragraph numbering

Post by ankscorek »

Ok here it is ..

in ur above quote the sub-para 1 (a) should be

Code: Select all

\begin{enumerate}[label=(\alph*),labelindent=\parindent,leftmargin=*]
The problem is that this sub para is not coming in this format

1. xxxxxxxxxxx xxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx
(a) xxxxxxxxxxxxxxxxxxx
xxxxxx.

then new line should start below (a) however even if i add fullwidth the problema remains same.

Code: Select all

\item \ \ \ \textbf{\underline{Architecture.}} \ \ \ The salient aspects of the architecture are as mentioned below :-
%\begin{enumerate}[fullwidth]
  
 
\begin{enumerate}[label=(\alph*),labelindent=\parindent,leftmargin=*]
 \item Device Driver on the host.
\item Calibration, Applications and Monitoring tools are provided.ankush ankush ankush ankush 
                                                                                                             
\item Baseband software contains:-\begin{enumerate}[label=(\roman*),fullwidth]
                                   \item Scheduler.
                                   \item Medium Access Controller and Physical, Radio Frequency Driver and Host Interface.
                                  \end{enumerate}

\end{enumerate}
In this code roman sub sub para is the way i want it to happen.However alpha sub para is not coming proper
ankscorek
Posts: 7
Joined: Sat May 15, 2010 9:18 am

Paragraph numbering

Post by ankscorek »

ok here is exactly what i have been looking for

Code: Select all

\documentclass[12pt,a4paper]{article}
%\setcounter{secnumdepth}{5}
\renewcommand\theparagraph{\arabic{paragraph}}
\thispagestyle{empty}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{enumitem}
\usepackage[pdftex]{graphicx}

\newenvironment{correct}%
{\noindent\ignorespaces}%
{\par\noindent%
\ignorespacesafterend}


\begin{document}


%\fancyhead{}
%\fancyfoot{}
\fancyhead[C]{\thepage}
%\fancyhead[C]{---Draft---} 
%\renewcommand{\footrulewidth}{0pt}}
\renewcommand{\headrulewidth}{0pt}
%\headrulewidth 0 pt
\begin{enumerate}[labelindent=\parindent,leftmargin=*,itemindent=\parindent,fullwidth]
 \item aasasasasasasasasa


\begin{enumerate}[label=(\alph*),leftmargin=*,labelwidth=17pt,itemindent=18pt]
 \item Device Driver on the host.
\item Calibration, Applications and Monitoring tools are provided ankush ankush ankush ankush. 
                                                                                                             
\item Baseband software contains:-\begin{enumerate}[label=(\roman*),listparindent=5pt,itemindent=20pt]
                                   \item Scheduler.
                                   \item Medium Access Controller and Physical, Radio Frequency Driver and Host Interface.
                                  \end{enumerate}

\end{enumerate}



\end{enumerate}

\end{document}
This seems to do the job for me...only one small hitch with the roman numerals ie with (i)(ii)...

if u notice the )and ) of (i)and(ii) are in a straight line...whereas i need (and( of (i)and(ii) in a a straight line

Can someone help me with the alignment please
Post Reply