This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

What should a <sidebar> look like?


I've been asked to convert an existing textbook to DocBook for publishing 
in a variety of media.  The authors of the textbook tried to do students a 
favour by including summary notes in the margins throughout the book.  An 
example, if you're viewing this is a fixed-width font, is as follows:

> This is a paragraph of important text. In
> this paragraph we give an example of how            This paragraph is an 
> example.
> including summary notes in the text margins
> can significantly enhance student enjoyment.
> Students are happier when they don't have           Students like this 
> approach.
> to make their own summary notes. Blah, blah,
> blah...

I had this crazy idea that the <sidebar> element would be appropriate.  It'
s not perfect, as I don't think a <sidebar> can be a child of a <para> 
which means my sidebars will always line up with the top of a paragraph, 
but it's pretty close.  A fragment of my markup follows:

> 		<section>
> 			<title>
> 				A First Section
> 			</title>
> 			<para>
> 				Some narrative text.  Some narrative text.  Some narrative 
> text.  Some narrative text.  Some narrative text.  Some narrative text.  
> Some narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.
> 			</para>
> 			<sidebar>
> 				<title>
> 					A Sidebar
> 				</title>
> 				<para>
> 					Sidebar content.  Sidebar content.  Sidebar content.  
> Sidebar content.  Sidebar content.  Sidebar content.  Sidebar content.  
> Sidebar content.  Sidebar content.  Sidebar content.  Sidebar content.  
> Sidebar content.
> 				</para>
> 			</sidebar>
> 			<para>
> 				The continuing flow of the narrative text.  The continuing 
> flow of the narrative text.  The continuing flow of the narrative text.  
> The continuing flow of the narrative text.  The continuing flow of the 
> narrative text.  The continuing flow of the narrative text.  The 
> continuing flow of the narrative text.  The continuing flow of the 
> narrative text.  The continuing flow of the narrative text.  The 
> continuing flow of the narrative text.  The continuing flow of the 
> narrative text.  The continuing flow of the narrative text.  The 
> continuing flow of the narrative text.  The continuing flow of the 
> narrative text.
> 			</para>
> 		</section>

When I ran this through the XSL:FO stylesheets in the  docbook-xsl-1.45 
distribution (as the CVS stylesheets appear to require more than my naive 
knowledge to function) the result was something close to:

> Some narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.  Some 
> narrative text.  Some narrative text.  Some narrative text.
>
> Sidebar content.  Sidebar content.  Sidebar content.  Sidebar content.  
> Sidebar content.  Sidebar content.  Sidebar content.  Sidebar content.  
> Sidebar content.  Sidebar content.  Sidebar content.  Sidebar content.
>
> The continuing flow of the narrative text.  The continuing flow of the 
> narrative text.  The continuing flow of the narrative text.  The 
> continuing flow of the narrative text.  The continuing flow of the 
> narrative text.  The continuing flow of the narrative text.

The sidebar content appeared to simply be embedded in the flow of the 
document.

Has anyone managed to achieve the effect I am looking for using the stock 
DocBook DTDs and stylesheets?

Thanks for your help!

Jason Foster


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]