Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jan 2000 19:41:32 +0000
From:      Nik Clayton <nik@freebsd.org>
To:        admin <admin@wtbwts.com>
Cc:        freebsd-doc@freebsd.org
Subject:   Re: destination html files
Message-ID:  <20000102194131.B37040@catkin.nothing-going-on.org>
In-Reply-To: <Pine.BSF.4.10.10001021318270.7180-100000@server.b0x.com>; from admin on Sun, Jan 02, 2000 at 01:37:51PM %2B0000
References:  <Pine.BSF.4.10.10001021318270.7180-100000@server.b0x.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 02, 2000 at 01:37:51PM +0000, admin wrote:
> In reference to section 6.3.1.1.3 of the docproj-primer, how does freebsd
> plan to include images in each chapter?

I've been pondering this on and off myself.

> Currently, when typing "make" in the /usr/doc/en_US-ISO_8859-1/, the
> appropriate html files are created in the same directories as the
> book.sgml files. If I were to include an image in a chapter directory, 
> it would probably look something like this in the sgml source:
> <mediaobject>
> <imageobject>
> <imagedata fileref="image.gif" format="gif">
> </imageobject>
> </mediaobject>
> 
> The problem is that this code translated to html will result in:
> <p><img src="image.gif"></p>
> 
> Now that's not right, is it? The html file is in the book.sgml directory
> whereas the image is in the chapter directory. 

Absolutely correct.

> How can this be fixed?

The only solution I've thought of so far is a bit of a kludge, but it will
work.

Assume that the names of all the images are listed in the document's 
Makefile in a variable.  This variable includes the partial path to the image.

Something like this;

    IMAGES= kernelconfig/link-list.gif linux/penguin.gif disks/winchester.gif

and so on.

The "all" target would be responsible for symlinking these images in to the
top level directory.

    all:
    ...
    .for _curimage in ${IMAGES}
            ln -s ${_curimage} `basename ${_curimage}`
    .endfor

The "install" target would be responsible for installing these images into
the top level of the installation directory.  And the "clean" target gets
rid of them again.

It's not quite that simple.  For example, I expect that the IMAGES list 
will have to avoid specifying file extensions.  If we're building the
HTML format then a .gif extension will have to appended by the Makefile,
if we're building PS or PDF format then a .eps extension will be appended
by the Makefile.

In addition, I think there will be some cases where there is no need to store
both formats in the repository -- the use of tools like the netpbm utils
might make it more appropriate to store TIFF or PNG files in the repository,
and then convert them as part of the build process.

Thoughts?  If you're planning on implementing something like this, I'd 
welcome patches.

N
-- 
    If you want to imagine the future, imagine a tennis shoe stamping
    on a penguin's face forever.
        --- with apologies to George Orwell


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000102194131.B37040>