Re: URL question [RESOLVED]

2023-02-15 Thread Pavel Sanda
On Wed, Feb 08, 2023 at 05:34:53PM +0100, Herbert Voss wrote:
> For URLs you also can use
> 
> \usepackage{xurl}
> 
> in the preamble, then the URL can be broken at every charcter.

I added this note to User Guide. Pavel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question

2023-02-09 Thread Dr Eberhard Lisse

That is a  LaTeX issue

I have this in my preamble(s)

\Urlmuskip=0mu plus 1mu
\usepackage{xurl}

el

On 2023-02-08 17:55 , Rich Shepard wrote:

I thought that after inserting a URL (either from the Insert menu or as ERT)
compiling with pdflatex would automatically break the string to fit the text
area. This one doesn't fit the line.

A MWE is attached.

Rich



--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question

2023-02-08 Thread Udicoudco
On Wed, Feb 8, 2023 at 5:55 PM Rich Shepard 
wrote:

> I thought that after inserting a URL (either from the Insert menu or as
> ERT)
> compiling with pdflatex would automatically break the string to fit the
> text
> area. This one doesn't fit the line.
>
> A MWE is attached.
>
> Rich--
>

I would suggest loading the xurl package (using \sloppy can change other
layouts in the documents...).
The xurl package  allows line breaks in URLs at alphanumeric characters and
= / . : * - ~ ' ".

> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question [RESOLVED]

2023-02-08 Thread Rich Shepard

On Wed, 8 Feb 2023, Herbert Voss wrote:


_Never_ use it in the pramble! It gives a lousy typesetting.


Herbert,

I read that in my StackExchange thread.


For URLs you also can use
\usepackage{xurl}
in the preamble, then the URL can be broken at every charcter.


Thanks very much for the pointer. I'll remember to include it in all
documents with URLs.

Regards,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question

2023-02-08 Thread sovhist via lyx-users
Hi.

Just add to preamble
\sloppy

Best regards,
Valdemaras

On vas 8 2023, at 5:55 pm, Rich Shepard  wrote:

> I thought that after inserting a URL (either from the Insert menu or
> as ERT)
> compiling with pdflatex would automatically break the string to fit
> the text
> area. This one doesn't fit the line.
> 
> A MWE is attached.
> 
> Rich-- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
> 
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question [RESOLVED]

2023-02-08 Thread Herbert Voss




Am 08.02.23 um 17:29 schrieb Rich Shepard:

On Wed, 8 Feb 2023, sovhist wrote:


Just add to preamble
\sloppy


_Never_ use it in the pramble! It gives a lousy typesetting.





Thanks for the pointer. The solution I found (on a StackExchange 
thread) is

to enclose that one paragraph in between \begin{sloppypar} ...
\end{sloppypar}. Result attached.



For URLs you also can use

\usepackage{xurl}

in the preamble, then the URL can be broken at every charcter.

Herbert
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question [RESOLVED]

2023-02-08 Thread Rich Shepard

On Wed, 8 Feb 2023, sovhist wrote:


Just add to preamble
\sloppy


Valdemaras,

Thanks for the pointer. The solution I found (on a StackExchange thread) is
to enclose that one paragraph in between \begin{sloppypar} ...
\end{sloppypar}. Result attached.

Regards,

Rich


mwe.pdf
Description: Adobe PDF document
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


URL question

2023-02-08 Thread Rich Shepard

I thought that after inserting a URL (either from the Insert menu or as ERT)
compiling with pdflatex would automatically break the string to fit the text
area. This one doesn't fit the line.

A MWE is attached.

Rich#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrartcl
\begin_preamble
%% Load an *.lco style file (see KOMA documentation)
%\LoadLetterOption{Rich}%

\date{}
\usepackage{scrlayer-scrpage,url}
\pagestyle{scrheadings}
\end_preamble
\use_default_options false
\maintain_unincluded_children false
\language american
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "palatino" "\font_sans"
\font_sans "default" "default"
\font_typewriter "default" "\font_math"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize custom
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 0
\use_package mathdots 0
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\paperwidth 6in
\paperheight 9in
\leftmargin 2cm
\topmargin 4cm
\bottommargin 2cm
\headsep 1.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Standard
The specifics of the antidegradation review protocol are in the Antidegradation
 Policy Implementation Internal Management Directive for NPDES Permits and
 Section 401 Water Quality Certifications 
\begin_inset Flex URL
status open

\begin_layout Plain Layout


\end_layout

\end_inset

 in March 2001.
 The antidegradation internal management directive provides step-by-step
 directions to guide staff through the antidegradation review process.
 The goal of the review is to determine if the proposed activity would likely
 result in any measurable change in water quality away from conditions unimpacte
d by anthropogenic sources (outside the mixing zone, if existing).
\end_layout

\begin_layout Standard

\end_layout

\end_body
\end_document
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question (also links, xref)

2006-10-19 Thread Jean-Pierre Chretien

>>To: Timothy Reaves <[EMAIL PROTECTED]>
>>Cc: lyx-users@lists.lyx.org
>>Subject: Re: URL question (also links, xref)
>>From: Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
>>Date: Thu, 19 Oct 2006 15:53:02 +0200

>>
>>The real reason why it is not done yet is that there can be many cases
>>of incompatibility between hyperref and other packages, where
>>everything breaks down when someone uses the packages in the wrong
>>order. This is a can of worm we have been reluctant to open. Also, if
>>LyX loads hyperref automatically, it may be in conflict with other
>>packages that use it with different options (am I right?).

Semms that it works like babel: no clash if hyperref is called without options.
(for hyperref users, like beamer addicts, the \hypersetup command allows to 
redefine
hyperref package option without clash).

Il seems that the problem is with documents which clash when 
\usepackage{hyperref} is added
to a working stuff (e.g., to get hypertexted pdf).

>>
>>But I agree that something needs to be done.

What about loading hyperref only if the Name field is filled up, or if
the checkbox is checked ?
Or upon a global setting of the behaviour of the URL inset (see bug 2268).

If a clash happens, the user has just to revert to the \url export.

-- 
Jean-Pierre



Re: URL question (also links, xref)

2006-10-19 Thread Jean-Marc Lasgouttes
> "Timothy" == Timothy Reaves <[EMAIL PROTECTED]> writes:

Timothy>Paul, you summed up my thoughts exactly; I can't think
Timothy> of where I'd prefer the URL.sty over hyperref. I'm not sure
Timothy> why anyone else would prefer URL. And I must say, I do like
Timothy> LyX very much. It's a bit ugly to see the ERT stuff directly
Timothy> in the document, when LyX otherwise does such a nice job.

The real reason why it is not done yet is that there can be many cases
of incompatibility between hyperref and other packages, where
everything breaks down when someone uses the packages in the wrong
order. This is a can of worm we have been reluctant to open. Also, if
LyX loads hyperref automatically, it may be in conflict with other
packages that use it with different options (am I right?).

But I agree that something needs to be done.

JMarc


Re: URL question (also links, xref)

2006-10-19 Thread Jean-Pierre Chretien

>>To: lyx-users@lists.lyx.org
>>From: Timothy Reaves <[EMAIL PROTECTED]>
>>Subject: Re: URL question (also links, xref)
>>Date: Wed, 18 Oct 2006 16:46:00 -0400
>>
>>Paul A. Rubin wrote:
>>> Paul A. Rubin wrote:
>>> 
>>>>
>>>> So if there are people who really prefer hyperref to url, I'd suggest 
>>>> entering an enhancement request in bugzilla to get menu support for it.
>>>>
>>> 
>>> So, of course, as soon as I post this I find a message saying that 
>>> Jean-Pierre *has* filed an enhancement request.
>>> 
>>> Once again trailing the pack,
>>> /Paul
>>> 
>>> 
>>
>>  Paul, you summed up my thoughts exactly; I can't think of where I'd 
>>prefer the URL.sty over hyperref.  I'm not sure why anyone else would 
>>prefer URL.  And I must say, I do like LyX very much.  It's a bit ugly 
>>to see the ERT stuff directly in the document, when LyX otherwise does 
>>such a nice job.
>>
>>  Glad to see someone has filed the request.
>>
I was myself trailing the pack, Uwe filed bug 2268
http://bugzilla.lyx.org/show_bug.cgi?id=2268
ten months ago.

Feel free to comment.

-- 
Jean-Pierre




Re: URL question (also links, xref)

2006-10-18 Thread Paul A. Rubin

Timothy Reaves wrote:



Paul, you summed up my thoughts exactly; I can't think of where I'd 
prefer the URL.sty over hyperref.  I'm not sure why anyone else would 
prefer URL.  And I must say, I do like LyX very much.  It's a bit ugly 
to see the ERT stuff directly in the document, when LyX otherwise does 
such a nice job.


There is one place where url.sty might outshine hyperref, at least for 
some people.  If you poke into the arcana of url.sty, I believe that you 
can exert a fair amount of influence over where a long URL gets broken. 
 I'm not sure how hyperref makes that decision, but I couldn't find any 
relevant hyperref parameters other than the on/off switch for 
line-breaking.  I know that some people are (justifiably) finicky about 
breaking URLs at "natural" break points (for instance, at a path 
separator) rather than willy-nilly.


That said, the current support for url.sty in LyX doesn't facilitate 
changing the line-breaking parameters anyway (meaning you'll need to use 
ERT, and you'll need a deeper understanding of the package than just 
"the text goes here, the URL goes there"), so I still think "the greater 
good for the greater number" is to support hyperref and relegate url.sty 
to ERT.


Plus supporting hyperref would give some lucky developer a chance to 
write a configuration dialog with several thousand options.  :-)


/Paul



Re: URL question (also links, xref)

2006-10-18 Thread Timothy Reaves

Paul A. Rubin wrote:

Paul A. Rubin wrote:



So if there are people who really prefer hyperref to url, I'd suggest 
entering an enhancement request in bugzilla to get menu support for it.




So, of course, as soon as I post this I find a message saying that 
Jean-Pierre *has* filed an enhancement request.


Once again trailing the pack,
/Paul




	Paul, you summed up my thoughts exactly; I can't think of where I'd 
prefer the URL.sty over hyperref.  I'm not sure why anyone else would 
prefer URL.  And I must say, I do like LyX very much.  It's a bit ugly 
to see the ERT stuff directly in the document, when LyX otherwise does 
such a nice job.


Glad to see someone has filed the request.



Re: URL question (also links, xref)

2006-10-18 Thread Jean-Pierre Chretien

>>To: lyx-users@lists.lyx.org
>>From: "Paul A. Rubin" <[EMAIL PROTECTED]>
>>Subject: Re: URL question (also links, xref)
>>Date: Wed, 18 Oct 2006 12:52:05 -0400
>>
>>Paul A. Rubin wrote:
>>
>>> 
>>> So if there are people who really prefer hyperref to url, I'd suggest 
>>> entering an enhancement request in bugzilla to get menu support for it.
>>> 
>>
>>So, of course, as soon as I post this I find a message saying that 
>>Jean-Pierre *has* filed an enhancement request.
>>
>>Once again trailing the pack,

Sorry, this anchor problem has been there for too long. When I saw it come out 
again,
I couldn't resist :-)

But you're right, beamer users just don't need it (and I must confess that I 
still
use xemacs to edit beamer tex files). But if I used LyX, I guess I would 
appreciate
to avoid ERT.

-- 
Jean-Pierre



Re: URL question (also links, xref)

2006-10-18 Thread Paul A. Rubin

Paul A. Rubin wrote:



So if there are people who really prefer hyperref to url, I'd suggest 
entering an enhancement request in bugzilla to get menu support for it.




So, of course, as soon as I post this I find a message saying that 
Jean-Pierre *has* filed an enhancement request.


Once again trailing the pack,
/Paul



Re: URL question (also links, xref)

2006-10-18 Thread Paul A. Rubin

Richard Heck wrote:


So am I not understanding something?
Perhaps. The url.sty package isn't intended for the sort of use for 
which you are trying to use it. Its purpose is to allow you to use URLs 
in a document without running into line-break problems, the issue being 
that URLs can be (i) long and (ii) spaceless. Indeed, the documentation 
describes the \url command as simply a special form of \verb. So, all of 
that said, hyperref is indeed what you need here and, at present, LyX 
has no special support for it.


