IAW bundle Teil 2

git-svn-id: https://svn.libreccm.org/ccm/trunk@263 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-09-12 00:13:49 +00:00
parent 8a27bd0907
commit 90982fabb3
72 changed files with 9678 additions and 0 deletions

View File

@ -0,0 +1,68 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Create an HTML document with index and figures in place.
# This is done by:
# 1. Converting from SGML to HTML
# 2. Generating an SGML index based on the HTML
# 3. Converting from SGML to HTML (taking into account the index this time)
# 4. Copying figures from original source tree into the output directory
# The end result is a directory tree ready for publishing/packaging/whatever...
# Point to the CSS and standard admon graphics. Note that these paths use
# the "dsssl-stylesheets" symlink to point to the latest dsssl stuff...
FINAL_INDEX=generated-index.sgml
#ADMON_GRAPHICS=/usr/share/sgml/docbook/dsssl-stylesheets/images/*.gif
ADMON_GRAPHICS=../rh-sgml/stylesheet-images/*.gif
INDEXFILE=INDEX$$
# Convert to HTML, generating the HTML.index file that we'll use to
# create an SGML index...
echo Running $SGML_JADE...
$SGML_JADE -t sgml -V html-index $SGML_ARGUMENTS
# Generate the index, fixing up the problem of bogus empty closing tags (</>)...
echo Indexing...
perl /usr/bin/collateindex.pl -g -i generated-index -o ../$FINAL_INDEX HTML.index
# Not sure if these are still needed; when we first tried collateindex;
# it threw "</>" in the generated index in certain cases...
cat ../$FINAL_INDEX | sed 's,^[ ]*</>[ ]*$,,' > ../$INDEXFILE
mv -f ../$INDEXFILE ../$FINAL_INDEX
# Nuke the HTML.index file; we don't need it anymore...
rm -f HTML.index
echo Rerunning $SGML_JADE...
$SGML_JADE -t sgml $SGML_ARGUMENTS
echo -n "Copying admon graphics..."
mkdir ./stylesheet-images
cp ${ADMON_GRAPHICS} ./stylesheet-images/
echo "Done!"
if [ -d ../figs/ ]
then
echo -n "Moving figures..."
(cd ../ ; tar chf - figs/) | (tar xf -)
echo "Done!"
echo -n "Cleaning CVS..."
find ./figs/ -type d -name "CVS"|xargs rm -rf
echo -n "EPS..."
find ./figs/ -type f -name "*eps"|xargs rm -f
echo -n " .xvpics..."
find ./figs/ -type d -name ".xvpics"|xargs rm -rf
echo -n "directories..."
find ./figs/ -type d -empty|xargs rm -rf
echo "Done!"
fi
#
exit 0

View File

@ -0,0 +1,80 @@
#Makefile for Red Hat Documentation
#Created by Tammy Fox <tfox@redhat.com>
#Copyright Red Hat Inc. 2001
include Makefile.local
TOP = $(shell pwd)
PRINTENTITY = SET-FOR-PRINT
LANG = en
SGMLFILE = $(DOCNAME).sgml
HTMLSCRIPT = db2indexed-html
VERSION = $(shell awk '/Version:/ { print $$2 }' $(DOCNAME).spec)
RELEASE = $(shell awk '/Release:/ { print $$2 }' $(DOCNAME).spec)
get-ext = $(subst .,,$(suffix $(1)))
SPLITTER = java -cp ../docs-stuff/classes/ com.redhat.ccm.documentation.Splitter
sedexpr = -e 's/^\(<!ENTITY \+% \+$2 \+"\)\(INCLUDE\|IGNORE\)\(">\)/\1$1\3/'
incl = $(call sedexpr,INCLUDE,$1)
ignore = $(call sedexpr,IGNORE,$1)
inclsedcmd = sed $(call incl,$1) $2
ignoresedcmd = sed $(call ignore,$1) $2
all: sgml html ps pdf rpm
sgml:
ifdef SPLITTERDIRS
$(SPLITTER) build $(shell find $(SPLITTERDIRS) -type f -not -name "*~" -not -name "\#*")
find build/ -type f -exec ln -sf {} \;
endif
html: sgml
$(call ignoresedcmd,$(PRINTENTITY),$(SGMLFILE)) > $(DOCNAME)-temp.sgml
$(HTMLSCRIPT) --output $(DOCNAME) $(DOCNAME)-temp.sgml
@rm $(DOCNAME)-temp.sgml
@rm -rf $(DOCNAME)-$(VERSION)
@mv $(DOCNAME) $(DOCNAME)-$(VERSION)
ps pdf: sgml $(SGMLFILE)
@rm -f $(DOCNAME).$@
$(MAKE) $(addsuffix .$@,$(basename $(SGMLFILE)))
%.ps %.pdf:
$(call inclsedcmd,$(PRINTENTITY),$(SGMLFILE)) > $(DOCNAME)-temp.sgml
db2indexed-$(call get-ext,$@) $(notdir $(DOCNAME)-temp.sgml)
@rm $(DOCNAME)-temp.sgml
@mv $(DOCNAME)-temp.$(call get-ext,$@) $(DOCNAME)-$(VERSION)-$(RELEASE).$(call get-ext,$@)
tarball: html
@cp -f ../docs-stuff/icon/docs.png $(DOCNAME)-$(VERSION)
@tar cvjf $(DOCNAME)-$(VERSION).tbz $(DOCNAME)-$(VERSION)/*
@echo "The archive is in $(DOCNAME)-$(VERSION).tbz"
zip: html
@cp -f ../docs-stuff/icon/docs.png $(DOCNAME)-$(VERSION)
@zip -r $(DOCNAME)-$(VERSION).zip $(DOCNAME)-$(VERSION)/*
@echo "The archive is in $(DOCNAME)-$(VERSION).zip"
srpm: tarball
@rpmbuild -ts $(DOCNAME)-$(VERSION).tbz
@echo "SRPM created"
rpm: tarball
@rpmbuild -bb --define "_sourcedir `pwd`" $(DOCNAME).spec
@echo "RPM created"
clean:
@rm -rfv *.ps *.pdf *.tex *.out *.log html $(DOCNAME) $(DOCNAME)-$(VERSION) $(DOCNAME).junk *.tbz generated-index.sgml build
find . -maxdepth 1 -lname "build/*" -exec rm {} \;
zipclean: clean
@rm -f *.zip
splitter: classes/com/redhat/ccm/documentation/Splitter.class
classes/com/redhat/ccm/documentation/Splitter.class: src/com/redhat/ccm/documentation/Splitter.java
@mkdir -p classes
javac -d classes src/com/redhat/ccm/documentation/Splitter.java

View File

@ -0,0 +1 @@
#empty

View File

@ -0,0 +1,127 @@
#! /bin/sh
RH_STYLESHEET=`dirname $0`/stylesheets/RHL7/redhat-html.dsl
HTML_STYLESHEET=/usr/lib/sgml/stylesheets/nwalsh-modular/test/docbook.css
ADMON_GRAPHICS=/usr/lib/sgml/stylesheets/nwalsh-modular/images/*.gif
FINAL_INDEX=generated-index.sgml
output=db2html-dir
TMPDIR=DBTOHTML_OUTPUT_DIR$$
INDEXFILE=INDEX$$
TMPSTYLE=`dirname $0`/stylesheets/STYLE$$
HTM_EXTENSIONS=0
# Process any options...
while getopts ":3" opt; do
case $opt in
3 ) HTM_EXTENSIONS=1 ;;
\? ) echo "Usage: `basename $0` [options] [filename.sgml]" >&2
echo "Options:" >&2
echo " -3 -- create HTML output with .htm file extensions" >&2
exit 1 ;;
esac
done
shift $(($OPTIND - 1))
if [ $# -gt 2 ] || [ $# -lt 1 ]
then
echo "Usage: `basename $0` [options] [filename.sgml]" >&2
echo "Options:" >&2
echo " -3 -- create HTML output with .htm file extensions" >&2
exit 1
fi
if [ $# -eq 1 ]
then
if [ ! -r $1 ]
then
echo Cannot read \"$1\". Exiting. >&2
exit 1
fi
if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
then
# now make sure that the output directory is always a subdirectory
# of the current directory
input_file=`basename $1`
output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
fi
fi
if [ $HTM_EXTENSIONS -eq 1 ]
then
# We need to take the normal stylesheet, and hack a temporary version to use...
cat $RH_STYLESHEET | sed 's/^[ ]*"\.html"[ ]*)[ ]*$/ ".htm")/' > $TMPSTYLE
# Point to the new temporary stylesheet...
RH_STYLESHEET=$TMPSTYLE
fi
mkdir $TMPDIR
SAVE_PWD=`pwd`
if [ $1 = `basename $1` ]; then
echo Running jade...
RH_STYLESHEET="`echo $RH_STYLESHEET | sed 's,^\([^/]\),\.\./\1,'`"
(cd $TMPDIR; jade -t sgml -ihtml -d ${RH_STYLESHEET} -V html-index ../$1; cd $SAVE_PWD)
# Generate the index, fixing up the problem of bogus empty closing tags (</>)...
for index_script in /usr/bin/collateindex.pl /usr/lib/sgml/stylesheets/nwalsh-modular/bin/collateindex.pl
do
if [ -f $index_script ]; then
echo Indexing...
perl $index_script -g -o $FINAL_INDEX $TMPDIR/HTML.index
fi
done
# Not sure if these are still needed; when we first tried collateindex, it threw "</>"
# in the generated index in certain cases...
cat $FINAL_INDEX | sed 's,^[ ]*</>[ ]*$,,' > $INDEXFILE
mv -f $INDEXFILE $FINAL_INDEX
# We should now have a good index; clean up and rerun...
echo Rerunning jade...
rm -rf $TMPDIR
mkdir $TMPDIR
(cd $TMPDIR; jade -t sgml -ihtml -d ${RH_STYLESHEET} ../$1; cd $SAVE_PWD)
else
# Yeah, I know it's ugly, but...
echo Rerun this script from the directory containing your SGML... >&2
exit 1
fi
if [ -d ${output}.junk ]
then
/bin/rm -rf ${output}.junk
fi
if [ -d ${output} ]
then
mv $output ${output}.junk
fi
echo "Copying cascading stylesheet and admon graphics..."
cp ${HTML_STYLESHEET} ${TMPDIR}/
mkdir ${TMPDIR}/stylesheet-images
cp ${ADMON_GRAPHICS} ${TMPDIR}/stylesheet-images
echo Moving figures and cleaning up random stuff...
if [ -d figs/ ]
then
tar cf - figs/ | (cd $TMPDIR; tar xf -)
find $TMPDIR/figs/ -type d -name "CVS"|xargs rm -rf
find $TMPDIR/figs/ -type f -name "*eps"|xargs rm -f
find $TMPDIR/figs/ -type d -name ".xvpics"|xargs rm -rf
find $TMPDIR/figs/ -type d -empty|xargs rm -rf
fi
rm -f $TMPSTYLE
mv ${TMPDIR} $output
rm -rf $TMPDIR
exit 0

View File

@ -0,0 +1,400 @@
/*
CSS stylesheet for the HTML versions of Red Hat Documentation
Created by Tammy Fox <tfox@redhat.com>
*/
body {
background-color: #ffffff;
color: #000000;
margin: 0;
padding: 0;
font-family: helvetica, arial,sans-serif;
font-size: 12pt;
/* needed so buttons created with css don't bleed into text */
line-height: 1.3;
}
body.book, body.article, body.chapter, body.part, body.preface, body.sect1, body.index, body.colophon, body.glossary, body.reference, body.refentry {
font-family: helvetica, arial,sans-serif;
font-size: 12pt;
background-color: #ffffff;
margin: 0;
padding : 0;
}
p, td, th, .variablelist {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
/* left must be 0 so it lines up */
margin : 10px 0px 10px 0px;
}
div.article p {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
/* if in article made from XML left must be 10 so it lines up */
margin : 10px 10px 10px 10px;
}
li {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
}
table {
width: 90%;
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
margin : 0px 0px 0px 0px;
}
table.note, table.tip, table.important, table.caution, table.warning {
width: 95%;
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
border: 2px solid #B0C4DE;
background-color: #F0F8FF;
color: #000000;
/* padding inside table area */
padding: 0.5em;
margin-bottom: 0.5em;
margin-top: 0.5em;
}
/* set width smaller is IE is happy */
ul table.note, ul table.tip, ul table.important, ul table.caution, ul table.warning, ol table.note, ol table.t\ip, ol table.important, ol table.caution, ol table.warning {
width: 95%;
}
.computeroutput, .command {
font-family: courier, courier new, monospace;
font-size: 12pt;
}
.userinput {
font-family: courier, courier new, monospace;
font-size: 12pt;
font-weight: bold;
}
table.screen {
width: 95%;
font-family: courier, courier new, monospace;
font-size: 12pt;
border: 2px solid #A9A9A9;
background-color: #DCDCDC;
color: #000000;
padding: 0.5em;
margin-bottom: 0.5em;
margin-top: 0.5em;
}
table.calstable {
width: 95%;
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
background-color: #DCDCDC;
color: #000000;
}
table.calstable td {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
border: 1px solid #A9A9A9;
background-color: #DCDCDC;
color: #000000;
padding: 0.5em;
margin-bottom: 0.5em;
margin-top: 2px;
margin : 0px 0px 0px 10px;
}
table.calstable th {
border: 2px solid #A9A9A9;
background-color: #A9A9A9;
color: #000000;
}
.navheader, .navfooter {
background-color: #ffffff;
color: #000000;
/* need top margin so title line isn't touching the top */
margin : 10px 20px 0px 20px;
font-family: helvetica, arial,sans-serif;
font-size: 12pt;
}
div.navheader hr, div.navfooter hr {
background-color: #CCCCCC;
margin: 0px 0px 0px 0px;
height: 1px;
border-style: none;
}
div.navheader table, div.navfooter table {
width: 95%;
background-color: #ffffff;
margin: 0px 0px 0px 0px;
padding: 0;
font-family: helvetica, arial,sans-serif;
font-size: 12pt;
}
body>div.navheader table, body>div.navfooter table {
/* Hidden from IE */
width: 100%;
}
/* top hr on index page is not in a div so it needs div margins */
hr {
background-color: #CCCCCC;
margin: 0px 10px 0px 10px;
height: 1px;
border-style: none;
}
h2, h2.indexdiv {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
font-weight: bold;
color: #990000;
}
h3
{
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
font-weight: bold;
line-height: 1.4em;
color: #990000;
}
h4
{
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
font-weight: bold;
color: #990000;
}
h5
{
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
font-weight: bold;
color: #990000;
}
h6 {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
font-weight: bold;
color: #666666;
}
a:link {
color: #000066;
}
a:visited
{
color: #333399;
}
/* not in a div, so need standard left margin */
.footnotes {
width: 95%;
margin : 10px 20px 10px 20px;
font-size: 12pt;
}
div.preface, div.colophon, div.chapter, div.appendix, div.index, div.partintro, div.legalnotice, div.glossary, div.refnamediv, div.refsect1 {
margin : 0px 20px 0px 20px;
font-family: helvetica, arial, sans-serif;
}
/* A, B, etc. in Index */
div.indexdiv {
font-family: helvetica, arial, sans-serif;
}
div.titlepage {
margin : 0px 10px 0px 10px;
font-family: helvetica, arial, sans-serif;
}
/* div.sect1 for an article doesn't have the extra padding from a div.chapter */
div.article div.sect1 {
margin : 0px 10px 0px 10px;
font-family: helvetica, arial, sans-serif;
}
/* div.sect1 on same page as div.chapter, etc. with margins and padding already */
div.chapter div.sect1, div.preface div.sect1, div.appendix div.sect1, div.colophon div.sect1 {
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
padding: 0;
}
/* on separate page without div.chapter, so need same padding */
div.sect1 {
margin : 0px 20px 0px 20px;
font-family: helvetica, arial, sans-serif;
}
/* same as dev.sect1 except no padding because div.sect1 doesn't end before div.sect2, etc.*/
div.sect2, div.sect3, div.sect4 {
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
padding: 0;
}
/* chapter, preface, and colophon titles don't have a class */
h1 {
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
font-size: 18pt;
font-weight: bold;
color: #990000;
}
h1.sect1, h2.sect1 {
/* already in div.sect1, so no margins */
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
font-size: 18pt;
font-weight: bold;
color: #990000;
}
h2.sect2, h2.title {
/* already in div.sect1, so no margins */
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
font-size: 16pt;
font-weight: bold;
color: #990000;
}
h3.sect3, h3.title {
/* already in div.sect1, so no margins */
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
font-size: 14pt;
font-weight: bold;
color: #990000;
}
h4.sect4, h5.sect5, h6.sect6 {
/* already in div.sect1, so no margins */
margin : 0px 0px 0px 0px;
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
font-weight: bold;
color: #990000;
}
/* book and article titles on index.html page and part title pages */
h1.title {
font-family: helvetica, arial, sans-serif;
font-size: 22pt;
font-weight: bold;
color: #990000;
margin : 10px 10px 10px 10px;
/* add padding so title is not touching top margin */
padding: 10 0 0;
}
body.refentry h1 {
margin: 0 0 0 20px;
}
div.glossary h1 {
font-family: helvetica, arial, sans-serif;
font-size: 22pt;
font-weight: bold;
color: #990000;
margin : 10px 10px 10px 0px;
/* add padding so title is not touching top margin */
padding: 10 0 0;
}
.subtitle {
font-family: helvetica, arial, sans-serif;
font-size: 18pt;
color:#666666;
font-weight: bold;
margin : 10px 10px 10px 10px;
padding: 0;
}
b.othername {
font-family: helvetica, arial, sans-serif;
font-size: 18pt;
color:#666666;
font-weight: bold;
margin : 10px 10px 10px 10px;
padding: 0;
}
.copyright, .affiliation {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
color:#666666;
margin : 10px 10px 10px 10px;
padding: 0;
}
isbn.isbn {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
color:#666666;
margin : 10px 10px 10px 10px;
padding: 0;
}
.toc {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
padding: 0;
margin : 10px 20px 10px 20px;
}
.citetitle {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
color:#666666;
font-weight: bold;
}
div.qandaset big {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
color: #990000;
}
.author {
font-family: helvetica, arial, sans-serif;
font-size: 12pt;
color:#990000;
font-weight: bold;
margin : 10px;
line-height: 1.4em;
}
/* make guibuttons look like real buttons */
.guibutton {
color: #000000;
font-family: helvetica, arial, sans-serif;
background-color: #DCDCDC;
padding: 1px 3px;
font-size: 10pt;
border: outset 2px;
text-decoration: none;
}

View File

@ -0,0 +1,51 @@
#! /bin/sh
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
# Figure out what our output directory should be called. Note that we
# also check to see if the user explicitly specified an output directory,
# in which case we'll use their choice...
O_OPTION=0
for i in "$@"
do
if [ $O_OPTION = "1" ]
then
OUTPUTDIR=$i
O_OPTION=0
fi
if [ $i = "-o" ]
then
O_OPTION=1
fi
done
# See if the user specified an output directory...
if [ -z $OUTPUTDIR ]
then
# Nope -- default to the name of the SGML file...
OUTPUTDIR="`echo $i | sed 's,\.sgml$,,;s,\.sgm$,,'`"
fi
# Nuke the output directory (if it exists); jw will create it for us...
if [ -d $OUTPUTDIR ]
then
echo -n "Cleaning out $OUTPUTDIR..."
rm -rf $OUTPUTDIR
echo "Done!"
fi
jw -f docbook \
-b $STUFFPATH/indexed-html \
-d $STUFFPATH/stylesheets/redhat.dsl#html \
-o $OUTPUTDIR \
$*

View File

@ -0,0 +1,54 @@
#! /bin/sh
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
#
#Grab name of the SGML file without extension
#
O_OPTION=0
for i in "$@"
do
if [ $O_OPTION = "1" ]
then
FILENAME=$i
O_OPTION=0
fi
if [ $i = "-o" ]
then
O_OPTION=1
fi
done
if [ -z $FILENAME ]
then
# Grab name of the SGML file...
FILENAME="`echo $i | sed 's,\.sgml$,,;s,\.sgm$,,'`"
fi
# Generate index
jw -f docbook \
-b $STUFFPATH/index \
-d $STUFFPATH/stylesheets/redhat.dsl#html \
-o $FILENAME-tmp \
$*
# Generate PDF with generated index
jw -f docbook \
-b $STUFFPATH/indexed-pdf \
-d $STUFFPATH/stylesheets/redhat.dsl#print \
$*
# Remove temp directory
echo -n Removing temp directory $PWD/$FILENAME-tmp...
rm -rf $PWD/$FILENAME-tmp
echo Done!

View File

@ -0,0 +1,54 @@
#! /bin/sh
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
#
#Grab name of the SGML file without extension
#
O_OPTION=0
for i in "$@"
do
if [ $O_OPTION = "1" ]
then
FILENAME=$i
O_OPTION=0
fi
if [ $i = "-o" ]
then
O_OPTION=1
fi
done
if [ -z $FILENAME ]
then
# Grab name of the SGML file...
FILENAME="`echo $i | sed 's,\.sgml$,,;s,\.sgm$,,'`"
fi
# Generate index
jw -f docbook \
-b $STUFFPATH/index \
-d $STUFFPATH/stylesheets/redhat.dsl#html \
-o $FILENAME-tmp \
$*
# Generate PS with generated index
jw -f docbook \
-b $STUFFPATH/indexed-ps \
-d $STUFFPATH/stylesheets/redhat.dsl#print \
$*
# Remove temp directory
echo -n Removing temp directory $PWD/$FILENAME-tmp...
rm -rf $PWD/$FILENAME-tmp
echo Done!

View File

@ -0,0 +1,54 @@
#! /bin/sh
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
#
#Grab name of the SGML file without extension
#
O_OPTION=0
for i in "$@"
do
if [ $O_OPTION = "1" ]
then
FILENAME=$i
O_OPTION=0
fi
if [ $i = "-o" ]
then
O_OPTION=1
fi
done
if [ -z $FILENAME ]
then
# Grab name of the SGML file...
FILENAME="`echo $i | sed 's,\.sgml$,,;s,\.sgm$,,'`"
fi
# Generate index
jw -f docbook \
-b $STUFFPATH/index \
-d $STUFFPATH/stylesheets/redhat-training.dsl#html \
-o $FILENAME-tmp \
$*
# Generate PDF with generated index
jw -f docbook \
-b $STUFFPATH/indexed-training-pdf \
-d $STUFFPATH/stylesheets/redhat-training.dsl#print \
$*
# Remove temp directory
echo -n Removing temp directory $PWD/$FILENAME-tmp...
rm -rf $PWD/$FILENAME-tmp
echo Done!

