ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \underbar not allowing line-breaking
@ 2003-07-29 18:09 Duncan Hothersall
  2003-07-31 14:03 ` Duncan Hothersall
  0 siblings, 1 reply; 5+ messages in thread
From: Duncan Hothersall @ 2003-07-29 18:09 UTC (permalink / raw)


A quick question: \underbar is demonstrated in the manual as allowing lines
to break normally (page 204). In my texts line breaks won't happen in an
underlined phrase, meaning that they stick out into the right hand margin.
Is this a known problem, or does it work for other people?

Thanks

Duncan
dh@capdm.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: \underbar not allowing line-breaking
  2003-07-29 18:09 \underbar not allowing line-breaking Duncan Hothersall
@ 2003-07-31 14:03 ` Duncan Hothersall
  2003-08-05 20:36   ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Duncan Hothersall @ 2003-07-31 14:03 UTC (permalink / raw)


In answer to my own question, and possibly as a bug report: line breaking
within \underbar{...} is broken when used in conjunction with

\setupalign[{right,nothyphenated}]

Duncan

> -----Original Message-----
> From: ntg-context-admin@ntg.nl [mailto:ntg-context-admin@ntg.nl]On
> Behalf Of Duncan Hothersall
> Sent: 29 July 2003 19:10
> To: ConTeXt Mailing List
> Subject: [NTG-context] \underbar not allowing line-breaking
>
>
> A quick question: \underbar is demonstrated in the manual as
> allowing lines
> to break normally (page 204). In my texts line breaks won't happen in an
> underlined phrase, meaning that they stick out into the right hand margin.
> Is this a known problem, or does it work for other people?
>
> Thanks
>
> Duncan
> dh@capdm.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: \underbar not allowing line-breaking
  2003-07-31 14:03 ` Duncan Hothersall
@ 2003-08-05 20:36   ` Hans Hagen
  2003-08-13  9:51     ` Duncan Hothersall
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2003-08-05 20:36 UTC (permalink / raw)


At 15:03 31/07/2003 +0100, you wrote:
>In answer to my own question, and possibly as a bug report: line breaking
>within \underbar{...} is broken when used in conjunction with

it is not possible to do that with normal rules since they get attached 
under the word; you may give \underbars [plural] a try)

or the more obscure:

% output=pdftex

\starttext

\definetextbackground
   [underbared]
   [alternative=1,location=text,
    background=,frame=]

\def\underbared
   {\groupedcommand
      {\starttextbackground[underbared]}
      {\stoptextbackground}}


\underbared{\input tufte\relax}

\stoptext

typical an example for a MyWay document -)
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: \underbar not allowing line-breaking
  2003-08-05 20:36   ` Hans Hagen
@ 2003-08-13  9:51     ` Duncan Hothersall
  2003-08-21 22:07       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Duncan Hothersall @ 2003-08-13  9:51 UTC (permalink / raw)


Hans wrote:

> % output=pdftex
>
> \starttext
>
> \definetextbackground
>    [underbared]
>    [alternative=1,location=text,
>     background=,frame=]
>
> \def\underbared
>    {\groupedcommand
>       {\starttextbackground[underbared]}
>       {\stoptextbackground}}
>
>
> \underbared{\input tufte\relax}
>
> \stoptext
>
> typical an example for a MyWay document -)

Thanks! I've been looking through core-pos to try to understand how I can
change the look of this. I can set the colour of the line with framecolor,
but I can't seem to adjust the offset. The default appears to be overlay,
but this looks ugly as an underline, as it obscures the baseline of the
text. I have tried offset=, frameoffset= and backgroundoffset=, but no
change occurs.

Then I also tried getting rid of the alternative=1 (what does this do?) and
putting frame=off,bottomframe=on, but this produced no output at all.

Is there a way to do it?

Also, when a line break occurs the underlining stretches out to the right
further than the end of the line - is there any way to stop this happening?

Thanks

Duncan
dh@capdm.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: \underbar not allowing line-breaking
  2003-08-13  9:51     ` Duncan Hothersall
@ 2003-08-21 22:07       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2003-08-21 22:07 UTC (permalink / raw)


At 10:51 13/08/2003 +0100, you wrote:
>Hans wrote:
>
> > % output=pdftex
> >
> > \starttext
> >
> > \definetextbackground
> >    [underbared]
> >    [alternative=1,location=text,
> >     background=,frame=]
> >
> > \def\underbared
> >    {\groupedcommand
> >       {\starttextbackground[underbared]}
> >       {\stoptextbackground}}
> >
> >
> > \underbared{\input tufte\relax}
> >
> > \stoptext
> >
> > typical an example for a MyWay document -)
>
>Thanks! I've been looking through core-pos to try to understand how I can
>change the look of this. I can set the colour of the line with framecolor,
>but I can't seem to adjust the offset. The default appears to be overlay,
>but this looks ugly as an underline, as it obscures the baseline of the
>text. I have tried offset=, frameoffset= and backgroundoffset=, but no
>change occurs.
>
>Then I also tried getting rid of the alternative=1 (what does this do?) and
>putting frame=off,bottomframe=on, but this produced no output at all.
>
>Is there a way to do it?

you can redefine the metapost graphic, the main thing there is that you 
draw/fill something related to the multipar paths; it takes a bit of 
experimenting, but after a while you start seeing possibilities. See 
plus-rul.tex for an example of such a graphic.

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-21 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 18:09 \underbar not allowing line-breaking Duncan Hothersall
2003-07-31 14:03 ` Duncan Hothersall
2003-08-05 20:36   ` Hans Hagen
2003-08-13  9:51     ` Duncan Hothersall
2003-08-21 22:07       ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).