$_$_TITLE Documentation for the AscToRTF conversion utility $_$_DESCRIPTION AscToRTF is a utility for converting plain text (ASCII) into Rich Text Format. $_$_CHANGE_POLICY Indent Position(s) : 0 4 8 12 16 $_$_CHANGE_POLICY Create mailto links : no $_$_CHANGE_POLICY Default font : Arial, regular, 10 $_$_CHANGE_POLICY Could be blank line separated : yes $_$_TABLE_HEADER_COLS 1 $_$_TABLE_BORDER 0 $_$_HELP_SUBJECT "Introduction to AscToRTF" $_$_SECTION MAKINGRTF AscToRTF Help Index ******************* $_$_SECTION MAKINGHTML [[HTML

Documentation for the AscToRTF text-to-RTF conversion utility

]] $_$_SECTION ALL $_$_HELP_TOPIC_ID HID_ANAL_BULLETS $_$_HELP_TOPIC_ID HID_ANAL_CONTENTS $_$_HELP_TOPIC_ID HID_ANAL_FILESTRUCT $_$_HELP_TOPIC_ID HID_ANAL_HEADINGS $_$_HELP_TOPIC_ID HID_ANAL_LAYOUT $_$_HELP_TOPIC_ID HID_ANAL_LOOKFOR $_$_HELP_TOPIC_ID HID_ANAL_PREFORM $_$_HELP_TOPIC_ID HID_ANAL_TABLE $_$_HELP_TOPIC_ID HID_CONFIG_STYLEFILE $_$_HELP_TOPIC_ID HID_FILE_CONVERT $_$_HELP_TOPIC_ID HID_FILE_EXIT $_$_HELP_TOPIC_ID HID_HELP_ABOUTXXXTOXXX $_$_HELP_TOPIC_ID HID_HELP_CONTENTS $_$_HELP_TOPIC_ID HID_HELP_HTML $_$_HELP_TOPIC_ID HID_HELP_HTML_NET $_$_HELP_TOPIC_ID HID_HELP_REGISTER $_$_HELP_TOPIC_ID HID_MERRILL $_$_HELP_TOPIC_ID HID_OUT_FILE_CONTENTS $_$_HELP_TOPIC_ID HID_OUT_FILE_DIRECTORY $_$_HELP_TOPIC_ID HID_OUT_FILE_FILE $_$_HELP_TOPIC_ID HID_OUT_FILE_FRAMES $_$_HELP_TOPIC_ID HID_OUT_FILE_GENERATION $_$_HELP_TOPIC_ID HID_OUT_FILE_NAMES $_$_HELP_TOPIC_ID HID_OUT_HTML_ADDED $_$_HELP_TOPIC_ID HID_OUT_HTML_HYPERLINKS $_$_HELP_TOPIC_ID HID_OUT_HTML_LINKDICT $_$_HELP_TOPIC_ID HID_OUT_HTML_STYLE $_$_HELP_TOPIC_ID HID_OUT_MISC_PREPRO $_$_HELP_TOPIC_ID HID_OUT_OVERVIEW $_$_HELP_TOPIC_ID HID_OUT_RTF_SETTINGS $_$_HELP_TOPIC_ID HID_OUT_STYLE_COLOURS $_$_HELP_TOPIC_ID HID_OUT_STYLE_CSS $_$_HELP_TOPIC_ID HID_OUT_STYLE_FONT $_$_HELP_TOPIC_ID HID_OUT_STYLE_HTML $_$_HELP_TOPIC_ID HID_OUT_TABLE_TABLE $_$_HELP_TOPIC_ID HID_POLICIES_ANALYSIS $_$_HELP_TOPIC_ID HID_POLICIES_CHANGE $_$_HELP_TOPIC_ID HID_POLICIES_LOAD $_$_HELP_TOPIC_ID HID_POLICIES_OUTPUTTOHTML $_$_HELP_TOPIC_ID HID_POLICIES_RELOAD $_$_HELP_TOPIC_ID HID_POLICIES_RESETTODEFAULTS $_$_HELP_TOPIC_ID HID_POLICIES_SAVE $_$_HELP_TOPIC_ID HID_PROD_ASCTOHTM $_$_HELP_TOPIC_ID HID_PROD_ASCTORTF $_$_HELP_TOPIC_ID HID_PROD_ASCTOTAB $_$_HELP_TOPIC_ID HID_PROD_JAFSOFT $_$_HELP_TOPIC_ID HID_REANALYSE $_$_HELP_TOPIC_ID HID_REMEMBER_SETTINGS $_$_HELP_TOPIC_ID HID_RTF_CONTENTS $_$_HELP_TOPIC_ID HID_RTF_DOCUMENT $_$_HELP_TOPIC_ID HID_RTF_HELP $_$_HELP_TOPIC_ID HID_RTF_LINKDICT $_$_HELP_TOPIC_ID HID_SETTINGS_DIAGNOSTICS $_$_HELP_TOPIC_ID HID_SETTINGS_DOCO $_$_HELP_TOPIC_ID HID_SETTINGS_DRAG $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_ENGLISH $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_FRENCH $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_GERMAN $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_OTHER $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_PORTUGUESE $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_SPANISH $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_SWEDISH $_$_HELP_TOPIC_ID HID_SETTINGS_LOADLANG $_$_HELP_TOPIC_ID HID_SETTINGS_POLICY $_$_HELP_TOPIC_ID HID_SETTINGS_VIEWER $_$_HELP_TOPIC_ID HID_SHOW_STATUS $_$_HELP_TOPIC_ID HID_SHOW_TOOLTIPS $_$_HELP_TOPIC_ID HID_UPGRADE $_$_HELP_TOPIC_ID HID_VIEW_LASTCONVERSION $_$_HELP_TOPIC_ID HID_VIEW_MESSAGES $_$_HELP_TOPIC_ID HIDD_A2HDLG_DIALOG $_$_HELP_TOPIC_ID HIDD_ADDEDHTML $_$_HELP_TOPIC_ID HIDD_ADVANCED_HTML $_$_HELP_TOPIC_ID HIDD_CHOOSE_LANGUAGE $_$_HELP_TOPIC_ID HIDD_COLOURS $_$_HELP_TOPIC_ID HIDD_CSS $_$_HELP_TOPIC_ID HIDD_DETAG $_$_HELP_TOPIC_ID HIDD_DIRECTORY $_$_HELP_TOPIC_ID HIDD_EXPIRED $_$_HELP_TOPIC_ID HIDD_FRAME_COLOUR $_$_HELP_TOPIC_ID HIDD_FRAMES $_$_HELP_TOPIC_ID HIDD_HEADING_LEVELS $_$_HELP_TOPIC_ID HIDD_MERRILL $_$_HELP_TOPIC_ID HIDD_SETTINGS_SINGLEVIEWER $_$_HELP_TOPIC_ID HIDD_SPLASH $_$_HELP_TOPIC_ID HIDD_STATIC $_$_HELP_TOPIC_ID HIDD_STYLE $_$_HELP_TOPIC_ID HIDD_TABLE $_$_HELP_TOPIC_ID HIDD_TAG_MANIPULATION $_$_HELP_TOPIC_ID HIDD_Template $_$_HELP_TOPIC_ID HIDD_TEXT_FRAGMENTS $_$_HELP_TOPIC_ID HIDD_TEXT_MISC $_$_HELP_TOPIC_ID HIDD_TEXT_PARAGRAPHS $_$_HELP_TOPIC_ID HIDD_TEXTFORMAT $_$_HELP_TOPIC_ID HIDD_TEXTLINK $_$_HELP_TOPIC_ID HIDD_TEXTTABLE $_$_HELP_TOPIC_ID HIDR_ACCELERATOR1 $_$_HELP_TOPIC_ID HIDR_MAINFRAME $_$_HELP_TOPIC_ID HID_SHOW_RESULTS $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_ITALIAN $_$_HELP_TOPIC_ID HID_ANAL_BULLETS $_$_HELP_TOPIC_ID HID_ANAL_CONTENTS $_$_HELP_TOPIC_ID HID_ANAL_FILESTRUCT $_$_HELP_TOPIC_ID HID_ANAL_HEADINGS $_$_HELP_TOPIC_ID HID_ANAL_LAYOUT $_$_HELP_TOPIC_ID HID_ANAL_LOOKFOR $_$_HELP_TOPIC_ID HID_ANAL_PREFORM $_$_HELP_TOPIC_ID HID_ANAL_TABLE $_$_HELP_TOPIC_ID HID_FILE_CONVERT $_$_HELP_TOPIC_ID HID_FILE_EXIT $_$_HELP_TOPIC_ID HID_HELP_ABOUTXXXTOXXX $_$_HELP_TOPIC_ID HID_HELP_CONTENTS $_$_HELP_TOPIC_ID HID_HELP_HTML $_$_HELP_TOPIC_ID HID_HELP_HTML_NET $_$_HELP_TOPIC_ID HID_HELP_REGISTER $_$_HELP_TOPIC_ID HID_MERRILL $_$_HELP_TOPIC_ID HID_POLICIES_ANALYSIS $_$_HELP_TOPIC_ID HID_POLICIES_CHANGE $_$_HELP_TOPIC_ID HID_POLICIES_LOAD $_$_HELP_TOPIC_ID HID_POLICIES_OUTPUTTOHTML $_$_HELP_TOPIC_ID HID_POLICIES_RELOAD $_$_HELP_TOPIC_ID HID_POLICIES_RESETTODEFAULTS $_$_HELP_TOPIC_ID HID_POLICIES_SAVE $_$_HELP_TOPIC_ID HID_PROD_ASCTOHTM $_$_HELP_TOPIC_ID HID_PROD_ASCTORTF $_$_HELP_TOPIC_ID HID_PROD_ASCTOTAB $_$_HELP_TOPIC_ID HID_PROD_JAFSOFT $_$_HELP_TOPIC_ID HID_REANALYSE $_$_HELP_TOPIC_ID HID_RTF_CONTENTS $_$_HELP_TOPIC_ID HID_RTF_DOCUMENT $_$_HELP_TOPIC_ID HID_RTF_LINKDICT $_$_HELP_TOPIC_ID HID_SETTINGS_DIAGNOSTICS $_$_HELP_TOPIC_ID HID_SETTINGS_DOCO $_$_HELP_TOPIC_ID HID_SETTINGS_DRAG $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_ENGLISH $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_GERMAN $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_OTHER $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_PORTUGUESE $_$_HELP_TOPIC_ID HID_SETTINGS_LANGUAGE_SPANISH $_$_HELP_TOPIC_ID HID_SETTINGS_POLICY $_$_HELP_TOPIC_ID HID_SETTINGS_VIEWER $_$_HELP_TOPIC_ID HID_VIEW_LASTCONVERSION $_$_HELP_TOPIC_ID HID_VIEW_MESSAGES $_$_HELP_TOPIC_ID HIDD_ADDEDHTML $_$_HELP_TOPIC_ID HIDD_COLOURS $_$_HELP_TOPIC_ID HIDD_CSS $_$_HELP_TOPIC_ID HIDD_DIRECTORY $_$_HELP_TOPIC_ID HIDD_MERRILL $_$_HELP_TOPIC_ID HIDD_SPLASH $_$_HELP_TOPIC_ID HIDD_STATIC $_$_HELP_TOPIC_ID HIDD_STYLE $_$_HELP_TOPIC_ID HIDD_Template $_$_HELP_TOPIC_ID HIDR_ACCELERATOR1 $_$_HELP_TOPIC_ID HIDR_MAINFRAME $_$_HELP_TOPIC_ID HIDR_MENU_ASCTORTF $_$_HELP_TOPIC_ID HIDR_MENU1 $_$_HELP_TOPIC_ID HIDR_MENU2 AscToRTF is a utility designed to convert plain text files into RTF pages. The program can be used to convert legacy text files to RTF as one-off conversions, or to help you author sets of RTF pages in text. The program has been developed from AscToHTM a text-to-HTML conversion utility. Much of the code and help files are developed in parallel, so there may occasionally be inappropriate references to AscToHTM. The program attempts to detect the existing structure in the files being converted by determining rules or policies that describe the file layout. These are known as the [[goto analysis policies]]. The RTF generated by the program can be configured to a limited extent via the programs [[goto output policies]]. The policies used by the file can be saved to a policy file and subsequently reloaded. This allows standard sets of policies to be defined. $_$_SECTION MAKINGRTFHELP There's a [[goto complete contents list for this document]] Complete contents list for this document ======================================== $_$_HELP_TOPIC_ID ID_CONTENTS_LIST This is a complete contents list for the .rtf file used to generate this help file. Sadly it isn't hyperlinked, but it may help you find what you're looking for. Ignore any page numbers. $_$_SECTION ALL $_$_CONTENTS_LIST 2 $_$_HELP_CHAPTER 1,"Installation" Installation ************ The shareware version of AscToRTF is made available over the web from [a2r Download location]. Once you register you can download the full version (no nags, no limits), and are entitled to free upgrades for an arbitrary (equals "my decision is final") period of time. So far I've *never* requested payment for any [a2r updates] of AscToRTF over the last 2-3 years. Installation will vary according to the type of install kit you've downloaded, but in each case you first download the .ZIP file appropriate to your system and unzip. $_$_SECTION MAKINGHTML *Contents of this section* $_$_CONTENTS_LIST 2,,2 $_$_SECTION ALL $_$_HELP_CHAPTER 2,"Windows Installation" Windows installation ==================== The current version of the software makes updates to your Registry. See the Install notes that come with the software for a description of the registry settings used. Installing the Windows GUI version ---------------------------------- The standard installations use InnoSetup to offer install and uninstall options. To use this version, unzip the file and then run the Setup program. This will move the files to a directory, and create all icons etc. Once installed, InnoSetup will also offer an uninstall option. You can access this via Control Panel | Add/remove software. Installing the console version ------------------------------ The [[goto console version]] simply comes in a .zip file. The documentation is not included as this is the same as the Windows version. Simply unzip the console version to the folder of your choice. $_$_HELP_CHAPTER 2,"OpenVMS version" $_$_HELP_SUBJECT "Installation" OpenVMS version of AscToRTF =========================== Sorry. No VMS distribution is planned at this time as RTF is not exactly a VMS-friendly file format. That said, the software - like AscToHTM - is largely developed under VMS, so if there is enough interest this may change. Email *infojafsoft.com* if you're interested (replace the "" by "@"). $_$_HELP_CHAPTER 1,"How it works" $_$_HELP_SUBJECT "Overview" How it works ************ AscToRTF analyses your document, looking at how the text is laid out, and trying to identify and quantify the rules used by the author to format the document. These rules are then used to set "policies" that determine how each part of the document should be interpreted. These policies are then used during the output pass to decide how the output document should be formatted. The user can choose to manually set "Policies", thereby overriding the software's analysis, and may additionally set some policies that only apply to the output pass (such as which fonts should be used). These manual options may be saved in a policy file and reloaded the next time. Different policy files may be created for different document sets, or for different types of output. For example analysis might determine that a large number of lines appear to be "underlined", and that these may be headings. Having made this decision, lines that are underlined will become headings, while those that are numbered or capitalised may not. If this is the wrong decision, the user can disable the use of underlined headings via a policy file, and even choose to recognize capitalised headings instead should they wish. $_$_SECTION MAKINGHTML *Contents of this section* $_$_CONTENTS_LIST 2,,2 $_$_SECTION ALL Assumptions made by the program =============================== AscToRTF makes one big assumption :- _Each text file has been laid out in a consistent manner by its author in a way that makes it easy for a human reader to understand_ Given this, AscToRTF tries to read the text file and mark it up in RTF accordingly. This is achieved by making three passes through the document, an [[goto The analysis pass,analysis pass]], a [[goto The collating pass,collating pass]], and an [[goto The output pass,output pass]]. Note: Sadly this assumption is not always true :( The analysis pass ================= During the analysis pass AscToRTF gathers together all the statistics that it needs to analyse how the author has laid out the file. For example, the distribution of line indentations and line lengths is observed, together with the number and types of bullets, section headings and lots of other stuff. Once this has been done, the program uses this data to determine how the author has structured the document. For example are the section headings underlined, capitalised or numbered? If numbered, what style of numbering is used, and at what level of indentation is the heading placed? This information is then used to set the analysis polices (see the [Policy Manual]) which may then be overridden by the user, or by loading a policy file with different values. The collating pass ================== Having performed the analysis, the program makes a second "collating" pass. This is effectively a dry run for the output pass. During this pass the program determines how the file will be output, what headings there are and where certain key in-line tags occur. It also assembles any contents list. This information is then used during the output pass to reduce the likelyhood of errors, and to ensure all internal hyperlinks are valid and will point to the correct file location. The output pass =============== During the output pass AscToRTF generates the RTF file (there's nothing like stating the obvious :-) The RTF generated depends only on the original document, the calculated document policy, and any user policies supplied. [[GOTO Understanding the RTF generated]] describes the markup produced in more detail. $_$_HELP_CHAPTER 1,"Running the software" Running the software ******************** $_$_SECTION MAKINGHTML *Contents of this section* $_$_CONTENTS_LIST 2,,2 $_$_SECTION MAKINGRTFHELP - [[goto Running as a Windows application]] - [[goto Running as a command line program]] - [[goto "Running from the 'SendTo' menu"]] $_$_SECTION ALL Overviews ========= - [[goto Understanding the RTF generated]] - [[goto Using policy files]] - [[goto analysis policies]] - [[goto output policies]] - [[goto Using the pre-processor]] - [[goto settings menu,"Saving program preferences"]] - [[goto Diagnosing conversion errors]] Other Information ================= - [[goto Ordering your copy]] - [[goto Upgrade Policy]] - [[goto Documentation available]] - [[goto Acknowledgements]] $_$_HELP_CHAPTER 2,"Running as a Windows application" $_$_HELP_SUBJECT "Overview" Running as a Windows application ================================ $_$_HELP_TOPIC_ID ID_RUN_WINDOWS AscToRTF can be invoked as a normal Windows application. On start-up you will be presented with the main window. This consists of a menu bar across the top of the window, and some data entry fields in the main body of the window. *Menu Bar* $_$_BEGIN_DELIMITED_TABLE [[goto File menu]] File options [[goto Conversion Options menu]] Options that affect the conversion [[goto Settings menu]] Edit the program's settings [[goto Language menu]] Select the language you'd like the program's user interface to be in [[goto View menu]] View the created RTF files or the messages for the last conversion [[goto Help menu]] Various help files and on-line resources $_$_END_DELIMITED_TABLE *Data entry fields* The data entry fields show - the file(s) selected for conversion - whether or not you want to [[goto search sub-folders]] - the [[goto conversion type]] wanted - the output directory - the output filename Normally you need simply select the input file(s) using the Browse button, and the rest of the fields will be set to default values. If you want to use wildcards, type the file specification in the data entry box directly. Once you have selected your files, press the Convert button. The [[goto Status Window]] will briefly appear whilst the conversion proceeds. *Policy files* AscToRTF has many options known as "policies" to help you improve and correct the analysis it performs, and to customise the RTF it generates. Policy files are described more fully in [[goto Using policy files]]. Options on this screen include :- - Load policies from an existing policy file - Reset all policies to their default values More options are available under the Conversion Options menu. Search sub-folders .................. *New in version 2.0* When this option is selected, the software will convert any files that match the supplied filename in either the directory specified or any of its sub-folders. Conversion type ............... *New in version 2.0* The *Conversion Type* specified how the input file should be regarded during the conversion. The options available include $_$_BEGIN_TABLE plain text The input file is a plain text file, and the software should analyse it to determine how it is structures text table The input file is a plain text file which contains a single table. The program will treat the whole file as a table, and use analysis to calculate the table layout comma-delimited table The input file is a comma-delimited data file (usually a .csv file). Each line in the file will be treated as a row in the table, and commas are used to separate the data for each column. tab-delimited table As above, but the TAB character is used as a delimiter other-delimited table As above, but you need to specify the delimiter in the field that appears when this option is selected. $_$_END_TABLE In the delimited table types the delimiter character shouldn't appear in the data value itself. This usually means that tab-delimited files work better. In a comma-delimited file, any value that contains a comma must be placed in double quotes. Any double quotes in a quoted value should be doubled up inside the quote. So the value "Enter," she said would need to be written as """Enter,"" she said" in the data file. $_$_HELP_CHAPTER 3,"File menu" $_$_HELP_SUBJECT "Options" File menu --------- $_$_HELP_TOPIC_ID ID_MENU_FILE The file menu offers the following options:- $_$_BEGIN_DELIMITED_TABLE Convert This will prompt you for a file to convert and will then convert the selected file(s). [[goto Load policy file]] Load policies from a policy file [[goto Save policy file]] Save the current set of policies to a policy file Exit Exit the program. $_$_END_DELIMITED_TABLE $_$_HELP_CHAPTER 3,"Conversion Options menu" $_$_HELP_SUBJECT "Options" Conversion Options menu ----------------------- $_$_HELP_TOPIC_ID ID_MENU_OPTIONS This menu allows you access to the conversion options - also known as policies - that give you a large amount of control over the conversion process. These policies can be saved to a policy file (with a .pol extension by default) for re-use in later conversions. Policies are explained more in [[goto Using policy files]] The menu options include:- $_$_BEGIN_DELIMITED_TABLE [[goto Analysis policies]] Edit those policies that affect the analysis of your source document [[goto Output policies]] Edit those policies that affect the type of RTF generated. [[goto Config File locations menu, Configuration File locations]] Specify the locations of various configuration files [[goto Load policy file]] Load policies from a policy file Reload policies from file Allows you to re-load the policy file, or to load a different file. [[goto Re-analysing the input file]] Re-analyse the input file to re-calculate the analysis policies [[goto Resetting policies to default values]] Reset policies to default values. $_$_END_DELIMITED_TABLE Analysis policies menu ...................... The Analysis Policies menu allows you to change those policies that affect the analysis of the source document. These are discussed fully in the [[goto Analysis Policies]] section of this document. Output policies menu .................... The Output Policies menu allows you to change those policies that affect the output of the conversion process. These are discussed fully in the [[goto Output Policies]] section of this document. Config File locations menu .......................... The Config File Location menu allows you to specify the location of various additional configuration files. The locations you select will be stored in your policy file, so in a sense these files act as extensions of the policy file, but by being stored in separate files the same configuration files can be shared by multiple policy files. The options on this menu allow you to select do locate following :- - [[goto Selecting the Link Dictionary File,Link Dictionary File]] - [[goto Selecting the Style Definition File,Style Definition File]] - [[goto Selecting the Table Definition File,Table Definition File]] - [[goto Selecting the Text Command File,Text Command File]] Selecting the Link Dictionary File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option allows you to select the Link Dictionary. When selected it takes you to the Link Dictionary dialogue where you can select the Link Dictionary file you want, and also view and edit its contents (although this could also be done directly using a text editor) If a file has been selected you can press the Edit button to bring up a dialog where you can [[goto Link Dictionary Edit Dialog,edit the selected link dictionary]] although you may find this easier to do using a text editor. See [[goto Using link dictionary files]] Selecting the Style Definition File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option allows you to select the [[goto Using Style Definition Files (SDF),Style Definition File]] you wish to use. This defines the "styles" that will be available for use in the FO (font) preprocessor tag. It also allows you to select the [[goto Scope for font tags]] See [[goto Pre-processor command: FO]] Selecting the Table Definition File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option allows you to select the [[goto Using Table Definition Files (TDF),Table Definition File]] you wish to use. Selecting the Text Command File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option allows you to select the [[goto Using Text Command Files,Text Command File]] you wish to use. Re-analysing the input file ........................... $_$_HELP_TOPIC_ID ID_REANAL This option, available from the [[goto conversion options menu]], allows you to reset the analysis options by analysing the current input file. This is not normally necessary, as this will be done automatically during a conversion. Resetting policies to default values .................................... $_$_HELP_TOPIC_ID ID_RESET_POLICY This option will reset all policies to their default values. If a policy file has been loaded, it will be unloaded. Load policy file ................ $_$_HELP_TOPIC_ID HIDD_OPTIONS AscToRTF has many options known as "policies" to help you improve and correct the analysis it performs, and to customise the RTF it generates. These policies can be saved in a policy file for later re-use in future conversions. This dialog screen is primarily intended to allow you to load a previously saved policy file Policy files are described more fully in [[goto Using policy files]]. Options on this screen include :- - Load policies from an existing policy file - [[popup Save policy file]] to save options to file for later re-use - Reset all policies to their default values Save Policy File ................ $_$_HELP_TOPIC_ID HIDD_SAVE_POLICY This window is displayed whenever the user wishes to save their policies to a file, usually for use in later conversions. To save the file, simply select the policy file name, usually with a .pol extension. This window contains a radio button with two options: - *Save only those policies that have changed* If this option is selected, then only those policies that have been loaded from an existing file and/or been edited during the current session will be saved. This is the recommended option, as it will exclude all policies that have been set up correctly automatically. - *Save all policies* If this option is selected, that all policies are written to file. This is a good way of documenting the policies used, but is usually too restrictive to be loaded as input into conversions of other files. The saved file is a text file designed so that it may be manually edited and reloaded. If you do so, take care not to change the key phrases at the start of each line. Note: If you find that conversions that used to work "stop working" it's possibly because you're using a complete policy file $_$_HELP_CHAPTER 3,"The Settings Menu" $_$_HELP_SUBJECT "Options" Settings menu ------------- $_$_HELP_TOPIC_ID ID_MENU_SETTINGS $_$_HELP_TOPIC_ID HIDD_SETTINGS The program settings menu allows you to customise the way AscToRTF executes each time it is invoked. This is kept separate from the use of [[goto what are policy files?,"policy files"]], which are used to customise the actual conversion process. This menu has the following options :- $_$_BEGIN_DELIMITED_TABLE [[goto Documentation Settings]] Specify the location of your documentation on your hard drive [[goto Diagnostic Settings]] Set message filters and alter the error reporting level to control the number and type of messages generated during conversions [[goto Drag and Drop Settings]] Set the program's properties when invoked by dragging files into the icon on the desktop [[goto Results viewers settings]] Specify the viewers to be used for viewing results files, and their method of invocation [[goto Use of policy file settings]] Specify any default policy file to be used. $_$_END_DELIMITED_TABLE Documentation settings ...................... $_$_HELP_TOPIC_ID HIDD_SETTINGS_DOCO These options allow you to specify the location of the program's documentation on your local system. This is required for the option on the Help menu to work. By default the documentation is placed in the same directory as the program on installation, so you should only need to change this setting should you decide to move the documentation. Diagnostic settings ................... $_$_HELP_TOPIC_ID HIDD_SETTINGS_MESSAGES These options allow you to set the level of error reporting, or to suppress messages of various types from being displayed during conversion. The types of messages include :- $_$_BEGIN_DELIMITED_TABLE *INFO messages* Informational messages. These convey information telling you what was been done and why. *WARNING messages* Warning messages. These tell you that something you have requested has not been done, or something has been done which may not be correct. It's possible you may be able to take corrective action. *TAG ERROR messages* Tagging errors. Only occur when you use the preprocessor in-line tags and directives introduced in Version 4.0 *PROGRAM ERROR messages* Program errors. The program has detected it has done something wrong. The conversion may still be successful, but there is nothing you can do about such messages except report them to the program's author at *infojafsoft.com* *URL messages* URL detection. When a URL is found a message is displayed. When switched on this can be a quick way of listing all the URLs in a file :-) $_$_END_DELIMITED_TABLE Drag and drop settings ...................... $_$_HELP_TOPIC_ID HIDD_SETTINGS_DRAG These options specify the behaviour of AscToRTF when invoked via drag and drop (i.e. by dropping a file icon on AscToRTF's icon). _Show the status screen_ The status dialog, showing messages reporting how the conversion is going should be shown. _View results in browser once complete_ The selected viewer (browser) for the results files should be invoked on the last file converted once conversion is complete _Start program after conversion_ The program should be launched in Windows mode once the conversion is completed. Results viewers settings ........................ $_$_HELP_TOPIC_ID HIDD_SETTINGS_VIEWER $_$_HELP_TOPIC_ID HIDD_SETTINGS_VIEWER_RTF This identifies the viewers to be used whenever AscToRTF launches an application to view a results or documentation file. Viewers may be required for both HTML and RTF files. You can elect to have results viewed automatically after each conversion. This will normally result in the named application being launched to view the last file converted. For HTML, you can elect to use Dynamic Data Exchange (DDE) to have the results displayed in a currently active browser. This can be quicker and more efficient that launching a new instance of the browser each time. You should ensure your DDE browser matches the program named as the default browser so that if not already active, the program can start a fresh instance. When DDE is used the results will vary from browser to browser. IE for example will come to the front, whereas Netscape will not, and if it is minimised you won't see the results until you maximise the browser again. For RTF, DDE is not currently available. Use of policy file settings ........................... $_$_HELP_TOPIC_ID HIDD_SETTINGS_POLICY *Using a default policy file* This determines which [[goto what are policy files?,"policy file"]], if any, is to be used by default when AscToRTF is first invoked. The actual policy file used can, of course, be changed via the policy dialogue. The default policy file will also be used if AscToRTF is invoked via drag'n'drop. This avoids the need for creating batch files with the policy file name on the command line. *Always reload policy file during conversion* This specifies that the current policy file should be reloaded every time the conversion is done. If the file is large, and you are repeatedly converting using the same policy file, then this can slow you down. On the other hand if you are editing the policy file by hand outside the program between conversions then you will want this option enabled. $_$_HELP_CHAPTER 3,"Language menu" $_$_HELP_SUBJECT "Language options" Language menu ------------- $_$_HELP_TOPIC_ID HIDD_TRANSLATIONS $_$_HELP_TOPIC_ID ID_MENU_LANGUAGE $_$_HELP_TOPIC_ID ID_SETTINGS_LANGUAGE $_$_HELP_TOPIC_ID HIDD_LANGUAGES From version 3.2 onwards it is possible to change the user interface to the language of your choice. This is a process being rolled out by a number of volunteers who are converting the menu, dialog, ToolTips, message and documentation text. At any given time you may still find English translations, especially in the messages displayed, and in the help and documentation files, but it is hoped that the efforts of these volunteers will make the program easier to use for non-English speakers. _Supported languages_ At present work is under way on $_$_BEGIN_TABLE Spanish Gonzalo San Martin is undertaking the Spanish translation. Gonzalo operates a highly popular Real Madrid fan page (in Spanish and English) which you can visit at http://members.bigfoot.com/~G.SanMartin/ Gonzalo can be contacted at *G.SanMartinbigfoot.com* Italian The Italian translation is being undertaken by Gianluigi Pizzuto who can be contacted at *giblylibero.it* and has a web page at http://web.tiscalinet.it/fotone Swedish The Swedish translation is being undertaken by Dan Svarreby who can be contacted at *dan.svarrebyhome.se*. German The German translations is being undertaken by Jörg Feierabend who can be contacted at *zeitenwanderert-online.de* French The French translation is being undertaken by Andre Martinez. Portuguese The Portuguese translation is being undertaken by Ana Maria G. F. de Mello who can be contacted at *anagfmbigfoot.com* $_$_END_TABLE If you would like to volunteer to help with this effort, please email translationsjafsoft.com or visit the web page at http://www.jafsoft.com/products/translations.html *Language "Skins"* From version 1.1 the program supports the use of [[goto "language 'skins'"]] Language 'Skins' ................ AscToRTF supports the use of "language skins", that is the ability to export, edit and re-import from text file the strings used in the program's user interface. The "language skin" is a text file, usually with an .lng extension. This file consists of one string per line, with each line being numbered to identify the string. You can edit these strings into your own language, and then reload the modifications back into the program. If you do this, make sure you leave the numbers unchanged. *Export current language setting to file* This option allows you to export all the current language strings to an external .lng file. You may then edit this file to get the user interface strings that you want. *Load a language "skin"* If you check the "use language skin" box, then the program will load the specified file each time it runs, using the text in that file as the user interface. Changes will take effect when you press OK. $_$_HELP_CHAPTER 3,"View menu" $_$_HELP_SUBJECT "View menu options" View menu ---------- $_$_HELP_TOPIC_ID ID_VIEW_MENU This menu contains the following options - [[goto Status window,Messages from last conversion]] - [[goto View conversion results]] View conversion results ....................... $_$_HELP_TOPIC_ID ID_VIEW_RESULTS Once you've converted a file, you can view the results in the browser of your choice. AscToRTF will detect the default browser used on your system. If you wish you can change this through the [[goto settings menu]] You can view results in the selected browser by selecting the option on the [[popup view menu]] or by pressing the View results button on the main screen. AscToRTF can also be configured to automatically review results when run from the command line or in drag'n'drop operation. $_$_HELP_CHAPTER 3,"Help menu" $_$_HELP_SUBJECT "Help menu options" Help menu --------- $_$_HELP_TOPIC_ID ID_MENU_HELP The help menu has the following options:- $_$_BEGIN_DELIMITED_TABLE _Contents_ Brings up the contents page of this help file. Help can be brought up anywhere in the program by pressing F1 _RTF doco (offline)_ Brings up the local copy of the RTF documentation in your preferred browser _RTF doco (online)_ Brings up the Internet copy of the RTF documentation in your preferred browser. _Register (online)_ In the shareware version this will take you to the web page which gives registration details. You will need to be online for this to work _About_ Shows the program version and other details. Includes buttons to take you to the home page etc on the web. $_$_END_DELIMITED_TABLE $_$_HELP_CHAPTER 3,"Status window" $_$_HELP_SUBJECT "The status window" Status window ------------- $_$_HELP_TOPIC_ID HIDD_STATUS_DIALOG The status window is displayed whenever a conversion is in progress. It displays messages showing how the conversion is progressing. Usually these are just informational messages telling you of lines on which AscToRTF hasn't performed markup because they "fail policy". For example a line with a number at the beginning won't be turned into a header unless the number is in sequence, and the line is at the correct indentation level. You should review these messages and check they don't indicate an error in conversion. This screen can be retrieved by pressing the "Show messages window" button on the main window. $_$_HELP_CHAPTER 2,"Running AscToRTF as a command line program" $_$_HELP_SUBJECT "Command line syntax" Running as a command line program ================================= $_$_HELP_TOPIC_ID ID_RUN_COMMAND You can run AscToRTF from the command line inside a Command Line ("DOS") window. You can also run a [[goto console version]], A2RCONS. The command line has the syntax c:> A2RCONS [ ...] [] [/qualifiers] if running the console version, or c:> AscToRTF [ ...] [] [/qualifiers] if running the Windows version (although this doesn't support all qualifiers). If you supply no on the command line, then the windows version will be launched as normal, but the console version will prompt you for filenames. The value can be any valid filespec, including wildcards. You can supply additional , ... values should you wish. For example c:> a2hcons a*.txt b*.txt c*.txt abc.pol /out=c:\temp\ will convert all the files a*.txt, b*.txt and c*.txt in the current folder using the policy file abc.pol and place all the output files in the folder c:\temp\. If you supply one or more valid value these files will be converted. For the Windows version, depending on the [[goto settings menu,Settings]] you've selected, the [[goto Status Window]] will be displayed during the conversion, the program will display once finished, and a viewer may be launched to view the results. *Note, generally we advise using the console version for command line operations* If you want to use a policy file, add this to the argument list. The policy file must have a .pol extension, and only the first policy file listed will be used. Recognised qualifiers include $_$_BEGIN_DELIMITED_TABLE [[popup command line qualifiers: /COMMA,/COMMA]] Input file is a comma-delimited table [[popup command line qualifiers: /CONSOLE,/CONSOLE]] Direct the output to the console stdout stream [[popup command line qualifiers: /CONTENTS,/CONTENTS]] Generate a contents list [[popup command line qualifiers: /DOS,/DOS]] Generate DOS 8.3 filenames [[popup command line qualifiers: /HELP,/HELP]] Generates a HELP message [[popup command line qualifiers: /LOG,"/LOG=filename"]] Generate a log file. [[popup command line qualifiers: /LIST,"/LIST=filename"]] Generate a list file. [[popup command line qualifiers: /OUTPUT,"/OUTPUT=filespec"]] Specify the output filename(s) [[popup command line qualifiers: /POLICY,"/POLICY=filename"]] Generate a .pol policy file from the analysis of the source file [[popup command line qualifiers: /SILENT,/SILENT]] Suppress all console messages [[popup command line qualifiers: /SIMPLE,/SIMPLE]] Treat the source file as "simple", i.e. don't look for complex constructs [[popup command line qualifiers: /TABBED,/TABBED]] Input file is a tab-delimited table [[popup command line qualifiers: /TABLE,/TABLE]] Input file is a plain text table $_$_END_DELIMITED_TABLE Qualifiers must begin with the slash (/) character but may be of mixed case and may be shortened provided they remain unique. So /H will get you help, whereas you can't use /S since that could be /SILENT or /SIMPLE Command line qualifiers: /COMMA ------------------------------- _New in version 2.0_ Specifies that the source file is a comma-delimited table. In this case each line will become a row in a table, and each value separated by a comma will become a cell in the table. Command line qualifiers: /CONSOLE --------------------------------- _New in version 2.0_ Specifies that the output should be direct to the output stream. This should normally be used with [[goto command line qualifiers: /SILENT]] to suppress all status messages. This option could be useful if you wanted to pipe the output into some other application. Command line qualifiers: /CONTENTS ---------------------------------- $_$_HELP_TOPIC_ID ID_QUAL_CONTENTS This qualifier will cause a contents list to be generated containing links to all the headings detected ion the source document. See the discussion on [[goto adding a contents list]] and the [[goto contents policies]] Command line qualifiers: /DEBUG ------------------------------- $_$_HELP_TOPIC_ID ID_QUAL_DEBUG This qualifier will cause the program to generate diagnostics files. Command line qualifiers: /DOS ----------------------------- $_$_HELP_TOPIC_ID ID_QUAL_DOS If specified the output filenames will be in the 8.3 format Command line qualifiers: /HELP $_$_HELP_TOPIC_ID ID_QUAL_HELP ------------------------------ On the [[goto console version]] this generates a help message detailing usage. Command line qualifiers: /LIST ------------------------------ These qualifiers cause AscToRTF to generate some diagnostic files, which have extensions .LIS1 an analysis before policy is set .LIS an analysis after policy is set The list files can assist in understanding how AscToRTF has interpreted your file. The .stats file is neither pretty, nor easy to read, but can in extreme cases assist in diagnosing faults should you wish to report them. If Command line qualifiers: /LIST is used, only the list files are created. Command line qualifiers: /LOG ----------------------------- $_$_HELP_TOPIC_ID ID_QUAL_LOG This qualifier will cause the status messages created by the program to be copied into a log file. This log file will include messages suppressed from the user interface. You can specify a filename as /LOG="", the default filename, if omitted, will be AscToRTF.log Command line qualifiers: /OUTPUT -------------------------------- $_$_HELP_TOPIC_ID ID_QUAL_OUTPUT The /OUTPUT=filename qualifier specifies where the output file(s) should be placed. It can include wildcards, with the input file being used to replace any parts of the filename not specified. Thus "/OUT=c:\temp\*.sav" will result in a file with the same name, but with a .sav extension, and in the "c:\temp\" directory folder. If omitted, the output file will be given the same name as the input file but with a .rtf extension. Command line qualifiers: /POLICY -------------------------------- $_$_HELP_TOPIC_ID ID_QUAL_POLICY This qualifier will cause the program to generate a .pol file for each file converted. This file will represent the "best guess" policy file generated by the program through analysis of your file. WARNING: The .pol file will have the same name as the file being converted with a .pol extension, and will overwrite any existing policy file of the same name. For this reason we recommend your input policy files should have different names (e.g.. by adding "in_" in front of the name. Command line qualifiers: /SILENT -------------------------------- $_$_HELP_TOPIC_ID ID_QUAL_SILENT This qualifier suppresses all error messages from being displayed to the console. Mainly relevant in the OpenVMS and console versions of the program, rather than the Windows version. Command line qualifiers: /SIMPLE -------------------------------- $_$_HELP_TOPIC_ID ID_QUAL_SIMPLE This qualifier indicates that you want the source file treated as a "simple" file, and that AscToRTF shouldn't look for more complex constructs such as headings etc. This is equivalent to the [[goto Keep it simple]] policy Command line qualifiers: /TABBED -------------------------------- _New in version 2.0_ Specifies that the source file is a tab-delimited table. In this case each line will become a row in a table, and each value separated by a tab will become a cell in the table. Command line qualifiers: /TABLE ------------------------------- _New in version 2.0_ Specifies that the source file is a plain text table. In this the program will do its best to analyse the table structure, and reproduce it. $_$_HELP_CHAPTER 2,Running from the 'SendTo' menu $_$_HELP_SUBJECT "Invoking the program from your right-click 'Sent To' menu" Running from the 'SendTo' menu ============================== $_$_HELP_TOPIC_ID ID_RUN_SENDTO AscToRTF can make a useful addition to your "Send to" menu (available when you right-click on a file in explorer). To add AscToRTF to this menu, simply add a shortcut to your /Windows/SendTo directory. If you want to use a standard policy file (e.g. with a particular colour scheme), then create a simple .bat file with the command *AscToRTF %1 standard.pol* $_$_HELP_CHAPTER 1,"Getting the most from AscToRTF" Getting the most from AscToRTF ****************************** $_$_SECTION MAKINGHTML *Contents of this section* $_$_CONTENTS_LIST 2,,2 $_$_SECTION MAKINGRTFHELP This section contains discussions on the following - [[goto Making your first attempt]] - [[goto Refining your results]] - [[goto Using policy files to improve the conversion]] - [[goto Using link dictionary files]] - [[goto Using multiple policy files]] - [[goto Use the pre-processor and in-line tags]] - [[goto Processing several files at once]] - [[goto Using wildcards]] - [[goto Using script files]] - [[goto Generating log files]] $_$_SECTION ALL $_$_HELP_CHAPTER 2,"Getting started" Making your first attempt ========================= $_$_SECTION MAKINGRTFHELP This section contains discussions on the following topics. - [[goto Starting to use the console version]] - [[goto Starting to use the Windows version]] $_$_SECTION ALL Starting to use the console version ----------------------------------- To run the console version A2RCONS simply type c:> A2RCONS Input_file.name at the command line. This will create a file :- input_file.rtf An output file which will have the same file name with a .rtf extension The program may display a number of status messages which are largely informational, and can be ignored if the conversion worked okay. If it didn't, these messages may give a clue as to where the analysis went wrong. Starting to use the Windows version ----------------------------------- Enter the name of the file to be converted in the *File(s) to convert* text field. You can type in wildcards into this field. If you wish, use the browse button to search for the file to be converted. Alternatively simply drop the file icon from an Explorer window onto the program. Once you've chosen the file(s), the *output filename* and *output directory* are calculated for you from the filename. If you wish, you may change these values. Press the *Convert File(s)* button. The Status Display window will appear briefly showing progress messages. You can dismiss this display (or tick the option that it does so automatically on completion). If you wish to view these messages later, you can selected the *Show Messages* option on the [[goto View menu]]. To view the last file converted, press the *View results* button. This should launch your default application for the file types (.rtf) just created. This will usually be your default word processor package. $_$_HELP_CHAPTER 2,"Refining your results" $_$_HELP_SUBJECT "Improving your results" Refining your results ===================== If all goes well the resultant RTF file will be satisfactory. If there are problems, or if you wish to add to the created file, you can tailor the conversion by changing policies. Note: Unlike [AsctoHTM], AscToRTF has relatively few output policies, as it is expected that users will "tidy up" the created file using their preferred Word processing application. In the Windows version, this is done by editing policies via the *Conversion Options* menu, which is fully described in the context-sensitive Windows Help file (press F1 at any point). The conversions options are also known as "policies", and these can be saved to a text policy file. Policy files are just text files with one option per line. If you're careful, they can be edited by hand in a text editor. It is the format of policies in a policy file that is shown and discussed in this document. Policy files created in the Windows version can also be used by the console version. Using policy files to improve the conversion -------------------------------------------- If your initial results are a little strange, then review the policies calculated by the program, and create a "policy file" to tell the program how to do the conversion differently. You can do this as follows :- a) _By creating a "sample" policy file_ You can create a sample .pol policy file that documents the policies used. Do this either by using the command line c:> A2RCONS Input_file.name /policy or by ticking "Generate a sample policy file" on the _Conversion Options->File Generation_ tabbed dialogue When this is done then the next time you convert the file, in addition to the .rtf file generated, you will now have an output policy file "input_file.POL" which describes the document policy file calculated by AscToRTF and used by it during the conversion. This file will contain one line each for all the program policies, *most of which should be correct*. Review the contents of this file, deleting all lines that look correct, and editing all lines that appear to be wrong. You want to delete "correct" lines, because that leaves the program free to re-calculate these options on a file-by-file basis. If you leave the "correct" value in the file, you fix the option, which may not be "correct" for later files that you choose to convert. Save the modified .POL file which should only contain lines for those policies you think are wrong or want to override. You'll may need to review the [Policy Manual] in order to understand the policies to do this fully. b) _By re-analysing the file_ Under Windows a slightly easier option is to select _Conversion Options -> Re-analyse the file_. This will analyse the file and change all the policy values currently on display to be the values calculated by the program. You can then review and change these values using the tabbed dialogues. Once you're happy with your changes, select "Save policies to file" from the menu, saving only the changed policies. You can review this file in a normal text editor. Once you've produced your new input policy file, re-run the conversion using the new policy file. The program will now override aspects of the calculated document policy with the input policy you've supplied. Each document policy file consists of a number of lines of data. Each line has the form $_$_BEGIN_PRE Keywords : Data value(s) $_$_END_PRE For clarity a number of section headers are added like this : $_$_BEGIN_PRE [Analysis] $_$_END_PRE Such headings are ignored, as are any lines whose keywords are not recognised or not yet supported. The order of policies in the file, and their location within "sections" is totally unimportant. The order of policies within the file is usually unimportant, and the placement relative to the "headings" is ignored. The Headings are simply there to make the file easier to read in a text editor. A sample fragment from a calculate policy file looks like this $_$_BEGIN_PRE [Hyperlinks] ------------ Create hyperlinks: Yes Create mailto links: Yes Create NEWS links: Yes $_$_END_PRE These are all default values used by AscToRTF. If, for example you want to add a title to your page and prevent email addresses being turned into hyperlinks, simply create a policy file containing the lines $_$_BEGIN_PRE [Hyperlinks] ------------ Create mailto links: No $_$_END_PRE (Remember the insertion of section headings is optional, as is the ordering of policies within the file). By refining the input policy file, you can greatly influence the output that AscToRTF generates Using link dictionary files --------------------------- NOTE: This feature is a legacy from [AscToHTM]. The generation of hyperlinks in RTF documents - though possible - is less likely to be of interest. In addition to adding hyperlinks for all URLs, email addresses, section references and contents list entries, AscToRTF allows users to specify key phrases that should be turned into hyperlinks. This is achieved by adding lines to the input policy of the form $_$_BEGIN_PRE [Link Dictionary] ----------------- Link definition : "[Google]" = "Google search engine" + "www.google.com" $_$_END_PRE The syntax used here is $_$_BEGIN_PRE Link definition : "match phrase" = "replacement phrase" + "link" $_$_END_PRE In this case the string "[google]" is replaced by a link to a web page "www.google.com" with the text "Google search engine" being highlighted. NOTE: Unlike AscToHTM, only external hyperlinks are accepted. Relative links will be ignored since they won't work from inside an RTF document. Using multiple policy files --------------------------- If you wish to use AscToRTF to support several text files e.g. for a set of Intranet documentation, it may be useful to share some common document policies, e.g. colour, headers and footers and particularly the link dictionary. To support this AscToRTF allows two special types of line in the policy file. a) Include files $_$_BEGIN_PRE include file : Link_Dictionary.dat $_$_END_PRE If a line of this type is encountered, the contents of the file Link_dictionary.dat are included in the current policy file. This is the best way of sharing data across many converted files. b) "daisy-chain" files $_$_BEGIN_PRE switch to file : Other_policy_file.dat $_$_END_PRE If a line of this type is encountered, the processing of the current file terminates, and continues in the named file. This is a way of "daisy-chaining" policy files together which may be useful if you wish to group files together at different levels. Use the pre-processor and in-line tags -------------------------------------- AscToRTF has a built-in pre-processor. This allows you to add special codes to your source file that tell the program what you'd like it to do. Examples include delimiting tables, or adding a timestamp to the file being converted. Again, much of this functionality was developed for [AscToHTM] and may be less useful for RTF generation. See [[GOTO Using the pre-processor]] and [[GOTO pre-processor in-line tags]] for more details. $_$_HELP_CHAPTER 2,"Processing multiple files at once" Processing several files at once ================================ The program is capable of processing more than one file in a single run. There are a number of ways in which you can tell the program which files you want. - You can [[goto Using wildcards,use wildcards to specify the filenames]] The wildcard will be expanded to a set of filenames, and each file will be processed in turn. - (From the command line only) You can [[goto Using script files,use a script file]] That is you can pass the name of a file which lists the files you want converted. - (From the command line only) You can pass in multiple file specifications, each of which can be a wildcard. For details see [[goto running as a command line program]] Using wildcards --------------- You can convert multiple files at one time by specifying a wildcard describing the files to be converted. The wildcard has to be meaningful to the operating system you are using, and will be expanded in alphabetical order. Under Windows this ordering may be case-sensitive. At present we recommend that wildcards are only used on the contents of a single directory. Indeed wildcards spanning directories are probably not supported (let's just say it's untested :-) Note, the same policies will apply to all files being converted. If you wish different policies to apply, use a script (see 4.3.3.2) Note: In the shareware version, wildcard conversions are limited to only 5 files Using script files ------------------ From the command line you can convert several files at the same time in the order and manner of your choosing. To do this use the command c:> A2RCONS @List.file [rest of command line] Where the file "list.file" is a steering file which contains a list of AscToRTF command, and the "@" in front indicates it is a list file, rather than a file to be converted. An example list file might look like $_$_BEGIN_PRE ! this is the main document DOCO.TXT IN_DOCO.POL # # These are the other chapters CHAPTER2.TXT CHAPTER3.TXT /SIMPLE $_$_END_PRE Note the use of "!" or "#" at the start of a line signifies it's a comment line to be ignored. Any qualifiers used on the original A2RCONS line will be used as defaults for each conversion, but will be overridden by any listed in the list file. In this way it would be possible to specify a default policy file for a bunch of similar conversions. Note: In the shareware version, batch conversions are limited to only 5 files $_$_HELP_CHAPTER 2,"Generating a log file" $_$_HELP_SUBJECT "Creating a log file" Generating log files ==================== If you want a log of what has been done, you can create a log file. This can be done in a number of ways :- - *From the command line* On the command line you can use to launch the program, add the /LOG= qualifier (see [[goto command line qualifiers: /LOG]]). - *From the policy file* Use the [[goto Generate diagnostics files]] policy. You will need to manually edit this into your .pol file, as it can't be set via the user interface. - *From the Status Dialog* In the Windows version, the Status Dialog now contains a "Save to file" option to save the displayed messages. $_$_HELP_CHAPTER 1,"Understanding the RTF generated" Understanding the RTF generated ******************************* Before converting files to RTF, AscToRTF first attempts to analyse your document looking for the following components. - [[goto Text layout]] - [[goto Paragraph detection]] - [[goto Indentation detection]] - [[goto Bullets and list detection]] - [[goto Definition detection]] - [[goto Text formatting]] - [[goto Centred text detection]] - [[goto Quoted line detection]] - [[goto Emphasis detection]] - [[goto Unix Emphasis character detection]] - [[goto Adding hyperlinks]] - [[goto Contents List detection]] - [[goto Cross-reference detection]] - [[goto URL detection]] - [[goto Usenet Newsgroup detection]] - [[goto E-mail address detection]] - [[goto User-specified keywords]] - [[goto Headings and section titles]] - [[goto Numbered heading detection]] - [[goto Capitalised heading detection]] - [[goto Underlined heading detection]] - [[goto Embedded heading detection]] - [[goto Key phrase headings]] - [[goto Numbered paragraph detection]] - [[goto Pre-formatted text, diagrams and tables]] - [[goto Line detection]] - [[goto Form feed page markers]] - [[goto User defined pre-formatted text]] - [[goto Automatically detected pre-formatted text]] - [[goto Table detection]] - [[goto Code sample detection]] - [[goto ASCII art and diagram detection]] - [[goto Text block detection]] - [[goto Other formatted text]] - [[goto Adding features to the document]] - [[goto Adding a Document Title]] - [[goto Adding a Contents list]] - [[goto The use of RTF stylesheets]] $_$_HELP_CHAPTER 2,"Text layout" Text layout =========== The software can detect several types of text layout. For more details see the following topics. - [[goto Paragraph detection]] - [[goto Indentation detection]] - [[goto Hanging paragraph indent detection]] - [[goto Bullets and list detection]] - [[goto Definition detection]] Paragraph detection ------------------- $_$_HELP_TOPIC_ID ID_PARAGRAPHS AscToRTF can automatically detect paragraphs in your document. Normally this is done by detecting blank lines between paragraphs, but when there are no blank lines other features such as short lines at the end of a paragraph and an offset at the start of each new paragraph may also be taken into account. Indentation detection --------------------- AscToRTF performs statistical analysis on the document to determine at what character positions indentations occur. This information is used on the output pass to determine the indentation level for each source line. In calculating the indent positions AscToRTF first converts all tabs to spaces. This may result in unexpected indent positions, but shouldn't normally be a problem. If it is, adjust the [[goto Tab size]] policy. AscToRTF may reject indentations that appear too close together, so as to keep the number of indent levels manageable. You can override the analysis by specifying your own indentation policy. This can sometimes be useful to add an extra indentation level, or to better match up bullet paragraphs with non-bullet paragraphs. See also [[goto indent position(s),"Indentation policy"]] and [[goto Bullet policies]] Hanging paragraph indent detection ---------------------------------- Some documents have hanging paragraph indents. That is, the first line of each paragraph starts at an offset to the rest of the paragraph. AscToRTF struggles heroically with this, and tries not to treat this as text at two indent levels, but it does occasionally get confused. If writing a text file from scratch with AscToRTF in mind, then it is best to avoid this practice. $_$_HELP_CHAPTER 3,"Bullets and lists" $_$_HELP_SUBJECT "Detecting bullets and lists" Bullets and list detection -------------------------- AscToRTF detects and supports several types of bullets and lists. However it doesn't attempt to convert these into auto-numbered lists (introduced in a later version of RTF). This has the effect of putting the bulleted text one level of indentation to the right of the current text. Should the analysis fail, you can override any and all of these via the analysis [[goto bullet policies]] Such text is marked up using the "Bullet" Style. See "[[GOTO the use of RTF stylesheets]]". *Bullet paragraphs* AscToRTF will attempt to detect bullet paragraphs, that is, paragraphs that belong to the bullet point. To do this it attempts to match the indentation of follow-on lines with that past the bullet character(s) on the bullet line itself. Currently this detection only stretches to the paragraph containing the bullet. *Possible problems* 1) Numbered bullets may sometimes get confused with numbered sections. This can be corrected by switching off numbered sections (if there aren't any), replacing the numbered bullets by letters or roman numerals, or by moving the numbered bullets to a different indentation level from the section numbers. 2) AscToRTF currently only detects the first paragraph belonging to a bullet. If the bullet has several paragraphs there may be alignment problems, as the positioning of the second and subsequent paragraphs will depend on the indentation policy. Sometimes careful balancing of the indentations and the indentation policies can sort the problem. Bullet chars ............ Bullet chars are lines of the type $_$_BEGIN_PRE - this is a bullet line - this is a bullet paragraph because it carries over onto more lines $_$_END_PRE That is, a single character followed by the bullet line. AscToRTF can determine via statistical analysis which character, if any, is being used in this way. Special attention is paid to the '-' and 'o' characters. Numbered bullet detection ......................... AscToRTF can spot numbered bullets. These can sometimes be confused with section headings in some documents. This is one area where the use of a document policy really pays dividends in sorting the sheep from the goats. Alphabetic bullet detection ........................... AscToRTF detects upper and lower case alphabetic bullets. Roman Numeral bullet detection .............................. AscToRTF detects upper and lower case roman numeral bullets. [[LINKPOINT "Definitions"]] $_$_HELP_CHAPTER 3,"Definitions" $_$_HELP_SUBJECT "Definition detection" Definition detection -------------------- AscToRTF will search for definitions. Definitions consist of a definition term and then the definition description. - [[popup One-line definitions]] - [[popup Definition paragraphs]] One-line definitions .................... A definition line is a single line that appears to be defining something. Usually this is a line with either a colon (:) or an equals sign (=) in it. For example $_$_BEGIN_PRE IMHO = In my humble opinion Address : Somewhere over the rainbow. $_$_END_PRE AscToRTF attempts to determine what definition characters are used and whether they are *"strong"* (only ever used in a definition) or *"weak"* (only sometimes used in a definition). AscToRTF marks up definition lines by placing a line break on the end of the line to preserve the original line structure. Where this decision is made incorrectly unexpected breaks can appear in text. AscToRTF offers the option of marking up the definition term in bold. This is not the default behaviour however. Definition paragraphs ..................... AscToRTF also recognises the use of definition paragraphs such as :- $_$_BEGIN_PRE Note: This is a definition paragraph whereby the whole paragraph is defining the term shown on the first line. Unfortunately AscToRTF currently only copes with single paragraphs (i.e. not with continuation paragraphs), and only with single word definitions. $_$_END_PRE AscToRTF can detect such definitions, subject to the current limitations - Only one word definition terms are detected - Only the first definition paragraph is detected. Whether or not subsequent paragraphs are aligned correctly will depend on the indentation policy applied to it. These limitations will hopefully be removed in later versions. Where definition paragraphs are detected the definition will be marked up as hanging paragraphs and (optionally) can have the definition term highlighted in bold. $_$_HELP_CHAPTER 2,"Text formatting" Text formatting =============== In addition to various types of formatted [[goto Automatically detected pre-formatted text,text layouts]], the software can detect a number of special types of text formatting, including the following. - [[goto Centred text detection,Centred text]] - [[goto Quoted line detection,Quoted lines (such as in emails)]] - [[goto Emphasis detection,Emphasised text]] - [[goto Unix emphasis character detection,Unix emphasis characters]] Centred text detection ---------------------- *New in version 2.0* AscToRTF can be made to attempt automatic detection of centred text. When enabled the indentation and length of each line is compared to the nominal page width within a specified tolerance (see [[GOTO "page width"]] and [[GOTO "Automatic centring tolerance"]]) If the line appears centred (and meets a few other conditions) then it will be rendered centred in the output. This option is normally left switched off, as it is fairly prone to errors, not least because the calculation is sensitive to getting the page width calculation correct. When it goes wrong you are liable to find the document centres lines that shouldn't be. Quoted line detection --------------------- AscToRTF recognises that, especially in Internet files, it is increasingly common to quote from other text sources such as e-mail. The convention used in such cases is to insert a quote character such as ">" at the start of each line. Consequently, AscToRTF adds a line break at the end of such lines to preserve the line structure of the original, and marks it up in italics to differentiate the quoted text Such text is marked up using the "Quotes" Style. See "[[GOTO the use of RTF stylesheets]]" Emphasis detection ------------------ AscToRTF can look for text emphasised by placing asterisks (*) either side of it, or underscores (_). AscToRTF will convert the enclosed text to *bold* and _italic_ respectively using *Bold* and *italic* tags respectively. AscToRTF will also look for combinations of asterisks and underscores which will be placed in _*bold italic*_. The asterisks and underscores should be properly nested. The emphasised word or phrase should span no more than a few lines, and in particular should *not* span a blank line. If the phrase is longer, or if AscToRTF fails to match opening and closing emphasis marks, the characters are left unconverted. Tests are made to ignore double asterisks and underscores, and sometimes adjacent punctuation will prevent the text being marked up. Only markup that occurs in matched pairs over 2-3 lines will be converted, so _this and that* won't be converted. Unix emphasis character detection --------------------------------- AscToRTF also tries to handle use of Ctrl-H in Unix documents. In such documents Ctrl-H can be used to overstrike characters. Common effects are double printing and underlining. Where detected AscToRTF will use bold and underlining markup. Examples could include:- The word this^H^H^H^H____ is underlined. The word that^H^H^H^Hthat is bold (overwritten twice). $_$_HELP_CHAPTER 2,"Hyperlinks and section references" Adding hyperlinks ================ The software can add active hyperlinks to the following :- - [[goto Cross-reference detection,Cross-references to numbered sections]] - [[goto URL detection,URLs of various types]] - [[goto Usenet Newsgroup detection,Usenet newsgroups]] - [[goto E-mail address detection,email addresses]] - [[goto User-specified keywords]] Contents List detection ----------------------- Unlike [AscToHTM], AscToRTF leaves any detected contents list intact and unchanged. However, since headings are marked up in a Heading style, it should be possible to create a TOC in Word from the marked up headings. This being the case, the original text TOC is redundant and best deleted. See [[goto adding a contents list]] Cross-reference detection ------------------------- AscToRTF can convert cross-references to other sections into hyperlinks to those sections. Unfortunately this is currently only possible for second, third, fourth... level numeric headings (n.n, n.n.n, n.n.n.n etc) This is because the error rate becomes too high on single numbers/letters or roman numerals. This _may_ be refined in future releases, although it's hard to see how that would work. It is possible to use AscToRTF tags though, for example the [[goto Pre-processor command: GOTO,GOTO command]] and [[goto Pre-processor command: POPUP,POPUP command]] can create links to named sections. For example $_$_BEGIN_PRE See [[OT]]goto cross-reference detection[[CT]] $_$_END_PRE becomes See [[goto cross-reference detection]] URL detection ------------- AscToRTF can convert any URLs in the document to hyperlinks. This includes http and FTP URLs and any web addresses beginning with www. The domain name part of the URL will be checked against the known domain name structures and country codes to check it falls within an allowed group. So www.somewhere.thing won't be allowed as ".thing" isn't a proper top level domain. URLs that use IP addresses or some more obscure methods of specifying domain names will also be recognised, but the link will be changed wherever to either a domain name or an IP address. This will de-obfuscate any obscure references so beloved by spammers. Unlike [AscToHtm], AscToRTF will only convert hyperlinks to a full URLs (i.e. those where a site name is supplied). If a URL like "\home\index.html" is detected it is left unconverted. This is because it is less likely that the relationship between source and target can be relied on. Usenet Newsgroup detection -------------------------- AscToRTF can convert any newsgroup names it spots into hyperlinks to those newsgroups. Because this is prone to error, AscToRTF currently only converts newsgroups in known USENET hierarchies such as rec.gardens by default. This can be overcome either by a) placing "news:" in front of the newsgroup name (e.g. news:this.is.a.newsgroup.honest) b) relaxing this condition via a document policy (see [[goto Only use known groups]]). c) specifying the newsgroup hierarchy as recognised via a policy (see [[goto Recognised USENET groups]]). E-mail address detection ------------------------ AscToRTF can convert any email addresses into hypertext mailto: links. As with [[goto URL detection]], the domain name is checked to see it falls into a recognised group. User-specified keywords ----------------------- AscToRTF can convert use-specified keywords into hyperlinks. The words or phrase to be converted must lie on a single line in the source document. Care should be taken to ensure keywords are unambiguous. Normally I mark my keywords in [] brackets if authoring for conversion by AscToRTF See the discussion in [[goto Using link dictionary files]]. $_$_HELP_CHAPTER 2,"Headings and section titles" $_$_HELP_SUBJECT "Introduction to detecting headings" Headings and section titles =========================== AscToRTF recognises various types of headings. Where headings are found, and deemed to be consistent with the prevailing document policy (correct indentation, right type, in numerical sequence etc), AscToRTF will use the standard "Heading n" styles. In addition to this, AscToRTF will insert a named bookmark to allow hyperlink jumps to this point. These bookmarks are used for example in any cross-reference hyperlinks that AscToRTF generates, and also by any [[goto Pre-processor command: GOTO,GOTO]] tags. Numbered heading detection -------------------------- Sections of type N.N.N can be checked for consistency, and references to them can be spotted and converted into hyperlinks. At present more exotic numbering schemes using roman numerals and letters of the alphabet are not fully supported. Capitalised heading detection ----------------------------- AscToRTF can treat wholly capitalised lines as headings. It also allows for such headings to be spread over more than one line. Underlined heading detection ---------------------------- AscToRTF can recognize underlined text (e.g. a row of minus signs), and optionally promote the preceding line to be a section header. The "underlining" line should have no gaps in it, and should be a similar length to the preceding heading. If these conditions aren't met you'll probably get a horizontal rule instead. If you're authoring a file from scratch, it is probably best to use underlined headings for ease of use. Embedded heading detection -------------------------- _New in version 2.0_ The program can look for headings "embedded" in the first paragraph. Such headings are expected to be a complete sentence or phrase in UPPER CASE at the start of a paragraph. Where detected the heading will be marked up in bold, rather than markup, although it will still be added to, and accessible from any hyperlinked contents list you generate for the document. At present such headings are not auto-detected... you need to switch on the [[goto Expect Embedded headings]] policy. Key phrase headings ------------------- _New in version 2.0_ The program can now look for lines that start with particular words or phrases (such as "Chapter", "Part", Title") of your choice and treat these lines as headings. Previously this only worked in a limited way if the heading line was also *numbered* ("Chapter 1") etc. To use this feature, set the policy [[goto Heading Key phrases]] Numbered paragraph detection ---------------------------- Some types of documents use what look like section numbers to number paragraphs (e.g. legal documents, or sets of rules). AscToRTF can recognize this, and mark up such lines by placing the number in bold, and not using the "Heading n" style on the whole line. Mail and USENET headers ----------------------- Some documents, especially those that were originally email or USENET posts, come with header lines, usually in the form of a number of lines with a keyword followed by a colon and then some value. AscToRTF can recognize these (to a limited extent). Where these are detected the program will parse the header lines to extract the Subject, Author and Date of the article concerned. A heading containing this information will then be generated to replace all the unsightly header lines. $_$_HELP_CHAPTER 2,"Pre-formatted text, diagrams and tables" Pre-formatted text ================== The software can detect various forms of pre-formatted text. This is text laid out in such a way that the spacing used is critical. Spacing is not normally preserved in conversion to RTF, so the correct detection and handling of these special types of text is quite important. Types of text recognised include the following - [[goto Line detection,Lines]] - [[goto Form feed page markers]] - [[goto User defined pre-formatted text]] - [[goto Automatically detected pre-formatted text]] - [[goto Table detection,Tables]] - [[goto Code sample detection,Code samples]] - [[goto ASCII art and diagram detection,Diagrams and ASCII art]] - [[goto Text block detection,Text blocks]] - [[goto Other formatted text]] Line detection -------------- Lines are interpreted in context. If they appear to be underlining text, or part of some pre-formatted structure such as a table, then they are treated as such. Otherwise they become horizontal rules. An attempt is made to interpret half-lines etc as such, although the effect is only approximate. Form feed page markers ---------------------- Form feeds or page breaks become page breaks in the RTF User defined pre-formatted text ------------------------------- AscToRTF allows users to define their own regions of pre-formatted text, using the BEGIN_PRE and END_PRE pre-processor tags (see [[GOTO Using the pre-processor]]). Such areas are marked up in the "Preformatted" style (see "[[GOTO the use of RTF stylesheets]]"), which uses a non-proportional font to preserve the relative spacing. For example :- $_$_BEGIN_PRE The use of BEGIN_PRE and END_PRE preprocessor commands (see 7.1) in the text documents tells AscToHTM that this portion of the document has been formatted by the user and should be left unchanged. $_$_END_PRE $_$_HELP_CHAPTER 3,"Automatically detected pre-formatted text" $_$_HELP_SUBJECT "Introduction to detecting pre-formatted text" Automatically detected pre-formatted text ----------------------------------------- AscToRTF attempts to spot sections of preformatted text. This can vary from a single line (e.g. a line with a page number on the right-hand margin) to a complete table of data. Where such text is detected AscToRTF analyses the section to determine what type of pre-formatted text it is. Options include - Tables - Code samples - ASCII Art and diagrams - some other formatted text A number of policies allow you to control - whether or not the program looks for such text - how sensitivity it is to "pre-formatted" text - how inclined the program is to "extend" the region to adjacent lines - whether or not table generation should be attempted - various aspects of any table analysis that is carried out. See [[GOTO "Pre-formatted text"]] policies for full details. You can adjust the sensitivity of AscToRTF to pre-formatted text by setting the minimum number of lines required for a pre-formatted region using the [[goto Minimum size of automatic
 section]] policy.

RTF ignores all white space in the source document, thus any hand-crafted 
layout information would normally get lost.  When AscToRTF detects 
such regions it marks them up in fixed width font which tells RTF 
this region is pre-formatted.

When tables are detected, AscToRTF will attempt to generate the correct 
RTF table.

When AscToRTF gets the detection wrong you can use the AscToRTF 
[[goto Using the pre-processor,pre-processor]] to mark up regions of your document 
you wish preserved.


Table detection
...............
Tables are marked out by their use of white space, and a regular pattern
of gaps or vertical bars being spotted on each lines.  AscToRTF will
attempt to spot the table, its columns, its headings, its cell alignment
and entries that span multiple columns or rows.

Should AscToRTF wrongly detect the extent of a table, you can mark up
a section of text by using the [[goto Pre-processor command: TABLE,TABLE]] pre-processor 
markup (see the [Tag Manual]).  Alternatively you can try adding
blank lines before and after, as the analysis uses white space to
delimit tables.

You can alter the characteristics of all tables via the table policies
(see [[GOTO Formatting policies]]).

You can alter the characteristics of all or individual tables via the
table pre-processor commands (see [[goto Pre-processor command: TABLE,TABLE]]).

Or you can suppress the whole thing altogether via the 
[[goto Attempt TABLE generation]] policy

Tables will be marked up using the "Table" style.  See "[[GOTO the use of RTF stylesheets]]".

Code sample detection
.....................
AscToRTF attempts to recognize code fragments in technical documents.
The code is assumed to be "C++" or "Java"-like, and key indicators
are, for example, the presence of ";" characters on the end of lines.

Should AscToRTF wrongly detect the extent of a code fragment, you can
mark up a section of text by using the [[goto Pre-processor command: CODE,CODE]] pre-processor 
markup.

Or you can suppress the whole thing altogether via the policy
[[goto Expect code samples]].

Code samples will be marked up using the "Code" style. 
See "[[GOTO the use of RTF stylesheets]]".

ASCII art and diagram detection
...............................
AscToRTF attempts to recognize ASCII art and diagrams in documents.
Key indicators include large numbers of non-alphanumeric characters
and the use of white space.

However, some diagrams use the same mix of line and alphabetic
characters as tables, so the two sometimes get confused.

Should AscToRTF wrongly detect the extent or type of a diagram,
you can mark up a section of text by using the [[goto Pre-processor command: DIAGRAM,DIAGRAM]] 
pre-processor markup.

Diagrams are marked up using the "Diagram" style. 
See "[[GOTO the use of RTF stylesheets]]".

Text block detection
....................
_New in version 2.0_

If AscToRTF detects a block of text at a large indent, it will now
place that text in such a way as to preserve as faithfully as 
possible the original indent.


Other formatted text
....................
If AscToRTF detects formatted text, but decides that it is neither
table, code or art (and it knows what it likes), then the text may be
put out "as normal", but with the original line structure preserved.

In such regions other markup (such as bullets) may not be processed 
such as it would be elsewhere.


$_$_HELP_CHAPTER 2,"Adding features to the document"
Adding features to the document
===============================
As well as detection features present in the source text, the 
software allows you to add in features that you would expect 
in the output file that can't be inferred from the input

These include the following.

	- [[goto Adding a Document Title,Document title]]
	- [[goto Adding a contents list,A working contents list]]


Adding a Document Title
-----------------------
AscToRTF can calculate - or be told - the title of a document.  This
will be placed in document properties section in the header of 
each RTF file produced.

The Title is calculated as in the order shown below.  If the first	
algorithm returns a value, the subsequent ones are ignored.

1) If a [[goto Pre-processor command: TITLE,TITLE command]] is placed in the
   source text, that value is used

2) If the [[goto Document Details,Document title]] policy is set then this value
   is used.

3) Finally, if none of the above result in a title the text
   "Converted from " is used.


Adding a Contents list
----------------------
AscToRTF can detect the presence of a contents list in the original
document, or it can insert a field code that will generate a contents
list from the headings that it observes.  This is possible because
AscToRTF marks headings up in the Headings style.  
See [[goto The use of RTF stylesheets]]

This contents field added can be recalculated in Word by pressing F9.

There are a number of policies that give you control over how and 
where a contents list is generated (see [[goto contents policies]]).

_Contents lists placement_

By default the contents list will be placed at the top of the output
file.  You can cause contents lists to be placed wherever you want 
by using the CONTENTS_LIST preprocessor command (see [[goto pre-processor directives]]).  

_Contents list detection_
AscToRTF can detect contents lists in a number of ways

- By detecting "table of contents" "end contents" or something similar 
  in the text.

- By spotting the numbering sequence has been repeated twice.  AscToRTF 
  will assume the first set is the contents list.

- By spotting [[goto Using the pre-processor,pre-processor]] markup.

This is often a hit-and-miss procedure, and is liable to error.

Should the analysis fail, you can attempt to correct it via the 

[[goto contents policies,Contents lists]] policies.


$_$_HELP_CHAPTER 2,"AscToRTF's use of stylesheets"
$_$_HELP_SUBJECT "Stylesheets used by AscToRTF"
The use of RTF stylesheets
==========================
AscToRTF supports the use of stylesheets.  That is the marking up
of text in particular styles.  AscToRTF uses this to identify how
the text was analysed, thus headings acquire a "Headings" style, and
bulleted lists are marked up in the Bullet Style.

Initially most of these styles are the same, but if you use a word
processor that supports RTF stylesheets (such as Word), you'll be
able to globally change attributes line font face and colour.  For
example you could turn all code samples green by changing the attributes
of the code style.

Styles are implemented in a hierarchy, with style attributes being
inherited from their parents.  Later versions of AscToRTF may allow
style attributes to be selected before conversion.

The style hierarchy is as follows

$_$_BEGIN_DIAGRAM
      Normal 				(generic normal text style)
	|
    	+-- 1 Body 			(main body text)
    	|       |
    	|       +--- 11 ShortLine 	(short lines)
    	|       +--- 12 Bullet 		(bullets and numbered lists)
    	|       +--- 13 Quoted 		("quoted" text as found in emails)
    	|       +--- 14 Hanging 	(hanging paragraphs)
    	|       +--- 15 Definition 	(definitions)
    	|
    	+-- 2 Table			(Table text)
    	+-- 3 Preform			(preformatted text)
    	+-- 4 Diagram			(diagrams)
    	+-- 5 Code			(code samples)
    	|
	+-- 6 Heading			(generic heading style)
	|	|
	|	+--- 61 Heading1	(level 1 headings)
	|	+--- 62 Heading2	(level 2 headings)
	|	+--- 63 Heading3	(level 3 headings)
	|	+--- 64 Heading4	(level 4 headings)
	|	+--- 65 Heading5	(level 5 headings)
	|
	+-- 7 TOC  			(generic TOC style)
	|	|
	|       +--- 71 TOC1		(level 1 TOC entry)
	|       +--- 72 TOC2		(level 2 TOC entry)
	|       +--- 73 TOC3		(level 3 TOC entry)
	|       +--- 74 TOC4		(level 4 TOC entry)
	|       +--- 75 TOC5		(level 5 TOC entry)
	o
$_$_END_DIAGRAM

      The default implementations of these styles are as follows:-

      _Body_			Uses the user-supplied font.  Created 
      				justified text by default.

      _ShortLine_		Same as _Body_, but with a \par at the end 
            			of each line to preserve the original line structure.  
      				These paragraphs have zero spacing before
      				and after, to closely mimic the original text 
      				file structure.

      _Bullet_			Styling is the same as _Body_, but the bullet 
            			itself is output using a hanging indent with a 
      				tab after the bullet.

      _Quoted_			Text is placed in italics, and left justified.  
      				Each line is given a \par to preserve the original 
      				line structure.

      _Hanging_			The text is divided into two parts.  The first 
      				is placed on the left, and the "hanging" part is 
      				placed on the right, after a tab.  The position
       	     			of the tab stop is calculated according to 
      				the size of the text to be placed on the left.
      				Often text that AscToHTM would put in a table comes
      				out as a hanging list.

      _Definition_		Much like _Hanging_.  The definition term is on left, 
            			the rest is hung on the right after a tab.  Options 
      				exist to allow the definition term to be made bold.

      _Table_			The text is styled as in _Body_, but is placed into 
      				cells in a table.  Table analysis is complex, and 
            			deserves a document in its own right, but
      				in essence the text is placed in cells and 
      				aligned according to original placement and data 
      				type.  The whole process can sometimes go wrong.

      _Preformatted_		Preformatted text is output in a non-proportional font 
            			(usually Courier) with no spacing between lines and 
      				a \par on each line to preserve the line structure.  
      				A font size of 8pt is used as this best represents
      				80 characters across a page without wrapping.

      _Diagram_			Same as _Preformatted_.

      _Code_			Same as _Preformatted_.

      _Heading_			Heading itself is unused, but acts as a common parent 
      				for the actual styles "Heading 1", "Heading 2" etc.  
            			These are set to be the same as the Microsoft Word 
      				equivalents.

      _TOC_			The table of contents style TOC itself is unused, 
      				but acts as a common parent for the actual styles 
      				"TOC 1", "TOC 2" etc.  These are set to be the same 
            			as the Microsoft Word equivalents.



$_$_HELP_CHAPTER 1,"Using policy files"
Using policy files
******************
$_$_HELP_TOPIC_ID ID_POLICY_FILES
Document policies have two main uses; to correct any failure of 
analysis that AscToRTF makes, and to tell the program how to 
produce better RTF in ways that couldn't possibly be inferred 
from the original text.

Examples of the former may include specifying a nominal page 
width, and stating whether or not underlined section headings 
are expected etc.

Examples of the latter include adding colour and titles to 
the page, as well as requesting that a large document is split 
into several pages. 

$_$_SECTION MAKINGHTML
*Contents of this section*
$_$_CONTENTS_LIST 2,,2
$_$_SECTION MAKINGRTF
	[[goto analysis policies]]

	- [[goto General analysis policies,General Analysis]]
	- [[goto Headings Policies]]
	- [[goto bullet policies,Bullets]]
	- [[goto Pre-formatted text policies,Pre-formatted text]]
	- [[goto Table analysis policies,Table analysis]]

	[[goto output policies]]

	- [[goto File Structure policies,File generation]]

	- [[goto Document details]]
	- [[goto Formatting Policies,Formatting]]
	- [[goto RTF settings]]
	- [[goto Make Windows Help File policies,Make Windows Help File]]
	
	- [[goto Hyperlinks policies,Hyperlinks]]
	- [[goto Preprocessor policies,Preprocessor]]
	
	- [[goto Font policies,Fonts]]
	
	- [[goto Link Dictionary Edit Dialog,Link Dictionary]]
$_$_SECTION ALL

What are Policy files?
======================
$_$_HELP_TOPIC_ID ID_DEFINEPOLICYFILES
AscToRTF has a large number of options available to influence the 
analysis of your text files, and the output to RTF.  These options 
are called "policies" as they govern how the source file should 
be interpreted and converted.

Policies may be saved in text files, known as policy files.  These 
files have a ".pol" extension by default.  The policy files are 
usually updated by changing the policies and saving the changes 
in a new file.  Because they are text files you can also edit them 
directly, in a text editor.  The files have the format of one 
policy per line of

Text in the form

	PolicyText : 

The use of policy files allow a given set of options to be saved 
and reused for other conversions, or later conversions of the same file.
See [[goto Using policy files]] for more information.


$_$_HELP_CHAPTER 2,"Analysis policies"
$_$_HELP_SUBJECT "Introduction"
Analysis policies
=================
$_$_HELP_TOPIC_ID ID_CONV_POLICIES
Analysis policies are usually calculated by AscToRTF by making a 
first pass through your document.   The resulting policies are then 
used during the second, conversion pass to categorise all input 
lines so that they may be correctly converted to HTML.

You should only need to change these policies should the analysis fail.

	- [[goto 'What to look for' policies]]
	- [[goto General analysis policies,General Analysis]]
	- [[goto bullet policies,Bullets]]
	- [[goto File Structure policies,File generation]]
	- [[goto Headings Policies]]
	- [[goto Pre-formatted text policies,Pre-formatted text]]
	- [[goto Table analysis policies,Table analysis]]


$_$_HELP_CHAPTER 3,"What to look for" policies
$_$_HELP_SUBJECT "List of 'look for' policies"
'What to look for' policies
---------------------------
$_$_HELP_TOPIC_ID HIDD_LOOKFOR
These policies act as "broad stroke" policies enabling or disabling 
areas of functionality within the software by telling it what to look 
for and to try to detect.  

For example you can tell the program whether or not to bother looking 
for patterns of indentation, bullets, or numbered lists.  In many 
cases if you enable a policy you can further fine tune the conversion 
details on other policy sheets.

	- [[popup Look for indentation]]
	- [[popup Look for white space,Look for paragraphs]]
	- [[popup Look for short lines]]
	- [[popup Look for horizontal rules]]
	- [[popup Look for bullets and numbered lists]]
	- [[popup Look for definitions]]
	- [[popup Look for quoted lines]]
	- [[popup Look for emphasis]]
	- [[popup Look for underlined text]]
	- [[popup Look for mail and USENET headers]]
	- [[popup Look for character encoding]]
	- [[popup Look for preformatted text,Look for regions of preformatted text]]
	- [[popup Look for diagrams]]


Look for indentation
....................
$_$_HELP_TOPIC_ID ID_LOOKFOR_INDENTS
AscToRTF can attempt to detect the indentation pattern of your 
document and replicate it in the output file.  If you chose to 
disable this policy, all your text will be output with no 
indentations at all.

If the program is wrongly indenting your files, you can try 
adjusting the pattern of indentation on the 
[[goto General analysis policies,General Analysis]] tabbed policy sheet.

Look for white space
....................
$_$_HELP_TOPIC_ID ID_LOOKFOR_PARAS
By default AscToRTF will attempt to look for paragraphs in your 
source.  Usually this is signaled by a blank line between paragraphs, 
a leading indent on the first line of each paragraph, or (in 
extreme cases) a short line at the end of a paragraph.

If you don't want AscToRTF to detect paragraphs, disable this policy.

If AscToRTF is wrongly detecting paragraphs, try adjusting the 
paragraph analysis policies on the [[goto General analysis policies,General Analysis]]
tabbed policy sheet.

Look for short lines
....................
$_$_HELP_TOPIC_ID ID_LOOKFOR_SHORTLINES
By default AscToRTF will attempt to detect short lines and preserve 
their structure by adding a line break.  Disabling this will cause 
short lines to be merged into the surrounding paragraph's text.

If AscToRTF is wrongly handling your short lines, you can adjust 
the short line cutoff point or the page width (which is used in 
short line detection) in the Sizes section of the 
[[goto General analysis policies,General Analysis]] tabbed policy sheet.

Look for horizontal rules
.........................
$_$_HELP_TOPIC_ID ID_LOOKFOR_RULES
By default AscToRTF will treat a series of hyphens, minus signs, 
equal signs on the same line as a horizontal rule.  (On occasion it 
might be regarded as underlining a heading on the previous line).

You can disable this is you wish, or you can specify how many 
"line" characters it takes to make a horizontal rule.

Look for bullets and numbered lists
...................................
$_$_HELP_TOPIC_ID ID_LOOKFOR_BULLETS
By default AscToRTF will try to detect bullet points and numbered 
lists.  This can sometimes go wrong if you have lines that look to 
the program like bullet points.

You can disable this behaviour should you wish.  Alternatively you 
can fine tune the detection of bullets on the [[goto bullet policies,"bullet analysis"]] 
tabbed policy sheet.

Look for definitions
....................
$_$_HELP_TOPIC_ID ID_LOOKFOR_DEFINITIONS
By default AscToRTF will try to detect definitions and notes, 
usually in the form of a single word and a hanging paragraph. 

This can often go wrong, so you can use this policy to disable 
this feature.

Look for quoted lines
.....................
$_$_HELP_TOPIC_ID ID_LOOKFOR_QUOTES
By default AscToRTF will try to identify "quoted" lines.  
Quoted lines are lines that have had a single character 
(often ">" or "!") inserted at the start.  This is common 
practice when quoting email in a reply.  AscToRTF places 
such text in italics.

You can disable this behaviour should you wish.

Look for emphasis
.................
*New in version 2.0*

AscToRTF will try to look for text that has been marked up
with underscores and asterisks to signify bold an italic text.
For example
$_$_CHANGE_POLICY look for emphasis : no
	*This is bold* and _this is italic_
$_$_CHANGE_POLICY look for emphasis : no
becomes
	*This is bold* and _this is italic_


Look for underlined text
........................
*New in version 2.0*

AscToRTF will try to detect where a line of text has been "underlined" 
by following it by a same length row of dashes, hyphens, equal signs
etc.  This text will then be regarded as a candidate for being an
underlined heading or - if those are not allowed - underlined text.

If you have tables and reports, you may want to switch this policy
off since the line at the end of a table may appear to under- or
over-line the last line of text in the table.

Look for mail and USENET headers
................................
$_$_HELP_TOPIC_ID ID_LOOKFOR_MAILHEAD

AscToRTF will try to look for email and USENET headers.  Where
these are recognised they can be simplified so that only
the To, Form and Subject lines are shown in the output.

You can disable this behaviour should you wish.

Look for character encoding
..............................
Specifies whether or not the software should attempt to detect alternative
character sets, such as those used for languages such as Greek, Turkish,
Chinese etc.

The software does this by doing a statistical analysis on the characters used
in the source file.  This process isn't perfect, and when it fails you will
need to manually set the correct character set using the [[GOTO Character encoding]]
policy.

If you find the program is wrongly detecting the character encoding, disable
this policy and/or manually set it using the [[GOTO Character encoding]] policy

Note: Not all character sets are supported by RTF.

Look for preformatted text
..........................
$_$_HELP_TOPIC_ID ID_LOOKFOR_PREFORM
By default AscToRTF will try to identify regions of preformatted 
text.  Once identified AscToRTF will try to decide if it's a 
diagram, table or some other form of preformatted text.  If it thinks 
it's a table it will attempt to place the text in an appropriate 
table structure.

You can disable the search for preformatted text, or if you allow 
preformatted text, disable table generation.  (This may be 
appropriate if you have a large number of ASCII diagrams in 
your text).

The search for preformatted text can be refined via the 
[[goto Pre-formatted text policies,Pre-formatted text]] and [[goto Table analysis policies,Table analysis]] 
tabbed policy sheets.

The output of tables can be fine-tuned via the 
output policy [[goto Formatting policies,Formatting]] tabbed policy sheet.

Look for diagrams
.................
Specifies whether or not regions of preformatted text that are detected
should be considered as candidate diagrams.  Text that contains numbers
of characters such as "|", "-", ">" and "<" may be considered to be
an ASCII diagram.

If you find the program is wrongly treating tables as diagrams
then disable this policy.


$_$_HELP_CHAPTER 3,"General analysis policies"
General analysis policies
-------------------------
$_$_HELP_TOPIC_ID HIDD_ANALYSIS
These policies aid AscToRTF's analysis by describing in detail what 
the contents of the document being converted are

*Sizes*

	- [[popup Page Width]]
	- [[popup TAB Size]]
	- [[popup Short line length]]
	- [[popup Min Chapter Size]]

*Paragraphs*

	- [[popup Blank lines between paragraphs]]
	- [[popup New paragraph offset]]

*Definitions*

	- [[popup Search for definitions,Search for definitions in source text]]
	- [[popup hanging indent position(s),Definition paragraph indent levels]]
	- [[popup recognize hyphen characters]]
	- [[popup recognize colon characters]]
	- [[popup Other definition characters]]

*Layout*

	- [[popup indent position(s), Indentation levels]]


Page Width
..........
$_$_HELP_TOPIC_ID ID_PAGEWIDTH
This indicates the width (in characters) of your nominal output 
page.  This width is calculated from the observed line lengths 
in the original document.

This width is used in short line calculation, and determining 
whether a given line contains a definition term or not 
(definition character near the start of the line).

In documents that contain line feeds this should be automatically 
detected.

In other documents you may need to set this manually.

TAB size
........
$_$_HELP_TOPIC_ID ID_TABSIZE
This indicates the size (in characters) of your tabs.  AscToRTF 
converts all tabs to spaces on conversion before analysis.  By 
default a tab size of 8 characters is assumed.

The tab size can influence the analysis of paragraph indentations 
and other layout.  Provided they are used consistently there 
shouldn't be a problem.  However where tabs and spaces are used 
in combination, mistakes can arise.  

This is particularly true in tables of data.  AscToRTF does not 
expect tab-separated table cells, instead converting the tabs 
to spaces and analysing the results.

If your source document has been created with an editor with a 
different tab size, you should change this value should you 
start to experience strange layout conversion problems.

Short Line Length
.................
$_$_HELP_TOPIC_ID ID_SHORTLINE
This policy is used to determine what is a "short line".  Short 
lines are treated specially by AscToRTF by adding a paragraph
marker on the end.  They can also be used to detect ends of 
paragraphs in those documents that don't have blank lines between 
paragraphs.

Normally AscToRTF will determine whether or not a line is short 
by comparing it to the page width, given the current context.

The default value is 0 characters (indicating a comparison to 
Page Width should be used).  Set this to any value you like.  
A value of 80 is likely to make every line in your original 
document have a paragraph marker on the end.

Min Chapter Size
................
$_$_HELP_TOPIC_ID ID_MINCHAPTER
This policy tells AscToRTF what the smallest chapter size may be.  
This is used when trying to determine if a numbered line is a 
chapter heading.  AscToRTF tries to avoid treating numbered lists 
as a series of small chapters using this policy.

The default value is 8 lines.  Change this only if you suspect 
small chapters are being ignored, or large list items are being 
treated as chapter headings.


Blank Lines between paragraphs
..............................
$_$_HELP_TOPIC_ID ID_BLANKLINES

AscToRTF can detect whether or not it should expect blank lines 
between paragraphs.  Documents without blank lines between 
paragraphs will be harder to convert, and errors are more likely.  
Unfortunately text documents exported from Word for Windows 
often have this property.

Where there are no blank lines, AscToRTF relies of spotting the 
last line of a paragraph (usually shorter), and (in some 
documents) the presence of a [[popup New paragraph offset,"hanging indent"]] at the 
start of each new paragraph. 

This should be automatically detected.

New Paragraph Offset
....................
$_$_HELP_TOPIC_ID ID_NEWPARA
Some documents start the first line of a new paragraph with an 
offset of a number of characters.  This is especially true in text 
files saved from Word for Windows documents.

AscToRTF can sometimes confuse such paragraphs as being two different 
levels of indentation.  Use this policy to eliminate such confusion.

This should be automatically detected


Search for definitions
......................
$_$_HELP_TOPIC_ID ID_ALLOWDEFINITIONS
This policy can be used to disable the search for definitions.  
Sometimes this leads to unexpected results with text that is 
not part of a definition being treated as such.  In such cases 
you can adjust the definition policies, but if this still 
fails, use this to disable the search completely.

See also [[popup one-line definitions]] and [[popup definition paragraphs]]

Hanging indent position(s)
..........................
$_$_HELP_TOPIC_ID ID_DEFNINDENTS

This policy identifies the indentations used for the follow-on 
text in [[popup definition paragraphs]].  These indentation 
levels need not be the same as the indentation levels used for 
normal text, though of course often they are.

This should be detected automatically, but if your document has 
only a few examples it's possible AscToRTF will ignore them.  
In such cases you may need to set this policy manually.

_Note, this policy appears on-screen as "Definition paragraph indent levels"_

Recognize hyphen characters
...........................
$_$_HELP_TOPIC_ID ID_HYPHENDEFNS
This policy specifies whether or not hyphen (-) characters are 
used in [[popup one-line definitions]].

If the hyphen character only occurs in definitions, then set the 
nearby always flag, otherwise AscToRTF will have to guess whether 
a particular character is part of a definition or not.  This is 
sometimes a source of conversion errors.

If this policy is selected, it will result in a suitable "Definition Char" 
line being added to the policy file.

This should be detected automatically.

Recognize colon characters
..........................
$_$_HELP_TOPIC_ID ID_COLONDEFNS
This policy specifies whether or not colon (:) characters are 
used in [[popup one-line definitions]].

If the colon character only occurs in definitions, then set the 
nearby always flag, otherwise AscToRTF will have to guess 
whether a particular character is part of a definition or not.  
This is sometimes a source of conversion errors.

If this policy is selected, it will result in a suitable "Definition Char" 
line being added to the policy file.

This should be detected automatically.

Other definition Characters
...........................
$_$_HELP_TOPIC_ID ID_DEFNCHARS
This policy specifies which other characters are used in 
[[popup one-line definitions]].

This may be detected automatically, but more likely you'll need 
to specify it yourself.

Each character selected as a potential delimiter will result in a
"Definition Char" line being added to the policy file.

Indent position(s)
..................
$_$_HELP_TOPIC_ID ID_INDENTS
AscToRTF recognises multiple levels of indentation.  This policy 
shows the character levels at which indentation has been detected.

AscToRTF converts all tab characters into multiple spaces in input.  
These indentation positions are the positions that result after 
that conversion.  Depending on your tab settings these might not 
be exactly the positions you would expect.

Normally these levels are correctly detected automatically, but 
should you wish to set them manually you may need to experiment 
slightly to see how AscToRTF has handled your tabs.



Bullet policies
---------------
$_$_HELP_TOPIC_ID HIDD_BULLETS
AscToRTF should be able to detect the use of bullets on a 
reasonably sized document.  These policies describe the type 
of bullets expected.

	- [[popup Look for bullets, Automatically detect bullets and numbered lists]]


*Expected Bullet types*

	- [[popup expect numbered bullets, numbered bullets]]
	- [[popup expect alphabetic bullets, alphabetic bullets]]
	- [[popup expect roman numeral bullets, roman numeral bullets]]


*Bullet characters*

	- [[popup "Recognise '-' as a bullet",recognize hyphen character as a bullet point]]
	- [[popup "Recognise 'o' as a bullet",'recognize an "o" character as a bullet point']]
	- [[popup Other bullet point characters]]


Look for bullets
................
$_$_HELP_TOPIC_ID ID_AUTODETECT_BULLETS
This policy states whether or not the program should attempt to 
automatically detect bullets and numbered lists.  This should 
normally be left on unless your document has no such features, 
but the program (wrongly) thinks it has.

This policy appears on the Bullets dialog as "Automatically detect 
bullets and numbered lists", but is identical to the "Look for bullets"
policy on the [[goto 'What to look for' policies]] tabbed property sheet.

Expect Numbered bullets
.......................
$_$_HELP_TOPIC_ID ID_NUMBERBULLETS
This policy states whether or not numbered bullet points are 
expected.  The numbered bullets can be followed by any 
punctuation, thus 1., 2) and (3) will all be recognised, but 
RTF will not necessarily support this in the markup produced.

This should be automatically detected.

Expect alphabetic bullets
.........................
$_$_HELP_TOPIC_ID ID_ALPHABULLETS
This policy states whether or not alphabetic bullet points are 
expected.  The numbered bullets can be followed by any punctuation, 
thus a., b) and (c) will all be recognised, but RTF will not 
necessarily support this in the markup produced.

Both upper and lower case bullets are recognised (and supported 
in the markup).

This should be automatically detected


Expect roman numeral bullets
............................
$_$_HELP_TOPIC_ID ID_ROMANBULLETS
This policy states whether or not roman numeral bullet points 
are expected.  The numbered bullets can be followed by any 
punctuation, thus i., ii) and (iii) will all be recognised, but 
RTF will not necessarily support this in the markup produced.

Both upper and lower case bullets are recognised (and supported 
in the markup), although the range of roman numeral values 
supported is limited.

This should be automatically detected.

Recognise 'o' as a bullet
.........................
$_$_HELP_TOPIC_ID ID_MINUSBULLETS
This policy states whether or not bullet points starting with 
the hyphen character '-' are expected.

This policy appear on-screen as "Recognize hyphen character as a bullet point"

This should be automatically detected.

Recognise '-' as a bullet
.........................
$_$_HELP_TOPIC_ID ID_OBULLETS
This policy states whether or not bullet points starting with 
the lower case 'o' are expected.

This policy appear on-screen as "Recognize 'o' character as a bullet point"

This should be automatically detected.

Other bullet point characters
.............................
$_$_HELP_TOPIC_ID ID_OTHERBULLETS
This policy lists any other characters that are to be recognised 
as bullet characters.

Each bullet character entered will appear in the policy file as
it's own "Bullet Char" line.

This should be automatically detected, but may sometimes need to 
be manually entered.


$_$_HELP_CHAPTER 3,"Contents policies"
Contents policies
-----------------
$_$_HELP_TOPIC_ID HIDD_CONTENTS

This dialog shows both analysis and output policies connected with contents list detection and generation.

	*Analysis*
		- [[popup Expect contents list]]
		
$_$_BEGIN_IGNORE
		
!	*Output*
!		- [[popup Generate a contents list]]
!	
!	See the discussion on contents list generation in the [[goto Documentation available]]
$_$_END_IGNORE

Expect contents list
....................
$_$_HELP_TOPIC_ID ID_EXPECTCONTENTS
This policy specifies whether or not the document already 
contains a contents list.  If it does, AscToRTF will attempt 
to convert the existing list into a series of hyperlinks.

This should be detected automatically, but occasionally you 
will need to set this policy manually.

See the discussion on contents list generation in the 
[[goto Documentation available]]

$_$_BEGIN_IGNORE	
!	Generate a contents list
!	........................
!	$_$_HELP_TOPIC_ID ID_MAKECONTENTS
!	This policy specifies whether or not AscToRTF should generate a 
!	contents list.  This lost will be generated from either an 
!	existing list in the source documents, or from the observed headings.
!	
!	A link to "contents list" will be added to the main RTF file.
!	
!	See the discussion on contents list generation in the 
!	[[goto Documentation available]]
!	
$_$_END_IGNORE

$_$_HELP_CHAPTER 3,"File Structure policies"
File Structure policies
-----------------------
$_$_HELP_TOPIC_ID HIDD_FILESTRUCT
These policies aid AscToRTF's analysis by describing some of the 
file structure that would affect the analysis.

	- [[popup Keep it simple, Expect only a simple layout]]


*Expected File contents*
	- [[popup Expect Code samples,'Expect "C"-code samples']]
	- [[popup Input file contains DOS characters, Contains DOS characters]]
	- [[popup Input file contains PCL codes, Contains PCL printer codes]]
	- [[popup Input file contains Japanese characters, Contains non-European (e.g. Japanese) characters]]
	- [[popup Input file contains MIME encoding, Contains mime-encoded quotable characters]]
	- [[popup Input file has change bars, File has change bars]]
	- [[popup Input file has page markers, File has Page markers]]
	- [[popup Page marker size (in lines)]]


*Text Attributes*
	- [[popup Text justification]]
	- [[popup Input file is double spaced, File is double spaced]]


*Text to ignore*
        - [[popup Lines to ignore at start of file, Number of lines to ignore at start of document]]
        - [[popup Lines to ignore at end of file, Number of lines to ignore at end of document]]

Keep it simple
..............
$_$_HELP_TOPIC_ID ID_SIMPLE
AscToRTF puts a lot of effort into detecting overall structure 
such as headings etc.

In documents that don't have any such structure, AscToRTF is 
liable to convert any line with a number at the start into a 
heading.

To prevent this, you can mark the document as simple, that is 
with no global structure.  In a simple document AscToRTF will 
attempt far less analysis.

This policy appears on-screen as "Expect only a simple layout".

AscToRTF attempts to automatically identify simple documents,
but you may still need to set this policy manually.

Expect Code samples
...................
$_$_HELP_TOPIC_ID ID_EXPECTCODE
AscToRTF can markup C-like code fragments in 
...
tags to preserve the layout and readability of the quoted code. This may be automatically detected, but occasionally needs to be manually corrected. Input file contains DOS characters .................................. $_$_HELP_TOPIC_ID ID_DOSCHARS AscToRTF can convert files that use the DOS (OEM) character set. By default the file is assumed to be in the ANSI character set, but some files may have originated under DOS. This may be automatically detected, but usually needs to be manually set. Input file contains PCL codes ............................. $_$_HELP_TOPIC_ID ID_PCL_CODES _New in version 2.0_ Indicates that the input file contains PCL printer codes. When set, the program will make whatever sensible use it can of these codes, otherwise they will be removed. Please note that the PCL printer codes offer a rich command language that may be used to drive graphical printers. As such the emulation possibilities in a *text* converter are limited, and it is quite likely that files that make heavy use of such codes will fail dramatically to convert. That said, those codes that are not recognised will be eliminated from the output. Input file contains Japanese characters ....................................... $_$_HELP_TOPIC_ID ID_JAPANCHARS *** not implemented yet *** Files using non-ASCII character sets (Japanese, Korean etc) will be incorrectly converted. This may be fixed (as far as possible) in later versions. Appears on-screen as "Contains non-European (e.g. Japanese) characters" Input file contains MIME encoding ................................. $_$_HELP_TOPIC_ID ID_MIMECHARS AscToRTF can convert mime-encoded quotable characters. These will usually appear in files that were originally part of an email message. Such files use the "=" character to escape special characters. So for example "=20" should be interpreted as a space. This appears on-screen as "Contains mime-encoded quotable characters" This may be automatically detected in files where the "=" is used to break up long lines, but more usually you will need to manually set this. Input file has change bars .......................... $_$_HELP_TOPIC_ID ID_CHANGEBARS AscToRTF can strip out change bars in documents that contain them. Change bars are usually a vertical bar '|' placed in the leftmost or rightmost column. Currently this is not automatically detected, and so will need to be manually switched on. Input file has page markers ........................... $_$_HELP_TOPIC_ID ID_PAGEMARKER AscToRTF has a limited ability to remove page markers. These are normally a few lines following a form feed (FF) character, containing page numbers etc. This will commonly occur with files generated from older software packages. Page marker size (in lines) ........................... $_$_HELP_TOPIC_ID ID_PAGE_MARKERSIZE The number of lines after each form feed (FF) that should be ignored. These lines will not be copied to the output. Text Justification .................. $_$_HELP_TOPIC_ID ID_TEXTJUSTIFICATION AscToRTF recognises documents that are left justified (default), right justified, centred or both left and right justified (confusingly known as "justified"). The program cannot currently mark up the text in a matching style, but this policy is important in the analysis. For example "justified" documents are padded with extra white space which could be interpreted as pre-formatted text where the document not recognised as being justified. Normally this policy is correctly detected automatically. Input file is double spaced ........................... $_$_HELP_TOPIC_ID ID_DOUBLESPACED AscToRTF will normally treat a blank line as a break between paragraphs. Some files have extra CR/LF characters (usually if they've come from a different computer, or from a printer package). In such cases AscToRTF will see every second line as blank, and this will affect the analysis, usually by turning each line of data into a separate paragraph. If you have such a file, use this policy to mark the file as double spaced to get better results. Lines to ignore at start of file ................................ $_$_HELP_TOPIC_ID ID_IGNORE_AT_START _New in version 2.0_ This specifies how many lines from the input files should be ignored at the start of the file. These lines will be discarded from the output. This can be useful when converting file copied from a news feed or whatever that adds a small data header to the file. Lines to ignore at end of file .............................. $_$_HELP_TOPIC_ID ID_IGNORE_AT_END _New in version 2.0_ This specifies how many lines from the input files should be ignored at the end of the file. Up to 40 lines may be ignored in this way. These lines will be discarded from the output. This can be useful when converting file copied from a news feed or whatever that adds a small data footer to the file. $_$_HELP_CHAPTER 3,"Headings policies" Headings policies ----------------- $_$_HELP_TOPIC_ID HIDD_HEADINGS These policies determine the headings structure that the document is expected to have. Normally these are calculated correctly by AscToRTF, but due to the complexity of heading detection, you may sometimes need to correct the analysis. At the top of the dialog you can specify what type of headings you expect to see. Any combination is allowed, although usually documents use just one type of heading. - [[popup Expect Numbered headings]] - [[popup Expect Underlined headings]] - [[popup Expect Capitalised headings]] - [[popup Expect Embedded headings]] - [[popup Heading Key phrases]] - [[popup Use first line as heading]] - [[popup Center first heading]] - [[popup Check indentation for consistency, Check indentations of headings are consistent]] If numbered headings are expected, it may be possible to expect headings at multiple levels, and to also expect a contents list. Each level of heading will have it's own set of policies which are shown on this dialog. The policies are shown in text form, but are edited via [[goto the heading details dialog]] Note: This area of functionality is continually under review. See also the discussion in detecting [[goto headings and section titles]]. Expect numbered headings ........................ $_$_HELP_TOPIC_ID ID_NUMBERED_HEADINGS This policy specifies whether or not numbered headings are expected in the document. Numbered headings may be found at multiple levels, and their details may be edited via [[goto The heading details dialog]] This should be calculated correctly by AscToRTF. But is prone to error, getting confused by numbered bullets and the like. In such cases you may need to set this policy manually. Expect underlined headings .......................... $_$_HELP_TOPIC_ID ID_UNDERLINED_HEADINGS This policy specifies whether or not underlined headings are expected. Note, where the headings themselves are numbered, the underlining will be taken into account, and you should set the [[popup expect numbered headings]] policy instead. AscToRTF uses the character in the underlining to determine the heading level, thus text underlined with equals signs is given prominence over text with single underline characters such as minus signs, tildes or underscores. Expect capitalised headings ........................... $_$_HELP_TOPIC_ID ID_CAP_HEADINGS This policy specifies whether or not CAPITALISED headings are expected. Note, where the headings themselves are numbered, this policy need not be set, and instead you should set the [[popup expect numbered headings]] policy instead. Expect Embedded headings ........................ $_$_HELP_TOPIC_ID ID_EMBEDDED_HEADINGS _New in version 2.0_ This policy specifies whether or not "embedded" headings are expected, i.e.. the heading is "embedded" in the first paragraph. Such headings are expected to be a complete sentence or phrase in UPPER CASE at the start of a paragraph. At present such headings are not auto-detected... you need to switch this policy. Heading Key phrases ................... $_$_HELP_TOPIC_ID ID_KEYPHRASE_HEADINGS _New in version 2.0_ If specified, then any line that begins with one of the key phrases will be regarded as a heading. The syntax is
,
... where each set of details is
= , [] and = [|] That is, each set of
can optionally specify a . If omitted this will default to 1,2,3 for the first, second, third set of details etc. Note, this is a *logical* heading level, and will be apparent in the contents list. Each set of
must supply a set of , and each set of phrases would must have at least one phrase with extra phrases added if wanted, separated by vertical bars. So for example Part, Chapter, Section would treat lines beginning with the words "Part", "Chapter" and "Section" as level 1,2, and 3 headings. The key phrases are case-sensitive in order to reduce the likelihood of false matches with lines that just happen to have these phrases at the start of the line. So PART|Part, Chapter, Section Would allow either "PART" or "Part" to be matched. "PART|Part,1" , "Chapter,2" , "Section,2" Would make lines beginning with "Part" level-1 headings, while both "Chapter" and "Section" would become level 2. This would be the same as "PART|Part,1" , "Chapter|Section,2" Note, spaces may form part of a match phrase, but because of their use in the tag syntax commands and vertical bars may not. If false matches occur, (e.g. the word "Part" appears in the body of the text) edit the source text so that the offending word is no longer at the start of the line. Use first line as heading ......................... *New in version 2.0* When this option is selected, the first line in the document will be treated as a heading. This can be a useful option to select when the first line of your document is a document title line, but doesn't conform to the headings style used in the rest of the document. See also [[goto use first line as title]] Center first heading .................... *New in version 2.0* When this option is selected, the first heading in the document is centred. This may be an appropriate choice when the first heading is in fact to be treated as a document title. See also [[goto use first line as heading]] Check indentation for consistency ................................. $_$_HELP_TOPIC_ID ID_HEADINDENTS The program performs a number of consistency checks when detecting headings. Amongst these is a check that all headings of the same type occur at the same indentation. This check can help distinguish between numbered headings and numbered lists. However, if you have numbered headings that are different indentations - e.g. because they are centred on the page - then this check will cause them to be rejected as headings. In such cases you can manually disable this check. This policy appears on-screen as "Check indentations of headings are consistent" The heading details dialog .......................... $_$_HELP_TOPIC_ID HIDD_HEADDTLS This dialog is reached through one of the edit buttons on the main [[goto Headings Policies]] dialog. This allows you to edit details of a particular type or level of heading. *Position of section number on the line* - [[popup Indentation of heading lines]] - [[popup Heading prefix words]] *Section number formatting* - [[popup Heading numbering scheme]] - [[popup Heading separator characters]] - [[popup Heading trailing letters]] *Bracketing* - [[popup Heading bracket characters]] Indentation of heading lines ............................ $_$_HELP_TOPIC_ID ID_HEAD_INDENT AscToRTF uses checks on indentation levels to reject lines with numbers on that could be confused with headers. This is the indentation level (in characters) that heading of this types are expected to be found at. Heading prefix words .................... $_$_HELP_TOPIC_ID ID_HEAD_PREFIX Some documents put words like "chapter", "subject" and "section" in front of the section number. These are known as prefix words. Heading numbering scheme ........................ $_$_HELP_TOPIC_ID ID_HEAD_NUMBERTYPE This is the numbering scheme expected for headings at this level. At present AscToRTF can't cope with mixed types like "II-2.b". This may be addressed in later versions. Heading separator characters ............................ $_$_HELP_TOPIC_ID ID_HEAD_SEPARATOR This shows the separator expected between parts of the heading number. *** Not currently supported *** Heading trailing letters ........................ $_$_HELP_TOPIC_ID ID_HEAD_TRAILALPHA This shows whether we expect trailing letters after the section number, as in "1.1b". *** Not currently supported *** Heading bracket characters .......................... $_$_HELP_TOPIC_ID ID_HEAD_BRACKETS This shows what bracket characters (if any) we expect before and after the section number as in "[2.2]" or "3.2.1)". *** Not currently supported *** Pre-formatted text policies ........................... $_$_HELP_TOPIC_ID HIDD_PREFORMAT These policies specify how AscToRTF detects pre-formatted text. Detecting pre-formatted regions - [[popup Minimum size of automatic
 section]]

See the section on [[goto pre-formatted text]] for more details.

Minimum size of automatic 
 section
.......................................
$_$_HELP_TOPIC_ID ID_MINPRESIZE
This policy specifies the minimum number of consecutive 
pre-formatted lines that must be detected before the text is 
placed in fixed width font.

AscToRTF detects heavily formatted lines, and then looks at 
their neighbours to see if they too could be part of a 
pre-formatted text.

Once a group of lines is identifies, it will only be marked 
up as pre-formatted if the minimum is exceeded.

The default value is 0.  Set this value larger if AscToRTF is 
marking text as pre-formatted when it shouldn't do.

Note: 	The 
 is a reference to the shared ancestry of this 
software with the text to HTML converter from which it evolved.

$_$_HELP_CHAPTER 3,"Table analysis policies"
Table analysis policies
-----------------------
$_$_HELP_TOPIC_ID HIDD_TABANAL
These policies specify how AscToRTF detects possible tables and 
analyses the data in them into columns and rows.

	- [[popup Attempt TABLE generation]]

*Detection*

	- [[popup Table extending factor, Extend preformatted regions]]

*Analysing rows*

	- [[popup Could be blank line separated,Could table have blank lines between rows]]
	
*Analysing columns*

	- [[popup Default table layout, Table Layout]]
	- [[popup Expect sparse tables,Is the table expected to have sparse columns]]
	- [[popup Ignore table header during analysis,Ignore table header when analysing columns]]
	- [[popup Column merging factor, Merge together "poor" columns]]
	- [[popup Minimum TABLE column separation, Minimum number of spaces between table columns]]

See the section on [[goto pre-formatted text]] for more details.


Attempt TABLE generation
........................
$_$_HELP_TOPIC_ID ID_ATTEMPT_TABLE
This policy specifies whether or not you want RTF table 
generation attempted for regions of apparently pre-formatted 
text.  AscToRTF will attempt to analyse such regions, preferring 
to fit them into a RTF table.  However, if this is not possible, 
or if AscToRTF decides the pre-formatted region is something 
else (like a diagram or a piece of code) then a RTF table will 
not be generated.

Disabling this policy tells AscToRTF not to attempt this 
analysis, usually leading to pre-formatted text being placed 
in simple fixed width font markup instead.

Table extending factor
......................
$_$_HELP_TOPIC_ID ID_EXTEND_TABLE
When the program encounters a strongly formatted line, it examines 
the adjacent lines to see if they too could form part of the 
same preformatted region.

This policy specifies the extend to which strongly preformatted 
lines should be used to "extend" to include adjacent lines as 
part of the same preformatted regions.  If set to 10, then all 
adjacent lines up to the next page break or section heading will 
be treated as part of the