© A.W.Marczewski 2002
HTML advice :
HTML | CSS
Graphs | URL lists
Nice looking graphs and equations may be produced with help of e.g. MS Word and Excel
If you do not want to use special software for web-page editing, you may e.g. text-edit your HTML code (even with Notepad or Wordpad) and use graphics produced by other software.
If you have some documents written and saved in e.g. Word and you'd like to publish it on the web, the simplest way to do so is:
The quality of such www pages is acceptable, but you do not have much control over the way this document is formatted (mso-styles and such). Yet, you may use the graphics obtained in such a way and create your own HTML.
- use the 'File/Export to/Compact HTML' Word option (your personal settings are removed, HTML file is small),
- use 'File/Save as/Web page...' (the properties of the document are all preserved, however :some browsers may have troubles with such pages, HTML file is big, your privacy is not protected)
CAUTION! Office HTML Filter 2.1 is OK if you want to obtain nice bitmap images, however this version removes all temporarily created vector images from disk. If you need to keep/use such files (*.wmz, *.emz - see below) use Office HTML Filter 2.0 (older version). Another option is just to SAVE MS Word document as HTML (as opposed to EXPORT as HTML) - such HTML file will be much larger, however all graphic files (vector and bitmap images) will be preserved and with the same names as in the case of HTML Export with HTML Filter 2.0 (or 2.1) (you may also keep the smaller exported HTML file if you need it too).
How to produce nice looking bitmap graphs and equations for web pages:
- Create (or use existing) a Word document with embedded vector graphics, e.g. Excel (or other) graphs and Equation Editor equations
The best quality and stability is obtained if Excel objects are inserted as pictures in windows metafile WMF or enhanced windows metafile EMF format: Copy/Paste Special/As picture .... The downside is that after changing your original graph you will have to re-insert it into your Word document. The upside is that your Word document will be much smaller and your original Excel data will not be saved within Excel object in Word document)
- Export your Word document to the HTML format
In contrast to 'Save As .../ Web page (htm, html)' which creates html documents that are almost equivalent to normal Word .DOC documents, this filter removes MS Office-specific tags from html documents (the original documents should be preserved), may be also used from command-line
For MS Word 2000 you may download the 'Export to HTML' filter (currently ver. 2.1; setup file: 'msohtmf2.exe'; execultable: filter.exe; help: filter.exe -?) from MS Office site (search for 'Export to HTML' or 'Export filter')
- Find the folder with the corresponding graphic files created automatically accoding to the template, e.g.:
<your_Word_doc_name>_files (English Windows)
<your_Word_doc_name>_pliki (Polish Windows)
- For each of the embedded vector images in the original Word document, at least 2 files are created (usually very small). However, only 1 vector image is created even if more than one copy of object is present (if such copy is not edited, however it may be formatted, e.g. scaled):
(CAUTION! If you use bitmap graphics in Word, the results vary depending on type of graphics used, e.g. BMP is always converted: e.g. to GIF format for simple block graphics, to JPEG or PNG format for images with large no. of colors, e.g. photographs ...)
- 1 compressed vector image: fileA.emz or fileA.wmz
- 1 (or more) bitmap image(s): fileB.gif (sometimes fileB.jpg or fileB.png)
File names of graphic files:
image001, image002 ... image999
E.g., the document contains following vector images:
Then, the following files may be created:
- [miniature of vFig2] (a copy of the [vFig2] object)
- [miniature of vFig3] (a copy of the [vFig3] object)
- image001.emz, image002.gif - from [vFig1]
- image003.wmz, image.004.gif, image005.gif - from [vFig2] and [miniature of vFig2]
- image005.emz, image.006.gif - from [vFig3]
- image007.emz, image.008.gif - from [vFig4]
- image009.gif - from [miniature of vFig3]
If you insert some vector image graphics into Word document and then copy/paste this vector image object several times (N) and format/scale (without editing!) each of the copies differently, you will get a single vector file .emz or .wmz and a series of at most N bitmap graphics files - in this way you may get full-size images and corresponding miniatures.
Caution! If the copied object lies outside Word, repeating the Copy/Paste several times will produce various objects and consequently more .emz/.wmz files!
*.emz and *.wmz files are GZIP-compressed fully scallable *.emf and *.wmf images and corresponding bitmap images have size suitable for the screen settings used during the HTML-export and size resulting from the size of displayed image in Word. The quality of graphics is usually excellent.
*.emz and *.wmz file formats are recognized as graphics files by MS Office applications (e.g. Word, PowerPoint) and may be inserted (Insert/Picture or Image/From file ...) into such documents (and scaled at will).
However, there may be some problems with e.g. displaying fonts in PowerPoint. On my system - Win98/MS Office2k - all Arial fonts in such *.emz, *.wmz, *.emf, *.wmf files are displayed as Times New Roman - font face is ignored; the same images copied from Word/Excel etc. as objects are displayed OK.
After you uncompress *.emz or *.wmz files into the corresponding uncompressed *.emf and *.wmf formats, such files will be treated as graphics by practically all vector-graphics recognizing applications.
How to uncompress *.emz or *.wmz files:
With GZIP.EXE (free command-line program, gzip.org GNU project):
GZIP.EXE -d <name>.emz
ren <name>.em <name>.emf
With Winzip.exe (shareware windowed program, winzip.com):
Run Winzip, Open <name>.emz (content is single file, without info on original name etc.), Extract/Save archive content with name: <name>.emf
A collection of links may be easily prepared by converting a selection of your 'Favourites' i.e. links/www bookmarks that you've added to your Favourites (IE) section.
Such bookmarks are small files with extension URL. A simple tool (e.g. VBScript script file - you may see the script 'insides' and decide if you like it or not; it is simple enough and in contrast to compiled programs easy to verify) may create a chunk of HTML code with all or some your URL's arranged in e.g. list.
Such a list may be (usually needs to be) later edited, but typing errors in WWW addresses are avoided.
A simple, free url2hml.vbs
VBScript is available for download as a zip archive url2html.zip
The file inside zip archive was renamed to 'url2html_vbs.txt'. After you unzip this file and after checking what it does and that it is harmless/OK rename this file
back to 'url2html.vbs'. 2nd file is an example of html output.
There are lots of comments in the code. Some of those comments are displayed after running it.
- Script may be run in VERBOSE mode - try it only with small no. of URL files only!
- Inside the code the 'test' variable may be set to 'true' making script to display much more info on what it does.
- Another variable 'list' (default: 'true') controls the appearance of links - either unordered (set variable 'list_ordered' to 'false') <ul><li></li></ul> or ordered list <ol><li></li></ol>. If 'list' is 'false' the link entries are separated by line breaks <br>
- Variable 'fold_disp' (default is 'true') controls additional displays of various folder properties
- Variable 'write_headfoot' (default 'true' controls writing html <html>, <head> and <body> tags
- Variable 'url_target' controls the type of default target window for all links (default is "_blank" i.e. open link in new window) - InputBox is opened and user may change this behavior by supplying one of special names or his/her own window name).
There are several ways to run it (described also in the script source):
NOTE: file/folder parameters Only the first valid parameter (file or folder) is used - its FullPath is used - url2html.vbs utility reads ALL URL files in the folder and creates its html output. No folder recursion is possible. If you need only some of the url-s select them manually or sort them e.g. by date/time - selected portion may be copied/moved to some tmp folder and this folder may be processed.
NOTE: command line length limit If you drag the folder icon or several URL icons to this script the entire length of command line should not exceed 127 characters
NOTE: wsh 5.6 Windows Scripting Host 5.6 should be installed (for older machines may be dowloaded from MS).
NOTE: Polish/CE/EE ISO/Win/CP/IBM/Unicode encoding Polish characters are converted to the corresponding UNICODE html codes (currently set to Windows 1250 character code, search for 'conv = conv_Win1250' in the VBS code - you may change for other charset-encoded source files: iso-8859-2/Latin2, CP-852/IBM-852 (MS-DOS/PC-DOS), Unicode. Conversion was prepared according to my Pl char page).
None of the original files URL files (or any other file) is affected! No malicious code is executed or saved. The only file created (or overwritten if such a file already exists and script user agrees) is 'url_list.htm'.
- The simplest way to run it is by dragging a folder with your URL's to url2html.vbs script icon
(all URL's in the folder will be used; no folder recursion is available, however).
- You may also drag icons of selected URL's in the same way (the 1st will be used as a source or pathname and all url-s in this folder will be processed).
- Another way (my preferred) is to create a shortcut to the url2html.vbs script in your context SendTo menu (Win: right-click). Then you may send the folder or group of files to this shortcut. The HTML code 'url_list.htm' is saved in the folder containing URL's.
- It may be also run from command line.
Panda ActiveScan antivirus software gave warning that this file MAY BE a .VBS wirus - I informed the program maker about the problem. Funny thing, this program identified some versions of this script as possible virus and some not (while the version differences were meaningless).
HTML | CSS
E-mail addresses are modified to in order to prevent spamming / mail-abuse:
in e-mail remove spaces, replace " AT@AT " by "@"
Send a message to Adam.Marczewski AT@AT umcs.lublin.pl