[texhax] Non-proportional font availability

John R. Culleton john at wexfordpress.com
Mon Aug 7 22:17:29 CEST 2006

On Monday 07 August 2006 13:38, hgi at shaw.ca wrote:
> Hi All!
> I now have a nice, in-house, two-column newsletter that our branch uses to
> generate awareness in other branches.  It goes out once a month, is a
> one-pager (two sides), yet presents some useful information.
> I'm now setting it up so everything can be generated automatically using a
> Python program to generate the Tex (LaTex) code.
> My  difficulty is that I have little "title bars" in blue (with white text
> inside) just above each tiny section.  So it would be great, when titles
> are entered, to know that a titlebar is say, 50 characters in width and
> since the heading itself is (for example) 30 chars in width, I need to pad
> 20 characters with the blue colour.  In this way all titlebars are exactly
> the same width, regardless of how much text they contain.
> So I am wondering if there is a fairly nice looking font that I might
> access for titles, that is likely non-proportional, so I can dynamically
> create equal-width titlebars throughout my little document.
> Thanks so much!
> -Warren

Perhaps it would be easier to just center the text in a fixed
length bar, rather than counting spaces.  

It is not difficult to set up a title bar as an hbox to a given
width and center the text with \hfil within the box. Getting
different color text is pretty easy too. Haven't figured out the blue
background yet. Here is what I have thus far:

\pdfoutput 1
\input pdfcolor.tex
%the above would be different for LaTeX

\hbox to 1in{\Blue \hfil Short text\hfil}
\vskip 10pt

\hbox to 1in{\Blue \hfil Longer  text\hfil}

Of course this gives blue text on a white background. You want the
reverse. But at least I have provided a fixed length
bar with variable text inside of it. Someone else can figure out
the backgrojnd color scheme. I can do it in Context but not in LaTeX, 
which I seldom use.

A nice tool for newsletters etc. is Scribus. You can use one of
the newsletter tamplates and flow in the articles. 

John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 

More information about the texhax mailing list