Skip site navigation (1)Skip section navigation (2)
Date:      25 Jul 2000 15:55:33 +0200
From:      Rasmus Kaj <kaj@raditex.se>
To:        Jim Mock <jim@luna.osd.bsdi.com>
Cc:        Rasmus Kaj <kaj@raditex.se>
Subject:   Re: docs/20130: Entities missing from doc/share/sgml/man-refs.ent
Message-ID:  <848zuqfh62.fsf@frodo.sickla.raditex.se>
In-Reply-To: Jim Mock's message of "Sun, 23 Jul 2000 22:50:01 -0700 (PDT)"
References:  <200007240550.WAA15046@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "JM" == Jim Mock <jim@luna.osd.bsdi.com> writes:

 >> People writing documentation for the FDP are supposed to use entities
 >> in the form &man.foo.1; to refer to system commands etc.
 >> /usr/share/doc/man contains about 3500 manpages (entities needed),
 >> man-refs.ent contains 220 entities.
 
 JM>  I think the major reason for this is that a) stuff that's needed can be
 JM>  added when a document is written, and b) it keeps the file size down.
 JM>  If we add entities for every single man page, chances are, we'll never
 JM>  use at least half of them, so it's kind of overkill to have a huge,
 JM>  bloated man-refs.ent file when it's not necessary.

I use entities like &foldoc.foo; to reference to words (foo) in Foldoc 
(free online dictionary of computing). Currently I have these listed
pretty much like the &man.foo.n; entities, but I'd like to have them
created automatically. 

Something like this (in a directory containing sgml stuff) lists the
needed entities.

find . -name '*.sgml' | xargs grep '&foldoc\.' | sed -e "s#;#;\\
#g" -e 's#^.*\&foldoc\.#foldoc.#' | grep ^foldoc | sort -u | sed -e 's#;##'

This gives me a list of entities i need. Adding a further sed command:

sed -e 's#foldoc\.\(.*\)#<!ENTITY & "<a class=\\\"foldoc\\\"\
 href=\\\"\&foldoc;\1\\\">\1</a>">#

Gives me the entity definitions I need, in no practically measurable
time. However, the pages I do this on is less than 200kb sgml, so it
might not be practically possible to do it on the entire documentation 
project, at least not for each build ...

-- 
Rasmus Kaj -------------------- rasmus@kaj.se - http://Raditex.se/~kaj/
 \  If you think I'm talking about the future you're living in the past
  \------------------------------------------------- http://Raditex.se/


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?848zuqfh62.fsf>