Hi All,

When asciidoc generates manpage for docbook backend, it always lowers mantitle.
Though this behavior may be useful in some cases, in general, it is incorrect.

Accordingly to DocBook reference
http://www.docbook.org/tdg/en/html/refentrytitle.html
===
A RefEntryTitle is the title of a reference page. It is frequently the
same as the first RefName or the RefDescriptor, although it may also
be a longer, more general title.
===

Thus for functions that use mixed letters (like XTextWidth), it should
be possible to
have RefEntryTitle as XTextWidth or even X11::XTextWidth. Therefore, I
propose to
correct asciidoc, so it will lower only if mantitle is in all caps. My
patch is below.

Thanks,
Dmitry

Index: asciidoc.py
===================================================================
--- asciidoc.py
+++ asciidoc.py
@@ -1295,7 +1295,11 @@
             if not mo:
                 error('malformed manpage title')
             else:
-                attrs['mantitle'] = mo.group('mantitle').lower().strip()
+                mantitle = mo.group('mantitle').strip()
+                # mantitle is lowered only if in ALL CAPS
+                if mantitle == mantitle.upper():
+                    mantitle = mantitle.lower()
+                attrs['mantitle'] = mantitle;
                 attrs['manvolnum'] = mo.group('manvolnum').strip()
         AttributeEntry.translate_all()
         s = reader.read_next()
===================================================================

_______________________________________________
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss

Reply via email to