Hello, I would like to setup rules on class names used in HTML attributes, with the final aim to make it easier for users to do CSS, javascript or HTML postprocessing.
Here is my proposition, with 3 rules: Reserve class names without hyphen to @-commands. Output at max one of such attribut on an element for each @-command appearing in the Texinfo source. This rule applies to automatically generated class names based on some Texinfo code, so these auto generated classes should have at least a string with an hyphen prepended or appended. Class names <command>-* with <command> a Texinfo @-command name are reserved for classes marking that one is an @-command but in other elements, in general sub elements. Does not apply to automatically generated class names. Class names *-<command> with <command> a Texinfo @-command name are reserved for uses related to @-command <command>. Does not apply to automatically generated class names. Note that for names with hyphens (like <some>-<name>) the rules prevents from using some names, but do not mandate to use them. For example if there is a bibliography, one should not use in the bibliography the class "biblio-contents" as @contents is an @-command related to contents, but one can use "list-sections-toc" class name in @contents formatting even though there is no "contents" string in the class name. Also note that a string within the middle of a class name can be anything, so in a bibliography one can have a class like "biblio-contents-last" (it is probably best not to do it, though). A consequence of those rules is that when a new Texinfo @-command is created all the unrelated classes names that are not automatically generated and that begin or end with that name need to be renamed. Any comment, remark? Another rule, not on the name per se, would be to use as much as possible semantic names corresponding to the use in the document and not styling names. With these rules some class names already output should change. One case of change is the @example arguments which would need to be changed and contradicts the current manual content. According to the proposal @example arguments should not be left as is (for the first rule), but have something prepended or appended. I would propose prepending arg-. The manual is right now: You may optionally give arguments to the '@example' command, separated by commas if there is more than one. In the HTML output, any such arguments are output as class names. It would become You may optionally give arguments to the '@example' command, separated by commas if there is more than one. In the HTML output, any such arguments are output as class names with 'arg-' prepended. Any comment, remark? -- Pat