Skip to content

support for .dtx commented code. #211

@jessexknight

Description

@jessexknight

Different from #36 and PR126

Background

.dtx files are "documented tex files" which compile to produce .cls / .sty files and .pdf documentation from the same source. In .dtx files, the uncommented code is added to the .cls / .sty, while commented code is recompiled separately to produce the .pdf documentation. It's a bizarre system but it's the standard documentation approach for tex packages. Reason I bring it up: the commented code is valid tex code, and I wish we could highlight it (in a new scope). Currently, it is all treated as comment.

Issue

Commented code in .dtx files is not highlighted.

Request

  1. Add a new scope to identify: .dtx file name and line starts with %
  2. Highlight the line as standard tex code.
  3. Allow users to style the scope, e.c. all italics / different background color.

Hope this makes sense! I might try this myself but I've never worked with grammars before...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions