Turning on smartquotes for HTML output

Remko Lodder remko at FreeBSD.org
Thu May 5 14:04:40 UTC 2005


Murray Stokely wrote:
> 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

i'd say: Go for it :)

-- 
Kind regards,

      Remko Lodder  ** remko at elvandar.org
      Reporter DSINET  **  remko at DSINet.org
      Founder Tienervaders  ** remko at tienervaders.org
      FreeBSD Documentation Project  ** remko at FreeBSD.org



More information about the freebsd-doc mailing list