Index: doc/index.txt
===================================================================
--- doc/index.txt	(revision 4443)
+++ doc/index.txt	(working copy)
@@ -44,7 +44,7 @@
 This documents the language that is accepted by the TYP compiler that
 is included within mkgmap.
 
-[/doc/options '''Logging''']
+[/doc/logging '''Logging''']
 Instructions on how to control messages that are logged and to where
 they are written.
 
Index: doc/logging.txt
===================================================================
--- doc/logging.txt	(revision 4443)
+++ doc/logging.txt	(working copy)
@@ -43,5 +43,5 @@
 log file, with warning and error messages being also sent to stdout.
 
 Further information can be found at
-https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html
+[https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html]
 
Index: doc/options.txt
===================================================================
--- doc/options.txt	(revision 4443)
+++ doc/options.txt	(working copy)
@@ -1,3 +1,5 @@
+=== Command line ===
+
 The command line is of the format:
 
 :	java.exe [java-options] -jar mkgmap.jar [mkgmap-options]
@@ -29,6 +31,7 @@
 disable specific logging messages. This is useful if you want to see
 certain types of message that are not logged by default or choose where
 the messages should be written.
+
 === Mkgmap options ===
 
 The order of the options is significant in that options only apply
@@ -49,12 +52,24 @@
 
 === File options ===
 
-filename
+;filename
 ;--input-file=filename
 : 	Read input data from the given file.  This option (or just a
 filename) may be specified more than once. Make sure you set all 
-wanted options before this.
+wanted options before this. Input files may be of the following types:
 
