Skip to content

Math context macro issues: \cv{} and \mathrel{} #31

@lefticus

Description

@lefticus

Problem

Two math-related macros are not properly handled in complex contexts:

  1. \cv{} macro not converted in complex math expressions
  2. \mathrel{} macro content not stripped

Affected Files

  • class.md (2 instances total)

Examples

Issue 1: \cv{} in math context (line 5435)

Actual output:

$T_1$ and $T_2$ are similar if they have the same form and their corresponding components are either the same or similar. If $T_1$ and $T_2$ are "array of `\(N_1\) \cv U_1$" and "array of $N_2$ U_2$", they are similar if $N_1$ and $N_2$ have the same value and U_1$ and $U_2$ are similar

Problem: The \cv macro is embedded in a complex LaTeX math/code mixing context that's not being handled correctly. Should likely render as "cv U_1" or similar.

Issue 2: \mathrel{} not stripped (line 5450)

Actual output:

$T_1$ and $T_2$ are layout-compatible types if [...] $T_1$ and $T_2$ are layout-compatible enumerations ([dcl.enum]).\mathrel{}

Problem: The \mathrel{} macro (likely empty or whitespace) is being left in the output as literal text.

Impact

Minor - These are relatively rare occurrences and don't severely impact comprehension, but they do create visual noise and indicate incomplete macro handling.

Total Instances

2 occurrences in class.md

Fix Required

  1. Improve handling of \cv{} macro in complex math/code contexts
  2. Add \mathrel{} to the list of macros to strip in cpp-macros.lua filter

Metadata

Metadata

Assignees

No one assigned

    Labels

    macro-conversionLaTeX macro conversion issueminorMinor priority issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions