Re: TOC (newbie question)

2010-01-21 Thread Helge Hafting

Peter Bradley wrote:
I'm trying to add a TOC to my document - a paper I'm giving later this 
year.  I've done what it says to do in the help:


Insert --> List / TOC --> Table of Contents

The 'Table of Contents' button appears and if I click on it, a listing 
appears in a window at the left.  However no TOC appears in my dvi 
document, just the legend, 'Contents'.


I guess your document doesn't have anything that gets listed
in the TOC then. See below.



This is my first proper attempt to create a document using LyX, so I'm 
probably misunderstanding something at a fairly fundamental level.  
Apologies if that is the case.


The TOC will list chapters, sections, subsections and so on.
It will not list the unnumbered chapter*, section*, subsection* and so 
on. (The purpose of "section*" is when you want a heading, but no

entry in the TOC. And of course no number, it does not make sense
to number something that isn't listed in the TOC anyway.)

So make sure you use the numbered variants. If you don't want
to have numbers printed, use this menu:
Document->Settings->Numbering & TOC.

Here you can turn unwanted numbering off, and also decide what will be 
listed in your TOC. (Some people want subsections and subsubsections 
listed, some do not.)


Helge Hafting


Re: TOC (newbie question)

2010-01-17 Thread Peter Bradley

stephen's mailinglist account wrote:

I can do it with ERT is there a LyX or other more elegant way?


ERT way adds following
\setcounter{section}{0}
after subsequent section headers.  I guess you could redefine \part in
latex preamble or put into a module even and use it as a custom inset?


  

\makeatletter

\...@addtoreset{section}{part}

\makeatother

rh






That is a better way

  


Thanks to all of you.

I've decided to leave it as it is because, on reflection, I think it's 
right.


And possibly partly because I don't understand the TeX/LATEX stuff 
properly.  It's on my TODO list, but has been for some years now. :(


If I reorient my thinking such that Parts are logical divisions and 
Sections are actual divisions, it all makes sense.


I'm grateful for all the help.  Thanks.

Cheers


Peter




Re: TOC (newbie question)

2010-01-17 Thread stephen's mailinglist account
>> I can do it with ERT is there a LyX or other more elegant way?
>>
>>
>> ERT way adds following
>> \setcounter{section}{0}
>> after subsequent section headers.  I guess you could redefine \part in
>> latex preamble or put into a module even and use it as a custom inset?
>>
>>
>
> \makeatletter
>
> \...@addtoreset{section}{part}
>
> \makeatother
>
> rh
>
>
>

That is a better way

-- 
Stephen


Re: TOC (newbie question)

2010-01-17 Thread rgheck

On 01/17/2010 12:03 PM, stephen's mailinglist account wrote:

Might I be permitted a supplementary?

Now that all the various bits are numbered, I notice that all the Sections
number sequentially regardless of their location within Parts.  So I get:

Part I
   Section 1
   Section 2
Part II
   Section 3
   Section 4
   Section 5
Part III
   Section 6

... and so on.

Is there any way I can get the Section numbering to restart inside each
Part?

RTFM is a suitable answer if it comes with a reference to the appropriate
part of the manual :)

Thanks again

Cheers


Peter


 

I can do it with ERT is there a LyX or other more elegant way?


ERT way adds following
\setcounter{section}{0}
after subsequent section headers.  I guess you could redefine \part in
latex preamble or put into a module even and use it as a custom inset?

   

\makeatletter

\...@addtoreset{section}{part}

\makeatother

rh




Re: TOC (newbie question)

2010-01-17 Thread rgheck

On 01/17/2010 11:37 AM, Peter Bradley wrote:

Rob Oakes wrote:

Hi Peter,

It's important to make sure that you are using the numbered styles 
for your table of contents (e.g section, subsection).


If you are using unnumbered styles (e.g section* , subsection*; note 
the asterisk) they will appear in your document map but not in your 
table of contents.


Pretty basic, but this might cause the behavior you describe.

Cheers,

Rob Oakes


Yes.  Thanks Rob, and others.  That's the fix.

Might I be permitted a supplementary?

Now that all the various bits are numbered, I notice that all the 
Sections number sequentially regardless of their location within 
Parts.  So I get:


Part I
   Section 1
   Section 2
Part II
   Section 3
   Section 4
   Section 5
Part III
   Section 6

... and so on.

Is there any way I can get the Section numbering to restart inside 
each Part?



This is a LaTeX thing. IN the preamble:

\makeatletter

\...@addtoreset{section}{part}

\makeatother
Or you can use the chngcntr package, which is available from CTAN, if 
you don't have it.



Note that this will not change the display in LyX. To do that, you need 
to redefine the section counter in LyX, probably using a module. See 
Chapter 5 of the Customization manual. This is a two-liner.


rh



Re: TOC (newbie question)

2010-01-17 Thread stephen's mailinglist account
> Might I be permitted a supplementary?
>
> Now that all the various bits are numbered, I notice that all the Sections
> number sequentially regardless of their location within Parts.  So I get:
>
> Part I
>   Section 1
>   Section 2
> Part II
>   Section 3
>   Section 4
>   Section 5
> Part III
>   Section 6
>
> ... and so on.
>
> Is there any way I can get the Section numbering to restart inside each
> Part?
>
> RTFM is a suitable answer if it comes with a reference to the appropriate
> part of the manual :)
>
> Thanks again
>
> Cheers
>
>
> Peter
>
>
I can do it with ERT is there a LyX or other more elegant way?


ERT way adds following
\setcounter{section}{0}
after subsequent section headers.  I guess you could redefine \part in
latex preamble or put into a module even and use it as a custom inset?
-- 
Stephen


Re: TOC (newbie question)

2010-01-17 Thread Peter Bradley

Rob Oakes wrote:

Hi Peter,

It's important to make sure that you are using the numbered styles for 
your table of contents (e.g section, subsection).


If you are using unnumbered styles (e.g section* , subsection*; note 
the asterisk) they will appear in your document map but not in your 
table of contents.


Pretty basic, but this might cause the behavior you describe.

Cheers,

Rob Oakes


Yes.  Thanks Rob, and others.  That's the fix.

Might I be permitted a supplementary?

Now that all the various bits are numbered, I notice that all the 
Sections number sequentially regardless of their location within Parts.  
So I get:


Part I
   Section 1
   Section 2
Part II
   Section 3
   Section 4
   Section 5
Part III
   Section 6

... and so on.

Is there any way I can get the Section numbering to restart inside each 
Part?


RTFM is a suitable answer if it comes with a reference to the 
appropriate part of the manual :)


Thanks again

Cheers


Peter



Re: TOC (newbie question)

2010-01-17 Thread John Kane
Aha. Something I just discovered. Nice to have it confirmed. 

--- On Sun, 1/17/10, Rob Oakes  wrote:

> From: Rob Oakes 
> Subject: Re: TOC (newbie question)
> To: "Peter Bradley" 
> Cc: "lyx-users@lists.lyx.org" 
> Received: Sunday, January 17, 2010, 11:08 AM
> Hi Peter,
> 
> It's important to make sure that you are using the numbered
> styles for your table of contents (e.g section,
> subsection).
> 
> If you are using unnumbered styles (e.g section* ,
> subsection*; note the asterisk) they will appear in your
> document map but not in your table of contents.
> 
> Pretty basic, but this might cause the behavior you
> describe.
> 
> Cheers,
> 
> Rob Oakes
> 
> Sent from Rob's Palm
> 
> On Jan 17, 2010, at 8:01 AM, Peter Bradley 
> wrote:
> 
> > stephen's mailinglist account wrote:
> >> What type (class) of document  are you
> working on (article, report, book)?
> >> 
> >> What sections, chapters, subsections do you expect
> to see?
> >> 
> >> 
> > Hi Stephen,
> > 
> > Thank you for the reply.
> > 
> > It's an 'article (paper)'
> > 
> > The document has a number of parts with appropriate
> sections, sub-sections and sub-sub-sections.  All
> un-numbered.  These are what I'm expecting to see.
> > 
> > The document map that appears to the left of the
> editor when I insert a TOC looks fine.  It just doesn't
> appear in the final document.
> > 
> > Cheers
> > 
> > 
> > Peter
> > 
> 


  __
Get a sneak peak at messages with a handy reading pane with All new Yahoo! 
Mail: http://ca.promos.yahoo.com/newmail/overview2/


Re: TOC (newbie question)

2010-01-17 Thread Rob Oakes

Hi Peter,

It's important to make sure that you are using the numbered styles for  
your table of contents (e.g section, subsection).


If you are using unnumbered styles (e.g section* , subsection*; note  
the asterisk) they will appear in your document map but not in your  
table of contents.


Pretty basic, but this might cause the behavior you describe.

Cheers,

Rob Oakes

Sent from Rob's Palm

On Jan 17, 2010, at 8:01 AM, Peter Bradley   
wrote:



stephen's mailinglist account wrote:
What type (class) of document  are you working on (article, report,  
book)?


What sections, chapters, subsections do you expect to see?



Hi Stephen,

Thank you for the reply.

It's an 'article (paper)'

The document has a number of parts with appropriate sections, sub- 
sections and sub-sub-sections.  All un-numbered.  These are what I'm  
expecting to see.


The document map that appears to the left of the editor when I  
insert a TOC looks fine.  It just doesn't appear in the final  
document.


Cheers


Peter



Re: TOC (newbie question)

2010-01-17 Thread John Kane
I'm running the LyTex portable version of LyX 1.6.5  and I seem to be getting 
the same results with an Article class document.  I get the heading Contents 
but nothing else untill the first paragraph of the text.

A quick change to Book class gives me what appears to be a Chapter heading 
Contents and then a running header Contents.  No actual ToC appears.

Strange



--- On Sun, 1/17/10, Peter Bradley  wrote:

> From: Peter Bradley 
> Subject: Re: TOC (newbie question)
> To: lyx-users@lists.lyx.org
> Received: Sunday, January 17, 2010, 10:01 AM
> stephen's mailinglist account wrote:
> > What type (class) of document  are you working on
> (article, report, book)?
> > 
> > What sections, chapters, subsections do you expect to
> see?
> > 
> >   
> Hi Stephen,
> 
> Thank you for the reply.
> 
> It's an 'article (paper)'
> 
> The document has a number of parts with appropriate
> sections, sub-sections and sub-sub-sections.  All
> un-numbered.  These are what I'm expecting to see.
> 
> The document map that appears to the left of the editor
> when I insert a TOC looks fine.  It just doesn't appear
> in the final document.
> 
> Cheers
> 
> 
> Peter
> 
> 


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


Re: TOC (newbie question)

2010-01-17 Thread Peter Bradley

stephen's mailinglist account wrote:

What type (class) of document  are you working on (article, report, book)?

What sections, chapters, subsections do you expect to see?

  

Hi Stephen,

Thank you for the reply.

It's an 'article (paper)'

The document has a number of parts with appropriate sections, 
sub-sections and sub-sub-sections.  All un-numbered.  These are what I'm 
expecting to see.


The document map that appears to the left of the editor when I insert a 
TOC looks fine.  It just doesn't appear in the final document.


Cheers


Peter



Re: TOC (newbie question)

2010-01-17 Thread stephen's mailinglist account
2010/1/17 Peter Bradley :
> William Seager wrote:
>>
>> On  Sunday 17 January 2010  at  08:24,  Peter Bradley wrote:
>>
>>>
>>> The 'Table of Contents' button appears and if I click on it, a listing
>>> appears in a window at the left.  However no TOC appears in my dvi document,
>>> just the legend, 'Contents'.
>>>
>>>
>>
>> well - just to be sure of the basics, do you have the appropriate
>> "List in TOC" settings in Tools-Documents-Lists & TOC?
>>
>>
>
> Yes.  That's the right place to start. :)
>
> Actually I don't have Tools-Documents-Lists & TOC.  I'm using LyX 1.6.4, if
> that helps.
>
> I do have Document --> Settings --> Number & TOC
>
> It has some sliders labeled 'Numbering' and 'List in Table of Contents',
> which I don't understand at all.  What value am I supposed to be
> increasing/decreasing?
>
> It also has a table with the following columns:
>
> Example, Numbered, Appears in TOC
>
> Neither the sliders nor the table contents appear to be changeable.  The
> sliders don't slide and the table offers no means of
> adding/deleting/amending its entries.
>
> There are also two buttons, 'Use class defaults' and 'Save as document
> defaults'.  I'm afraid I've no idea what they might do.
>
> Then there are some greyed out buttons:
> - Restore
> - OK
> - Apply
>
> Finally, there is an active 'Close' button.
>
> Does that help?  And thanks very much for the reply.  It's appreciated.
>
> Cheers
>
>
> Peter
>
>
>

What type (class) of document  are you working on (article, report, book)?

What sections, chapters, subsections do you expect to see?

-- 
Stephen


Re: TOC (newbie question)

2010-01-17 Thread Peter Bradley

William Seager wrote:

On  Sunday 17 January 2010  at  08:24,  Peter Bradley wrote:
  
The 'Table of Contents' button appears and if I click on it, a listing 
appears in a window at the left.  However no TOC appears in my dvi 
document, just the legend, 'Contents'.





well - just to be sure of the basics, do you have the appropriate
"List in TOC" settings in Tools-Documents-Lists & TOC?

  

Yes.  That's the right place to start. :)

Actually I don't have Tools-Documents-Lists & TOC.  I'm using LyX 1.6.4, 
if that helps.


I do have Document --> Settings --> Number & TOC

It has some sliders labeled 'Numbering' and 'List in Table of Contents', 
which I don't understand at all.  What value am I supposed to be 
increasing/decreasing?


It also has a table with the following columns:

Example, Numbered, Appears in TOC

Neither the sliders nor the table contents appear to be changeable.  The 
sliders don't slide and the table offers no means of 
adding/deleting/amending its entries.


There are also two buttons, 'Use class defaults' and 'Save as document 
defaults'.  I'm afraid I've no idea what they might do.


Then there are some greyed out buttons:
- Restore
- OK
- Apply

Finally, there is an active 'Close' button.

Does that help?  And thanks very much for the reply.  It's appreciated.

Cheers


Peter




Re: TOC (newbie question)

2010-01-17 Thread William Seager
On  Sunday 17 January 2010  at  08:24,  Peter Bradley wrote:
> The 'Table of Contents' button appears and if I click on it, a listing 
> appears in a window at the left.  However no TOC appears in my dvi 
> document, just the legend, 'Contents'.
> 

well - just to be sure of the basics, do you have the appropriate
"List in TOC" settings in Tools-Documents-Lists & TOC?

-- 
William Seager
University of Toronto Scarborough
www.utsc.utoronto.ca/~seager