From: David G. <go...@py...> - 2005-05-08 00:08:09
|
[Felix Wiemann] > I need section subtitles. +1. Go for it. > My idea for the implementation in the HTML writer:: > > <h1>Title</h1> > <h1 class="section-subtitle">Subtitle</h1> > > (<h2> for the subtitle doesn't seem reasonable since it messes up > the document structure.) In the CSS file: > > h1.section-subtitle, h2.section-subtitle, ... { > font-size: 70%; > } Seems fine. > Regarding when to transform section subtitles, I'd say we add an > option (section_subtitle_xform or so [1]_). +1. > .. [1] Am I the only one who thinks "xform" sounds bad? Maybe it > should all be renamed to "transform", maintaining compatibility > for some time. -1. It's not worth the trouble. > But I'm not yet sure about the default; "true" as a default might be > not that bad (and it would be analog to doctitle_xform), but it > causes a (slight?) change of some existing reST documents. So what > would you like to see as a default? Make it "true". > About the default: I just noticed that it would break > <http://docutils.sf.net/FAQ.html#can-i-use-docutils-for-python-auto-documentation>, > because there we have a section (section 4) which has only one > subsection. So it's probably best not to transform section > subtitles by default. I don't know about that. The FAQ is a special case; there's a single subsection only because we anticipate future subsections. There's not much difference (visually or structurally) between a section title & subtitle, and a section title with single subsection title. In other words, a section whose sole content is a single subsection, is a degenerate case that doesn't make much sense from a document structure perspective. Therefore, we shouldn't worry about it much. However, I have another case that we should consider: Section 1 Title =============== Section 1 Subtitle ------------------ text Section 2 Title =============== text Subsection 2.1 Title -------------------- text The adornment of "Section 1 Subtitle" and "Subsection 2.1 Title" must be the same to parse, but structurally they're different. Would this be confusing to authors or readers of the text source? -- David Goodger <http://python.net/~goodger> |