[racket] Book parts in scribble

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Feb 1 13:43:08 EST 2013

I've added a 'grouper style property for parts, which makes a part like
like a "part" in the sense of a book.

 #lang scribble/base

 @title{The Book}

 @section[#:style 'grouper]{First part}
 @subsection{First chapter}
 @subsection{Second chapter}

 @section[#:style 'grouper]{Second part}
 @subsection{Third chapter}
 @subsection{Fourth chapter}

I've also added a 'hidden-number style property, which I think is what
Matthias needs for intermezzos.

Finally, there are now `scribble/book' and `scribble/report' languages,
which are like `scribble/base' but set up Latex to use the standard
"book" or "report" format. Most of the Latex configuration is
redirecting section commands to chapter commands, etc.

At Wed, 16 Jan 2013 11:19:25 -0500, Matthias Felleisen wrote:
> 
> When you have written those macros, including intermezzos, please share. I have 
> been too lazy to figure it out :-) 
> 
> 
> 
> On Jan 16, 2013, at 11:12 AM, David Van Horn wrote:
> 
> > I'm trying to achieve something like Latex's \part in scribble and not sure 
> what the right approach is.
> > 
> > I want
> > 
> > I First part
> > 1 First chapter
> > 2 Second chapter
> > II Third part
> > 3 Third chapter
> > 4 Fourth chapter
> > 
> > Should the parts be sections that include-section each section for the 
> chapters?  But then how do I get the Roman numbering of the parts, and how can 
> I restore the chapter counter so that it doesn't reset to 1 within each part?
> > 
> > Or should parts just be a kind of section that exists at the same level as 
> chapters, but with some custom style?  But then, how do I get the separate 
> counter for part numbers, and how do I render them with Roman numerals?
> > 
> > Thanks,
> > David
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
> 
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.