Word and the Web

Dr Lawrie Brown,
Dr Chris Lokan

Seminar Contents

Word and the Web	I
Overview	1
Introduction	2
What is the Web	3
What are Hypermedia documents	5
HTML	6
Example	7
Creating HTML	8
Common HTML Mistakes	9
Translating into HTML	10
Markup vs Presentation	11
WORD Styles	12
WORD Outline	13
Styles for the Web	14
rtftohtml	15
html-trans	16
Graphics	17
GraphicConvertor	18
PBM tools	18
ToCs and Index files	19
rtf2ht	20
Hints and Tips	21
More Features	22
Limitations	23
Other HTML Tools	24
Other WORD Translators	25
Summary	26

Overview
•	what is the web?
•	HTML
•	authoring HTML
•	translation into HTML
•	WORD styles and outline
•	styles for HTML
•	tricks and traps
Introduction
•	web is growing explosively
•	we need to use it
-	course information, lecture notes and labs
+	CS1E Information
+	CS1 Information
-	papers
+	Kamus TR
What is the Web
•	 universal information database (docuverse) of hypermedia documents
•	a consistent means of accessing a variety of media and services through a common presentation interface
•	access documents anywhere on the Internet or private local network with an appropriate server running
•	can also access many other existing services (FTP, gopher)

•	all documents referenced in the web have a unique name, called their Uniform Resource Locater (URL)

	http://www.adfa.oz.au/
	http://www.ncsa.uiuc.edu/demoweb/url-primer.html
	ftp://gandalf.rutgers.edu/pub/sfl/sf-resource.guide.html
	gopher://life.anu.edu.au:70/I9/weather/auslast.gif
	news:alt.hypertext
•	any document can be accessed directly using its URL
•	documents can also be accessed by selecting a hotspot in another document that includes a reference to it
What are Hypermedia documents
•	hypermedia documents contain text, graphics, sound, movies, and pointers to other documents

HTML
•	these documents are created using a special language called the HyperText Markup Language (HTML)
-	D C McArthur, "World Wide Web & HTML", Dr. Dobbs Journal, Dec94, pp18-26, 86
-	"Beginners Guide to HTML"

Example
<!doctype html public '-//IETF//DTD HTML 3.0 Strict//EN' >
<html><head>
<title>Computer Science 1E Info</title>
<link rev="made" href="mailto:Lawrie.Brown@adfa.oz.au">
</head><body>
<h1>Computer Science 1E Student Information</h1>
<h2>Aim</h2>
To prepare First Year engineering students to use the computer and computing programming as tools for use in their engineering course and future employment.
	.....
<h2>Assessment</h2>
The final mark for the subject will be composed from:
<ul>
<li> examination mark 60%
<li> assignment mark 40%
</ul> <hr>Go Back to 
<a href="http://www.adfa.oz.au/CS/student-info/">
Information for Students</a>.
<hr><address><a href="http://www.adfa.oz.au/CS/lpb/">
Lawrie.Brown@adfa.oz.au</a> /  3 Mar 95 </address>
</body></html>

Creating HTML
•	manually inserting markup tags using a text editor
psgml	mode for emacs 19.xx
hotmetal	Unix/Windows/Mac
HTML.edit	for Mac
TkWWW	for X
•	translating from formatted text file (LaTeX or Word RTF)
rtftohtml	from WORD (or any RTF source)
latex2html	from LaTeX

Common HTML Mistakes
1.	Poor Structure - No Doctype, Title, Head, Body Elements
2. 	Poor Paragraphing - <P>
3.	Missing Elements
4.	Unclosed Elements - no ...</H1>
5.	Unbalanced Elements - <H1> ... </H2>
6.	Overlapped Elements
7.	Illegally Nested Elements
8.	URL Errors - Improper use of relative/qualified URL
9. 	Using here as anchor text is strictly forbidden.
Translating into HTML
•	author document using favourite word processor
•	markup and format for primary target media
•	translate this to HTML for web access
•	possibly tweak result for optimum usage
	but
•	will not achieve satisfactory results unless markup correct
Markup vs Presentation

Markup	represents logical structure of document
Presentation	concerned with final look & feel

