On 2014-08-07, 12:58, Wolfgang Schuster wrote:

> The position of the \hyphenatedurlseparator symbol depends currently
> on the breakpoint in the url, when the break is allowed after a
> character at the end of line but when the break is allowed before a
> character the symbol appears at the begin of the line.
> The question is now if this is intended or can it be changed.

I can hardly imagine this to be intended.  The reader should be
informed about a break as soon as he reaches the break, so he knows the
word/token is not finished yet.  As we read from top to bottom, the
end of the top line is where this information should be.


> Another thing where we can discuss is the way to set the separator,
> e.g. \sethypehantedurlseparator{…} seems more appropriate than
> \def\hyphenatedurlseparator{…} because we already have other \setXXX
> commands.

Agreed.

> > The second URL has a linebreak in front of the colon, which I do
> > not want.
> 
> The points where contexts is allowed to break a url at :/# etc. are
> predefined in the Lua code.
> 
> When you want to change this you have to use the three commands
> 
>   - \sethyphenatedurlbefore{…}
>   - \sethyphenatedurlafter{…}
>   - \sethyphenatedurlnormal{…}

Could you please change my minimal example (attached at the
end) accordingly? I want an URL like "http://optimist"; to be wrapped
after "://" only, not in front of the colon.  I couldn't find out how to
achieve this.  I also want no linebreak to occur between two slahes
(if this is possible with the current implementation).  By the way, I
also don't understand the meaning of \sethyphenatedurlnormal {...}.

Kind regards,
Joshua


\setuplayout[width=5cm]
\sethyphenatedurlafter {/}
\sethyphenatedurlbefore {}
\sethyphenatedurlnormal {}
\starttext

Word Word Word \hyphenatedurl {http://optimist.optimist}

Word Word Word W \hyphenatedurl {http://optimist.optimist}

Word Word Word Wo \hyphenatedurl {http://optimist.optimist}

(Only the first of these three linebreaks is desired.)

\stoptext


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to