Skip to content

Commit ee6ad78

Browse files
felipecgitster
authored andcommitted
doc: remove GNU troff workaround
In 2007 the docbook project made the mistake of converting ' to \' for man pages [1]. It's a problem because groff interprets \' as acute accent which is rendered as ' in ASCII, but as ´ in utf-8. This started a cascade of bug reports in git [2], debian [3], Arch Linux [4], docbook itself [5], and probably many others. A solution was to use the correct groff character: \(aq, which is always rendered as ', but the problem is that such character doesn't work in other troff programs. A portable solution required the use of a conditional character that is \(aq in groff, but ' in all others: .ie \n(.g .ds Aq \(aq .el .ds Aq ' The proper solution took time to be implemented in docbook, but in 2010 they did it [6]. So the docbook man page stylesheets were broken from 1.73 to 1.76. Unfortunately by that point many workarounds already existed. In the case of git, GNU_ROFF was introduced, and in the case of Arch Linux a mapping from \' to ' was added to groff's man.local. Other distributions might have done the same, or similar workarounds. Since 2010 there is no need for this workaround, which is fixed elsewhere, not just in docbook, but other layers as well. Let's remove it. [1] docbook/xslt10-stylesheets@ea2a0ba [2] https://lore.kernel.org/git/[email protected]/ [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507673#65 [4] https://bugs.archlinux.org/task/9643 [5] https://sourceforge.net/p/docbook/bugs/1022/ [6] docbook/xslt10-stylesheets@fb55343 Inspired-by: brian m. carlson <[email protected]> Signed-off-by: Felipe Contreras <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73876f4 commit ee6ad78

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

Documentation/Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,6 @@ MAN_BASE_URL = file://$(htmldir)/
191191
endif
192192
XMLTO_EXTRA += -m manpage-base-url.xsl
193193

194-
# If your target system uses GNU groff, it may try to render
195-
# apostrophes as a "pretty" apostrophe using unicode. This breaks
196-
# cut&paste, so you should set GNU_ROFF to force them to be ASCII
197-
# apostrophes. Unfortunately does not work with non-GNU roff.
198-
ifdef GNU_ROFF
199-
XMLTO_EXTRA += -m manpage-quote-apos.xsl
200-
endif
201-
202194
ifdef USE_ASCIIDOCTOR
203195
ASCIIDOC = asciidoctor
204196
ASCIIDOC_CONF =

Documentation/manpage-quote-apos.xsl

Lines changed: 0 additions & 16 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,6 @@ include shared.mak
207207
# Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks
208208
# field that counts the on-disk footprint in 512-byte blocks.
209209
#
210-
# Define GNU_ROFF if your target system uses GNU groff. This forces
211-
# apostrophes to be ASCII so that cut&pasting examples to the shell
212-
# will work.
213-
#
214210
# Define USE_ASCIIDOCTOR to use Asciidoctor instead of AsciiDoc to build the
215211
# documentation.
216212
#

0 commit comments

Comments
 (0)