On Tuesday, October 18, 2011 04:53:58 PM Kenedy Torcatt wrote:
> Hello, I have been using LyX for while, I've prepared my thesis and
> I have a problem with the index and the PDF file. I'll try to be
> as clear as possible here.
> 
> -Things to know: I'm using Document type "article"
> 
> *Clarifying this with my real example *
> 
> In mi case with the two first chapters:
> 
> Chapter 1 (corresponding to "section") (Number on the left side)
> 1.1(corresponding to "subsection")
> 1.2(corresponding to "subsection")
> 1.3(corresponding to "subsection")
> 1.4(corresponding to "subsection")
> 
> Chapter 2 (corresponding to "section") (Number on the left side)
> 2.1(corresponding to "subsection")
> 2.2(corresponding to "subsection")
> 2.3(corresponding to "subsection")
> 
> When I insert "Section" for my chapters they show a number to the
> left side when I render the file to PDF.
> The subsections show the number as well beginning with number 1,
> then 1.1, 1.2 and on goes on...
> 
> Ok, now I know that's the right thing it should be happening. But,
> I don't want the number on the left side of my chapter name, just
> for the subsections.
> I tried changing this to "Section*" but after that the new chapter
> subsections appeared numbered as continuing the subsections from
> the last chapter.
> I mean:
> 
> Chapter 1 (corresponding to "section")
> 1.1(corresponding to "subsection")
> 1.2(corresponding to "subsection")
> 1.3(corresponding to "subsection")
> 1.4(corresponding to "subsection")
> 
> Chapter 2 (corresponding to "section*") (without number on the left
> side) 1.5(corresponding to "subsection")
> 1.6(corresponding to "subsection")
> 1.7(corresponding to "subsection")
> 
> *I don't want that either. I need this:*
> 
> Chapter 1 (corresponding to "section*") (without number on the left
> side) 1.1(corresponding to "subsection")
> 1.2(corresponding to "subsection")
> 1.3(corresponding to "subsection")
> 1.4(corresponding to "subsection")
> 
> Chaprter 2 (corresponding to "section*") (without number on the
> left side) 2.1(corresponding to "subsection")
> 2.2(corresponding to "subsection")
> 2.3(corresponding to "subsection")
> 
> I tried Inserting the code below after "Section" and before
> "Subsection"
> 
>  \addtocounter{section}{1}
> 
> *That doesn't fix the issue either because the result in the PDF is
> *
> 
> 
> Chapter 1 (corresponding to "section*") (without number on the left
> side) 1.1(corresponding to "subsection")
> 1.2(corresponding to "subsection")
> 1.3(corresponding to "subsection")
> 1.4(corresponding to "subsection")
> 
> Chapter 2 (corresponding to "section*") (without number on the left
> side) 2.5(corresponding to "subsection")
> 2.6(corresponding to "subsection")
> 2.7(corresponding to "subsection")
> 
> As you can see the subsection from chapter 2 continue counting
> after 4 and not beginning from 1.
> 
> Besides that, in order for this to work I need obviously to change
> chapter 1 ans 2 to "section*" but inside the LyX interface appear
> the subsections established as "subsection" with 0.1, 0.2, 0.3
> ..... and on!
> 
> So I'm having 2 issues now with that crappy solutions that I tried.
> 
> Here you have some print screens of my thesis to clarify:
> 
> About the PDF problem counting from 4 in chapter 2:
> http://howtoplaypianohq.com/sshot-1.jpg
> 
> About confusing LyX interface if I change the section to section*:
> http://howtoplaypianohq.com/sshot-2.jpg
> 
> *So wrapping up, I need this:*
> 
> Chapter 1 (corresponding to "section*") (without number on the left
> side) 1.1(corresponding to "subsection")
> 1.2(corresponding to "subsection")
> 1.3(corresponding to "subsection")
> 1.4(corresponding to "subsection")
> 
> Chapter 2 (corresponding to "section*") (without number on the left
> side) 2.1(corresponding to "subsection")
> 2.2(corresponding to "subsection")
> 2.3(corresponding to "subsection")
> 
> Please help me with this. Maybe it sound like a dummy thing but
> it's critical for me...
> Thank you in advance!

Not at all a dummy thing. Everyone has this problem if they want to 
handle section numbering in an unusual manner.

My first comment is every time I've tried using Chapter* and Section* 
and Subsection* etc, there were all sorts of unpleasant side effects. I 
try very hard not to use them any more.

I know this isn't your intent, but if your intent were to number 
chapters but not sections, there's a very simple setting in the 
document's settings to do that. But if I read you correctly, you want 
numbers on your sections and subsections, but not on your chapters. 
LyX gives you no simple way to do that.

What I recommend would be for you, in a layout file, to change the 
definition of Chapter so it prints neither the word "Chapter" nor the 
chapter number. If I'm not mistaken, the former would be as simple as:

\let\thechapter\{}\

or something like that. The latter would involve actually preventing 
the number from printing.


This isn't directly responsive to your question, but in all my non-
Geek books such as "Thriving in Tough Times", instead of using numbers 
on sections, subsections and subsubsections, I use lines -- thick line 
for sections, medium line for subsections, thin line for 
subsubsections. In this way the reader can still understand where he 
is in the hierarchy, but not feel like he's reading a technical 
specification or legal briefing.

The following is the layout code I used to implement those horizontal 
lines:

======================================
\usepackage{titlesec}%          Special fonts for sections

\titleformat{\section}[hang]{\Large\sffamily\bfseries}{\rule[0pt]
{0.4in}{12pt}}{.5em}{\hspace{0.6em}}{} 
\titlespacing{\section}{0pt}{0.9cm}{-0.2cm}

\titleformat{\subsection}[hang]{\large\sffamily\bfseries}{\rule[1pt]
{0.4in}{6pt}}{.5em}{\hspace{0.7em}}{}
\titlespacing{\subsection}{0pt}{0.3cm}{-0.2cm}

\titleformat{\subsubsection}[hang]{\small\sffamily\bfseries}{\rule[2pt]
{0.4in}{01pt}}{.5em}{\hspace{0.4em}}{}
\titlespacing{\subsubsection}{0pt}{0.0cm}{-0.3cm}
======================================

HTH

SteveT

Steve Litt
Author: The Key to Everyday Excellence
http://www.troubleshooters.com/bookstore/key_excellence.htm
Twitter: http://www.twitter.com/stevelitt

Reply via email to