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
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.


Index: asciidoc.py
--- asciidoc.py
+++ asciidoc.py
@@ -1295,7 +1295,11 @@
             if not mo:
                 error('malformed manpage title')
-                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()
         s = reader.read_next()

Asciidoc-discuss mailing list

Reply via email to