This is accomplished in two phases:
welcome.m4mland piped through the general purpose macro preprocessor
m4(see the corresponding documentation:
man m4). This kind of preprocessing is also suggested by the WebTechs team. The aim of the header file is to provide a set of useful predefined macros, and to rename some of the m4 standard macros that correspond to common english words, so as to avoid the need of quotation. In particular:
define --> _define_ include --> _include_ ...
mlin order to obtain one or more html files.
<file>.m4mland try to compile the result with
m4ml <file>. It is recommended to first copy the original html file to a backup file in order to check that the result of the compilation leaves the file intact. Note that some characters and words now have special meaning, such as the left and right single quote, which are the quotation character for m4, and the character %, if it appears as the first character of a line, which has special meaning for ml.
At this point it is possible to add any
m4 macro command,
or macros defined in the header file,
_include_(filename) _define_(_ICONS_, /~user/images) <img src="_ICONS_/home.gif">Here is a brief list of predefined macros:
mlis to allow creation of parallel files in different languages (or different styles) starting from a single file. The source file starts with a header defining all the files to be created. If the header is missing, then a single file will be created, with the same name of the originating file, and extension
html. The complete syntax is described in the beginning of the source file multilang.c, here are a few examples:
%ita$f:%s.html %eng$f:%s_%k.html %fra$f:%s_%k.html %%endIn this example, three files will be created, with names
<file>_fra.html, and the keywords
fraare associated to each file.
Normally, each line of text following the header will be copied into all files, with the exception of lines starting with the percent (`%') character. Examples:
%ita:Questa linea viene scritta nel file <file>.html %eng:This line will be copied in file <file>_eng.htmlThis is a more sofisticated example:
%!ita$h:Disponibile in <a href="%s">italiano</a>This line is written in all files with the exception of
<file>.html(corresponding to the keyword
ita. The specifier `h' following the dollar sign substitutes the filename corresponding to the keyword
itain place of the subsequent appearance of %s.
%$d:Last updated: %s.Substitutes the current date in place of the %s.