Wrap <filename> in \url{...} if justification is turned on. This
prevents the majority of the remaining margin overflows. However, this solution isn't very elegant in that it completely ignores <replaceable>s inside of a <filename> element. The normal TeX that gets output inside of \url{..} confuses TeX, so we must simply process the children of replaceable without doing any additional formatting inside of the \url{..} (such as putting the text into italics). More work needs to be done on this.
This commit is contained in:
parent
81a9fe37de
commit
45c7fe1389
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10648
1 changed files with 29 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
<!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.52 2001/09/08 01:59:22 murray Exp $ -->
|
||||
<!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.53 2001/09/08 02:21:19 murray Exp $ -->
|
||||
|
||||
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
|
||||
<!ENTITY % output.html "IGNORE">
|
||||
|
@ -214,6 +214,34 @@
|
|||
|
||||
(define %hyphenation%
|
||||
#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
|
||||
(let ((%factor% (if %verbatim-size-factor%
|
||||
%verbatim-size-factor%
|
||||
1.0)))
|
||||
(make sequence
|
||||
font-family-name: %mono-font-family%
|
||||
font-size: (* (inherited-font-size) %factor%)
|
||||
(make formatting-instruction data:
|
||||
"\\url{")
|
||||
(with-mode ignore-mode
|
||||
(process-children))
|
||||
(make formatting-instruction data:
|
||||
"}"))))
|
||||
|
||||
;; If we wrap something in \url{..} in the TeX mode, then we
|
||||
;; can't get too funky with putting other stuff inside of it
|
||||
;; or TeX will get confused.
|
||||
|
||||
(mode ignore-mode
|
||||
(element replaceable
|
||||
(process-children)))
|
||||
|
||||
]]>
|
||||
|
||||
<!-- Print only ................................................... -->
|
||||
|
|
Loading…
Reference in a new issue