bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@ref{} adds ( ) in HTML


From: Han-Wen Nienhuys
Subject: @ref{} adds ( ) in HTML
Date: Sun, 31 Oct 2004 00:13:36 +0200

Hi there,

is it possible to make references to other info documents that just
dump

  <a href="THE-URL">node name</a>


We want to link from the LilyPond user manual 
at 

  http://lilypond.org/doc/v2.3/Documentation/user/out-www/lilypond

to the program reference at

   
http://lilypond.org/doc/v2.3/Documentation/user/out-www/lilypond-internals/index.html


These links should be unobtrusive, and only present in the HTML
document. We do this by inserting an

  @internalsref{Foo}

into the source document. Depending on the output format, this is
expanded differently.

We used to use @uref{} for linking these pages, but unfortunately,
encoded node names (eg. when there are spaces in the node name) make
that difficult. Now we use @ref{}, but that inserts inserts (filename)
after the URL. This makes makes our sentences rather painful to read,
for example,


  
http://lilypond.org/doc/v2.3/Documentation/user/out-www/lilypond/Changing-context-properties-on-the-fly.html#Changing-context-properties-on-the-fly

says

  The context argument to \set is left out, so automatic beaming is
  switched off in the current Voice (lilypond-internals) .


where the (lilypond-internals) is superfluous.

I believe this can easily be fixed by applying the following patch to
xref.c



*** xref.c.~1.2.~       2004-07-06 00:23:25.000000000 +0200
--- xref.c      2004-10-30 23:16:22.378689857 +0200
***************
*** 271,277 ****
                    add_anchor_name (tem, 1);
                    free (tem);
                    add_word ("\">");
!                   execute_string ("%s (%s)",ref_name, *arg5 ? arg5 : 
file_arg);
                    add_word ("</a>");
                  }
                else
--- 271,277 ----
                    add_anchor_name (tem, 1);
                    free (tem);
                    add_word ("\">");
!                   execute_string ("%s",ref_name);
                    add_word ("</a>");
                  }
                else





-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]