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.5. 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.9.

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; for CUPS a corresponding option is used.

3.1.7. 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.10. 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 many systems because of its license[2].

There are several Postscript fonts which are possible here: Times, Palatino, Utopia, Charter Bookman, CentSchool (New Century Schoolbook), Chancery (Zapf Chancery), Helvetica or AvantGarde.

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.1.12. Formatting of the mail body

The mail body is split into two parts: text and signature. If there is a signature and it should not be removed (see Section 3.1.18), this two parts can be formated separately.

Muttprint uses the LaTeX package fancyvrb.sty to print the body, which offers lots of formatting options. The options which are passed to the Verbatim environment could be set with the variable VERBATIMNORMAL (for the normal text) and VERBATIMSIG (for the signature).

You'll find the exact syntax in the documentation of fancyvrb.sty, which could be viewed with the command texdoc fancyvrb. Normally, the signature is printed in Italics. You can print borders, too.

If you don't want a separate formating of mail body and signature, just set VERBATIMSIG to raw. If so, the signature is treated as normal mail text and is printed like this (including the signature separator).

Here're some examples:

  • fontshape=it,frame=topline: italic font, border above the block

  • fontfamily=helvetica,fontseries=b: Helvetica font, bold

  • numbers=left,stepnumber=5: Line nummering each fifth line

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 different languages. Normally the environment variable LANG is set to the right value: e. g. de, it, fr, es or en, which is the shortcut according to ISO 639. 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.

You find a overview about all available translations in the file README.translations, which is installed with the documentation in the same directory.

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.

Since version 0.65 Muttprint supports printing of mails with cyrillic characters. In this case the charset is koi8-r. Please recognize that this does not work with all LaTeX systems; I recommend teTeX in version 2.0 or higher. Morover not all fonts contain the needed characters -- please use the LaTeX standard fonts, see also Section 3.1.10.

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).