The purpose of this document is to outline the documentation style to
adopt when adding to or extending LaTeX documents. It assumes that there
already exists a prior knowledge of LaTeX.
These general guidelines should be adhered to when creating all
LaTeX documents to achieve consistency throughout all documents. The
purpose of these guidelines is to create consistency throughout all documents
created in the CMISS group.
~cmiss/latex/. This should be copied to the directory of the
current document an modified appropriately to compile new LaTeX documents.
~cmiss/latex/shell_*.tex
~cmiss/documents/papers/coupledpaper/
~cmiss/latex/ directory.
There are three files containing predefined macros which have been written by
the CMISS group. These three files should be included into your latex
document. In order to keep up to date with any changes occuring to these files
you should not take a local copy and include that. You can reference the files
directly from the ~cmiss/latex/ directory or you can create a soft link
from a local file to the global files. The three files are:
In addition to this there is a file defns.tex which is in the same
directory. This should also be included. It contains standard margin settings,
paper size, packages etc.
NOTE It is important to use these predefined commands whenever possible.
The structure and layout definitions are stored in the style files located in
the directory ~cmiss/latex. These files usually have the extension
*.sty. LaTeX is distributed with standard document classes,
~cmiss/latex/shell_article.tex
~cmiss/latex/shell_report.tex
~cmiss/latex/shell_book.tex
~cmiss/latex/shell_letter.tex
~cmiss/latex/macros.tex
\compcode
in order to distinguish it from the rest of the text. This will produce
output of the form text.
\ionbicarbonate will produce output of the form .
A more extensive list can be located in the macros.tex file.
\colloq{text} to produce
output of the form `text'.
\nth{i},
which produces an output of the form \nunit{5}{\mps}. This will produce
the output appearing as ~cmiss/latex/macros.tex.
\nrunit{5}{7}{\mps} producing output appearing as
\gint{w}{x}{y}{z} which produces output of the form
or for evaluating integrals use \evalat{x}{y} to
create output of the form \dby{x}{y} to produce output of the form
The standard file for bibliography references are located in the directory
~cmiss/documents/references/references.bib.
Texts are cited using the last name of the first author of the book, a colon,
followed by the year published. If there are multiple publications in a year,
then a letter (e.g.,b, c) is added to the year of publication. How this system
works is that the when your document is compiled, the references section will
automatically be generated from the articles you have cited. If you want to
have a reference in your document which is not cited in the main body of the
text the \nocite command can be used.
The most common way of including a reference list is to create a file
references.tex which is included into the main file after the body of
the text (or the chapter inclusions). A sample references file can be found in the
~cmiss/latex/ directory.
To add a reference, open the references.bib file. At the top there are
abbreviations for most of the common journals. If the journal you require is
there please use the abbreviation given to ensure consistency. If the name of
the journal is not there, create a new one. If the references file is opened
in emacs, there are two extra menu bar headings which may be useful. The
Entry Types menu has a list of many types of document to be
referenced. Selecting one of these items creates a template for you to fill in
the blanks. Before the template appears you must type in the key for the
reference which is the string you will quote when referencing the item. The
template will be placed in the correct place in the database. Usually only
four fields are compulsory for the reference (this may depend on what you are
referencing). You should try to fill out as many of the optional fields as you
can.
The second menu is the Bibtex Edit menu. As the name suggests it has a list of editing commands which you can use in the database. The most useful few items are the clean up entry, the sort entries and the validate entries options. The clean option removes the unused fields and so 'cleans up' your new reference. The sort option will sort the entries into alphabetical order if, for example, you have decided to change the key. The validate option checks that all the entries have all the fields required and that the syntax is acceptable.
NOTE: This database is not like CMS, if you are saving the file something comes up such as File Changed on Disk, do not force a save, someone has been editing the file at the same time as you and saving will delete their changes.
Common abbreviations have been created in macros so that their formats may be
kept consistent. Some of these abbreviations include
Abbreviations
e.g.,\eg
et. al.\etal
etc.\etc
i.e.,\ie
n.b.\nb
Dr\Dr
Units
\degC
\mps
\mpsps
\kNpm
\mtwo
\mmthree
\vect command
\matr commandThere are two general comment blocks. They are to be used for marking the locations where changes are to be made. To indicate that
\todo{text} is used, which produces the output in
square brackets of the form: [text]
\remark{text}, which produces the output of the form: [Remark: text]
Graphics are either generated using the XFIGure and gnuplot packages. The XFIGure package is used for creating general diagrams. The gnuplot is used for generating graphs from data.
~/ <directory of the document> /figs ~/ <directory of the document> /epsfiles ~/ <directory of the document> /plots
\pstexfigure{figure}{short caption}{long caption}{label}\pstexfigure{figure}{}{caption}{label}
\epsfigure{epsfig options}{short caption}{long caption}{label}\epsfigure{epsfig options}{}{caption}{label}
There is a program written to compile your documents into a dvi file
which can be viewed in xdvi, a postscript file or an html file. It
uses a file called Latex_make.sh. The main copy is in the
~cmiss/latex directory. This should be copied to each directory where
you have a main TEX file. The file must be edited to show your file names,
directories etc. Instructions for setting this file up are contained
within the file itself. You can compile by typing Latex_make.sh but it
is most common to create an alias in your .cshrc of the form
alias latexmake './Latex_make.sh'
The program can now be run by typing latexmake. To find out exactly what the compiler can do type latexmake help and a list of commands will be given.