From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14351 Path: main.gmane.org!not-for-mail From: Tobias Burnus Newsgroups: gmane.comp.tex.context Subject: \hyphenatedurl problem Date: Sun, 21 Dec 2003 23:35:03 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <20031221223503.GA16055@physik.fu-berlin.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" X-Trace: sea.gmane.org 1072046643 11733 80.91.224.253 (21 Dec 2003 22:44:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Dec 2003 22:44:03 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Dec 21 23:43:55 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AYCIk-0008VC-00 for ; Sun, 21 Dec 2003 23:43:54 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 89BDB10B1C; Sun, 21 Dec 2003 23:43:50 +0100 (MET) Original-Received: from down.physik.fu-berlin.de (down.physik.fu-berlin.de [160.45.34.6]) by ref.ntg.nl (Postfix) with ESMTP id 2118C10AFC for ; Sun, 21 Dec 2003 23:35:08 +0100 (MET) Original-Received: from g31.physik.fu-berlin.de (g31.physik.fu-berlin.de [160.45.34.131]) by down.physik.fu-berlin.de (8.11.1/8.9.1) with ESMTP id hBLMZ1R1399534; Sun, 21 Dec 2003 23:35:06 +0100 (CET) X-Envelope-From: tburnus@physik.fu-berlin.de X-ZEDV-BeenThere: nukleon Original-Received: from tburnus by g31.physik.fu-berlin.de with local (Exim 3.35 #1 (Debian)) id 1AYCAB-0004Fh-00; Sun, 21 Dec 2003 23:35:03 +0100 Original-To: ntg-context@ntg.nl Content-Disposition: inline User-Agent: Mutt/1.3.28i Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14351 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14351 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I'm sure I miss something obvious but I have no clue what it is. I have: \def\gotoDOI#1{\hyphenatedurl#1} \gotoDOI{10.1016/S0009-2614(01)01361-6} \hyphenatedurl{10.1016/S0009-2614(01)01361-6} and I redefined supp-lan.tex's \scanurl to hyphenate at '(' and ')'. The strange thing is: Using gotoDOI the linebreak comes after the last '-' ('...01361-' // '6') while using hyphenatedurl it's '...(01)' // '01361-6' (the latter is desired). See attached test case. The real definition of gotoDOI will be: \def\gotoDOI#1{\useURL[doi][#1]\useURL[doiurl][http://dx.doi.org/#1]% \goto{\url[doi]}[url(doiurl)]} MERRY CHRISTMAS (or happy holidays) AND A HAPPY NEW YEAR! Tobias PS: Hans, can you include ( and ) as places where a hyphenation may happen? --OgqxwSJOaUobr8KG Content-Type: application/x-tex Content-Disposition: attachment; filename="test.tex" Content-Transfer-Encoding: quoted-printable \def\scanurl#1%=0A {\ifx#1\~%=0A \flushurl\splitbefore\~%=0A \else\i= fx#1(% NEW=0A \flushurl\splitbefore(% NEW=0A \else\ifx#1)% NEW=0A = \flushurl\splitafter)% NEW=0A \else\ifx#1\&%=0A \flushurl\splitbefor= e\&%=0A \else\ifx#1\%%=0A \flushurl\splitbefore\%%=0A \else\ifx#1\_= %=0A \flushurl\splitbefore\_%=0A \else\if\noexpand#1\relax=0A #1%= =0A \else\ifnum\catcode`#1=3D8=0A \flushurl\splitbefore\_%=0A \else= \ifnum\catcode`#1=3D6=0A \flushurl\splitbefore\#%=0A \else\ifnum\catc= ode`#1=3D4=0A \flushurl\splitbefore\&%=0A \else\if#1\lettertilde=0A = \flushurl\splitbefore\~%=0A \else\if#1\letterpercent=0A \flushurl\= splitbefore\%%=0A \else\if#1\letterunderscore=0A \flushurl\splitbefor= e\_%=0A \else\if#1\letterquestionmark=0A \flushurl\splitafter\letterq= uestionmark=0A \else\if#1\letterat=0A \flushurl\splitafter\letterat= =0A \else\if#1\letterslash=0A \edef\savedurl{\savedurl\letterslash}%= =0A \else\if#1+%=0A \flushurl\splitafter+%=0A \else\if#1:%=0A \= flushurl\splitafter:%=0A \else\if#1.%=0A \flushurl\splitafter.%=0A = \else=0A \ifx\savedurl\empty\else=0A \splitbefore\savedurl=0A = \let\savedurl\empty=0A \fi=0A #1%=0A \fi\fi\fi\fi\fi\fi\fi\fi\= fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}=0A=0A=0A\def\gotoDOI#1{\hyphenatedurl#1}= =0A=0A=0Aa b c d e f g h i k l m n o p q r s t u v w x y z=0Aa b c d e f g = h i k l m n o p q r s t u v w x y z=0Aa b c d e f g h i k l m n o p q r s t= u v w x y z=0Aa b c d e f g h i k l m n o p q r s t u v w x y z=0Aa b c d = e f g h i k l m n o p q r s t u v w x y z=0Aa b c d e f g h i k l m n o p q= r s t u v w x y z=0A=0A\hskip11cm=0A\gotoDOI{10.1016/S0009-2614(01)01361-6= }=0A=0A\hskip11cm=0A\hyphenatedurl{10.1016/S0009-2614(01)01361-6}=0A\bye=0A --OgqxwSJOaUobr8KG--