Re: [DOCS] Texinfo docs/target

2006-09-28 Thread Andreas Seltenreich
Peter Eisentraut <[EMAIL PROTECTED]> writes:

> Andreas Seltenreich wrote:
>> Now I'm wondering, if it'd be worth fixing the index and some minor
>> encoding deficiencies (e.g. medium-length dashes end up as
>> "[mdash]"), and adding Autoconf support in order to make it a proper
>> target.
>
> We probably won't ship it with the default distribution, but I don't see 
> any harm in at least providing build support for it initially.

The index seems to work with more recent versions of DB2X, and the
apparent encoding problems turned out to be an overlook in the
postgres.xml target.

I had to run makeinfo with the --no-validate option, mostly because
the info design doesn't allow duplicate node names.  However, it
doesn't seem to impair navigation besides addressing nodes by name,
and since most of the duplicate names are nodes like "Changes" in the
release notes section, I don't think it will be more of a nuisance
than being unable to look up Pi in the index...

I figured adding autoconf support for db2x/info wouldn't be very wise
as long as the experimental postgres.xml target the new rules depend
on doesn't have any either.

Patch attached.

regards,
andreas

Index: doc/src/sgml/Makefile
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/Makefile,v
retrieving revision 1.76
diff -u -r1.76 Makefile
--- doc/src/sgml/Makefile	6 Apr 2006 18:54:36 -	1.76
+++ doc/src/sgml/Makefile	29 Sep 2006 04:27:59 -
@@ -212,7 +212,7 @@
 
 postgres.xml: postgres.sgml $(GENERATED_SGML)
 	$(OSX) -x lower $< | \
-	  sed -e 's/\[\(lt\|gt\|amp\|nbsp\|copy\|quot\|ouml\|uuml\|egrave\) *\]/\&\1;/g' \
+	  sed -e 's/\[\(amp\|copy\|egrave\|gt\|lt\|mdash\|nbsp\|ouml\|pi\|quot\|uuml\) *\]/\&\1;/g' \
 	  -e '1a\' -e 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>' \
 	  >$@
 
@@ -222,6 +222,24 @@
 htmlhelp: stylesheet-hh.xsl postgres.xml
 	$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam pg.version '$(VERSION)' $^
 
+##
+## Experimental Texinfo targets
+##
+
+DB2X_TEXIXML = db2x_texixml
+DB2X_XSLTPROC = db2x_xsltproc
+MAKEINFO = makeinfo
+
+postgres.texixml: postgres.xml
+	$(DB2X_XSLTPROC) -s texi $< -o $@
+
+postgres.texi: postgres.texixml
+	$(DB2X_TEXIXML) --encoding=iso-8859-1//TRANSLIT $< \
+			--to-stdout > $@
+
+postgres.info: postgres.texi
+	$(MAKEINFO) --enable-encoding --no-split \
+		--no-validate $< -o $@
 
 ##
 ## Check
@@ -249,3 +267,5 @@
 	rm -f INSTALL HISTORY regress_README
 # XML
 	rm -f postgres.xml htmlhelp.hhp toc.hhc index.hhk
+# Texinfo
+	rm -f *.texixml *.texi *.info db2texi.refs

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[DOCS] bug in psql-ref

2006-09-28 Thread Andreas Seltenreich
While testing the texinfo target, I noticed the following bug in the
psql reference.  Declaring a printed character as part of the control
sequence is likely to confuse readline about what is on the screen,
causing unreliable line editing.

Patch attached.

regards,
andreas

Index: doc/src/sgml/ref/psql-ref.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.169
diff -u -r1.169 psql-ref.sgml
--- doc/src/sgml/ref/psql-ref.sgml	16 Sep 2006 00:30:19 -	1.169
+++ doc/src/sgml/ref/psql-ref.sgml	29 Sep 2006 04:27:42 -
@@ -2491,7 +2491,7 @@
  %]. Multiple pairs of these may occur within
  the prompt.  For example,
 
-testdb=> \set PROMPT1 '%[%033[1;33;[EMAIL PROTECTED]/%R%[%033[0m%#%] '
+testdb=> \set PROMPT1 '%[%033[1;33;[EMAIL PROTECTED]/%R%[%033[0m%]%# '
 
  results in a boldfaced (1;) yellow-on-black
  (33;40) prompt on VT100-compatible, color-capable

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings