Skip to content

Add sty automation for editor inline comments #3

Description

@taiya

e.g.

Preamble

% CR: The following line fails in my standalone LaTex with the error
%     ! Missing \endcsname inserted.
%     I tried fixing it for half an hour but couldn't.
\defeditor{AT}{blue}

Body

\AT{While this is my comment}
\at{This is a sentence edited by me.}

Add this to style file:

% TODO
\newcommand{\defeditorcomment}[2]{%
  \iftoggle{foo}{%
    \expandafter\def\csname#1\endcsname##1{{\color{#2}[#1: ##1]}}%
  }{%
    \expandafter\def\csname#1\endcsname##1{{}}%
  }%
}
\newcommand{\defeditorinline}[2]{%
  \iftoggle{foo}{%
    \expandafter\def\csname#1\endcsname##1{{\color{#2}##1}}%
  }{%
    \expandafter\def\csname#1\endcsname##1{{##1}}%
  }%
}
\newcommand{\defeditor}[2]{%
    \defeditorcomment{#1}{#2}%
    \defeditorinline{\MakeLowercase{#1}}{#2}%
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions