[Top][All Lists]

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

Re: [help-texinfo] Visible HTML anchors for options?

From: Gavin Smith
Subject: Re: [help-texinfo] Visible HTML anchors for options?
Date: Sat, 16 Feb 2019 14:45:12 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Feb 15, 2019 at 06:08:30PM -0500, David Malcolm wrote:
> From an end-user perspective, I want the title of the option to be
> visibly linkified in the browser, so that the user can right-click on
> an option in the HTML docs and select "Copy Link Location" (and e.g.
> paste it into IRC, bugreports, etc).
> I think what I want is an <a> with an href on the title associated
> with the item (here the <dt>), expressing a clickable link.  I hacked
> up the attachment you sent, and something like this works:
> <dd>
> <span id="index-flive_002dpatching"></span>
> </dd>
> <dt><a 
> href="#index-flive_002dpatching">-flive-patching=<var>level</var></a></dt>
> <dd>
> <p>Control GCC&rsquo;s optimizations to provide a safe compilation for live-
> patching.
> </p>
> </dd>
> ...where the destination of the href anchor is the adjacent id span.  
> With that, the title is visibly linkified in the browser in the way I'm
> looking for.

I think it would be confusing to have a load of links that don't go 

> Though it'd be much nicer if the URL were:
>   SOME_PAGE.html#-flive-patching
> or:
>   SOME_PAGE.html#option-flive-patching
> rather than
>   SOME_PAGE.html#index-flive_002dpatching
> (URLs are part of the UI).

You can use an anchor of your choice with e.g. @anchor{option flive 

> For reference, sphinx (which I'm using for libgccjit, a component of
> gcc) emits something like this:
> <dt id="gcc_jit_context_acquire">
> <a class="reference internal" href="#gcc_jit_context"
> title="gcc_jit_context">gcc_jit_context</a> *<tt
> class="descname">gcc_jit_context_acquire</tt><big>(</big>void<big>)</bi
> g><a class="headerlink" href="#gcc_jit_context_acquire"
> title="Permalink to this definition">ΒΆ</a></dt>
> <dd><p>This function a
> for e.g. 
> with some CSS magic (I think) to make the pilcrow mark appear when
> hovering over the item of interest.

This looks OK and I like this approach more than linkifying the entire 
text of the <dt>.

> [FWIW, is currently building its docs using "GNU Texinfo
> 6.4.91"]

That is odd, why are they not using an officially released version, e.g. 
6.4 or 6.5?

reply via email to

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