The Configuration File(s)

Table of Contents
The Different Files
The Options
Addressbook
Mydvips
Mydvipdf
Mylatex
Myeditor
Myprintcommand
Myxdvi
Dateformat
Advertise
Quite_latex
Filename_guess_format
Filename_guess_path
Mycountry
Guilevel
Opening_defaults
Closing_defaults
Addressbook_columns
Addressbook_column_widths
Header_defaults
Lettertype
Addressformat
Texcommands
The gtex-letter variables
Address-variables
Letter-based variables
Other variables

 

The Different Files

Gtex-Letter looks for a configuration file called .gtex-letterrc when started. This file may reside in the current directory, in your home directory or in the place, where the application is installed. This is also the order of places where gtex-letter will look for the file.

The gtex-letter package comes with a set of different config files containing different variants configuration variants. Mainly these files cover different languages. So if the your language of choice is Spanish, then you should run gtex-letter with the Spanish config files called .gtex-letterrc.spanish. This can be done accomplished with this call:

gtex-letter --rcfile .gtex-letterrc.spanish

The make the Spanish config file the standard one for the time being, copy it to your home directory under the name .gtex-letterrc. Gtex-Letter will look for that file when started. You can do it with your filemanager or using the following call:

cp /opt/gnome/bin/gtex-letter-prg/.gtex-letterrc.spanish ~

(This will work only if you used the standard directory for the install. If you changed it, then you have to change the path in the above command too, of course.)

 

The Options

But now for the internals of the config file. This section will describe the different options, one by one.

 

Addressbook

This is the location of your gnome-card-addressbook. You can define multiple addressbooks. Seperate them with a semicolon (;). The default is:

addressbook='~/.gnome/GnomeCard.gcrd'

 

Mydvips

The programm call to produce the ps-file out of the dvi-file. Ps means postscript and dvi device independent. If you do not know what this is all about, leave it the way it is. These are LaTeX specific programms gtex-letter depends upon.

mydvips='dvips __short_filename__'

__short_filename__ describes the filename without the suffix. The other possible variable is __filename__, meaning the normal filename. (Actually all the gtex-letter-variables are supported, but most do not make sense.)

 

Mydvipdf

The programm call to produce the pdf-file from the dvi-file. Pdf is the popular Adobe Acrobat format and dvi means device independent. If you do not know what this is all about, leave it the way it is. Default is:

mydvipdf='dvipdf __short_filename__'

__short_filename__ describes the filename without the suffix. The other possible variable is __filename__, meaning the normal filename. (Actually all the gtex-letter-variables are supported, but most do not make sense.)

 

Mylatex

The LaTeX call to produce the dvi-file. Dvi stands for device independent. You do not need to know, how gtex-letter makes use of this stuff. It is best to leave it the way it is.

Default is 'latex __short_filename__'

__short_filename__ describes the filename without the suffix. The other possible variable is __filename__, meaning the normal filename. (Actually all the gtex-letter-variables are supported, but most do not make sense.)

 

Myeditor

The command to bring up the editor, that lets you proceed with your letter manually.

myeditor='xterm -e vi __filename__'

This call opens a shell and vi therein with the current file. __filename__ means the filename choosen by you or the programm. (Actually all the gtex-letter-variables are supported, but most do not make sense.) If you are not used to vi, a classical Unix editor, you should replace it with you favorite editor. If your editor has a graphical version, you do not have to call it via an xterm. I use:

myeditor='gvim __filename__'

Gvim (for Gtx-Vim) is vi on steroids. The best editor ever, hehe!

 

Myprintcommand

The command used to print the file.

myprintcommand=''lpr __short_filename__.ps'

__short_filename describes the filename without the suffix. The other possible variable is __filename__, meaning the normal filename. (Actually all the gtex-letter-variables are supported, but most do not make sense.) If you change anything in this call, make sure the right file is being printed (usually the postscript one).

 

Myxdvi

The command to call the dvi-viewer. Dvi means device independent. This is the preview version. Default is:

