Discussion:
Numbering paragraphs
Micha
2008-04-11 20:33:56 UTC
Permalink
I am trying to write a research proposal for my uni and the instructions say
that the paragraphs should be numbered where the first number is the section
number.

Any way to do it in lyx/latex?

thanks
Bob Lounsbury
2008-04-11 21:10:08 UTC
Permalink
On Fri, Apr 11, 2008 at 2:33 PM, Micha <michf-+lLcF8/aw9x6auLlOhE+***@public.gmane.org> wrote:
> I am trying to write a research proposal for my uni and the instructions say
> that the paragraphs should be numbered where the first number is the section
> number.
>
> Any way to do it in lyx/latex?
>
> thanks
>

I'm confused?

Bob
Micha
2008-04-11 22:04:37 UTC
Permalink
On Fri, 11 Apr 2008 15:10:08 -0600
"Bob Lounsbury" <boblounsbury-***@public.gmane.org> wrote:

> On Fri, Apr 11, 2008 at 2:33 PM, Micha <michf-+lLcF8/aw9x6auLlOhE+***@public.gmane.org> wrote:
> > I am trying to write a research proposal for my uni and the instructions say
> > that the paragraphs should be numbered where the first number is the
> > section number.
> >
> > Any way to do it in lyx/latex?
> >
> > thanks
> >
>
> I'm confused?
>
> Bob
>

Me too, but to do a rough translation, the instructions say that the paragraphs
will be numbered in a continuous manner in any numbering method where the first
number indicates the section number.

A possible way to do this would be to use an enumeration if it allows a
numbering scheme where the first number is the enumeration number and the
second is the enumeration number.

i don't have any actual example to go by so any interpretation if this is
welcome.

On the other hand, this comes from the engineering department since I couldn't
find any instruction at all for the math department, either for the proposal or
the phd dissertation itself, which is rather strange since I seem to recall
finding something for my msc thesis.
Typhoon
2008-04-11 21:54:52 UTC
Permalink
On Fri, 11 Apr 2008 23:33:56 +0300
Micha <michf-+lLcF8/aw9x6auLlOhE+***@public.gmane.org> wrote:

> I am trying to write a research proposal for my uni and the
> instructions say that the paragraphs should be numbered where the
> first number is the section number.
>
> Any way to do it in lyx/latex?
>

My legal publisher requires paragraph numbers of the form:
[chapter-parano]. I use the following which you can modify
appropriately:

\newcounter{parno}[chapter]%% numbered paragraph
\renewcommand{\theparno}{\thechapter-\arabic{parno}}
\newcommand{\p}{\stepcounter{parno}\noindent[\theparno]\ }

Start a new numbered paragraph with \p

HTH,
Alan
> thanks
>
Micha
2008-04-11 22:19:42 UTC
Permalink
On Sat, 12 Apr 2008 07:54:52 +1000
Typhoon <typhoon-p5+***@public.gmane.org> wrote:

> On Fri, 11 Apr 2008 23:33:56 +0300
> Micha <michf-+lLcF8/aw9x6auLlOhE+***@public.gmane.org> wrote:
>
> > I am trying to write a research proposal for my uni and the
> > instructions say that the paragraphs should be numbered where the
> > first number is the section number.
> >
> > Any way to do it in lyx/latex?
> >
>
> My legal publisher requires paragraph numbers of the form:
> [chapter-parano]. I use the following which you can modify
> appropriately:
>
> \newcounter{parno}[chapter]%% numbered paragraph
> \renewcommand{\theparno}{\thechapter-\arabic{parno}}
> \newcommand{\p}{\stepcounter{parno}\noindent[\theparno]\ }
>
> Start a new numbered paragraph with \p
>

Thanks, it worked. It did teach a bit though and I ended up taking the idea
and abusing it a bit to use enumerations. More work if it was pure latex, but
in lyx a lot easier

I defined in the header

\renewcommand{\labelenumi}{[\thesection-\arabic{enumi}]}

Now I can just write the whole document as an enumeration environment and I
don't need to retype the \p for each paragraph (like I said, for pure latex it
would have been a lot harder since it requires an \item for each paragraph
instead of just \p but the wonders of lyx help me here). I'm sure that this
can also be done by hacking a lyx document class file but I don't have the
time since I have a day and a bit to start and finish writing my research
proposal ...

> HTH,
> Alan
> > thanks
> >
>
Typhoon
2008-04-11 23:07:59 UTC
Permalink
On Sat, 12 Apr 2008 01:19:42 +0300
Micha <michf-+lLcF8/aw9x6auLlOhE+***@public.gmane.org> wrote:

