From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6716 invoked by alias); 11 Jun 2002 23:01:16 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 6652 invoked from network); 11 Jun 2002 23:01:10 -0000 Received: from unknown (HELO comtv.ru) (217.10.32.4) by sources.redhat.com with SMTP; 11 Jun 2002 23:01:10 -0000 Received: from [10.0.1.181] (HELO mhz.mikhail.zabaluev.name) by comtv.ru (CommuniGate Pro SMTP 3.5.9) with ESMTP id 3445798; Wed, 12 Jun 2002 03:00:43 +0400 Received: by mhz.mikhail.zabaluev.name (Postfix, from userid 500) id 7BDCD896; Wed, 12 Jun 2002 03:04:46 +0400 (MSD) Date: Tue, 11 Jun 2002 16:01:00 -0000 From: Mikhail Zabaluev To: twaugh@redhat.com Cc: docbook-tools-discuss@sources.redhat.com Subject: docbook-utils patches Message-ID: <20020611230446.GD1948@mhz.mikhail.zabaluev.name> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="96YOpH+ONegL0A3E" Content-Disposition: inline User-Agent: Mutt/1.3.99i X-SW-Source: 2002-q2/txt/msg00041.txt.bz2 Message-ID: <20020611160100._W7Hn_mXftJ3DybBWlcCAXBnz5VFZwwO0xit-JqSRLo@z> --96YOpH+ONegL0A3E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 544 Hello, Here are two patches that solve issues with docbook-utils. The first plugs in an SGML normalizer to obtain the real doctype declaration for cases when other /dev/null` + if [ -z "SGML_NORM" ] + then + SGML_NORM=`which osgmlnorm 2>/dev/null` + fi +fi + # Set path to SGML catalogs (first try centralized catalog) case $SGML_STANDARD_CATALOGS in - yes) export SGML_CATALOGS_DIR SGML_FILE SGML_XML + yes) export SGML_CATALOGS_DIR SGML_FILE SGML_XML SGML_NORM SGML_CENTRALIZED_CATALOG=`sh $SGML_FRONTEND centralized-catalog` if [ -s $SGML_CENTRALIZED_CATALOG ] then --- docbook-utils-0.6.10/frontends/docbook.in.autover Mon Apr 15 20:58:21 2002 +++ docbook-utils-0.6.10/frontends/docbook.in Tue Jun 11 13:33:23 2002 @@ -6,13 +6,33 @@ # Give the location of the centralized catalog # First try the one with a version matching the version that is indicated in the document centralized-catalog) - SGML_VERSION=`grep -i '/dev/null | + grep -i '&2 exit 5 fi + +case "$SGML_OPTIONS" in + *paper-size*) + ;; + *) + # Set the paper size to A4 if the locale suggests so + papersize= + if [ -x /usr/bin/locale ] + then + h=$(/usr/bin/locale LC_PAPER 2>/dev/null | head -1) + if [ "$h" = 297 ] + then + papersize=A4 + fi + fi + if [ -n "$papersize" ] + then + SGML_OPTIONS="-V paper-size=$papersize $SGML_OPTIONS" + fi + ;; +esac # Choose a parser if [ -z "$SGML_JADE" ] --- docbook-utils-0.6.10/frontends/docbook.in.a4 Mon Apr 15 20:58:21 2002 +++ docbook-utils-0.6.10/frontends/docbook.in Tue Jun 11 14:26:15 2002 @@ -18,21 +18,7 @@ style-sheet) case $SGML_STYLESHEET in default) - base="${SGML_BASE_DIR}/docbook/utils-@VERSION@/docbook-utils" - pagesize= - if [ -x /usr/bin/locale ] - then - h=$(locale LC_PAPER 2>/dev/null | head -1) - if [ "$h" = "297" ] - then - pagesize=-a4 - fi - fi - if [ -f "${base}${pagesize}.dsl" ] - then - base="${base}${pagesize}" - fi - echo "${base}.dsl#${SGML_TYPE}" + echo "${SGML_BASE_DIR}/docbook/utils-@VERSION@/docbook-utils.dsl#${SGML_TYPE}" ;; none) find $SGML_BASE_DIR -name docbook.dsl | grep "$SGML_TYPE/docbook.dsl" | awk '{print $1}' --96YOpH+ONegL0A3E--