Thomas Schneider schneidt at mail.nih.gov
Sun Aug 29 08:57:14 CEST 2021

Dear TeXers and Vilar Camara Neto:

I am using:

% latex --version
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021)
which has:
breakurl version 1.40 (2013/04/10)

into the source code for breakurl

https://ctan.org/pkg/breakurl?lang=en

and found that the file breakurl.dtx is the actual source code.  It
has this line:

\DeclareRobustCommand{\burl}{\url}

and later

% Now the synonyms |\url| and |\urlalt| are (re)defined, unless the
% |preserveurlmacro| option is given.
%
%    \begin{macrocode}
\if at preserveurlmacro\else\let\url\burl\let\urlalt\burlalt\fi
%    \end{macrocode}

The command \url is actually a synonym of \burl, which may be most of
that this has to be accounted for properly.

I'm calling \url this way:

HOWEVER the first argument can be anything one wants; the actual URL
used for the link is the second argument.  I use this double form in
over 3000 bibtex references inside 'note = '.  This way most of the
time the link shows the actual url in my references and I can fix it
if there are problems (like blanks or underscores).  Putting '\\' into
the first argument does break the lines but I would have to adjust
each one and the bibtex entry would fail for different documents
since, for example, some documents have twocolumn which requires more
breaks than one column documents.  So it needs to be an automatic wrap
method.

A solution would be to have breakurl add breaks to the first argument
breakurl.dtx.  Here are the diffs between the original and the
modified breakurl.dtx:

408a409,410
705a708,709

URL appears twice because of the method I'm using.  A solution would
but with thousands of references I have to do it carefully.

In the meantime I suggest that breakurl be modified to break the first
argument and only use the second argument for the link.

Exmple code is in the zip file attached.

Tom

Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland  21702-1201
schneidt at mail.nih.gov
https://alum.mit.edu/www/toms
-------------- next part --------------
A non-text attachment was scrubbed...
Name: breakurldemo.zip
Type: application/x-zip-compressed
Size: 29719 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20210829/bfa42490/attachment-0001.bin>