File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,14 @@ ifdef DOCBOOK_SUPPRESS_SP
103
103
XMLTO_EXTRA += -m manpage-suppress-sp.xsl
104
104
endif
105
105
106
+ # If your target system uses GNU groff, it may try to render
107
+ # apostrophes as a "pretty" apostrophe using unicode. This breaks
108
+ # cut&paste, so you should set GNU_ROFF to force them to be ASCII
109
+ # apostrophes. Unfortunately does not work with non-GNU roff.
110
+ ifdef GNU_ROFF
111
+ XMLTO_EXTRA += -m manpage-quote-apos.xsl
112
+ endif
113
+
106
114
SHELL_PATH ?= $(SHELL )
107
115
# Shell quote;
108
116
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH ) )
Original file line number Diff line number Diff line change
1
+ <xsl : stylesheet xmlns : xsl =" http://www.w3.org/1999/XSL/Transform"
2
+ version=" 1.0" >
3
+
4
+ <!-- work around newer groff/man setups using a prettier apostrophe
5
+ that unfortunately does not quote anything when cut&pasting
6
+ examples to the shell -->
7
+ <xsl : template name =" escape.apostrophe" >
8
+ <xsl : param name =" content" />
9
+ <xsl : call-template name =" string.subst" >
10
+ <xsl : with-param name =" string" select =" $content" />
11
+ <xsl : with-param name =" target" >'</xsl : with-param >
12
+ <xsl : with-param name =" replacement" >\(aq</xsl : with-param >
13
+ </xsl : call-template >
14
+ </xsl : template >
15
+
16
+ </xsl : stylesheet >
Original file line number Diff line number Diff line change @@ -159,6 +159,10 @@ all::
159
159
# Define ASCIIDOC_NO_ROFF if your DocBook XSL escapes raw roff directives
160
160
# (versions 1.72 and later and 1.68.1 and earlier).
161
161
#
162
+ # Define GNU_ROFF if your target system uses GNU groff. This forces
163
+ # apostrophes to be ASCII so that cut&pasting examples to the shell
164
+ # will work.
165
+ #
162
166
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
163
167
# MakeMaker (e.g. using ActiveState under Cygwin).
164
168
#
You can’t perform that action at this time.
0 commit comments