| 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: | Warren Block (wbl...@wonkity.com) | |
| Date: | Jan 26, 2012 9:46:13 pm | |
| List: | org.freebsd.freebsd-doc | |
| Attachments: | ||
On Fri, 27 Jan 2012, Hiroki Sato wrote:
Changes look good to me, but it is better to use something like this
REINPLACE_TABS_CMD?=${SED} -i -e 's/ /\	/g'
in doc.common.mk (with some comments explaining this is a hack to preserve literal tab characters) and use it in these three.
Revised patch attached (for real, this time). Only lightly tested but no problems noticed.
On Windows XP, IE8 and Firefox 9 render the tabs in the new version correctly.
There is another issue: PDFs. A PDF version with the patch above is at http://www.wonkity.com/~wblock/porters/book.pdf.bz2
Actual tabs come out as a single space in the PDF. Compare that with the unpatched tabs-to-spaces version at ftp://ftp.freebsd.org/pub/FreeBSD/doc/en_US.ISO8859-1/books/porters-handbook/book.pdf.bz2
...which still isn't quite right. Tabs at the beginning of lines are removed. (That file has not been rebuilt in quite a while, either.)
I'm thinking the conversion will be different with DocBook XML, possibly more correct. There are other problems with the current PDFs that might also be cured.
As far as the other formats, book.txt looks somewhat okay, but I've honestly never looked at the .txt or .rtf formats before.
Index: doc/share/mk/doc.docbook.mk =================================================================== RCS file: /home/dcvs/doc/share/mk/doc.docbook.mk,v retrieving revision 1.129 diff -u -r1.129 doc.docbook.mk --- doc/share/mk/doc.docbook.mk 15 May 2011 20:41:31 -0000 1.129 +++ doc/share/mk/doc.docbook.mk 27 Jan 2012 04:48:32 -0000 @@ -525,6 +525,7 @@ ${DOC}.xml .endif .if !defined(NO_TIDY) + ${REINPLACE_TABS_CMD} $$(${XARGS} < HTML.manifest) -${TIDY} ${TIDYOPTS} $$(${XARGS} < HTML.manifest) .endif
@@ -545,6 +546,7 @@ ${DOC}.xml > ${.TARGET} .endif .if !defined(NO_TIDY) + ${REINPLACE_TABS_CMD} ${.TARGET} -${TIDY} ${TIDYOPTS} ${.TARGET} .endif
Index: doc/share/mk/doc.common.mk =================================================================== RCS file: /home/dcvs/doc/share/mk/doc.common.mk,v retrieving revision 1.18 diff -u -r1.18 doc.common.mk --- doc/share/mk/doc.common.mk 2 Nov 2006 18:58:17 -0000 1.18 +++ doc/share/mk/doc.common.mk 27 Jan 2012 04:48:32 -0000 @@ -9,6 +9,9 @@ GREP?= /usr/bin/grep REALPATH?= /bin/realpath SED?= /usr/bin/sed +# a hack to keep tidy from converting tabs to spaces +# replace them with 	 before calling tidy +REINPLACE_TABS_CMD?= ${SED} -i -e 's/ /\	/g'
.if defined(DOC_PREFIX) && !empty(DOC_PREFIX) WEB_PREFIX?= ${DOC_PREFIX}/../www Index: doc/share/mk/doc.html.mk =================================================================== RCS file: /home/dcvs/doc/share/mk/doc.html.mk,v retrieving revision 1.21 diff -u -r1.21 doc.html.mk --- doc/share/mk/doc.html.mk 25 Feb 2006 23:19:40 -0000 1.21 +++ doc/share/mk/doc.html.mk 27 Jan 2012 04:48:32 -0000 @@ -144,6 +144,7 @@ ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET} ${SGMLNORM} -c ${HTMLCATALOG} ${SRCS:S|^|${.CURDIR}/|} > ${.TARGET} .if !defined(NO_TIDY) + ${REINPLACE_TABS_CMD} ${.TARGET} -${TIDY} ${TIDYOPTS} ${.TARGET} .endif
Index: doc/share/mk/doc.xml.mk =================================================================== RCS file: /home/dcvs/doc/share/mk/doc.xml.mk,v retrieving revision 1.15 diff -u -r1.15 doc.xml.mk --- doc/share/mk/doc.xml.mk 9 Aug 2011 06:32:50 -0000 1.15 +++ doc/share/mk/doc.xml.mk 27 Jan 2012 04:48:32 -0000 @@ -385,6 +385,7 @@ ${XSLT.${_ID}} ${XML.${_ID}} . if !defined(NO_TIDY) || empty(NO_TIDY) . if !defined(NO_TIDY.${_ID}) || empty(NO_TIDY.${_ID}) + ${REINPLACE_TABS_CMD} ${.TARGET} -${TIDY} ${TIDYOPTS} ${.TARGET} . endif . endif
_______________________________________________ free...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-doc To unsubscribe, send any mail to "free...@freebsd.org"






.c