<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Petko, thanks, that looks very good to me. I have a couple of
      comments for you to consider, and a question.</p>
    <p>1. For duplicate and not duplicate visible anchors, pagetoc
      reveals the anchor name through a title='#anchor' attribute. For
      duplicate visible anchors, pagetoc produces:</p>
    <blockquote>
      <p>"<span style='color: red;'
        title='#$id'>$DuplicateAnchor</span>"</p>
    </blockquote>
    <p>$VisibleAnchorLinks=true adds <a href='#$id'> … </a>
      to the <span>.</p>
    <p>I wonder of the core ought to produce a similar output, with the
      default value of $DuplicateAnchor as ''. Those who prefer a
      visible sign of a duplicate can set $DuplicateAnchor to a value of
      their choice.</p>
    <p>2. The original user of pagetoc wanted visible anchors to be
      unobtrusive, leading to the choice of § (set in $VisibleAnchor;
      nitram's site uses ♦). Perhaps the core ought to let
      administrators choose between displaying #anchor or # with #anchor
      as a tool tip.</p>
    <p>3. You wrote, "For including text sections like include
      Page#anchor, the same (ie !!##?name) will be replaced (ie with !![[##?name]]) in
      the TextSection function before extracting the section." Does this
      mean nitram's use of the diff2 recipe will work with !!##anchor as
      well as !![[##anchor]], or will the recipe need modifying?</p>
    <p>Thanks again.</p>
    <p>JR</p>
    <div class="moz-cite-prefix">On 03/06/2026 10:41 pm, Petko Yotov
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:f3147038377bfec9c0ea1b0924854ec1@5ko.fr">Thank you JR
      for your input.
      <br>
      <br>
      CamelCase words in WikiStyles produced WikiWord links if these
      were enabled and broke the WikiStyle. This was an omission or a
      known limitation, should be fixed for 2.6.1.
      <br>
      <br>
      Agreed with your points about a separate anchor tag for !!#anchor
      rather than id attribute. An additional reason is for people to be
      able to right-click on the visible anchor and select "Copy link",
      it should link to itself.
      <br>
      <br>
      Consequently:
      <br>
      <br>
      - For rendering wiki pages, !!##?name will be replaced with
      !![[##?name]] then left to the 2 other markup rules to handle
      (anchor, heading).
      <br>
      <br>
      - For including text sections like include Page#anchor, the same
      will be replaced in the TextSection function before extracting the
      section.
      <br>
      <br>
      I added to the core the [[##anchor]] markup to produce a visible
      anchor:
      <br>
      <br>
        <a id="anchor" href="#anchor"
      class="visible-anchor">#anchor</a>
      <br>
      <br>
      You can override this either by inserting a markup rule before
      '[[#' that consumes the visible anchor markups, or by redefining
      '[[#'.
      <br>
      <br>
      New variable $VisibleAnchorPrefix default '#'. This seems more
      intuitive than '§' since the link is also #anchor, but can be
      redefined in config.php if needed.
      <br>
      <br>
      New class name 'visible-anchor' for these, with some styles:
      <br>
      <br>
        font-size: .8rem;
      <br>
        opacity: .67;
      <br>
      <br>
      People can override or complement the styles and the prefix
      character in local configuration.
      <br>
      <br>
      Visible anchors are detected in the core table of contents and
      used in the toc links, but are not visible in the toc links. That
      means if a heading is written as:
      <br>
      <br>
      !!##anchor Heading
      <br>
      <br>
      - the heading text will contain "#anchor Heading"
      <br>
      - the table of contents will link to Page#anchor, but the link
      text will contain "Heading".
      <br>
      <br>
      Duplicate anchors are removed rather than appearing with a
      different prefix character. The earliest instance among
      [[#anchor]], [[##anchor]], !!#anchor, !!##anchor, is rendered, the
      others are removed.
      <br>
      <br>
      If a writer expects a visible anchor that does not show, this
      ought to be a sufficient indication that the anchor was removed.
      :-)
      <br>
      <br>
      Petko
      <br>
      <snip></blockquote>
  </body>
</html>