a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: formatting question


From: ed . arthur
Subject: Re: formatting question
Date: Fri, 27 Feb 2004 14:09:19 +0000

One step beyond Jan's suggestion is perhaps to have
a pre-processor which generates the sheet file dynamically
if the keywords are changing from "run-to-run".

/Ed
> 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
> 
> 
> _______________________________________________
> A2ps mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/a2ps




reply via email to

[Prev in Thread] Current Thread [Next in Thread]