> On Sat, 12 Apr 2008 07:54:52 +1000
> Typhoon <typhoon-p5+***@public.gmane.org> wrote:
>
> > On Fri, 11 Apr 2008 23:33:56 +0300
> > Micha <michf-+lLcF8/aw9x6auLlOhE+***@public.gmane.org> wrote:
> >
> > > I am trying to write a research proposal for my uni and the
> > > instructions say that the paragraphs should be numbered where the
> > > first number is the section number.
> > >
> > > Any way to do it in lyx/latex?
> > >
> >
> > My legal publisher requires paragraph numbers of the form:
> > [chapter-parano]. I use the following which you can modify
> > appropriately:
> >
> > \newcounter{parno}[chapter]%% numbered paragraph
> > \renewcommand{\theparno}{\thechapter-\arabic{parno}}
> > \newcommand{\p}{\stepcounter{parno}\noindent[\theparno]\ }
> >
> > Start a new numbered paragraph with \p
> >
>
> Thanks, it worked. It did teach a bit though and I ended up taking
> the idea and abusing it a bit to use enumerations. More work if it
> was pure latex, but in lyx a lot easier
>
> I defined in the header
>
> \renewcommand{\labelenumi}{[\thesection-\arabic{enumi}]}
>
> Now I can just write the whole document as an enumeration environment
> and I don't need to retype the \p for each paragraph (like I said,
> for pure latex it would have been a lot harder since it requires an
> \item for each paragraph instead of just \p but the wonders of lyx
> help me here). I'm sure that this can also be done by hacking a lyx
> document class file but I don't have the time since I have a day and
> a bit to start and finish writing my research proposal ...

That's very clever!


>
> > HTH,
> > Alan
> > > thanks
> > >
> >
>
Eran Kaplinsky
2008-04-14 13:47:42 UTC
Permalink
Clever, indeed. You should add it to the WIKI.

I adapted it to my needs:

\renewcommand{\labelenumi}{\textbf{\thesection.\arabic{enumi}}}

Now I need two further changes:
First, to correct the indentation, so that the paragraph number is flush
with the left number and the rest of the text is not hanging, but also
flush.
Second, to create a second (and possibly third level):
1.1
1.2
1.2.1
1.2.2
1.3

Can you help?

Thanks,
Eran
Micha
2008-04-14 21:29:20 UTC
Permalink
On Mon, 14 Apr 2008 07:47:42 -0600
Eran Kaplinsky <eran.kaplinsky-yfeSBMgouQgsA/***@public.gmane.org> wrote:

> Clever, indeed. You should add it to the WIKI.
>
> I adapted it to my needs:
>
> \renewcommand{\labelenumi}{\textbf{\thesection.\arabic{enumi}}}
>
> Now I need two further changes:
> First, to correct the indentation, so that the paragraph number is flush
> with the left number and the rest of the text is not hanging, but also
> flush.

There is probably a better way to do this, but I haven't managed to find the
right lengths to modify so someone else will need to answer that, and this
piece of code also doesn't handle more nesting but it will do what you want for
the first level

\renewenvironment{enumerate}{
\setcounter{enumi}{0}
\renewcommand{\item}{
\smallskip

\noindent\smallskip\stepcounter{enumi}\textbf{\thesection.\arabic{enumi}}
}}
{}

You can remove the smallskip if you don't want special space between the
paragraphs

> Second, to create a second (and possibly third level):
> 1.1
> 1.2
> 1.2.1
> 1.2.2
> 1.3
>
> Can you help?
>
> Thanks,
> Eran
>
>
>
G. Milde
2008-04-15 06:03:17 UTC
Permalink
On 14.04.08, Eran Kaplinsky wrote:
> Clever, indeed. You should add it to the WIKI.

> I adapted it to my needs:

> \renewcommand{\labelenumi}{\textbf{\thesection.\arabic{enumi}}}

> Now I need two further changes:
> First, to correct the indentation, so that the paragraph number is flush
> with the left number and the rest of the text is not hanging, but also
> flush.
> Second, to create a second (and possibly third level):

Use the article (KOMA-script) (or report or book (KOMA-script) document class.

Use the "paragraph" Style for paragraph and "subparagraph" for 2nd level.

Set the numbering depth in Document>Settings so that the "paragraph" and
"subparagraph" are numbered.

Read scrguien.pdf for the preamble commands needed for formatting the
numbers according to your need.

If you need 3 levels of paragraphs, you might use subsubsection,
paragraph, and subparagraph with some more format-redefinitions.

(Untested, but from what I read in scrguide.pdf it should be possible.)

Guenter
Loading...