- Remove the <bookbiblio> element, it's not needed
- Added a <copyright> element and sub-elements. Based on the CVS logs
the Handbook dates back to 1995.
- Changed the <xref> to a <link> in the abstract.
- Reformatted abstract to be neater (sorry translators, but it's only
one paragraph).
This lets the stylesheets generate a nice front page.
these changes;
1. Remove '<tt>' and '</tt>'.
2. Search/replace
\s-+<htmlurl url='mailto:\([^']+\)'\s-+name='[^']+'>
with
<email>\1</email>
(there's a leading space before <email>)
Added an ENTITY line to handbook.sgml to use the new entities.
<!--
Local Variables:
mode: sgml
sgml-indent-data: t
sgml-omittag: nil
sgml-shorttag: nil
sgml-always-quote-attributes: t
sgml-minimize-attributes: max
End:
-->
to handbook.sgml
Added
<!--
Local Variables:
mode: sgml
sgml-declaration: "../chapter.decl"
sgml-indent-data: t
sgml-omittag: nil
sgml-shorttag: nil
sgml-always-quote-attributes: t
sgml-minimize-attributes: max
sgml-parent-document: ("../handbook.sgml" "part" "chapter")
End:
-->
to the bottom of each chapter.sgml file so that Emacs can do the right
thing.
chapter.sgml in a directory named according to the value the id
attribute on that chapter.
Added chapters.ent, which lists the entities for each chapter.
Updated handbook.sgml to use these entities.
* Fixup use of <symbol> with more appropriate element
* Fixup wrong occurence of $Id$
* Fixup references to 'make' variables, and strim off the surrounding
${...}, it can be added back by the stylesheet at presentation time.
* More insertions or deletions of <para>...</para> as appropriate.
And with this commit, ladies and gentlemen, we're almost there as far as
the DocBook conversion goes. I still need to:
- Split the big handbook.sgml into its constituent files and directories.
- Sort out the files that will contain entities, and put in the correct
SGML to use them.
- Merge in the changes that have happened to doc/handbook over the past
7 or so months.
- Build the Makefile framework and supporting apps to do .txt, .ps, .rtf
and .pdf conversions.
But the mind numbingly tedious stuff is over. Of course, there's
always more to do (like the whole bibliography section should be marked
up as a bibliography) and I'm putting together the "This is how the
handbook should be marked up" document as well. Oh, and organising my
notes on how the Handbook could be re-arranged. But apart from that,
it's done :-)
id="bar">
...
changed to
<foo id="bar">
...
Before people complain that "Hang on, now you can't find out what the
allocated ID values are with a simple 'grep'" I'll say that's not a
problem. I plan to introduce a target in the Makefile (probably
something like 'handbook.id' which will automatically generate this
list doing a proper SGML parse.
to <email>.
Can't do this globally. Some of the links are odd (i.e,. the link
is not their e-mail address but is their name, eg
<ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink>
which would turn to
<email>Nik Clayton</email>
which isn't very useful. Ignore these ones, and do the others.
(i.e., the ones that look like
<ulink url="mailto:nik@freebsd.org">nik@freebsd.org</ulink>
)
This Emacs regexp does the job.
Search for: <ulink\s-+url="mailto[^>]+>\([^<]+\)</ulink>
Replace with: <email>\1</email>
Step 2. A lot of the <email>...</email> sets will have '<' and '>' embedded
in them (as entities). These can be removed, since the stylesheet
will add them;
Search for: <email><\([^&]+\)></email>
Replace with: <email>\1</email>
Step 3. The trick now is to turn
<ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink>
into
Nik Clayton <email>nik@freebsd.org</email>
This step could (possibly) have been done first, and then steps
1 and 2 could be done globally. I haven't done this because of
concerns about the ordering of names within languages. This
transformation is fairly simple in English, I've no idea what
it's like in Japanese.
Search for: <ulink\s-+url="mailto:\([^"]+\)">\([^<]+\)</ulink>
Replace with: \2 <email>\1</email>
Step 4. Remove leading and trailing spaces that may have slipped in
Search for: <email>\s-+
Replace with: <email>
Search for: \s-+</email>
Replace with: </email>
<literal remap=..> -> <literal>
<command remap=..> -> <command>
Or deleted <emphasis ..> altogether in some cases.
More redundant <para>..</para>'s removed.
things.
I'm now working through from the beginning of the handbook to end,
correcting as I go. I'll commit in chunks of 5,000 lines (or
thereabouts).
Most of the changes fall into the following categories.
* <emphasis remap=bf> --> <emphasis>
* Spurious <para>s around <*list>s deleted (but not reformatted)
"C-c -" in Emacs SGML mode (when the point is on an element starting
or end tags) will delete that element's starting or end tags.
* Marked smileys with <!-- smiley --> for possible future deletion
* Deleting <emphasis>, around
<term><emphasis>...</emphasis></term> -> <term>...</term>
* Fine tuning markup choices in some cases
- <filename>C:</filename> -> <devicename>C:</devicename>
* Extra <note>s here and there.
* Some <*list>s to <procedure> (and <listitem>s to <step>)
* ASCII emphasis converted to <emphasis>
i.e., do it like *this* -> do it like <emphasis>this</emphasis>
* <symbol> -> <replaceable>
There are very few whitespace changes, although a few have probably
cropped up. The vast majority of the whitespace changes will happen in
one megacommit, hopefully some time next week.
This does the first 5,000 lines or so.
this (in Emacs) by searching for
\s-+</para>
and replacing with
</para>
Do this for all occurences *except* where the element immediately before
the </para> is one of <itemizedlist>, <orderedlist>, <variablelist>,
<procedure>. The <para>...</para> wrapping these elements is mostly
redundant, and will be removed later.
<para> There is some leading space here.</para>
Get rid of it, doing an emacs search/replace for
<para> +\([^ ]\)
and replacing with
<para>\1
This can be done globally.
Some parts of the handbook had single spaces after stops, some had double
or triple. While the typographical convention for monospaced fonts may
be to use double spaces after them, that doesn't apply here. TeX will
ignore them, as will HTML. If we need them for a plain text version of the
Handbook then the stylesheet / conversion mechanism can insert them
as necessary.
Searching for
_\([;:!\.\?,]\) +_
in Emacs and replacing with
_\1 _
(ignore the '_', they're just to delineate the regexps) does the job
quite nicely. However, you can't do this everywhere, since some of the
double spaces might be in program listings or other literal sections
(e.g., the BSD Copyright), so you need to sit and bounce on the 'y' or
'n' key as appropriate for each occurance of a stop.
In some cases <informalexample> wasn't appropriate, and the markup was
changed to <programlisting> or other.
In some cases there were spurious <para> elements before and after the
<informalexample>. These were removed.
Reformatted text within <screen> elements because the whitespace *is*
significant.
Added <prompt> and <userinput> elements within <screen> where necessary.
If I spotted inappropriate use of markup within the immediate vicinity
of the <informalexample> elements then I fixed that (mostly the use of
<emphasis remap="...">).
This is part one of these changes -- there's a load of them, and this
goes up to line 11,284 or thereabouts, roughly one third of the way
through.
contract, start contract, work too many hours per day) I'm back working
on the DocBook conversion :-)
Create two new entities, prompt.root and prompt.user. Use these where the
user is shown an OS prompt, to indicate whether they should be a normal
user or do it as root.
Everything else that looks like a prompt (e.g., C:\> which occurs here
and there) is also marked up as <prompt>.
and near it. Most of the time this consisted of replacing the <emphasis>
with <replaceable> or <userinput>. Sometimes <screen> is the wrong element
to use, and will need replacing with something like <programlisting> or
<literallayout>.
command(number)) from the variety of different existing markup
(which included <command>, <emphasis>, and <ulink>s to man2html
CGI scripts) to a common format, which is
<citerefentry>
<refentrytitle>command</refentrytitle>
<manvolnum>number</manvolnum>
</citerefentry>
although in the interests of keeping the changes as simple as possible
for the translators, the above was flattened on to one line.