View File

@ -0,0 +1,46 @@
#! /bin/sh
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
DVI_PAGES=$1
FILENAME=$2
export DVI_PAGES
if [ "$1" == "" ] || [ "$2" == "" ] ; then
echo "Usage: $0 <page-nums> <parent-file>"
echo "example: $0 42-50 rhl-cg-en.sgml"
exit 1
fi
#
#Grab name of the SGML file without extension
#
FILENAME="`echo $FILENAME | sed 's,\.sgml$,,;s,\.sgm$,,'`"
# Generate index
jw -f docbook \
-b $STUFFPATH/index \
-d $STUFFPATH/stylesheets/redhat.dsl#html \
-o $FILENAME-tmp \
${FILENAME}.sgml
# Generate PDF with generated index
jw -f docbook \
-b $STUFFPATH/indexedpg-pdf \
-d $STUFFPATH/stylesheets/redhat.dsl#print \
${FILENAME}.sgml
# Remove temp directory
echo -n Removing temp directory $PWD/$FILENAME-tmp...
rm -rf $PWD/$FILENAME-tmp
echo Done!

View File

@ -0,0 +1,16 @@
#! /bin/sh
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
jw -f docbook \
-b html \
-d $STUFFPATH/stylesheets/redhat-nochunks.dsl#html \
--nochunks \
$*

View File

@ -0,0 +1,60 @@
#!/usr/bin/perl
#
#
# convert image to Encapsulated Postscript, with possible scaling of width
#
# Downloaded from http://people.redhat.com/dcm/
#
# Modified by tfox for Red Hat Documentation - default to width of 4
#
$width = "4";
if ($ARGV[0] =~ /^--width=(.+)$/) {
$width = $1;
shift (@ARGV);
}
#print "width =",$width,"\n";
#print "argv =",$ARGV[0],"\n";
$infile = $ARGV[0];
if (!(-e $infile)) {
print "File doesn't exist\n";
exit 1;
}
$imagesz = `identify $ARGV[0]`;
($name, $type, $size, $rest) = split / /, $imagesz, 4;
#print "split:", $name, " ", $type, " ", $size, " ", $rest, "\n";
#print "size = ",$size,"\n";
($x, $y) = split /x/, $size, 2;
($y, $rest) = split /\+/, $y, 2;
#print $x," by ",$y, "\n";
#
# if width set, we need to scale
#
if ($width != "") {
$scale = $width * (72.0/$x);
} else {
$scale = 1;
}
$scale = 72.0/$scale;
#print "scale = ",$scale,"\n";
$outfile = $infile;
$outfile =~ s/\.gif/\.png/;
print $infile," ",$outfile,"\n";
system("convert -type TrueColor $infile $outfile");

View File

@ -0,0 +1,63 @@
#!/usr/bin/perl
#
#
# convert image to Encapsulated Postscript, with possible scaling of width
#
# Example: img2eps --width=3 myfile.gif
# (width in inches)
#
$width = "";
if ($ARGV[0] =~ /^--width=(.+)$/) {
$width = $1;
shift (@ARGV);
}
#print "width =",$width,"\n";
#print "argv =",$ARGV[0],"\n";
$infile = $ARGV[0];
if (!(-e $infile)) {
print "File doesn't exist\n";
exit 1;
}
$imagesz = `identify $ARGV[0]`;
($name, $type, $size, $rest) = split / /, $imagesz, 4;
#print "split:", $name, " ", $type, " ", $size, " ", $rest, "\n";
#print "size = ",$size,"\n";
($x, $y) = split /x/, $size, 2;
($y, $rest) = split /\+/, $y, 2;
#print $x," by ",$y, "\n";
#
# if width set, we need to scale
#
if ($width != "") {
$scale = $width * (72.0/$x);
} else {
$scale = 1;
}
$scale = 72.0/$scale;
#print "scale = ",$scale,"\n";
$tmpfile = $infile;
$tmpfile =~ s/\.gif/\.ept/;
$outfile = $infile;
$outfile =~ s/\.gif/\.eps/;
#print $infile," ",$outfile,"\n";
system("convert $infile tmpimage.pgm");
#system("giftopnm $infile | ppmtopgm > tmpimage.pgm");
system("convert -density $scale tmpimage.pgm $tmpfile");
system("mv -f $tmpfile $outfile");
system("rm -f tmpimage.pgm");

View File

@ -0,0 +1,47 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Make sure we have an absolute path to the backend and stylesheet, as
# jw doesn't like relative paths...
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
# Generate the index, fixing up the problem of bogus empty closing tags (</>)...
FINAL_INDEX=generated-index.sgml
INDEXFILE=INDEX$$
# Convert to HTML, generating the HTML.index file that we'll use to
# create an SGML index...
echo Running $SGML_JADE...
$SGML_JADE -t sgml -V html-index -i html -d $STUFFPATH/stylesheets/redhat.dsl#html ../${SGML_FILE_NAME}.sgml
# Generate the index, fixing up the problem of bogus empty closing tags (</>)...
echo Indexing...
if [ $LANG = "it_IT" ]; then
SYMBOL="-s Simboli"
elif [ $LANG = "es_ES" ]; then
SYMBOL="-s Símbolos"
else
SYMBOL=""
fi
perl /usr/bin/collateindex.pl -g $SYMBOL -i generated-index -o ../$FINAL_INDEX HTML.index
# Not sure if these are still needed; when we first tried collateindex;
# it threw "</>" in the generated index in certain cases...
cat ../$FINAL_INDEX | sed 's,^[ ]*</>[ ]*$,,' > ../$INDEXFILE
mv -f ../$INDEXFILE ../$FINAL_INDEX
echo Rerunning $SGML_JADE...
$SGML_JADE -t sgml -i html -d $STUFFPATH/stylesheets/redhat.dsl#html ../${SGML_FILE_NAME}.sgml

View File

@ -0,0 +1,89 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Create an HTML document with index and figures in place.
# This is done by:
# 1. Converting from SGML to HTML
# 2. Generating an SGML index based on the HTML
# 3. Converting from SGML to HTML (taking into account the index this time)
# 4. Copying figures from original source tree into the output directory
# The end result is a directory tree ready for publishing/packaging/whatever...
# Make sure we have an absolute path to the backend, DSSSL stylesheet, and CSS
STUFFPATH=`dirname $0`
if [ -n "${STUFFPATH##/*}" ]
then
STUFFPATH=$PWD/$STUFFPATH
fi
FINAL_INDEX=generated-index.sgml
INDEXFILE=INDEX$$
CSSFILE=$STUFFPATH/css/rhdocs-man.css
# Convert to HTML, generating the HTML.index file that we'll use to
# create an SGML index...
echo Running $SGML_JADE...
$SGML_JADE -t sgml -V html-index $SGML_ARGUMENTS
# Generate the index, fixing up the problem of bogus empty closing tags (</>)...
echo Indexing...
if [ $LANG = "it_IT" ]; then
SYMBOL="-s Simboli"
elif [ $LANG = "es_ES" ]; then
SYMBOL="-s Símbolos"
else
SYMBOL=""
fi
perl /usr/bin/collateindex.pl -g $SYMBOL -i generated-index -o ../$FINAL_INDEX HTML.index
# Not sure if these are still needed; when we first tried collateindex;
# it threw "</>" in the generated index in certain cases...
cat ../$FINAL_INDEX | sed 's,^[ ]*</>[ ]*$,,' > ../$INDEXFILE
mv -f ../$INDEXFILE ../$FINAL_INDEX
# Nuke the HTML.index file; we don't need it anymore...
rm -f HTML.index
echo Rerunning $SGML_JADE...
$SGML_JADE -t sgml $SGML_ARGUMENTS
echo -n "Copying admon graphics..."
if [ ! -d ./stylesheet-images ]; then
mkdir -p ./stylesheet-images
fi
cp $STUFFPATH/stylesheet-images/*.png ./stylesheet-images/
echo "Done!"
if [ -d ../figs/ ]
then
echo -n "Moving figures..."
(cd ../ ; tar chf - figs/) | (tar xf -)
echo "Done!"
echo -n "Cleaning CVS..."
find ./figs/ -type d -name "CVS"|xargs rm -rf
echo -n "EPS..."
find ./figs/ -type f -name "*eps"|xargs rm -f
echo -n ".xvpics..."
find ./figs/ -type d -name ".xvpics"|xargs rm -rf
echo -n ".dia..."
find ./figs/ -type f -name "*dia"|xargs rm -rf
echo -n "directories..."
find ./figs/ -type d -empty|xargs rm -rf
echo "Done!"
fi
echo -n "Adding css..."
cp $CSSFILE rhdocs-man.css
#addcss.py *.html
echo "Done!"
exit 0

View File

@ -0,0 +1,75 @@
#!/bin/bash
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Support for Asian Languages by Paul Gampe <pgampe@redhat.com>
JADETEX="jadetex"
CJK="no"
if [ $LANG = "ja_JP" -o $LANG = "zh_TW" \
-o $LANG = "zh_CN" -o $LANG = "ko_KR" ]; then
echo "Enabling Asian Language Support via jadetex-cjk"
JADETEX="jadetex-cjk"
CJK="yes"
fi
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
$JADETEX ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 -a $CJK != "yes" ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
INDEX_CNT=0
INDEX_MAX=5
while egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
do
if [ $INDEX_CNT -gt $INDEX_MAX ] ; then
echo "Could not resolve undefined references after $INDEX_MAX tries"
exit 1
fi;
echo "$INDEX_CNT: re-running $JADETEX to resolve undefined references"
$JADETEX ${SGML_FILE_NAME}.tex >/dev/null
INDEX_CNT=`expr $INDEX_CNT + 1`
done
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
if [ "$CJK" = "no" ]; then
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 5.49in,8.26in -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
if [ $? -ne 0 ]
then
rm ${SGML_FILE_NAME}.dvi
exit 3
fi
rm ${SGML_FILE_NAME}.dvi
echo Done!
# Convert from PS to PDF
echo -n Converting to PDF...
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a5 -sOutputFile=${SGML_FILE_NAME}.pdf ${SGML_FILE_NAME}.ps
rm ${SGML_FILE_NAME}.ps
else
dvipdfm -p a5 ${SGML_FILE_NAME}.dvi > /dev/null
fi
echo Done!
exit 0

View File

@ -0,0 +1,78 @@
#!/bin/bash
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Support for Asian Languages by Paul Gampe <pgampe@redhat.com>
JADETEX="jadetex"
CJK="no"
if [ $LANG = "ja_JP" -o $LANG = "zh_TW" \
-o $LANG = "zh_CN" -o $LANG = "ko_KR" ]; then
echo "Enabling Asian Language Support via jadetex-cjk"
JADETEX="jadetex-cjk"
CJK="yes"
fi
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
$JADETEX ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 -a $CJK != "yes" ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
INDEX_CNT=0
INDEX_MAX=5
while egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
do
if [ $INDEX_CNT -gt $INDEX_MAX ] ; then
echo "Could not resolve undefined references after $INDEX_MAX tries"
exit 1
fi;
echo "$INDEX_CNT: re-running $JADETEX to resolve undefined references"
$JADETEX ${SGML_FILE_NAME}.tex >/dev/null
INDEX_CNT=`expr $INDEX_CNT + 1`
done
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
if [ "$CJK" = "no" ]; then
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 5.49in,8.26in -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
if [ $? -ne 0 ]
then
rm ${SGML_FILE_NAME}.dvi
exit 3
fi
rm ${SGML_FILE_NAME}.dvi
echo Done!
# Convert from PS to PDF
echo -n Converting to PDF...
gs -q -dNOPAUSE -dBATCH \
-dEncodeGrayImages=false -dAntiAliasGrayImages=true \
-sDEVICE=pdfwrite -sPAPERSIZE=a5 -sOutputFile=${SGML_FILE_NAME}.pdf ${SGML_FILE_NAME}.ps
rm ${SGML_FILE_NAME}.ps
else
dvipdfm -p a5 ${SGML_FILE_NAME}.dvi > /dev/null
fi
echo Done!
exit 0

View File

@ -0,0 +1,44 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
then
jadetex ${SGML_FILE_NAME}.tex >/dev/null
jadetex ${SGML_FILE_NAME}.tex >/dev/null
fi
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 5.49in,8.26in -k -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
if [ $? -ne 0 ]
then
rm ${SGML_FILE_NAME}.dvi
exit 3
fi
rm ${SGML_FILE_NAME}.dvi
echo Done!
exit 0

View File

@ -0,0 +1,50 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
then
jadetex ${SGML_FILE_NAME}.tex >/dev/null
jadetex ${SGML_FILE_NAME}.tex >/dev/null
fi
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 8.5in,11in -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
if [ $? -ne 0 ]
then
rm ${SGML_FILE_NAME}.dvi
exit 3
fi
rm ${SGML_FILE_NAME}.dvi
echo Done!
# Convert from PS to PDF
echo -n Converting to PDF...
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -sOutputFile=${SGML_FILE_NAME}.pdf ${SGML_FILE_NAME}.ps
rm ${SGML_FILE_NAME}.ps
echo Done!
exit 0

View File

@ -0,0 +1,44 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
then
jadetex ${SGML_FILE_NAME}.tex >/dev/null
jadetex ${SGML_FILE_NAME}.tex >/dev/null
fi
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 8.5in,11in -k -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
if [ $? -ne 0 ]
then
rm ${SGML_FILE_NAME}.dvi
exit 3
fi
rm ${SGML_FILE_NAME}.dvi
echo Done!
exit 0

View File

@ -0,0 +1,52 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
then
jadetex ${SGML_FILE_NAME}.tex >/dev/null
jadetex ${SGML_FILE_NAME}.tex >/dev/null
fi
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
echo ${DVI_PAGES}
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 5.49in,8.26in -pp ${DVI_PAGES} -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}-pg${DVI_PAGES}.ps
if [ $? -ne 0 ]
then
# rm ${SGML_FILE_NAME}.dvi
exit 3
fi
#rm ${SGML_FILE_NAME}.dvi
echo Done!
# Convert from PS to PDF
echo -n Converting to PDF...
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a5 -sOutputFile=${SGML_FILE_NAME}-pg${DVI_PAGES}.pdf ${SGML_FILE_NAME}-pg${DVI_PAGES}.ps
rm ${SGML_FILE_NAME}-pg${DVI_PAGES}.ps
echo Done!
exit 0

View File

@ -0,0 +1,46 @@
# Based on original from Eric Bischoff <eric@caldera.de>
# Modified by Tammy Fox <tfox@redhat.com> for Red Hat Documentation
# Convert to TeX
$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
if [ $? -ne 0 ]
then exit 1
fi
# Convert from TeX to DVI
jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.out
if [ $? -ne 0 ]
then
cat ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.out
rm ${SGML_FILE_NAME}.tex
exit 2
fi
rm ${SGML_FILE_NAME}.out
# If there are unresolved references, re-run jadetex, twice
if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
then
jadetex ${SGML_FILE_NAME}.tex >/dev/null
jadetex ${SGML_FILE_NAME}.tex >/dev/null
fi
#Keep log file - tfox
#rm ${SGML_FILE_NAME}.log
rm ${SGML_FILE_NAME}.aux
rm ${SGML_FILE_NAME}.tex
echo ${DVI_PAGES}
# Convert from DVI to PostScript
echo -n Converting to PS...
dvips -T 5.49in,8.26in -k -pp ${DVI_PAGES} -q ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}-pg${DVI_PAGES}.ps
if [ $? -ne 0 ]
then
# rm ${SGML_FILE_NAME}.dvi
exit 3
fi
#rm ${SGML_FILE_NAME}.dvi
echo Done!
exit 0

View File

@ -0,0 +1,89 @@
#!/usr/bin/perl
#
#
# convert image to Encapsulated Postscript, with possible scaling of width
#
# Downloaded from http://people.redhat.com/dcm/
#
# Modified by tfox for Red Hat Documentation - default to width of 4
#
# Modified by tfox for Red Hat Documentation - if eps exists, use same scaling
#
if ($ARGV[0] =~ /^--width=(.+)$/) {
$width = $1;
shift (@ARGV);
}
#print "width =",$width,"\n";
#print "argv =",$ARGV[0],"\n";
$infile = $ARGV[0];
$outfile = $infile;
$outfile =~ s/\.png/\.eps/;
if (!(-e $infile)) {
print "File doesn't exist\n";
exit 1;
}
if (!(-e $outfile)) {
# print "EPS File doesn't exist\n";
#default width to 4 if it is not specified
if ($width == "") {
$width = "4";
}
} else
{
#if eps exists AND no width is specified, use existing scaling
if ($width == "") {
print "scaling $infile based on existing EPS\n";
$epsimagesz = `identify $outfile`;
#print "epsimagesz=", $epsimagesz,"\n";
($epsname, $epstype, $epssize, $epsrest) = split / /, $epsimagesz, 4;
# print "epssplit:", $epsname, " ", $epstype, " ", $epssize, " ", $epsrest, "\n";
#print "epssize = ",$epssize,"\n";
($epsx, $epsy) = split /x/, $epssize, 2;
($epsy, $epsrest) = split /\+/, $epsy, 2;
#print $epsx," by ",$epsy, "\n";
$width = $epsx/72.0;
#print "epswidth=", $width, "\n";
}
}
$imagesz = `identify $ARGV[0]`;
#print "imagesz=", $imagesz,"\n";
($name, $type, $size, $rest) = split / /, $imagesz, 4;
#print "split:", $name, " ", $type, " ", $size, " ", $rest, "\n";
#print "size = ",$size,"\n";
($x, $y) = split /x/, $size, 2;
($y, $rest) = split /\+/, $y, 2;
#print $x," by ",$y, "\n";
# if width set, we need to scale
if ($width != "") {
$scale = $width * (72.0/$x);
} else {
$scale = 1;
}
$scale = 72.0/$scale;
#print "scale = ",$scale,"\n";
#print $infile," ",$outfile,"\n";
system("convert $infile tmpimage.pgm");
#system("giftopnm $infile | ppmtopgm > tmpimage.pgm");
system("convert -density $scale -colorspace gray tmpimage.pgm $outfile");
system("rm tmpimage.pgm");

View File

@ -0,0 +1,87 @@
#!/usr/bin/perl
#
#
# convert image to Encapsulated Postscript, with possible scaling of width
#
# Downloaded from http://people.redhat.com/dcm/
#
# Modified by tfox for Red Hat Documentation - default to width of 4
#
# Modified by tfox for Red Hat Documentation - if eps exists, use same scaling
#
if ($ARGV[0] =~ /^--width=(.+)$/) {
$width = $1;
shift (@ARGV);
}
#print "width =",$width,"\n";
#print "argv =",$ARGV[0],"\n";
$infile = $ARGV[0];
$outfile = $infile;
if (!(-e $infile)) {
print "File doesn't exist\n";
exit 1;
}
if (!(-e $outfile)) {
# print "EPS File doesn't exist\n";
#default width to 4 if it is not specified
if ($width == "") {
$width = "4";
}
} else
{
#if eps exists AND no width is specified, use existing scaling
if ($width == "") {
print "scaling $infile based on existing EPS\n";
$epsimagesz = `identify $outfile`;
#print "epsimagesz=", $epsimagesz,"\n";
($epsname, $epstype, $epssize, $epsrest) = split / /, $epsimagesz, 4;
# print "epssplit:", $epsname, " ", $epstype, " ", $epssize, " ", $epsrest, "\n";
#print "epssize = ",$epssize,"\n";
($epsx, $epsy) = split /x/, $epssize, 2;
($epsy, $epsrest) = split /\+/, $epsy, 2;
#print $epsx," by ",$epsy, "\n";
$width = $epsx/72.0;
#print "epswidth=", $width, "\n";
}
}
$imagesz = `identify $ARGV[0]`;
#print "imagesz=", $imagesz,"\n";
($name, $type, $size, $rest) = split / /, $imagesz, 4;
#print "split:", $name, " ", $type, " ", $size, " ", $rest, "\n";
#print "size = ",$size,"\n";
($x, $y) = split /x/, $size, 2;
($y, $rest) = split /\+/, $y, 2;
#print $x," by ",$y, "\n";
# if width set, we need to scale
if ($width != "") {
$scale = $width * (72.0/$x);
} else {
$scale = 1;
}
$scale = 72.0/$scale;
#print "scale = ",$scale,"\n";
#print $infile," ",$outfile,"\n";
system("convert $infile tmpimage.pgm");
system("convert -density $scale -colorspace gray tmpimage.pgm $outfile");
system("rm tmpimage.pgm");

View File

@ -0,0 +1,136 @@
package com.redhat.ccm.documentation;
import java.io.*;
import java.util.*;
/**
* Splitter
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #1 $ $Date: 2003/09/18 $
**/
public class Splitter {
public final static String versionId = "$Id: Splitter.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2003/09/18 15:50:41 $";
private static final String BEGIN = "@rhdoc.begin";
private static final String END = "@rhdoc.end";
private File m_dir;
private HashMap m_examples = new HashMap();
public Splitter(File dir) {
m_dir = dir;
}
public Splitter(String dir) {
this(new File(dir));
}
private FileWriter getExample(String example) {
return (FileWriter) m_examples.get(example);
}
private Collection getExamples() {
return m_examples.values();
}
private void beginExample(String example) throws IOException {
File file = new File(m_dir, example);
File parent = file.getParentFile();
if (parent != null) { parent.mkdirs(); }
FileWriter fw = new FileWriter(file);
fw.write("<![CDATA[");
m_examples.put(example, fw);
}
private void endExample(String example) throws IOException {
FileWriter fw = getExample(example);
fw.write("]]>\n");
fw.close();
m_examples.remove(example);
}
private boolean hasExample(String example) {
return m_examples.containsKey(example);
}
private void endExamples() throws IOException {
for (Iterator it = m_examples.entrySet().iterator(); it.hasNext(); ) {
Map.Entry me = (Map.Entry) it.next();
FileWriter fw = (FileWriter) me.getValue();
fw.close();
it.remove();
}
}
private void writeln(String line) throws IOException {
for (Iterator it = getExamples().iterator(); it.hasNext(); ) {
FileWriter fw = (FileWriter) it.next();
fw.write(line);
fw.write("\n");
}
}
public void split(String file) throws IOException {
split(new File(file));
}
public void split(File file) throws IOException {
FileReader fr = new FileReader(file);
LineNumberReader lines = new LineNumberReader(fr);
while (true) {
String line = lines.readLine();
if (line == null) { break; }
int index = line.indexOf(END);
if (index >= 0) {
String example = line.substring(index + END.length()).trim();
if (hasExample(example)) {
endExample(example);
continue;
} else {
System.err.println
(file + ":" + lines.getLineNumber() +
": no matching begin, ignoring directive");
}
}
index = line.indexOf(BEGIN);
if (index >= 0) {
String example = line.substring(index + BEGIN.length()).trim();
beginExample(example);
continue;
}
writeln(line);
}
endExamples();
fr.close();
lines.close();
}
private static final String USAGE =
"Usage: splitter <directory> <file_1> ... <file_n>";
public static void main(String[] args) {
if (args.length < 2) {
System.err.println(USAGE);
return;
}
try {
Splitter splitter = new Splitter(args[0]);
for (int i = 1; i < args.length; i++) {
splitter.split(args[i]);
}
} catch (IOException e) {
System.err.println(e.getMessage());
}
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,90 @@
;; from common/dbl1*.dsl
;; %p is replaced by the number of the page on which target occurs
;; %g is replaced by the (gentext-element-name)
;; %n is replaced by the label
;; %t is replaced by the title
(define (en-xref-strings)
(list (list (normalize "appendix") (if %chapter-autolabel%
"&Appendix; %n %t"
"the &appendix; called %t"))
(list (normalize "article") (string-append %gentext-en-start-quote%
"%t"
%gentext-en-end-quote%))
(list (normalize "bibliography") "%t")
(list (normalize "book") "%t")
(list (normalize "chapter") (if %chapter-autolabel%
"&Chapter; %n %t"
"the &chapter; called %t"))
(list (normalize "equation") "&Equation; %n")
(list (normalize "example") "&Example; %n")
(list (normalize "figure") "&Figure; %n")
(list (normalize "glossary") "%t")
(list (normalize "index") "%t")
(list (normalize "listitem") "%n")
(list (normalize "part") "&Part; %n %t")
(list (normalize "preface") "%t")
(list (normalize "procedure") "&Procedure; %n, %t")
(list (normalize "reference") "&Reference; %n, %t")
(list (normalize "section") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "sect1") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "sect2") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "sect3") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "sect4") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "sect5") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "simplesect") (if %section-autolabel%
"&Section; %n %t"
"the &section; called %t"))
(list (normalize "sidebar") "the &sidebar; %t")
(list (normalize "step") "&step; %n")
(list (normalize "table") "&Table; %n")))
;;redefined so outer parent of part is not included in xref to part
;;part is in cont-divn and division-element-list
;;from common/dbcommon.dsl
(define (auto-xref-indirect? target ancestor)
;; This function answers the question: should an indirect reference
;; to ancestor be made for target? For example:
;;
;; (auto-xref-indirect? SECT1 CHAP)
;;
;; should return #t iff a reference of the form "in [CHAP-xref]" should
;; be generated for a reference to SECT1 if SECT1 is in a different
;; chapter than the XREF to SECT1.
;;
;; This function _does not_ have to consider the case of whether or
;; not target and the xref are in the same ancestor.
;;
(cond
;; this is what I changed!
;; changed from Always to Never to prevent book titles in part xrefs
;; Nevers add indirect references to another book
((member (gi ancestor) (book-element-list))
#f)
;; Add indirect references to the section or component a block
;; is in iff chapters aren't autolabelled. (Otherwise "Figure 1-3"
;; is sufficient)
((and (member (gi target) (block-element-list))
(not %chapter-autolabel%))
#t)
;; Add indirect references to the component a section is in if
;; the sections are not autolabelled
((and (member (gi target) (section-element-list))
(member (gi ancestor) (component-element-list))
(not %section-autolabel%))
#t)
(else #f)))

View File

@ -0,0 +1,3 @@
These are DocBook 4.1 templates specific to Red Hat Linux
Documentation. If you use these templates, you will need
to use the custom scripts in the CVS module docs-stuff.

View File

@ -0,0 +1,94 @@
<!-- $Id: article.sgml 287 2005-02-22 00:29:02Z sskracic $ -->
<!DOCTYPE ARTICLE PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- *************** Control for HTML/print *************** -->
<!-- Set to either "IGNORE" (for HTML) or "INCLUDE" (for print) -->
<!ENTITY % SET-FOR-PRINT "IGNORE">
<!-- *************** Settings for Book ID string *************** -->
<!ENTITY BOOKDATE "2001-05-01T17:43-0500" -- Date the document was produced -->
<!ENTITY SHORT-TITLE "short" -- The short title of this manual -->
<!ENTITY PRODVER "&RHLVER;" -- The version of this product -->
<!-- *************** Bring in RH-standard entities *************** -->
<!ENTITY % RH-ENTITIES SYSTEM "./rh-sgml/rh-entities.sgml">
%RH-ENTITIES;
<!-- **************Settings for print ****************** -->
<!ENTITY HTML "HTML" -- Document in HTML -->
<!ENTITY PRINT "Print" -- Document in print -->
<![ %SET-FOR-PRINT [<!ENTITY % PRINTONLY "INCLUDE">]]>
<![ %SET-FOR-PRINT [<!ENTITY % HTMLONLY "IGNORE">]]>
<![ %SET-FOR-PRINT [<!ENTITY MEDIA "&PRINT;">]]>
<!-- Settings for HTML (or more accurately, not for print)... -->
<!ENTITY % PRINTONLY "IGNORE">
<!ENTITY % HTMLONLY "INCLUDE">
<!ENTITY MEDIA "&HTML;">
]>
<article id="index">
<articleinfo>
<title>Title</title>
<subtitle>Some Subtitle</subtitle>
<authorgroup>
<author>
<firstname>First</firstname>
<surname>Last</surname>
<affiliation>
<address><email>flast@redhat.com</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2001</year>
<holder>&FORMAL-RHI;</holder>
</copyright>
&BOILERPLATE;
<abstract>
<title>Abstract</title>
<para>
Brief overview of article.
</para>
</abstract>
</articleinfo>
<sect1 id="idname">
<title>Title for sect1</title>
<para>
Some text ...
</para>
<figure id="id-for-fig">
<title>Title for Figure</title>
<mediaobject>
<imageobject>
<imagedata fileref="./figs/chapter/someimage.eps"
format="eps">
</imageobject>
<imageobject>
<imagedata fileref="./figs/chapter/someimage.png"
format="png">
</imageobject>
<textobject>
<para>
Some text description of this image
</para>
</textobject>
</mediaobject>
</figure>
<sect2 id="idname2">
<title>Title for sect2</title>
<para>
More text ...
</para>
</sect2>
</sect1>
</article>

View File

@ -0,0 +1,87 @@
<!-- $Id: book.sgml 287 2005-02-22 00:29:02Z sskracic $ -->
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- *************** Control for HTML/print *************** -->
<!-- Set to either "IGNORE" (for HTML) or "INCLUDE" (for print) -->
<!ENTITY % SET-FOR-PRINT "IGNORE">
<!-- *************** Settings for Book ID string *************** -->
<!ENTITY BOOKDATE "2001-08-30T14:29-0400" -- Date the document was produced -->
<!ENTITY SHORT-TITLE "SHORT TITLE" -- The title of this manual -->
<!ENTITY PRODVER "&RHLVER;" -- The version of this product -->
<!-- *************** Bring in RH-standard entities *************** -->
<!ENTITY % RH-ENTITIES SYSTEM "./rh-sgml/rh-entities.sgml">
%RH-ENTITIES;
<!-- *************** Chapter entities... *************** -->
<!ENTITY INTRO SYSTEM "intro.sgml">
<!ENTITY CHAPTER SYSTEM "chapter.sgml">
<!ENTITY GENERATED-INDEX SYSTEM "generated-index.sgml">
<!ENTITY COLOPHON SYSTEM "./rh-sgml/colophon.sgml">
]>
<book id="index" lang="en">
<bookinfo>
<title>&RHL; &RHLVER;</title>
<subtitle>The Manual Entity Here</subtitle>
<isbn>
N/A
</isbn>
<mediaobject>
<imageobject>
<imagedata fileref="./figs/rhl-common/rhlogo-chapter-title.eps"
format="eps" align="left">
</imageobject>
<imageobject>
<imagedata fileref="./figs/rhl-common/rhlogo-chapter-title.png"
format="png" align="left">
</imageobject>
</mediaobject>
<publisher>
<publishername>
<inlinemediaobject>
<imageobject>
<imagedata fileref="./figs/rhl-common/rhlogo-title.eps"
format="eps">
</imageobject>
<imageobject>
<imagedata fileref="./figs/rhl-common/rhlogo-title.png"
format="png">
</imageobject>
</inlinemediaobject>
</publishername>
</publisher>
<copyright>
<year>2002</year>
<holder>&FORMAL-RHI;</holder>
</copyright>
&BOILERPLATE;
</bookinfo>
<toc>
<title>Table of Contents</title>
</toc>
<!-- The chapters start here... -->
&INTRO;
<part>
<title>Part Title</title>
<partintro>
<para>The part introduction goes here.</para>
</partintro>
&CHAPTER;
</part>
&GENERATED-INDEX;
&COLOPHON;
</book>

View File

@ -0,0 +1,47 @@
<!-- $Id: chapter.sgml 287 2005-02-22 00:29:02Z sskracic $ -->
<chapter id="ch-chapter">
<title>Chapter Title</title>
<indexterm>
<primary>chapter</primary>
</indexterm>
<para>
Text goes here...
</para>
<sect1 id="idname">
<title>Title for sect1</title>
<para>
Some text ...
</para>
<figure id="id-for-fig">
<title>Title for Figure</title>
<mediaobject>
<imageobject>
<imagedata fileref="./figs/chapter/someimage.eps"
format="eps">
</imageobject>
<imageobject>
<imagedata fileref="./figs/chapter/someimage.png"
format="png">
</imageobject>
<textobject>
<para>
Some text description of this image
</para>
</textobject>
</mediaobject>
</figure>
<sect2 id="idname2">
<title>Title for sect2</title>
<para>
More text ...
</para>
</sect2>
</sect1>
</chapter>

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,132 @@
<!-- $Id: intro.sgml 287 2005-02-22 00:29:02Z sskracic $ -->
<preface id="ch-intro">
<title>Introduction</title>
<indexterm>
<primary>introduction</primary>
</indexterm>
<para>
Welcome to the <citetitle>Manual Entity Goes Here</citetitle>.
</para>
<para>
The <citetitle>Manual Entity Goes Here</citetitle> contains information ...
</para>
<para>
This guide assumes ...
Briefly describe other manuals...
</para>
<para>
HTML and PDF versions of the Official &RHL; manuals are available on the
Documentation CD and online at <ulink
url="http://www.redhat.com/docs/">http://www.redhat.com/docs/</ulink>.
</para>
<note>
<title>Note</title>
<para>Although this manual reflects the most current information possible,
you should read the <citetitle>&RHL; Release Notes</citetitle> for
information that may not have been available prior to our documentation
being finalized. They can be found on the &RHL; CD #1 and online
at:</para>
<screen>
<ulink url="http://www.redhat.com/docs/manuals/linux">http://www.redhat.com/docs/manuals/linux</ulink>
</screen>
</note>
<sect1 id="s1-intro-changes">
<title>Changes to This Manual</title>
<para>
This manual has been expanded to include new features in &RHL; &RHLVER;
as well as topics requested by our readers. Changes to this
manual include:
</para>
<variablelist>
<varlistentry>
<term><citetitle>Chapter Title</citetitle></term>
<listitem>
<para>This new chapter discusses the <application>foo</application>
application, which allows users to ...</para>
</listitem>
</varlistentry>
<varlistentry>
<term><citetitle>Section Title</citetitle></term>
<listitem>
<para>The <citetitle>Chapter Title</citetitle>
chapter has been expanded to include a <citetitle>Section
Title</citetitle> section, which covers ...</para>
</listitem>
</varlistentry>
<varlistentry>
<term>foo topic</term>
<listitem>
<para>The foo topic has been expanded to include bar.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><citetitle>Chapter Title</citetitle></term>
<listitem>
<para>The <citetitle>Chapter Title</citetitle> has been moved to the
<citetitle>Manual Name</citetitle>.</para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
&CONVENTIONS;
<sect1 id="s1-intro-more-to-come">
<title>More to Come</title>
<para>
The <citetitle>Manual Entity Goes Here</citetitle> is part of &RHI;'s growing
commitment to provide useful and timely support to &RHL;
users. Something about expanding...
</para>
<sect2 id="s2-intro-feedback">
<title>Send in Your Feedback</title>
<para>
If you spot a typo in the <citetitle>Manual Entity Goes Here</citetitle>, or if
you have thought of a way to make this manual better, we would love to hear
from you! Please submit a report in Bugzilla (<ulink
url="http://www.redhat.com/bugzilla">http://www.redhat.com/bugzilla</ulink>)
against the component BUGZILLA COMPONENT NAME.
</para>
<para>
Be sure to mention the manual's identifier:
</para>
<screen>
&BOOKID;
</screen>
<para>
If you mention this manual's identifier, we will know exactly which
version of the guide you have.
</para>
<para>
If you have a suggestion for improving the documentation, try to be as
specific as possible. If you have found an error, please include the
section number and some of the surrounding text so we can find it
easily.
</para>
</sect2>
</sect1>
&SUPPORT;
</preface>