myxdvi='xdvi __short_filename__'

__short_filename describes the filename without the suffix. The other possible variable is __filename__, meaning the normal filename. (Actually all the gtex-letter-variables are supported, but most do not make sense.)

 

Dateformat

You can use this option to include a specially formatted date in the filename. Please refer to filename_guess_format for further information on this issue.

IMPORTANT NOTE: This is _not_ the date format that is displayed on the letter.

The date can be entered via the ANSI C date description format. Default is:

filename_guess_format=%x

for the standard and English rc-files. For the other ones, the default is:

filename_guess_format=%d.%m.%y

 

Advertise

This stands for an advertise-string in the generated LaTeX-file. If you do not care about LaTeX and just want to have your letter, then this is of no importance to you. Put it to 'false' or 'no' to suppress the advertise-string. Default is:

advertise=yes

 

Quite_latex

Set this option to 1 or yes to suppress all LaTeX output. It will also suppress the output of xdvi, dvips and dvipdf. If you do not know what this is all about, just leave it untouched. Default is:

quite_latex=no

 

Filename_guess_format

Gtex-letter will choose a filename for your letter based upon your selections, the and this option. This is called filename guessing. Optional values and separators are possible (please refer to section addressformat for explanation).

If there is empty space in the format or in the parameters you supply (subjects of letters tend to have empty space), these spaces will be converted to '_'. The same applies to ':' and '/'.

Please make sure that the end of the format is '.tex'. The possible variables are explained in the gtex-letter-variables-section.

filename_guess_format=__id__[-__subject__].tex

This means a guessed filename with the id of the addressee and if a subject for the letter is choosen, a hyphen and the subject. The sufix is .tex.

 

Filename_guess_path

Gtex-letter will choose a filename for your letter based upon your selections, the filename guess format and this path, which is prepended to the guessed filename. Default is:

filename_guess_path=~/

This means your home directory.

 

Mycountry

If you define mycountry, gtex-letter will hide the country in the address if it is equal to mycountry. This might not be true if you have changed the addressformat.

mycountry=D

Gtex-letter checks the country-field in the addresses of your addressbook. So if you abbrevated the countrys there, you have to abbrevate the mycountry-option too.

 

Guilevel

This is the level of complexity of the graphical user interface (gui). Default value is:

guilevel=novice

Guilevel 'novice', means simple screens, that are easy to understand. After a few runs you might consider moving to 'intermediate'. This is a bit more straight forward. You can give it a try with the command-line option "--guilevel 'intermediate'". At last, there is the guilevel 'expert' that brings you everything in one big page.

Various aliases exist for the three guilevels. The following values are possible: novice, beginner, normal, intermediate, advanced, expert, 0, 1 and 2.

 

Opening_defaults

The different default values for the combox or buttons for the opening. Please enter the openings seperated by ';'. But do not forget to set quotation marks in front and behind every opening.

It is possible to further enhance the buttons with the name of the address chosen. This can be reached via inclusion of a term like __lastname__. The possible terms are explained in the gtex-letter-variables-section. Most variables make little sense however.

Furthermore, the is a kind of 'if-then'-pattern matching possible. This applies to people writing in languages, where the opening depends on the sex of the addressee. This is explained in the section of adoption to the sex of an addressee. The default in the standard-file is:

opening_defaults="Dear __name_prefix__ __lastname__,"; "Dear __firstname__,"; "To whom it may concern,"

 

Closing_defaults

The different default buttons for the closing. Please enter the openings seperated by a semicolon (;). But do not forget to set quotation marks around every closing. 'If-then'-pattern matching is possible. They are explained in the section on opening_defaults. Default is:

closing_defaults="Yours sincerely,"; "Regards,"; "With the best regards,"; "With the very best regards,"

 

Addressbook_columns

The different columns of the gtex-letter representation of your addressbook. You can choose from the following columns: Name_Prefix, Firstname, Lastname, Street, ZIP, City, Country, Telephone. This list is the default value:

