3. Configuration

3.1. The configuration file

Some things could be configured in Muttprint. This is permanently done in the configuration files $HOME/.muttprintrc (only for the current user) or /etc/Muttprintrc (global for all users). User settings override global settings.

You can also specify an additional configuration file with the -r filename option. This file is read finally and overwrites command line settings, too. This additional configuration file is useful for using more than one configurations and you can combine it with some Hooks of Mutt.

The configuration file is structured in a way that values are assigned to different variables -- this is different from .muttrc. The name of the variable stands first and is case sensitive; take over them exactly. Then follows a equal sign (=) without any whitespace. At last, there's the value. Quotes (' or ") are optional.

An example for a configuration file is distributed with Muttprint (sample-muttprintrc). If you've installed a RPM or debian package, you'll find it in /usr/share/doc/packages/muttprint/.

An example for a correct assignment:

VARIABLE=value

Normally the script works without any adapts. But it is recommended to inform about the possibilities you have.

3.1.4. Duplex printing

Muttprint allows manual duplex printing. It prints odd pages at first, waits a while and prints then even pages.

Muttprint needs the speed of your printer to calculate the time when the printing of even pages will start, see Section 3.1.8.

To activate the duplex printing, set DUPLEX to on.

If you own a real Postscript printer and if this printer has duplex capabilities, you should set DUPLEX to printer. This changes the Postscript code in a way that tells your printer to enable automatic duplex printing.

3.1.6. Date

The DATE option allows two settings: original and local. If set to original, Muttprint print the date unchanged as it is in the mail header, i. e. in English and in the sender's time zone.

If you set this option to local, Muttprint converts the time zone in the time zone of the system and prints the date in the local language [1].

The format of the date could be specified with the DATE_FORMAT variable. The argument is a format string, e. g. "%A, %d. %B %Y %H:%M:%S". The quotation marks are necessary because the string contains spaces. The strftime(3) manpage contains details about it.

3.1.9. Font

You could use different fonts for the printing. The correspondent variable is names FONT. Latex (standard steting) means the standard LaTeX font of the EC family. Latex-bright uses Computer Modern Bright. This font is not available on current Debian systems because of its license[2]

There are several Postscript fonts which are possible here: Times, Palatino, Utopia, Charter and Bookman.

Of course the fonts has to be installed on your system. As the LaTeX distribution teTeX is standard on Linux systems, this should be no problem.

3.2. Command line options

Most configuration settings could be made by command line options as well. The advantage is a easier integration in the mail client (e. g. with own macros).

You find a detailled description of all options with muttprint -h oder or in the muttprint(1) manpage.

The effects of this options are the same as in the configuration file but command line settings override all other settings.

3.3. Different languages

Muttprint supports the languages German, Italian, Spanish, French and English. Normally the environment variable LANG is set to the right value: de, it, fr, es or en. Only the first two characters are recognized so that de_DE@euro is okay. If the value is not known, Muttprint falls back to English.

If you would like to use another language for Muttprint than for the remaining system, you could define LANG in your .muttprintrc.

3.3.2. Charsets

Muttprint supports different charsets for the printing. Here's a short overview:

This charsets allows you printing of most languages that use latin characters. The charset handling is mostly based on the LaTeX package inputenc.sty, but it is extended.

The default charset is Latin-1. If there are translation files, the charset is changed to the Country-specific one. For example, for German the charset Latin-9 is used for printing the Euro currency sign correctly. For Czech, the charset is changed to Latin-2 because it's a east European language.

Moreover, you can change the charset in the configuration file with the variable CHARSET. Normally, you should set this to the charset used for displaying the mail on the screen, see the variable charset of Mutt.

If you set CHARSET to the value auto, Muttprint tries to find a suitable mail header that contains the charset of the mail. Use this setting carefully. For example, Mutt adapts the output to the screen charset. On the other side, this setting could be useful if you often print mails with different charsets.

Aside from the charsets of the ISO-Latin family, Muttprint supports the enhancements of the Windows charsets Windows-1252 (West European) and Windows-1250 (East European). This charsets extends the ISO charsets with some characters, for example typographical quotation marks, per mille sign or the Euro sign. Last one often appears one the place 128 (decimal) because of the wide spread of Windows -- partial declared as ISO-8859-1. Muttprint prints this mails correctly, if the mailclient doesn't change something.

You find a full overview about the ISO-8859-* charsets on http://czyborra.com/charsets/iso8859.html.

Notes

[1]

This works independent from the translation file by using the functions of the operating system. Despite this, the LANG (see Section 3.3) in the configuration file affects the language of the date.

[2]

You can download this font and install it on your computer from the CTAN. You find the fonts in CTAN:/tex-archive/nonfree/fonts/cmbright/ (CTAN = Comprehensive TeX Archive Network consists of a network of several servers. The CTAN server in Germany is ftp://ftp.dante.de, in the United Kingdom ftp://cam.ctan.org and in the United States ftp://tug.ctan.org).