Turning on smartquotes for HTML output

Murray Stokely murray at freebsdmall.com
Thu May 5 13:17:52 UTC 2005


I would like to use proper entities to generate smart quotes rather
than relying on double ``ticks''.  The following patch produces much
nicer looking quotes in FireFox and Opera on FreeBSD.  We didn't have
this option many years ago when the quote element was first added to
our stylesheets, but the smartquote entities are now well supported so
we should use them.  If there are no objections I'll commit the
following patch.

	- Murray

Index: release.dsl
===================================================================
RCS file: /home/ncvs/src/release/doc/share/sgml/release.dsl,v
retrieving revision 1.8
diff -u -r1.8 release.dsl
--- release.dsl	5 Sep 2004 13:50:38 -0000	1.8
+++ release.dsl	5 May 2005 13:12:19 -0000
@@ -117,9 +117,9 @@
 	<!-- Convert " ... " to `` ... '' in the HTML output. -->
 	(element quote
 	  (make sequence
-	    (literal "``")
+	    (literal "“")
 	    (process-children)
-	    (literal "''")))
+	    (literal "”")))
 
         <!-- Specify how to generate the man page link HREF -->
         (define ($create-refentry-xref-link$ #!optional (n (current-node)))

Index: freebsd.dsl
===================================================================
RCS file: /home/dcvs/doc/share/sgml/freebsd.dsl,v
retrieving revision 1.87
diff -u -r1.87 freebsd.dsl
--- freebsd.dsl	31 Dec 2004 22:34:52 -0000	1.87
+++ freebsd.dsl	5 May 2005 13:13:04 -0000
@@ -275,9 +275,9 @@
 	<!-- Convert " ... " to `` ... '' in the HTML output. -->
 	(element quote
 	  (make sequence
-	    (literal "``")
+	    (literal "“")
 	    (process-children)
-	    (literal "''")))
+	    (literal "”")))
 
 	;; The special FreeBSD version of the trademark tag handling.
 	;; This function was more or less taken from the DocBook DSSSL



More information about the freebsd-doc mailing list