•	when authoring should primarily be concerned with content and logical structure, not presentation
•	presentation can (and does) vary depending on target
WORD Styles
•	Style is a name given to a collection of attributes applied to paragraphs with same semantics (heading, quote, item) 
•	can easily change the way these look by changing the style
•	correctly marked up documents have distinct styles for distinctly different paragraphs
-	Sample 1 (from sample1.rtf) - presented
-	Sample 2 (from sample2.rtf) - marked up
WORD Outline
•	Outline mode used to create and manipulate logical structure of a document (various level headings)
•	powerful tool for creating structured documents
•	uses special styles to tag headings

heading 1, heading 2, heading 3, ...
Styles for the Web
•	heading (outline) styles convert to html headings

heading 1, heading 2, heading 3, ...
•	various named styles convert to related html constructs

blockquote, hr, HTML, Normal, pre, 
bullet list, bullet list 1, ...
glossary, glossary 1, ...
numbered list, numbered list 1, ...
•	list styles must strictly nest
•	unknown styles are treated as Normal text
•	some styles are discarded (toc, index)
rtftohtml
•	translation program from RTF source to HTML target
•	available on Unix, Mac, (PC?)
•	basic operation given base.rtf creates base.html
-	can specify whether graphics are references or inline
-	optionally build a separate table of contents
•	Unix command-line

rtftohtml [-G] [-i] [-T] [-V] [-P extension] [-o file] rtffile

html-trans
•	control file for rtftohtml
•	specifies mappings from styles & character formats to html tags
•	can extend with own styles & actions (with extreme care!!!)

# match various ADFA OHP lecture styles
"Code Example",0,"pre"
"Example 24",0,"pre"
"Overhead body 24",0,"Normal"
"Overhead Points",0,"ul-d"
"Overhead Points 1",1,"ul-d"
"Overhead Points 2",2,"ul-d"
"Overhead Numbered",0,"ol-d"
"Overhead Numbered 1",1,"ol-d"
"Table 14",0,"_Table"
"Text ref",0,"Tref"
Graphics
•	rtftohtml graphics in "native" format (pict, wmf, bmf)
•	but translated html expects gif (web default)
•	must manually convert graphics files
•	specify if graphics are references (default) or inline [-i]
•	can specify alternate expected suffix [-P jpeg]
	inserts references to baseN.ext (default ext is gif)
•	can suppress graphics altogether [-G]

GraphicConvertor
•	on the Mac (very very good)
•	copy image into New window
•	Save As gif to AUFS volume
PBM tools
•	on Unix
•	use to translate extracted pict file to ppm to gif

ToCs and Index files
•	rtftohtml creates a separate Table of Contents base_toc.html
•	can suppress ToC [-T]
•	useful for building "Contents" or "Overview"

•	generally must insert pointer to new file in index for area index.html or welcome.html
•	usually manual edit to add

<a href="base.html">Nurgle Blah stuff</a>
rtf2ht
•	custom perl script
•	runs rtftohtml on a set of files
•	filters multiple blank lines & paragraphs
•	creates tag-file based on document titles for index
•	adds customised footer with author and date
•	may (one day) do graphic file translation using PBM tools

	ccadfa:~lpb/www/rtf2ht
Hints and Tips
•	watch out for unnecessary blank lines
•	lists must have tag<tab>item
•	lists must be strictly nested
More Features
•	using character formats can embed formatted text
-	bold, underline, italic, outline or shadow (em) words
-	monospace (Courier, Monaco) text
•	or embed special html constructs
-	italic & underline => cite
-	double-underline & hidden/not-hidden => href / hot text
-	shadow & hidden => literal html
-	outline & hidden => name
•	footnotes recognised by superscript marker, separate file
Limitations
•	some things not yet done well
tables	pre-formatted text
equations	not possible except as graphics
•	defined in html/3.0 but waiting on clients
Other HTML Tools
htls	index collection of web files
weblint	check syntax of HTML files
Other WORD Translators
•	Internet Assistant - WORD 6 extension, will be widely used
•	full list of filters
 http://info.cern.ch/hypertext/WWW/Tools/Word_proc_filters.html
Summary
•	discussed Web and html
•	translating documents from WORD source
•	talk available in WORD and Web formats

Hope (zone adfa-cs-NetWare)::
 MAC_APPS:Student Info:Lawrie Brown (lpb):Word and the Web 95

http://mnementh.cs.adfa.oz.au/seminars/word_web95.html