Hello, When using \definetextbackground in RTL setting, the boundaries are not determined correctly (both for location=paragraph and location=text) and colors gets messed up. Here a sort-of-minimal example adapted from details.pdf. Is there any particular keys I should use in RTL to fix the issue? \setupcolors[state=start] \definecolor[infogray][s=0.5] \definecolor[textgray][s=0.8] \definetextbackground[intro] [backgroundcolor=infogray, backgroundoffset=.25cm, offset=.5cm, frame=on,framecolor=red, location=paragraph, color=white] \definetextbackground[subintro] [backgroundcolor=textgray, backgroundoffset=0pt, offset=0pt, frame=off, location=text, color=blue] \starttext \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \blank[3*big] \righttoleft \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \stoptext Thanks, MHB
On 7/3/2016 6:46 PM, Mohammad Hossein Bateni wrote:
Hello,
When using \definetextbackground in RTL setting, the boundaries are not determined correctly (both for location=paragraph and location=text) and colors gets messed up.
Here a sort-of-minimal example adapted from details.pdf. Is there any particular keys I should use in RTL to fix the issue?
\setupcolors[state=start] \definecolor[infogray][s=0.5] \definecolor[textgray][s=0.8]
\definetextbackground[intro] [backgroundcolor=infogray, backgroundoffset=.25cm, offset=.5cm, frame=on,framecolor=red, location=paragraph, color=white]
\definetextbackground[subintro] [backgroundcolor=textgray, backgroundoffset=0pt, offset=0pt, frame=off, location=text, color=blue]
\starttext
\starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground
\blank[3*big]
\righttoleft \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \stoptext
I think i fixed it (no upload yet) but this kind of tricky things probably need some time to get sorted out. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Mohammad Hossein Bateni