Fri, 30 Nov 2007

It's good being a geek

a2ps works great under ubuntu 7.10 with an HP 950C deskjet printer. The only problem is that the page margins are screwed up when printing to a deskjet. Since I'm a geek, I don't need to throw up my hands and squeak "AIEEEEE! It doesn't work!".

The clue I needed to fix the problem was at the bottom of this stretch of config variables in /etc/a2ps.cfg:

#################################################################
# 1)    Definition of some media      #
# (Must be defined before --medium)       #
#################################################################
# Medium: name, width height [llx lly urx ury]
Medium: A3      842    1190
Medium: A4      595     842
Medium: A5      420     595
Medium: B4      729    1032
Medium: B5      516     729
Medium: Letter      612     792
Medium: Legal     612    1008
Medium: Tabloid     792    1224
Medium: Ledger     1224     792
Medium: Statement   396     612
Medium: Executive   540     720
Medium: Folio     612     936
Medium: Quarto      610     780
Medium: 10x14     720    1008

# Desk Jet users: bigger margins
Medium: A4dj    595 842 24  50  571 792
Medium: Letterdj  612 792 24  40  588 752

So, we need to set explicit margins for deskjet printers, but the given margins didn't work for my HP 950C. So there's a job for ~/.a2ps/a2psrc with numbers I derived by trial, error, and printing a dozen pages:

# Medium: name, width height [llx lly urx ury]
Medium: hp950c  612 792 10  85  578 790

Here's a script to print emails 2-up from gnus: ~/bin/printmail

a2ps -=mail -2 -M hp950c

In gnus, put the cursor on the message in the summary buffer, type `|' and tell it to run printmail.

Here's what I printed:

Subject: [cath_hs] Fwd: Zuppa Toscana

we had this last night and it was VERY good.  very spicy.  we will
make it next time, with half mild and half hot sausage.  instead of
fresh kale, i used frozen, dethawed and squeezed dry with my hands.

also, i used only 3 carrots, not 5.  diced the celery and carrots
small, since that's the only way our fam will eat them.  chopped my
taters into bite size pieces.  used light cream, but put a whole cup
in to cut some of the spice.  parmesan is just as fine for a garnish,
instead of romano.

2 quarts is 8 cups of stock. :-) rachel ray would call this a "stoup".
it's a thick and hearty soup.  nice with biscuits.  broth is flavorful
and creamy.  made a whole lotta soup.  tons of leftovers for the two
of us.

i think someone emailed me the recipe, but i can't find the original
email.  thank you!!

love mel

Begin forwarded message:

> Date: November 12, 2007 12:05:01 PM EST
> Subject: Zuppa Toscana
>
> Zuppa Toscana (adapted from Olive Garden's)
>
> 2 lbs. hot Italian Sausage patties
> 2 lg. onion, chopped
> 3 stalks celery, sliced thinly
> 5 carrots, sliced
> 6 cloves garlic, minced
> 2 qts. chicken stock
> 3 lbs. russet potatoes, chopped coarsely
> 1 bunch kale, leaves stripped of stem and chopped coarsely
> 1/2 c. cream, whatever type you like
> romano cheese to garnish
>
> Saute the sausage in dutch oven over medium heat until it is
> cooked. (If you can't find the patties, use links, just squeeze out
> the sausage before cooking.)  Remove the sausage from pan, and pour
> off most of the grease. Put onions, celery, and carrots into the pan
> and saute until onions are translucent. Add garlic and cook 2
> mins. more, stirring frequently. Add stock. Bring to boil and add
> potatoes. Cook until potatoes are done. Add kale leaves and cook 5
> mins. Remove from heat and add cream. It is now done! When serving,
> garnish with romano (pecorino romano is the best for this). This soup
> is even better the next day. If hot sausage is too much, mild italian
> sausage can be substituted, but the flavor is not as "punchy".