On Thu, Jun 07, 2001 at 11:09:36PM +0200, ben wrote:
> Hi,
> 
> I suppose that this request/patch is for jose. I suggest to have the
> xref support in LyX, when no name is given in the reference popup. When
> a name is provided the link element is used as usual.

  You read my mind.
  I had the same idea sometime ago when reading "DocBoook: The Definitive
Guide".

  It makes perfect sense, I will apply it.
  
> I've patch the following, and it seems to work:
> 
>  diff -u insets/insetref.C insets/insetref.C.new
> --- insets/insetref.C Tue Apr 24 19:33:01 2001
> +++ insets/insetref.C.new Thu Jun  7 22:59:09 2001
> @@ -80,8 +80,12 @@
> 
>  int InsetRef::DocBook(Buffer const *, ostream & os) const
>  {
> - os << "<link linkend=\"" << getContents()
> -    << "\">" << getOptions() << "</link>";
> + if (getOptions().empty()) {
> +  os << "<xref linkend=\"" << getContents() << "\"/>";
> + } else {
> +  os << "<link linkend=\"" << getContents()
> +     << "\">" << getOptions() << "</link>";
> + }
>   return 0;
>  }
> 
> What do you think?

  Thanks.
  
> BG

-- 
José

Reply via email to