[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK: Implementing DocBook on MS-DOS/Windows
Bob, I wrote a Q&D Guide to install a docbook on RH 7.1. I've looked it over again. It looks simple to convert this process to Win$$. I'll include it below and annotate (>>>Win$$) suggestions for Win$$ conversion. Let me know how you fare. Jonathan ------------------------------------------------------------------------ This is a hybrid installation where the programs tetex and openjade are installed from RPM, and the definitions are installed from their source the remaining definitions installed from their source. >>>Win$$: Just get the openjade binaries for Windows from >>>Win$$: openjade.sourceforge.net. Do not worry about Tetex. Refs: http://www.linuxdoc.org/authors/index.html#resources >>>Win$$: Look over this page it is very useful. 1. INSTALLATION ******************** 1.1. Install Tetex Installed the latest Redhat version, 1.07-27 rpm. Openjade uses tetex macros. Installed all the tetex packages. >>>Win$$: Ignore Tetex. 1.2. Install Openjade. Installed the latest Redhat version, 1.3.-17 rpm. 1.3. Install DocBook DTD's Got DocBook SGML 3.1 and DocBook SGML 4.1 from http://www.oasis-open.org/docbook/sgml/index.shtml Got DocBook XML 4.1.2 from http://www.oasis-open.org/docbook/xml/index.shtml These arrived as zip archives, Unzipped them into /usr/local/share/docbook/sgml-3.1/ /usr/local/share/docbook/sgml-4.1/ /usr/local/share/docbook/xml-4.1.2/ respectively. >>>Win$$: substitute C:\docbook for /usr/local/share/docbook >>>Win$$: If you are only interested in sgml, just get sgml-4.1 1.4. Install DocBook Entity Definitions Got http://www.linuxdoc.org/authors/tools/entities.tar.gz and un-tgz'd it repeatedly into each of the above DTD directories 1.5. Install DSSSL Stylesheets. Got the latest (1.72) style sheets and documentation from: http://sourceforge.net/projects/docbook/ >>>>> The latest version is now 1.73. Un-tgz'd the docs in /usr/share/doc/ >>>Win$$: Put the documentation where you like. Un-tgz'd the style sheets in /usr/local/share/docbook/, it creates a sub-dir /docbook-dsssl-1.72 in both cases >>>Win$$: Put in C:\docbook. (version is 1.73 not 1.72). 1.6. Install the LDP Customizations Got the lastest from: http://www.linuxdoc.org/authors/tools/ldp.dsl Copied this file into /usr/local/share/docbook/ldp >>>Win$$: copy ldp.dsl to C:\docbook\docbook-dsssl-1.73\html\. and >>>Win$$: C:\docbook\docbook-dsssl-1.73\print\. 2. CONFIGURATION ********************* 2.1 Create the following symlinks >>>Win$$ Do not worry about creating the symlinks. cd /usr/local/share/docbook/ ln -s sgml-4.1 sgml ln -s xml-4.1.2 xml ln -s docbook-dsssl-1.72 dsssl cd sgml-3.1 ln -s docbook.cat catalog cd ../sgml ln -s docbook.cat catalog cd ../xml ln -s docbook.cat catalog cd /usr/share/sgml ln -s openjade-1.3 openjade 2.2 Create the following file: >>>>>>>>>/usr/local/share/docbook/catalog CATALOG "/usr/share/sgml/openjade/catalog" CATALOG "/usr/local/share/docbook/dsssl/catalog" CATALOG "/usr/local/share/docbook/sgml/catalog" CATALOG "/usr/local/share/docbook/xml/catalog" <<<<<<<</usr/local/share/docbook/catalog >>>Win$$: substitute C:\docbook for /usr/local/share/docbook >>>Win$$: if not interested in xml delete last line 2.3 Add the following env variables to startup file I use bash, so add the following to /etc/profile ----------- export JADE_HOME=/usr/share/sgml/openjade export SGML_SHARE=/usr/local/share/docbook export SGML_CATALOG_FILES=$SGML_SHARE/catalog ----------- >>>Win$$: use SET in autoexec.bat - fix the JADE_HOME >>>Win$$: and SGML_SHARE=C:\docbook. 2.4 Apply the LDP customizations >>>Win$$ Ignore this step. cd /usr/local/share/docbook/dsssl/html ln -s ../../ldp/ldp.dsl . cd ../print ln -s ../../ldp/ldp.dsl . Log out and in again for env variables to take effect. >>>Win$$: The following applies until the next >>>Win$$ tag. Get a docbook sgml template to verify the installation. http://www.linuxdoc.org/authors/template/big-howto-template.sgml For multifile html (on one line). openjade -t sgml -d c:\docbook\docbook-dsssl-1.73\html\ldp.dsl#html <sgml-filename> for single file html (on one line) openjade -t sgml -V nochunks -V rootchunk -d c:\docbook\docbook-dsssl-1.73\html\ldp.dsl#html <sgml-filename> for a single rtf file. (0n one line) openjade -t rtf -d c:\docbook\docbook-dsssl-1.73\html\ldp.dsl#print -o <rtf outfile> <sgml file> To get from rtf use Win$$'s wordpad, and print using adobe's Acorobat distiller. >>>Win$$$ 3 Validating and Publishing xml or sgml ********************************************* To validate sgml nsgmls -sv -c $SGML_CATALOG_FILES <file>.sgml To validgate xml nsgmls -sv -c $SGML_CATALOG_FILES $SGML_SHARE/dsssl/dtds/decls/xml.dcl <file>.sgml The following script creates a <filename>.output subdirectory, into which it creates a dvi, tex, single html, chapterised html, pdf, ps, and txt files. >>>>>>>>>>/usr/local/bin/publish #!/bin/sh FILE=$1 IMAGES=$2 DSL_PRINT="${SGML_SHARE}/dsssl/print/ldp.dsl#print" DSL_HTML="${SGML_SHARE}/dsssl/html/ldp.dsl#html" if [ "`echo $FILE | grep \"\.xml$\"`" != "" ] ; then EXT=xml XTRA="${SGML_SHARE}/dsssl/dtds/decls/xml.dcl" elif [ "`echo $FILE | grep \"\.sgml$\"`" != "" ] ; then EXT=sgml XTRA="" else echo "To publish docbook formatted sgml or xml." echo "Usage: publish <filename>.{sgml,xml} [image-dir]" echo " where:" echo " filename is the file to publish" echo " image-dir is the relative dir path containing images" echo "" exit 1 fi if [ ! -f $FILE ] ; then echo "File: $FILE not found" exit 2 fi BASE=`basename $FILE $EXT` mkdir ${BASE}output > /dev/null 2>&1 cd ${BASE}output if [ "$?" != "0" ] ; then echo "Cannot mkdir or cd to ${BASE}output" exit 3 fi rm -fr * mkdir chaps if [ -n $IMAGES ] ; then mkdir images mkdir chaps/images cp ../${IMAGES}/* images/. > /dev/null 2>&1 cp ../${IMAGES}/* chaps/images/. > /dev/null 2>&1 fi cd chaps openjade -t $EXT-raw -E 0 -d $DSL_HTML $XTRA ../../$FILE mkdir patch for f in `\ls *.html` ; do sed -e 's,<br/>,<br>,g' $f > patch/$f done cd .. openjade -t $EXT-raw -E 0 -V nochunks -V rootchunk -d $DSL_HTML $XTRA ../$FILE sed -e 's,<br/>,<br>,g' index.html > ${BASE}html lynx -dump -nolist ${BASE}html > ${BASE}txt openjade -t rtf -E 0 -d $DSL_PRINT -o ${BASE}rtf $XTRA ../$FILE openjade -t tex -E 0 -d $DSL_PRINT -o ${BASE}tex $XTRA ../$FILE jadetex ${BASE}tex jadetex ${BASE}tex jadetex ${BASE}tex dvips -o ${BASE}ps ${BASE}dvi pdfjadetex ${BASE}tex pdfjadetex ${BASE}tex <<<<<<<</usr/local/bin/publish Execute publish as follows to hide unnecessary warning clutter. publish harold-config.xml 2>&1 | fgrep -v "DTDDECL catalog entries" ----------------------------------------------------------------- Robert CTR Oaks wrote: > I want to first thank those of you have previously responded to my plea for > help. But I have decided to change my plea. > > I am very interested in using DocBook to prepare software documentation and for > writing technical papers. Unfortunately, although I utilize a "real" computer > system (i.e., UNIX) for programming and maintaining data in an Oracle database, > I am forced to use a Windows PC for documentation. I say unfortunately because I > believe that MS Word is the worst word processing program that I have ever used > and I've been using word processing software for 20 years. > > DocBook appears to provide all the capabilities that I want and in a manner that > I can use. But I have encountered difficulties implementing jade and the DocBook > DTD on my PC. As I see it, in order to complete this implementation I need to > learn much more about the specifics of DTDs and DSSSLs, but I just don't have > the time because I am juggling numerous work assignments during the day and most > of my evenings are devoted to preparation for a programming class I teach. > > I'm willing to use a text editor to prepare and maintain the documentation -- in > fact, I still use the vi-editor to maintain html for web pages. What I want is > to be able to write some sgml pages using the DocBook DTD's constructs so I can > determine if DocBook provides the capabilities I need. At this point in time, I > have no intention of writing my own DTD or DSSLs. > > Does anyone out there know if this is possible? > > ==> Bob > > ---------------------------------------------------------------- > To subscribe or unsubscribe from this elist use the subscription > manager: <http://lists.oasis-open.org/ob/adm.pl> >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC