Hi all,
I am writing a new layout for my document class and I need several
styles of parts that would display like this:
---
Part 1
Part title
Plain text ...
---
Since several LyX standard layouts support Chapter style that does
exactly this, I was optimistic when I started reading LyX documentation
and experimenting with different layouts provided with LyX. I tried to
define my own counters and do something like:
Counter
Name mypartcounter
End
Style MyPart
Margin Dynamic
LatexType Command
Align Center
OptionalArgs 1
Font
Series Bold
Size Huge
EndFont
End
Style MyPart
LabelType Counter
LabelCounter mypartcounter
LabelString "MyPart \arabic{mypartcounter}"
End
This is a direct translation of Chapter definitions from LyX layout
files. However this produced something different than the Chapter
definition -- it refused to type the part name on the next line. I
played for some time and then found out that I can achieve the desired
behavior if I rename the counter ('mypartcounter') to be 'chapter'!
Which is very strange, since my layout knows nothing about LyX standard
layouts and 'chapter' should be just an arbitrary string. So does LyX
have a hard-coded behavior based on which strings are used as counter
names?
I also found the following from the LyX documentation (Customizing LyX:
Features for the Advanced User, Section 5):
LabelCounter [Chapter, Section, Subsection, Subsubsection, Paragraph,
Subparagraph, EnumI, EnumII, EnumIII, EnumIV]
This hints that there are only those 10 counter names accepted. However
I have been able to define my own counters for other styles very well
and use them with LabelCounter as well. And on the other hand, Chapter,
Section, Subsection, etc. are themselves defined in standard layout
files and ideally, neither LyX documentation nor LyX itself should know
anything about those a priori.
But apparently they do.
So I have the following questions. Is the display of Chapter style
really hard coded into LyX? Is is possible to define other styles with
the same behavior? And why should a counter name influence the display?
Or am I reading something very wrongly?
I wouldn't really mind using the chapter counter, the only trouble is
that I need several different styles like that and I can not use the
same counter name for all of them.
I'd be grateful if someone from the developers could answer this
problems and I hope that they read lyx-users list, too. Or is another
mailing list better?
Best regards,
Jan
------------------------------
Telli Päevaleht ja võida 4 Nissani maasturit!
http://www.epl.ee/4x4