Bug 17003 - some codes (".ft C") not for humans are left in displayed man-pages
Summary: some codes (".ft C") not for humans are left in displayed man-pages
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: git (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
: 19972 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-03 15:01 MSD by Ivan Zakharyaschev
Modified: 2012-03-16 13:59 MSK (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2008-09-03 15:01:30 MSD
Things like ".ft C" appear in the displayed manpages, but they are not part of the content of the manpages, just some technical codes left there erroneously:

$ man git-fetch | fgrep -1 .ft

           .ft C
                   [url "<actual url base>"]
                           insteadOf = <other url base>
           .ft

--

           .ft C
                   [url "git://git.host.xz/"]
--
                           insteadOf = work:
           .ft

--

           .ft C
                   [remote "<name>"]
--
                           fetch = <refspec>
           .ft

--

           .ft C
                   URL: one of the above URL format
--

           .ft

--

           .ft C
                   <url>#<head>
           .ft

--

           .ft C
                   refs/heads/<head>:<repository>
           .ft

$ rpm -q man git-doc
man-1.6f-alt1
git-doc-1.5.6.5-alt2
$
Comment 1 Alexey Gladkov 2008-09-05 02:36:50 MSD
В коде этой страницы написано следующее:
\&.ft C 
        [url "git://git\&.host\&.xz/"] 
                insteadOf = host\&.xz:/path/to/ 
                insteadOf = work: 
\&.ft

Цитирую groff(7):
\&     Non-printable, zero-width glyph.

Именно он мешает исполнению .ft . Мне кажется это ошибка в этой странице.
Comment 2 Slava Semushin 2008-09-12 16:42:04 MSD
Reassign
Comment 3 Dmitry V. Levin 2008-09-12 16:59:18 MSD
Это результат работы asciidoc.
Comment 4 Andrey Rahmatullin 2008-10-07 01:33:56 MSD
commit 281a53bb79786a6d7e54f9715cc8ad46fc2bdb0e
Author: Julian Phillips <julian@quantumfyre.co.uk>
Date:   Wed Jul 18 22:33:57 2007 +0100

    Force listingblocks to be monospaced in manpages

    For the html output we can use a stylesheet to make sure that the
    listingblocks are presented in a monospaced font.  For the manpages do
    it manually by inserting a ".ft C" before and ".ft" after the block in
    question.

    In order for these roff commands to get through to the manpage they
    have to be element encoded to prevent quoting.


commit 7f55cf451c9e7c35cad2efcd0bb7bbd7c7ae29ac
Author: Jonas Fonseca <fonseca@diku.dk>
Date:   Wed Nov 14 10:38:46 2007 +0100

    Documentation: Fix man page breakage with DocBook XSL v1.72

    From version 1.72 it will replace all dots in roff requests with U+2302
    ("house" character), and add escaping in output for all instances of dot
    that are not in roff requests. This caused the ".ft" hack forcing
    monospace font in listingblocks to end up as "\&.ft" and being visible
    in the resulting man page.

    The fix adds a DOCBOOK_XSL_172 build variable that will disable the
    hack. To allow this variable to be defined in config.mak it also moves
    build variable handling below the inclusion of config.mak.
Comment 5 Dmitry V. Levin 2008-10-21 02:29:46 MSD
(In reply to comment #4)
> commit 281a53bb79786a6d7e54f9715cc8ad46fc2bdb0e

Same problem in git-core-1.6.0.2-alt1.
Comment 6 Andrey Rahmatullin 2008-10-21 08:10:39 MSD
Problem? It suggests to define DOCBOOK_XSL_172 during build, if we are using docbook-style-xsl >= 1.72.
Comment 7 Dmitry V. Levin 2008-10-21 13:12:07 MSD
(In reply to comment #6)
> Problem? It suggests to define DOCBOOK_XSL_172 during build, if we are using docbook-style-xsl >= 1.72.

Thank you for the hint.
Comment 8 Sir Raorn 2009-05-07 17:27:49 MSD
*** Bug 19972 has been marked as a duplicate of this bug. ***
Comment 9 Sir Raorn 2009-05-07 17:41:41 MSD
В Documentation/asciidoc.conf есть такое:

ifndef::docbook-xsl-172[]
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
# v1.72 breaks with this because it replaces dots not in roff requests.
[listingblock]
<example><title>{title}</title>
<literallayout>
ifdef::doctype-manpage[]
&#10;.ft C&#10;
endif::doctype-manpage[]
|
ifdef::doctype-manpage[]
&#10;.ft&#10;
endif::doctype-manpage[]
</literallayout>
{title#}</example>
endif::docbook-xsl-172[]

Для dockbook-styles-xsl 1.73+, думаю, это уже неактуально, потому как man получается нормальный (см. напр. man -t и получившийся постскрипт, моноспейсом на сером фоне).
Comment 10 Sir Raorn 2009-05-07 17:51:10 MSD
В новом git это чинится опцией ASCIIDOC_NO_ROFF.

http://git.kernel.org/?p=git/git.git;a=commitdiff;h=8fa2b45f
Comment 11 Repository Robot 2009-05-15 17:42:22 MSD
git-1.6.3.1-alt1 -> sisyphus:

* Thu May 14 2009 Dmitry V. Levin <ldv@altlinux> 1.6.3.1-alt1

- Updated to maint v1.6.3.1.
- Fixed build of documentation with fresh asciidoc and docbook xsl (closes: #17003).