I'm the wrong person to express an opinion on this; about the only time 
I use links is inside Beamer presentations, and since Beamer loads 
hyperref automatically (I think), I always use hyperref and never use 
url.  That said, I'm inclined to believe that support for hyperref would 
be more useful than support for url.  The hyperref package has an option 
'breaklinks' (which I confess I've never used) that would seem to allow 
links to split across lines.  It's not as flexible as what url can do, 
but maybe it's good enough?


So if there are people who really prefer hyperref to url, I'd suggest 
entering an enhancement request in bugzilla to get menu support for it.


/Paul



Re: URL question (also links, xref)

2006-10-18 Thread Jean-Pierre Chretien

>>Date: Wed, 18 Oct 2006 11:54:00 -0400
>>From: Richard Heck <[EMAIL PROTECTED]>
>>To: Timothy Reaves <[EMAIL PROTECTED]>
>>CC: lyx-users@lists.lyx.org
>>Subject: Re: URL question (also links, xref)
>>
>>Timothy Reaves wrote:
>>> Paul A. Rubin wrote:
>>>> Timothy Reaves wrote:
>>>>> If I insert an URL, and make the URL mailto:[EMAIL PROTECTED] and 
>>>>> make 
>>>>> the name My Name, when I generate a PDF, the URL is displayed too.  
>>>>> Can I set it up to only display the Name field?
>>>> [deleted Paul's solution]
>>> Yes, that is what I had done as well.  But this makes me think that 
>>> the URL as supported by LyX is useless.  Not just because of the 
>>> e-mail, but cross references as well.
>>>
>>> I want to have arbitrary links in my document.  So for example, I 
>>> might have somewhere in my document 'see the section on blah', and 
>>> blah would be linked to that section.  When I use  Label & Reference, 
>>> it kinda works, but inserts a number at the reference.  I want the 
>>> text to be the link.  I can do this using the hyperref module.
>>>
>>> So am I not understanding something?
>>Perhaps. The url.sty package isn't intended for the sort of use for 
>>which you are trying to use it. Its purpose is to allow you to use URLs 
>>in a document without running into line-break problems, the issue being 
>>that URLs can be (i) long and (ii) spaceless. Indeed, the documentation 
>>describes the \url command as simply a special form of \verb. So, all of 
>>that said, hyperref is indeed what you need here and, at present, LyX 
>>has no special support for it.

I've posted an enhancement request, see
http://bugzilla.lyx.org/show_bug.cgi?id=2919
about external hyperlinks, I did not comment about internal targets, which 
should work.

I've suggested to use the Generate hyperlink button, which is local to the link,
but maybe I should have mentioned the possibility of a general setting: as the 
printed version
requires the url to be there, users would like to have it all with url printed, 
or
all with anchors.

Personnaly, I use html2latex, which allows to have the url in footnote when 
printed and under
an anchor in HTML, but I guess this can't really be interfaced in LyX. 

As for turning typographical croos-referencing automatically into internal 
target referencing,
currenly nothing exists to describe the anchor (unless prettyref does it ? 
never used it myself).

-- 
Jean-Pierre



Re: URL question (also links, xref)

2006-10-18 Thread Richard Heck

Timothy Reaves wrote:

Paul A. Rubin wrote:

Timothy Reaves wrote:
If I insert an URL, and make the URL mailto:[EMAIL PROTECTED] and make 
the name My Name, when I generate a PDF, the URL is displayed too.  
Can I set it up to only display the Name field?

[deleted Paul's solution]
Yes, that is what I had done as well.  But this makes me think that 
the URL as supported by LyX is useless.  Not just because of the 
e-mail, but cross references as well.


I want to have arbitrary links in my document.  So for example, I 
might have somewhere in my document 'see the section on blah', and 
blah would be linked to that section.  When I use  Label & Reference, 
it kinda works, but inserts a number at the reference.  I want the 
text to be the link.  I can do this using the hyperref module.


So am I not understanding something?
Perhaps. The url.sty package isn't intended for the sort of use for 
which you are trying to use it. Its purpose is to allow you to use URLs 
in a document without running into line-break problems, the issue being 
that URLs can be (i) long and (ii) spaceless. Indeed, the documentation 
describes the \url command as simply a special form of \verb. So, all of 
that said, hyperref is indeed what you need here and, at present, LyX 
has no special support for it.


Richard



Re: URL question (also links, xref)

2006-10-18 Thread Timothy Reaves

Paul A. Rubin wrote:

Timothy Reaves wrote:
If I insert an URL, and make the URL mailto:[EMAIL PROTECTED] and make 
the name My Name, when I generate a PDF, the URL is displayed too.  
Can I set it up to only display the Name field?





Insert->URL... uses the url.sty package, with which I'm not familiar. 
The way I do it is as follows:


1.  In the preamble, add \usepackage{hyperref} (and, of course, install 
the hyperref package if you don't already have it).


2.  In the document, type \href{mailto:[EMAIL PROTECTED] Name} either with 
everything in ERT or with everything except My Name in ERT (so two ERT 
insets, the first one ending with an opening brace and the second 
containing just a closing brace).  I prefer the latter, since it leaves 
My Name accessible for easy editing, spell checking etc., but either 
approach should work.


/Paul




	Yes, that is what I had done as well.  But this makes me think that the 
URL as supported by LyX is useless.  Not just because of the e-mail, but 
cross references as well.


	I want to have arbitrary links in my document.  So for example, I might 
have somewhere in my document 'see the section on blah', and blah would 
be linked to that section.  When I use  Label & Reference, it kinda 
works, but inserts a number at the reference.  I want the text to be the 
link.  I can do this using the hyperref module.


So am I not understanding something?



Re: URL question

2006-10-17 Thread Paul A. Rubin

Timothy Reaves wrote:
If I insert an URL, and make the URL mailto:[EMAIL PROTECTED] and make the 
name My Name, when I generate a PDF, the URL is displayed too.  Can I 
set it up to only display the Name field?





Insert->URL... uses the url.sty package, with which I'm not familiar. 
The way I do it is as follows:


1.  In the preamble, add \usepackage{hyperref} (and, of course, install 
the hyperref package if you don't already have it).


2.  In the document, type \href{mailto:[EMAIL PROTECTED] Name} either with 
everything in ERT or with everything except My Name in ERT (so two ERT 
insets, the first one ending with an opening brace and the second 
containing just a closing brace).  I prefer the latter, since it leaves 
My Name accessible for easy editing, spell checking etc., but either 
approach should work.


/Paul



URL question

2006-10-17 Thread Timothy Reaves
	If I insert an URL, and make the URL mailto:[EMAIL PROTECTED] and make the 
name My Name, when I generate a PDF, the URL is displayed too.  Can I 
set it up to only display the Name field?