Skip to content

\newcommand-like definitions with 'bare' command name #4470

Closed
@minoki

Description

@minoki

When defining a LaTeX macro, subsequent occurrences of \renewcommand or \providecommand with 'bare' command name (i.e. not enclosed in { }) fails because the (bare) command name gets wrongly expanded.

Input:

\newcommand{\foo}{123}\renewcommand\foo{456}\foo

Expected output:

456

Actual output (with 2.1.3 from git master):

$ echo '\newcommand{\foo}{123}\renewcommand\foo{456}\foo' | stack exec pandoc -- -f latex -t native

Error at "source" (line 1, column 36):
unexpected 123
\newcommand{\foo}{123}\renewcommand\foo{456}\foo
                                   ^

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions