[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Formatting chapters in Lout books
From: |
Valeriy E. Ushakov |
Subject: |
Re: Formatting chapters in Lout books |
Date: |
Sat, 5 Feb 2000 22:14:15 +0300 |
On Fri, Feb 04, 2000 at 09:21:10AM +0100, Henrik Martensson wrote:
> * I need to format different chapters in a book differently. In
> particular, I need a single column format for some chapters,
> and a two column format for other chapters in the same book.
> (This is a standard format for the stuff I am doing. The single
> column format, with sidebars, is the main chapter format. The
> two-column format is for chapters that are lists, for example
> equpment lists, spell lists, and character lists.)
>
> Is it possible to set this up in a reasonably simple way? If so, how?
You can't do it "off-the-shelf", but with minumum hacking that should
be possible. Also, your task is greatly simplified by the fact that
you generate your Lout documents and thus being user friendly is not a
problem for you.
With default "docf" I did the following:
@Document
@ColumnNumber { 2 }
//
@Text @Begin
@BeginSections
@Section
@Title { ColWidth }
@Begin
# ... This section will be set in two columns
@End @Section
@EndSections
@FullWidth { @BeginSections }
//
@Section
@Title { FullWidth }
@Begin
# ... This section will be set in full width
@End @Section
@address@hidden
@End @Text
The above hack doesn't have correct section numbers, as each
@BeginSection will start from @FirstSectionNumber - but that should be
tweakable.
Also note that a col-width section after a full-width section will
start on the same page, while a full-width section after a col-width
section will start on a new page. Changing this, if at all possible,
will require changes to the "dsf" idea of page structure.
> * Single column chapters in the format I want to emulate have
> sidebar text. Lout margin notes aren't quite what I need to do
> this. Rather, I need to set up a sidebar column with its own,
> separate text flow.
>
> Ideally, I would like to be able to tie the start of a particular
> sidebar section to a section in the main text flow to ensure that
> the sidebar section begins either on the same page, or as close
> to it as possible without colliding with other sidebar sections.
>
> Is any of this possible?
I'm afraid this will require changes to "dsf" since what you request
is a different page model, i.e. a sidebar column doesn't accept the
same type of material that the "main" column.
> * I really need to set up a recursive system for chapters and
> sections. For example, I have APA articles that I sometimes have
> to print as standalone documents, sometimes as parts of an APA
> submission and sometimes as part of an entire APA collection. This
> means that using the current Lout book and document packages, the
> same heading in an article may end up at different Lout
> @Chapter/@Section levels in different situations. This makes my
> filters unnecessarily complex.
I guess that you should be able to set up a style database similar to
refstyle and write a document format that will only provide @Section
but with its nesting level as a parameter. You then will be able to
retrive various style bits from the database using the nesting level
as a key.
E.g. note that you can write:
@BeginSections
@Section @Title { ... }
@Begin
@BeginSections # !!! not subsections
...
Having predefined @SubSection and @SubSubSection is just a way of
packaging style bits. Using database is a feasible alternative.
> I read somewhere that there is a document package with recursive section
> levels, but that it is not part of the standard Lout distribution.
>
> Is such a package available?
Hmm, I can't recall hearing about one.
SY, Uwe
--
address@hidden | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen