How can I highlight/shade text ?

Stuart Rogers srogers at phoenix-geophysics.com
Wed Dec 31 07:18:48 PST 2008


Avraham Makeler wrote:
> Hi all,
> 
> How can I highlight/shade text ?
> 
> - on a charchater basis
> - on a paragraph basis
> 

No easy automatic way.  You can use a borderless 1-celled table with 
shading; or you can insert a filled anchored frame with a text frame 
inside it; or you can draw a filled rectangle object, position it over 
the text and Send to Back (useful only after all other edits have been 
performed).

For headings, you can put filled frames on a reference page to use as 
Frame Below in a special-purpose, otherwise-empty pgf with negative line 
spacing; follow that with the content paragraph.  Here's full 
instructions by Tim Murray of TechKnowledgeCorp.com:

--------
Here’s a technique that uses a paragraph with a “frame below” and 
another that’s “forced” over the background.  Note that as you play with 
the values, you’ll have to do Ctrl+l (lowercase L) quite a few times to 
refresh the screen.

This example uses two tags: Bar and Reversed.

The Bar tag establishes the background bar. It is set up as 0 below; –4 
line spacing, fixed; Frame Below = FilledBar, found on the Reference 
page. In this example, it is drawn 20 points high.

The Reversed tag is the reversed text. Here, it is 14-point type; 12 
points first and left indent; 17 above; 0 below; 14 line spacing, fixed. 
The space-below value is needed if the paragraph that follows the 
Reversed tag does not use any space above, since it (the following 
paragraph, that is) would end up bumping into the bottom of the 
FilledBar frame.

Tag = Bar
    Tag = Reversed

This technique works if the Heading1 text is only one line. If your 
paragraph is two lines, you must make a fatter FilledBar and attach that 
to the Bar paragraph tag. For your bar to look the same relative to the 
single line, you would need to:
Make the bar 14 points fatter (the same value as the Reversed line spacing)
Subtract 14 points from the Bar tag’s line spacing (–4 – 14 = –18, in 
this example)
---------


Tim's method can be modified by setting the Bar tag Font to 2 pt with 
negative 12 Space Below, and the Reversed tag to negative 12 Space 
Above, non-Fixed Lined Spacing.  Play around with these settings to see 
what effects you can achieve.

HTH,

-- 
Stuart Rogers
Technical Communicator
Phoenix Geophysics Limited
Toronto, ON, Canada
+1 (416) 491-7340 x 325

srogers phoenix-geophysics com

"A man's screech should exceed his rasp, or what's a violin for?"

--another Rogers Original



More information about the framers mailing list