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.
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.
If Muttprint should not print to lp, you can change this by setting PRINTER to the correct value.
To print in a file, you could use following syntax, the name (and location) of the file is freely chosable:
PRINTER="TO_FILE:/foo/bar/test.ps"
If duplex printing is enabled, Muttprint creates a second file with the prefix 2, e. g. test.ps2.
As a default setting it is printed a little penguin on the right top of the page. If there should be another picture or if the penguin has another location as Muttprint assumes, you can configure this by setting the PENGUIN variable to the right value. The picture must be in Encapsulated PostScript (you could use convert from the Image Magick package for converting your favourite picture into EPS) and it is scaled to a height of 2 cm (5.08 in). The logo must not have a higher width than height.
If PENGUIN=on, Muttprint tries to find out the location of the penguin file. (Read the source code to find out, where Muttprint searches.) This is the default setting.
If the printing of the graphic should turned off, set PENGUIN to the value off.
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.5.
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.
It's possible to print two pages on one page in landscape. This allows you to save paper and ink and increases the printing speed. This makes only with the paper format DIN A4 sense because two reduced pages fit exactly to one sheet.
To enable this mode, set PAPERSAVE to on.
As mentioned above, Muttprint requires the duration which your printer needs to print one page. This setting is done by setting the variable SPEED to the value in seconds (only integers are allowed). Default is 30 seconds (SPEED=30).
You could use different fonts for the printing. The correspondent variable is names FONT. Latex means the standard LaTeX font of the EC family. Latex-bright (standard setting) uses Computer Modern Bright.
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.
There could be printed a rule under the headline resp. over the footline. They are turned off as default.
Set the variables HEADRULE resp. FOOTRULE to on or off.
There exists different possibilities to highlight the mailheaders on the first page. Here is a listing of them:
Style | Description |
---|---|
plain | no rules |
border | rule after the headers (default setting) |
fbox | simple box around the mailheaders |
shadowbox | shadowbox arount the header |
ovalbox | box with rounded corners arount the header (thin lines) |
Ovalbox | same as ovalbox but thicker lines |
doublebox | box with double lines around the header |
grey | grey background behind the headers |
greybox | same as grey but with a additional black box |
To set the paper format, set PAPER to the right value. Possible are only A4 and letter.
Often the signature contains unseless information or advertising and should therefore not be printed. Muttprint is able to cut the signature, if it was separated from the mail by using "–– " -- take a look at the whitespace (some mail clients don't generate a correct separator).
To do this you've to set REM_SIG (this means "remove signature" to the value on.
Often the author of the mail does not quote sensibly but attaches the whole mail so that the printing becomes very long and confusing.
If REM_QUOTE is set to on, the quoting will not be printed. Muttprint detects the quoting by using the same regular expression that Mutt does in its standard configuration. So the text which is color emphasized from Mutt should omited in the printing. This corresponds to the toggle quote funktion (Shift-t) on screen.
The output of latex and dvips are not displayed. If there are any problems, it would be helpful to read this output. Therefore you should set DEBUG to 1 in your .muttprintrc. Now Muttprint creates a logfile named /tmp/muttprint.log in the next run so that you can watch the error messages. This could be helpful for all bug reports, too.
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.
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.
The most important effects of language adaption are on the printing: the mail header and the date.
The last one is created with the LaTeX package babel.sty. Muttprint passes the right option which corresponds to your language to the package. You could set your own value with the variable LPack, e. g. to austrian, spanish. Read texdoc babel for a list of all possible values.
If you would like to use another strings for the printed header, you could set following variables:
FROM_STRING
TO_STRING
SUBJECT_STRING
CC_STRING
DATE_STRING
PAGE_STRING
OF_STRING
NEWSGROUPS_STRING
The Muttprint translation files are located in the share directory and have the name translation-language.pl. You could add new files in this directory without any changes on the Muttprint script. Not only the headers mentioned above but also the help message are translated here.
For new translations take any file as template, copy it and translate it. If you would like to provide your translation to other users, just send me the new file with a e-mail and I'll add it in the next release.