| From | Sent On | Attachments |
|---|---|---|
| Warren Block | Jan 18, 2012 2:49 pm | |
| Hiroki Sato | Jan 18, 2012 3:44 pm | |
| Warren Block | Jan 18, 2012 5:13 pm | |
| Hiroki Sato | Jan 18, 2012 10:57 pm | |
| Warren Block | Jan 20, 2012 12:05 pm | .c |
| Gabor Kovesdan | Jan 21, 2012 3:16 pm | |
| Warren Block | Jan 21, 2012 4:29 pm | |
| Gabor Kovesdan | Jan 23, 2012 9:07 am | |
| Warren Block | Jan 23, 2012 11:38 am | .py |
| Hiroki Sato | Jan 24, 2012 5:23 pm | |
| Gabor Kovesdan | Jan 24, 2012 6:15 pm | |
| Hiroki Sato | Jan 24, 2012 6:18 pm | |
| Warren Block | Jan 26, 2012 10:20 am | |
| Warren Block | Jan 26, 2012 10:22 am | .diff |
| Hiroki Sato | Jan 26, 2012 7:45 pm | |
| Warren Block | Jan 26, 2012 9:46 pm | .diff |
| Hiroki Sato | Jan 26, 2012 10:50 pm | .diff |
| Hiroki Sato | Jan 27, 2012 5:24 am | .diff |
| Warren Block | Jan 27, 2012 7:53 am | .diff |
| Hiroki Sato | Jan 27, 2012 8:58 am | .diff |
| Warren Block | Jan 27, 2012 11:43 am | |
| Hiroki Sato | Jan 28, 2012 12:57 am | |
| Warren Block | Jan 28, 2012 2:47 pm | |
| Hiroki Sato | Jan 28, 2012 10:24 pm |
| Subject: | Re: Tidy and HTML tab spacing | |
|---|---|---|
| From: | Hiroki Sato (hr...@FreeBSD.org) | |
| Date: | Jan 27, 2012 8:58:23 am | |
| List: | org.freebsd.freebsd-doc | |
| Attachments: | ||
Warren Block <wbl...@wonkity.com> wrote in <alpi...@wonkity.com>:
wb> On Fri, 27 Jan 2012, Hiroki Sato wrote: wb> wb> > Hiroki Sato <hr...@freebsd.org> wrote wb> > in <2012...@allbsd.org>: wb> > wb> > hr> I think the attached patch should fix the issue in the PDF format. wb> > hr> Could you test it? wb> > wb> > The previous patch did not include width calculation of the tab wb> > expansion (always used 8 spaces). The attached one does it for a wb> > simple character sequence. wb> wb> That helps a lot! Single tabs and multiple tabs are slightly wb> different, but it's close. wb> http://www.wonkity.com/~wblock/porters/tab1.png (good!) wb> http://www.wonkity.com/~wblock/porters/tab2.png (close) wb> wb> http://www.wonkity.com/~wblock/porters/tab3.png wb> wb> Should be: wb> LIB_DEPENDS+= foo.0:${PORTSDIR}/devel/foo wb> CONFIGURE_ARGS+= --enable-foo wb> wb> The second line '=' lands right before a tab stop, and the tab is wb> replaced with a single space. wb> wb> Thanks!
How about the attached one? A bug that could cause an extra space was fixed.
-- Hiroki
Index: freebsd-print.dsl
===================================================================
RCS file: /home/ncvs/doc/share/sgml/freebsd-print.dsl,v
retrieving revision 1.2
diff -d -u -I \$FreeBSD:.*\$ -I \$NetBSD:.*\$ -I \$OpenBSD:.*\$ -I
\$DragonFly:.*\$ -I \$Id:.*\$ -I \$Translation:.*\$ -I \$hrs:.*\$ -r1.2
freebsd-print.dsl
--- freebsd-print.dsl 8 Dec 2010 06:25:59 -0000 1.2
+++ freebsd-print.dsl 27 Jan 2012 16:56:59 -0000
@@ -6,12 +6,12 @@
<!ENTITY % output.print.pdf "IGNORE">
<!ENTITY % output.print.justify "IGNORE">
<!ENTITY % output.print.twoside "IGNORE">
+<!ENTITY % output.print.niceheaders "IGNORE">
<!ENTITY % freebsd.l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific
Entities//EN">
%freebsd.l10n;
<!ENTITY % freebsd.l10n-common PUBLIC "-//FreeBSD//ENTITIES DocBook Language
Neutral Entities//EN">
%freebsd.l10n-common;
-]]>
]>
<style-sheet> @@ -616,6 +616,99 @@ (with-mode section-title-mode (process-node-list subtitles)) ($section-info$ info)))) + + ;; Expand a literal tab character to spaces in elements like + ;; programlisting. + (define %default-tab-spacing% 8) + + (define ($verbatim-display$ indent line-numbers?) + (let* ((width-in-chars (if (attribute-string (normalize "width")) + (string->number + (attribute-string (normalize "width"))) + %verbatim-default-width%)) + (fsize (lambda () (if (or (attribute-string (normalize "width")) + (not %verbatim-size-factor%)) + (/ (/ (- %text-width% + (inherited-start-indent)) + width-in-chars) + 0.7) + (* (inherited-font-size) + %verbatim-size-factor%)))) + (vspace-before (if (INBLOCK?) + 0pt + (if (INLIST?) + %para-sep% + %block-sep%))) + (vspace-after (if (INBLOCK?) + 0pt + (if (INLIST?) + 0pt + %block-sep%)))) + (make paragraph + use: verbatim-style + space-before: (if (and (string=? (gi (parent)) + (normalize "entry")) + (absolute-first-sibling?)) + 0pt + vspace-before) + space-after: (if (and (string=? (gi (parent)) + (normalize "entry")) + (absolute-last-sibling?)) + 0pt + vspace-after) + font-size: (fsize) + line-spacing: (* (fsize) %line-spacing-factor%) + start-indent: (if (INBLOCK?) + (inherited-start-indent) + (+ %block-start-indent% + (inherited-start-indent))) + (if (or indent line-numbers?) + ($linespecific-line-by-line$ indent line-numbers?) + (let loop ((kl (children (current-node))) + (tabsp %default-tab-spacing%) + (res (empty-sosofo))) + (if (node-list-empty? kl) + res + (loop + (node-list-rest kl) + (cond + ((char=? (node-property + 'char (node-list-first kl) + default: #\U-0000) #\U-0009) + %default-tab-spacing%) + ((char=? (node-property + 'char (node-list-first kl) + default: #\U-0000) #\U-000D) + %default-tab-spacing%) + ((char? (node-property + 'char (node-list-first kl) + default: #f)) + (- (if (= (modulo tabsp %default-tab-spacing%) 0) + %default-tab-spacing% + (modulo tabsp %default-tab-spacing%)) + 1)) + (#t + (- (if (= (modulo tabsp %default-tab-spacing%) 0) + %default-tab-spacing% + (modulo tabsp %default-tab-spacing%)) + (modulo (string-length (data (node-list-first kl))) + %default-tab-spacing%)))) + (let ((c (node-list-first kl))) + (if (char=? (node-property + 'char c + default: #\U-0000) #\U-0009) + (sosofo-append res + (let sploop ((spc + (if (= tabsp 0) + %default-tab-spacing% + tabsp))) + (if (> spc 0) + (sosofo-append + (literal " ") + (sploop (- spc 1))) + (empty-sosofo)))) + (sosofo-append res + (process-node-list c))))))))))) ]]>
<





.c