On 06/03/2012 05:38 AM, Charlie wrote:

I'm certain it's been discussed here before, but I can't find a
reference to it.

The way to stop a URL as an "insert URL" from running out over the
margins into infinity. This happens in various document classes.

The first line of the Insert URL has the right idea, but the second one
doesn't stop at any margin.

I know it can be done easily without using the insert URL application,
but then the URL can't just be clicked on in the .pdf version to take
the reader to the location. Instead it needs to be copied and pasted
into a browser address bar.

I think it should be possible to show the URL in a different way, even
if it's just a link to the correct page.

Just thought I would ask if someone can point me to the location of the

There's a good discussion on the page

The solution to just add


to the preamble seems to work for me with pdfLatex, but not with
Postscript.  It lets Latex do a line break after a forward slash or
any alphabetic character.  I also added numbers and some punctuation
symbols, though a few are probably superfluous.  (Any character which
is not on the list but is in the URL seems to make the line breaks
overhang just slightly, by a character.)  The only downside seems to
be that the breaks are placed arbitrarily in the URL.

A different option would be to use \href directly in an ERT:

{\texttt{http://longURL.com/this\ab Is\ab A\ab Long\ab String\ab
Which\ab Can\ab Break\ab Between\ab Words}}

Note that this allows breaks wherever the \ab is.  It also allows
for the text of the link to be different from the URL itself, so
you could just substitute some descriptive phrase in place of the
full URL in the second argument.  (Without \texttt it will be in
the same font as the surrounding text, just like a hyperlink.)
In pdfLatex the links are clickable, but even in Postscript they
seem to print and line-break OK.  Unfortunately, the Latex
\allowbreak command cannot be entered from the Insert > Hyperlink

Reply via email to