# Materials Algorithms Project

## CREATING A TEX FILE FOR MAP

These notes are intended to be comprehensive enough to enable even those with little or no knowledge of TEX to edit the templates to produce a suitable file which can be submitted to the MAP Administrator for inclusion in MAP. For those with no knowledge of TEX, minor corrections and edits can be made by the MAP Administrator.

In the template files, those sections of the file which need to be edited are identified by a comment line containing the characters ####n, where n is an integer and refers to the number of the notes below.

PLEASE DELETE THESE COMMENT LINES and insert the required information.

The data template files contain fewer sections than the routine template files. Sections 7-9, 12, 15-18 & 20-23 are not applicable to data template files.

N.B. Please use the same pattern of capital and small letters to that used in the template file.

## Summary of useful TEX commands

TEX commands are preceded by the backslash character: \. Please do not delete these commands when inserting text into the templates (apart from any redundant lines). Any text inserted into the template file may contain as many TEX commands as desired. Some simple, but very useful, commands are given here.

To write words in a different format, such as in italics or boldface, the words and (in some cases) the TEX command should be enclosed by two curly brackets: { }. The TEX command MUST be followed by a space. For example, to write the words 'hello world'

• in italics - type {\it hello world} e.g. hello world
• in boldface - type {\bf hello world} e.g. hello world
• in monospaced font - type {\tt hello world} e.g. hello world
• as a superscript - type $^{hello world}$ e.g. hello world
• as a subscript - type $_{hello world}$ e.g. hello world
• underlined - type \underbar{hello world} e.g. hello world

The special characters \, _, & and % are used in TEX to identify and define commands. These characters can be inserted into the text by typing:

• $\backslash$ for a backslash
• \_ (followed by a space) for the underscore character
• \& (followed by a space) for &
• \% (followed by a space) for %

Other useful commands are:

• \char'27 (followed by a space) for the degree sign °
• $>$ for >
• $<$ for <
• \item {} can be typed at the beginning of a line to force TEX to start a new line.
• The command \dv1 is found in the TEX template files between each section. This command can be changed to \dvd to force TEX to start a new page at the beginning of the next section.

## Inserting information about the routine/data.

The numbers of the sections below refer to the integer in the comment line at the insertion point in the template file (####n).

1 - Routine type and name
The routine type is one of Program, Subroutine, Function, Module or Data Library. Check that the routine type specified here is the appropriate one for your routine/data. If not, then you are using the wrong template file. Please download and use the correct file now! The word 'LIB' should be changed to the name of the library in which the code is to be included. Currently this is either COMP, CRYSTAL, KINETIC, METALL, NEURAL, NICKEL, POLY, STEEL or UTIL.
The word 'NAME' should be changed to your name for the routine or data (use capital letters).
e.g.
Program MAP\_STEEL\_WELDSOFT
Data Library MAP\_DATA\_AUSTENMAT

2 & 3 - Names and addresses of authors
Give the name(s) and address(es) of the person(s) who provided the source code or data and who should be approached if further information is required.

4 - E-mail addresses of authors
If desired, an e-mail address for contacting the authors may be given by replacing ****** with the relevant e-mail address (it occurs twice). If not desired, please delete this line.

5 - Date of addition to MAP
Change month and year to show the date and year when the routine/data will first appear on the MAP web site.

6 - Purpose of code / Purpose of data
Give a brief statement outlining the broad purpose of the code or data (1-2 sentences).

7 - Language (not applicable to data template files)
Replace ****** with the computer language in which the code is written (FORTRAN/C/C++ etc.).

8 - Product Form (not applicable to data template files)
Replace ****** with the form in which the code is supplied i.e. Source code or Executable file or both. If an executable file is beng provided, the following information should, if possible, also be supplied: Compiler used; Computer type (e.g. IBM-PC, Macintosh, Sun etc.); Operating system (e.g. WINDOWS95, DOS, Mac OS, UNIX, LINUX etc.); any particular hardware requirements or memory requirements etc.

9 - Specification of routine and variables (not applicable to data template files)
Give a clear statement of the routine name, the input and output arguments used by the routine, the order in which they must be passed and their type. If the routine is a complete program, the statement 'Complete program.' is sufficient. Each line must start with the TEX command \item {}

10-13 - Description of routine / data
 Computer code Give a more detailed explanation of the purpose and operation of the code, perhaps including some background theory and any limitations on values of input arguments. A clear indication of the equation or equations being evaluated by the code would be useful, either by including the equation here or by giving a precise reference to the equation in a journal or other publication. Give details of any files included in the name.tar file, other than the usual MAP files. Data Give a detailed description of the data, the names and format of the data files and each column of data in the data files. Specify the units of the data.
12 - Including an equation or diagram (not applicable to data template files)
Simple equations can be included using text and simple TEX commands. More complicated equations can be produced easily with more extensive use of TEX commands. Alternatively, equations and diagrams can be included as image files in postscript format (name1.ps). The following TEX commands are required for the inclusion of an image file:
\vskip 2in
\special{psfile=./name1.ps hoffset=-60 voffset=-320}

The first command creates 2 inches of space on the page for your image. In the second command name1.ps should be replaced with the name of your image file. The values given for hoffset and voffset affect the position of the image on the page. The correct values to use need to be determined by trial and error. Delete this line if no image file is to be included.

14 - References
Give a list of references where more detailed background information and the theoretical basis of the code (where appropriate) can be found. These need not be published works. Include any publications involving the use of the code.

15 & 16 - Parameter descriptions (not applicable to data template files)
For each input and output parameter a description must be given in the form
\item {} VARIABLE-NAME - type
\parindent=1in
\item {} Description (units).
\parindent=0.5in
Replace VARIABLE-NAME with the name of the variable. Replace type with a statement of its type (e.g. real/integer/double precision/character/integer array of dimension 3). Replace Description (units) with a description of the variable and specify its units.

17 - Error indicators (not applicable to data template files)
Describe any error-trapping procedures that may be implemented in the code (e.g. input arguments outside specified limits) or any flags used to indicate errors encountered during the calculations. If there are no error indicators, type None.

18 - Accuracy (not applicable to data template files)
Give a statement of known limits to the accuracy of the results generated by the code, and/or a description of the circumstances within which a specified accuracy is maintained.

Give any additional information which does not fit into another category.

20-22 - Example (not applicable to data template files)
Give a simple program which illustrates the use of the routine and the output which is generated.
21 - Give a set of typical input data for the sample program.
22 - Show the output obtained from the sample program with the input data given above.