Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#326 man: Support per-element bold/ital customization

output: manpages
open
XSL (399)
3
2006-04-13
2006-03-09
No

People rarely agree about exactly what set of inline
elements should be rendered in bold and what set
should be rendered in italic. So we should provide
a simple customization mechanism that users can use
to override the default character formatting for
all inlines. I reckon we will need three new params:

man.bold.elements
man.italic.elements
man.plain.elements

..or whatever names. The value for each should just
be a simple space-separated list of element names.
The logic in the stylesheets is that we have some
default formatting for each inline (either plain,
bold, or italic) but that we check the value of those
params and if we find a match, we apply the specified
formatting instead of the default. I suppose we
will need to deal with the case where an element
is in multiple lists. In that case:

bold+italic = bold+italic (groff markup for both)
plain+bold = bold
plain+italic = italic

Discussion

  • Daniel Leidert
    Daniel Leidert
    2006-03-09

    Logged In: YES
    user_id=1102637

    Sounds impressive. But instead of checking, if an element is
    part of both lists, isn't it easier to instead use a 4th
    parameter man.bolditalic.elements. But independent from the
    answer: I would _really_ appreciate such a feature. Far
    better than a static declaration of such lists.

     
  • Logged In: YES
    user_id=118135

    OK, I will try to make this a priority. Certainly I will
    get it done before the next release. It will just require
    wrapping content of templates for most inlines in some
    conditional logic.

    As far as adding a man.bolditalic.elements param, I guess
    I think it's not needed. The problem is that I still need
    to consider the case where a user has a certain element
    specified in multiple params, and handle that.

     
  • Logged In: YES
    user_id=118135

     
    • priority: 5 --> 3