Use a formatting-instruction to work around the problem where Jade
thinks that it must never output something like "_" to the TeX backend, and should instead use \char{95}. The package we are using to hyphenate URLs, url.sty, is designed to allow URLs without worrying about such things, and will literally display the \char{95} without this patch.
This commit is contained in:
parent
486bf4abfd
commit
2f6155eed2
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10652
1 changed files with 33 additions and 21 deletions
|
@ -1,4 +1,4 @@
|
||||||
<!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.54 2001/09/11 02:06:03 murray Exp $ -->
|
<!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.55 2001/09/11 02:31:50 murray Exp $ -->
|
||||||
|
|
||||||
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
|
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
|
||||||
<!ENTITY % output.html "IGNORE">
|
<!ENTITY % output.html "IGNORE">
|
||||||
|
@ -348,32 +348,44 @@
|
||||||
(define %hyphenation%
|
(define %hyphenation%
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
;; This could be done better. However, I was not able to come
|
|
||||||
;; up with a more elegant solution that still builds the entire
|
|
||||||
;; Handbook. If you can come up with a better way to do this,
|
|
||||||
;; please do!
|
|
||||||
|
|
||||||
(element filename
|
;; The url.sty package is making all of the links purple/pink.
|
||||||
|
;; Someone please fix this!
|
||||||
|
|
||||||
|
(define (urlwrap)
|
||||||
(let ((%factor% (if %verbatim-size-factor%
|
(let ((%factor% (if %verbatim-size-factor%
|
||||||
%verbatim-size-factor%
|
%verbatim-size-factor%
|
||||||
1.0)))
|
1.0)))
|
||||||
(make sequence
|
(make sequence
|
||||||
font-family-name: %mono-font-family%
|
font-family-name: %mono-font-family%
|
||||||
font-size: (* (inherited-font-size) %factor%)
|
font-size: (* (inherited-font-size) %factor%)
|
||||||
(make formatting-instruction data:
|
(make formatting-instruction data:
|
||||||
"\\url{")
|
(string-append
|
||||||
(with-mode ignore-mode
|
"\\url|"
|
||||||
(process-children))
|
(data (current-node))
|
||||||
(make formatting-instruction data:
|
"|")))))
|
||||||
"}"))))
|
|
||||||
|
|
||||||
;; If we wrap something in \url{..} in the TeX mode, then we
|
(define (pathwrap)
|
||||||
;; can't get too funky with putting other stuff inside of it
|
(let ((%factor% (if %verbatim-size-factor%
|
||||||
;; or TeX will get confused.
|
%verbatim-size-factor%
|
||||||
|
1.0)))
|
||||||
|
(make sequence
|
||||||
|
font-family-name: %mono-font-family%
|
||||||
|
font-size: (* (inherited-font-size) %factor%)
|
||||||
|
(make formatting-instruction data:
|
||||||
|
(string-append
|
||||||
|
"\\path|"
|
||||||
|
(data (current-node))
|
||||||
|
"|")))))
|
||||||
|
|
||||||
(mode ignore-mode
|
(element port
|
||||||
(element replaceable
|
(pathwrap))
|
||||||
(process-children)))
|
|
||||||
|
(element filename
|
||||||
|
(pathwrap))
|
||||||
|
|
||||||
|
(element varname
|
||||||
|
(pathwrap))
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue