Skip to content

Table reference labels missing ID anchors, causing broken links #19

@lefticus

Description

@lefticus

Problem

Tables that are referenced by stable names lack the corresponding ID anchors, making cross-references to those tables broken. The reference exists but points to a non-existent anchor.

Location

File: n4950/concepts.md
Lines: 13, 15

Current Behavior

Line 13:

[[concepts.summary]].

Line 15 (the table itself):

**Table: Fundamental concepts library summary**

| Subclause |  | Header |

The table has no <a id="concepts.summary"> anchor, so the reference on line 13 points to nothing.

Expected Behavior

Line 15 should be:

**Table: Fundamental concepts library summary** <a id="concepts.summary">[[concepts.summary]]</a>

| Subclause |  | Header |

This adds the anchor so the reference on line 13 can link to the table.

Source Context

File: cplusplus-draft/source/concepts.tex
Line: 17

\begin{libsumtab}{Fundamental concepts library summary}{concepts.summary}

The \begin{libsumtab} macro takes three arguments:

  1. Table caption: "Fundamental concepts library summary"
  2. Table label: concepts.summary
  3. (implicit) Table structure

The label should be converted to an anchor.

Impact

  • Severity: MAJOR
  • Cross-references to tables don't work
  • Navigation within the document is broken
  • Users can't jump to the table by clicking the reference
  • This is likely a systematic issue affecting all tables with labels

Root Cause

The table processing filter (cpp-tables.lua) or the table conversion logic is not:

  1. Extracting the label argument from \begin{libsumtab}
  2. Converting it to an HTML anchor
  3. Adding the anchor to the table caption/header

Investigation Needed

Search for other table references to see if this is widespread:

# Find table references
grep -n "\\[\\[.*\\.summary\\]\\]" n4950/*.md

# Find table captions to see if any have anchors
grep -n "^\\*\\*Table:" n4950/*.md

Reproduction

  1. Open n4950/concepts.md
  2. Find the reference [[concepts.summary]] on line 13
  3. Try to navigate to it (should fail or go to top of page)
  4. Observe that the table on line 15 has no id="concepts.summary" anchor

Related Files

  • src/cpp_std_converter/filters/cpp-tables.lua - Table processing
  • May need to handle \begin{libsumtab} and similar table environments specially
  • Should extract label and add as anchor to the table

Related Issues

This is similar to cross-reference issues but specifically for table labels rather than section labels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajorMajor priority issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions