I got this error when compiling recipe "pdflatex->bibtex->pdflatex x2" on the visual studio code of windows10.

 LaTeX Error: Command \todo already defined.
               Or name \end... illegal, see p.192 of the manual.

The code is the same as I compiled on the visual studio code of ubuntu18. I am wondering how to overwrite the "\todo" command that I don't know where-else was it defined. ( It was never a problem on ubuntu!)

Ps. Part of my source code:

%% -------------------------------
%% |    My packages /commands    |
%% -------------------------------
% track changes
    %\usepackage{changes}       % highlight changes
    \usepackage[final]{changes} % don't highlight changes

% tables

% pseudocode

% for forcing positions of tables, figures, ...

% units

%% ---------------------------------
%% | ToDo Marker - only for draft! |
%% ---------------------------------
% Remove this section for final version!



UPDATE: I found a bypass method on windows by changing \newcommand{\todo}[1] to \renewcommand{\todo}[1]. However, the changed code give the error of "\todo undefined" on my ubuntu system.

It indicates that the enviroment differs, although the codes are same. What I need to do is find out which package is somehow added/upgraded in windows.

2 Answers 2


It is from changes package (as you can see by adding \show\todo at various points and seeing where it becomes defined). If you do not need the command from that package simply use \renewcommand in your definition to over-ride the existing definition.

  • thanks, \renewcommand works well in case of conflict. Commented Sep 20, 2020 at 14:20

Is this the final version? If so, comment out at least the 2 lines that define your command:

  • in this way, the function of \todo would be changed by the others' definition. Commented Sep 20, 2020 at 14:22
  • Of course. That is precisely why the change package has draft and final modes and why the code you quoted is prefaced by the instruction to comment out the code for the final version.
    – Una
    Commented Sep 20, 2020 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .