Fwd: [GMT-HELP] pstext -M how to color background line by line

Kristof Koch <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Paul,

I toyed around a bit more and found a working solution:

The brown box has the same content as the white box plus the "10' " and a carriage return (\015) at the beginning. The carriage return is used to force a line break in case the next word is not long enough to be wrapped to the next line.

The alignment of the brown box is now +jCB, the same as the white box. I pull the brown box up behind the withe box with -D and an appropriate offset. The offset is calculated from the font size plus the clearance between text and surrounding box.

Maybe this is helpful to somebody else as well. Thank you for your initial input Paul.

All the best,
Kristof


Anfang der weitergeleiteten Nachricht:

> Von: Kristof Koch <[email protected]>
> Betreff: Wtr: [GMT-HELP] pstext -M how to color background line by line
> Datum: 1. März 2014 14:56:48 GMT+4
> An: World-Wide GMT Usage and Help Mailing List <[email protected]>
> 
> Paul,
> 
> I made your suggestion work with a little help of some fine-tuned displacement via -D. Neat trick of yours!
> 
> However: the long word (Rio_de_Janeiro in this case) could as well be several words of different length. Currently I see no way of probing for the longest word to be put into the brown box as the different letters have different widths. Therefore the word with the most letters is not necessarily the longest.
> 
> All the best,
> Kristof
> 
> Anfang der weitergeleiteten Nachricht:
> 
>> Von: Kristof Koch <[email protected]>
>> Betreff: Aw: [GMT-HELP] pstext -M how to color background line by line
>> Datum: 1. März 2014 14:41:21 GMT+4
>> An: World-Wide GMT Usage and Help Mailing List <[email protected]>
>> 
>> Paul,
>> 
>> without having it tried - wouldn't this expand the brown box up as I added a line to it? Currently I'm using -F...+jCT for the white and -F...+jCB for the brown box.
>> 
>> All the best,
>> Kristof
>> 
>> Am 01.03.2014 um 14:33 schrieb Paul Wessel <[email protected]>:
>> 
>>> Kristof-
>>> 
>>> For the brown box, could you in addition to the first line which plots the 10' add a 2nd line which matches the name of the city but uses the @;<color>@ escape sequence to plot the text in the same brown color, rendering it invisible (but still being used to set the box width correctly)?
>>> 
>>> -p
>>> 
>>> On Mar 1, 2014, at 12:27 AM, Kristof Koch <[email protected]> wrote:
>>> 
>>>> Dear list,
>>>> 
>>>> I'm struggling with the coloration of a textbox created with pstext and the -M option. My desired result is seen in the mock-up in image 3. I found no way of doing it inline in the textfile fueling the paragraph. 
>>>> 
>>>> Therefore I'm now experimenting with two separate textboxes placed around the same coordinate. One with the brownish background oriented above and one with a white background oriented below the coordinate. 
>>>> 
>>>> Example image 1 looks almost perfect except for the almost invisible little step between the two boxes. Upon some tinkering and playing with extreme cases (image 2), I found the problem in the width of the content of the white box. 
>>>> 
>>>> pstext expands the box to a fitting width, if the content is wider than the specified width in the textfile. In other circumstances this is a very cool feature to have (and is saving me lots of time and headaches). In this case it destroys my optical illusion. I'd like to have the brownish box at the same width as the white box.
>>>> 
>>>> Any ideas to obtain the desired look are welcome.
>>>> 
>>>> All the best,
>>>> Kristof
>>>> 
>>>> 
>>>> 
>>>> <1.png><2.png><3.png>
>>>> --
>>>> My PGP Public Key: http://kristofkoch.de/pgp/
>>>> 
>>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]
>>> 
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]
>> 
>> 
>> --
>> My PGP Public Key: http://kristofkoch.de/pgp/
>> 
> 
> 
> --
> My PGP Public Key: http://kristofkoch.de/pgp/
> 


--
My PGP Public Key: http://kristofkoch.de/pgp/


To unsubscribe, send the message "signoff gmt-help" to [email protected]
signature.asc (application/pgp-signature, 496 B)
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJTEdSdAAoJEJ3YS27/3eKH7YAH/0zjiPO1g+254kwv88qEqcOM
a1BfWI/DtJT4Z/V262mUkLMA04JtOMTIEGm7dLMYMpmrB5lwE38wyxcFIW2bsxoG
fdvteb4UgWpfAfWfwhcMfb9e3dIvdpWC5ghqtFtyeEFwbPywW5ppIlruY4VSNRlv
fOlPoY6gntNir22CFY0mJGcFQpoQKeVDy2/x9A2nn6nnqiprnamABzGkdcXqxfYj
/hZZOYQux4HQikB+SUmyJo3V0SNrz6PWXyj2ZlCTfES1hwTvbP1I1f3wRxWZRMeo
yS8I/dUjvRAx+ayHuJ84/UYk8u6tOP+1ikCxbBVHOilmwf8sRn2L+S5+ItrjJIA=
=txaC
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.