addressbook_columns=Name_Prefix, Firstname, Lastname, Street, ZIP, City, Country, Telephone

 

Addressbook_column_widths

The widths of the columns, seperated by comma. Please make sure, that the number of columns and the number of column widths match. The width is counted in pixels. Default is:

addressbook_column_widths=50, 80, 100, 120, 50, 100, 20, 90

 

Header_defaults

You can enter a list of different LaTeX-header filenames here. Please enter the header filenames seperated by ';'. You may choose to omit the '.tex' in the filename.

A WORD OF WARNING: LaTeX letter classes are very specific. The letter-header defines some parameters that will be passed to LaTeX while processing your letter of the specified class. If you simply choose to use a different of the letter-headers that come with gtex-letter, without adopting the rc-file. LaTeX will complain. However, it is secure to use the default headers that are defined in every rc-file.

If you are not used to LaTeX, you should start to copy one of the default headers and adopt it to your needs. It is quite tricky to write a header from scratch. Default is:

header_defaults='letterheader.standard_latex'

 

Lettertype

The type of your LaTeX-letter. There are many different LaTeX letter classes available. Gtex-letter can be adopted to support them using this option and different LaTeX-commands. The default is:

lettertype='letter'

 

Addressformat

This option(s) defines the format of the addresses in your letter. This option is a multiple liner. The lines are numbered starting from 0, the number seperated from the name of the option by a dot. Empty lines are possible. The possible keywords are explained in the gtex-letter-variables-section.

Optional values are possible. They are set within [...]. An example: Not every address person has a name_suffix. However, if there is a name_suffix, it is seperated from that name via a "," in the default setting. If there is no name_suffix that "," should be omitted, of course. Therefor the name_suffix together with the "," is optional: [, __name_suffix__]. Do not worry about optional terms without a separator. Like __post_office__ as an example. They will be omitted anyways. The optional clause is only interesting together with separators. The deault is:

addressformat.0=__name_prefix__
addressformat.1=[__firstname__ ][__middlename__ ]__lastname__[, __name_suffix__]
addressformat.2=__post_office__
addressformat.3=__extended__
addressformat.4=__street__
addressformat.5=[__country__--][__zip__ ]__city__[, __region__]

 

Texcommands

These are the LaTeX-commands. More or less the template file for your letters. If you are not used to LaTeX, just leave it untouched. This option is a multiple liner. The lines are numbered starting from 0, the number seperated from the name of the option by a dot. Empty lines are possible. The possible keywords are explained in the gtex-letter-variables-section. Default is:

texcommands.0=\documentclass[12pt]{__lettertype__}
texcommands.1=\usepackage[T1]{fontenc}
texcommands.2=\usepackage[latin1]{inputenc}
texcommands.3=\name{Charles Mustermann}
texcommands.4=\usepackage{graphicx}
texcommands.5=\input{__letter_header__}
texcommands.6=\begin{document}
texcommands.7=\begin{letter}{__letter_address__}
texcommands.8=\textbf{\Large\raggedleft __letter_subject__}
texcommands.9=\opening{__letter_opening__}
texcommands.10=__letter_contents__
texcommands.11=
texcommands.12=\closing{__letter_closing__}
texcommands.13=\end{letter}
texcommands.14=\end{document}

 

Variables

The following options can be used in the gtex-letter and its config-file. They are all embraced by two underscores. This makes the rc-file more readable.

The address-variables:

The Id (Identification) of the choosen address: __id__
The prefix of a name in an address: __name_prefix__
The firstname of an address: __firstname__
The middlename: __middlename__
The lastname: __lastname__
The suffix of a name in an address: __name_suffix__
The extended part of an address: __extended__
The post-office-part of an address: __post_office__
The street: __street__
The postal code (zip-code): __zip__
The city: __city__
The region: __region__
The country: __country__

The letter-based variables:

The subject of your letter: __subject__
The opening choosen: __opening__
The closing: __closing__
The filename: __filename__
The filename without the suffix: __short_filename__

Other variables:

Todays date: __date__