+:;o5m, osm, pbf file: 
+::Input files are expected to contain Open Street Map data.
+
+:;txt file: 
+::The input file is expected to contain typ file information in text format.
+This will be compiled to a typ file with the same name and .typ as the extension.
+
+:;typ file: 
+::The input file is expected to be a compiled typ file. The output file will be
+modified to contain the correct family id, product id and code page as required
+by the map. The output file name will be the input file name prefixed with 'x'.
+
 ;--gmapsupp
 : 	Create a gmapsupp.img file that can be uploaded to a Garmin or
 placed in "/Garmin" in a microSD card (such as by mounting the
Index: options/buildoptions/main.java
===================================================================
--- options/buildoptions/main.java	(nonexistent)
+++ options/buildoptions/main.java	(working copy)
@@ -0,0 +1,144 @@
+package buildoptions;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+public class main {
+
+	public static void main(String[] args) {
+		final int indentSize = 4;
+		File inputFile = new File("..\\doc\\options.txt");
+		File outputFile = new File("..\\resources\\help\\en\\options");
+		int lineNumber = 0;
+		try {
+			FileReader fr = new FileReader (inputFile);
+			BufferedReader br = new BufferedReader(fr);
+			FileWriter fw = new FileWriter(outputFile);
+			BufferedWriter bw = new BufferedWriter(fw);
+			String line;
+			String previousLine = "";
+			int indent = 0;
+			Boolean preformatted = false;
+			while((line = br.readLine()) != null) {
+				++lineNumber;
+				if (!line.matches("\\p{ASCII}*"))
+					System.err.println("Line " + lineNumber + " contains one or more non-ASCII characters.\r\n" + line);
+				if (preformatted) {
+					if (line.trim().compareToIgnoreCase("</pre>") == 0)
+						preformatted = false;
+					else {
+					    bw.write(line);
+					    bw.newLine();
+					}
+				} else {
+					line = line.replaceAll("\\s+", " ");
+					if (line.length() > 0) {
+						if (line.startsWith(";")) {
+							line = line.substring(1);
+							indent = 0;
+							if (!previousLine.isEmpty()) {
+							    bw.write(previousLine);
+							    bw.newLine();
+							    previousLine = "";
+							}
+						}
+						else if (line.charAt(0) == ':') {
+							if (!previousLine.isEmpty()) {
+							    bw.write(previousLine);
+							    bw.newLine();
+							    previousLine = "";
+							}
+							indent = 1;
+							line = line.substring(1);
+							while (line.charAt(0) == ':') {
+								indent++;
+								line = line.substring(1);
+							}
+							if (line.charAt(0) == ';')
+								line = line.substring(1);
+						}
+						else if (line.trim().compareToIgnoreCase("<p>") == 0) {
+							if (!previousLine.isEmpty()) {
+							    bw.write(previousLine);
+							    bw.newLine();
+							    previousLine = "";
+							}
+							line = "";
+						    bw.newLine();
+						}
+						else if (line.trim().compareToIgnoreCase("<pre>") == 0) {
+							if (!previousLine.isEmpty()) {
+							    bw.write(previousLine);
+							    bw.newLine();
+							    previousLine = "";
+							}
+							line = "";
+						    preformatted = true;
+						}
+						line = line.trim();
+						if (!previousLine.isEmpty()) {
+							if (!line.isEmpty()) {
+								previousLine += " " + line;
+							}
+						} else {
+							previousLine = line;
+							for (int i = 0; i < indent; i++) {
+								for (int j = 0; j < indentSize; j++)
+									previousLine = " " + previousLine;
+							}
+						}
+						while (previousLine.length() > 79) {
+							line = previousLine.substring(0, 80);
+							int lastSpaceIndex = line.lastIndexOf(' ');
+							int firstNonSpaceIndex = 0;
+							while (firstNonSpaceIndex < 79) {
+								if (line.charAt(firstNonSpaceIndex) != ' ')
+									break;
+								firstNonSpaceIndex++;
+							}
+							if (lastSpaceIndex > firstNonSpaceIndex) {
+								line = line.substring(0, lastSpaceIndex);
+								previousLine = previousLine.substring(lastSpaceIndex + 1);
+								for (int i = 0; i < indent; i++) {
+									for (int j = 0; j < indentSize; j++)
+										previousLine = " " + previousLine;
+								}
+							    bw.write(line);
+							    bw.newLine();
+							}
+							else {
+							    bw.write(previousLine);
+							    bw.newLine();
+							    previousLine = "";
+							}
+						}
+					}
+					else {
+						indent = 0;
+						if (!previousLine.isEmpty()) {
+						    bw.write(previousLine);
+						    bw.newLine();
+						    previousLine = "";
+						}
+					    bw.newLine();
+					}
+				}
+			}
+			if (!previousLine.isEmpty()) {
+			    bw.write(previousLine);
+			    bw.newLine();
+			}
+			br.close();
+			fr.close();
+			bw.close();
+			fw.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}
Index: resources/help/en/options
===================================================================
--- resources/help/en/options	(revision 4443)
+++ resources/help/en/options	(working copy)
@@ -1,3 +1,5 @@
+=== Command line ===
+
 The command line is of the format:
 
     java.exe [java-options] -jar mkgmap.jar [mkgmap-options]
@@ -26,8 +28,10 @@
     Specifies a logging configuration file that allows you to enable and
     disable specific logging messages. This is useful if you want to see
     certain types of message that are not logged by default or choose where the
-    messages should be written. === Mkgmap options ===
+    messages should be written.
 
+=== Mkgmap options ===
+
 The order of the options is significant in that options only apply to
 subsequent input files. If you are using splitter, you probably will need to
 put most of your options before '-c template.args' (this file is generated by
@@ -50,8 +54,22 @@
 --input-file=filename
     Read input data from the given file. This option (or just a filename) may
     be specified more than once. Make sure you set all wanted options before
-    this.
+    this. Input files may be of the following types:
 
+    o5m, osm, pbf file:
+        Input files are expected to contain Open Street Map data.
+
+    txt file:
+        The input file is expected to contain typ file information in text
+        format. This will be compiled to a typ file with the same name and .typ
+        as the extension.
+
+    typ file:
+        The input file is expected to be a compiled typ file. The output file
+        will be modified to contain the correct family id, product id and code
+        page as required by the map. The output file name will be the input
+        file name prefixed with 'x'.
+
 --gmapsupp
     Create a gmapsupp.img file that can be uploaded to a Garmin or placed in
     "/Garmin" in a microSD card (such as by mounting the device in USB mass
