[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: formatting question
From: |
Jan Willem Knopper |
Subject: |
Re: formatting question |
Date: |
Fri, 27 Feb 2004 10:42:20 +0100 |
User-agent: |
Mutt/1.5.6i |
Warren Pollans wrote:
> Hello,
>
> Please feel free to point me elsewhere if this is not the appropriate
> place to ask this question.
>
> I have text files that I generate on the fly from database tables.
> I've decided that they would look better if some groups of words were
> in boldface. The words are not fixed "keywords" but can be found using
> a regex of the form ^pattern1(.*)pattern2$ so that $1 (or \1 ?)
> contains the word(s) I want print in bold. What's the easiest way to
> have a2ps do this? It seems like I should be able to write a simple
> .ssh file to this but I can't figure it out.
>
If you want to make a style sheet for your type of text files then you
can make pattern1 bold with a regex P-rule (pretty printing rule). The
example from the stylesheet info pages is:
(/^([a-zA-Z0-9_]*)([\t ]*:)/, \1 Label_strong, \2 Plain)
which is made to highlight the a_rule of a `Yacc' rule:
a_rule : part1 part2 ;
This rule can also be found in slightly different form in the file
yacc.ssh in the stylesheets directory (which for me is
/usr/local/share/a2ps/sheets).
I hope this helps,
Jan Willem