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?
At 23:35 21/12/2003, you wrote:
Hi,
I'm sure I miss something obvious but I have no clue what it is. I have:
\def\gotoDOI#1{\hyphenatedurl#1}
\def\gotoDOI#1{\hyphenatedurl{#1}} otherwise the first token in #1 becomes the argument to \hyphenatedurl
\gotoDOI{10.1016/S0009-2614(01)01361-6}
^ in your def it's now \hyphenatedurl -> #1 == 1 and the 0.... is just text
\hyphenatedurl{10.1016/S0009-2614(01)01361-6}
and I redefined supp-lan.tex's \scanurl to hyphenate at '(' and ')'.
\else\if#1(% \flushurl\splitbefore(% \else\if#1)% \flushurl\splitafter)% ...\fi\fi... Hans
participants (2)
-
Hans Hagen
-
Tobias Burnus