[NTG-context] inline textbackgrounds across linebreaks

Hans Hagen j.hagen at xs4all.nl
Tue Jan 15 15:22:56 CET 2019


On 1/15/2019 2:36 PM, Taco Hoekwater wrote:
> Hi,
> 
> Quick explanation: I am trying to implement the concept of the HTML <u> tag,
> which is supposed to be like a font switch, but doing underlining. I have a
> bunch of french clients, and this is a requirement I cannot get around. French
> officials _love_ underlining and uppercasing :(
> 
> Because of its flexibility, I try to use text backgrounds, but that seems to
> only work when the text does not break across lines: when on one line, the
> background starts and stops at the right spot, great! But if there is a line
> break, then it underlines complete lines, even for the first and last line.
> 
> Is there any way to have underlining + line breaks behave correctly?
> (perhaps not using text backgrounds at all?)
> 
> My current code is attached.
works her ebut better is probably:

\definebar[tacobar] [method=1,dy=-0.4,offset=-0.3,continue=yes]

\starttext

Here is the start of the paragraph
{\tacobar hello! (this looks fine)}
and some extra text running on to the next line

\blank

Here is the start of the paragraph
{\tacobar \input ward }
and some extra text running on to the next line

\stoptext



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list