-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Problem
The \grammarterm{} macro is not being converted to italics in certain definition contexts. The LaTeX command appears as raw text in the output.
Location
File: n4950/intro.md
Lines: 440, 483
Current Behavior
Line 440:
⟨non-template friend function with trailing \grammarterm{requires-clause⟩Line 483:
⟨\grammarterm{template-head⟩ template parameter list, excluding templateThe \grammarterm{...} command appears as literal text instead of being converted to italics.
Expected Behavior
Line 440:
⟨non-template friend function with trailing *requires-clause*⟩Line 483:
⟨*template-head*⟩ template parameter list, excluding templateThe grammar term should be italicized using markdown *...* syntax.
Source Context
File: cplusplus-draft/source/intro.tex
Lines: 575-576, 628
\defnadj{target}{targets}%
\item \range{non-template friend function with trailing \grammarterm{requires-clause}}
\defnx{template parameter}{parameter!template}%
\item \range{\grammarterm{template-head}} template parameter list, excluding templateThe \grammarterm{} macro is used within \range{} definitions.
Impact
- Severity: MAJOR
- Raw LaTeX macros appear in the visible output
- Makes the document look unprofessional
- Grammar terms should be distinguished from regular text
- Inconsistent with other
\grammarterm{}conversions in the document (most work correctly)
Root Cause
The macro filter (cpp-macros.lua) is not handling \grammarterm{} when it appears within certain contexts, specifically:
- Within
\range{...}definitions - Possibly other definition-related contexts
This is a partial failure - most \grammarterm{} macros in the document convert correctly, but these specific instances within definition ranges do not.
Reproduction
- Open
n4950/intro.md - Navigate to line 440 or 483
- Search for
\grammarterm{ - Observe the raw LaTeX macro in the output
Related Files
src/cpp_std_converter/filters/cpp-macros.lua- Macro conversion logicsrc/cpp_std_converter/filters/cpp-definitions.lua- Definition processing- May be related to the order of filter application or context-specific handling
Related Issues
- Similar to Issue \grammarterm{} not converted to italics in code blocks #10 (grammar terms not italicized in code blocks), but this is in prose/definition contexts
- Related to Issue \tcode{}, \keyword{}, and \term{} content silently dropped in definition notes #15 (content dropped in definition notes), suggesting definition-related contexts have special handling issues