0

Currently, for comments in the text (displayed in the compiled pdf) I use the 'todonotes' package with the ability to turn it on and off in the final pdf. I also need to use the text changes functionality similar to the 'changes' package. Unfortunately, both packages do not want to work together. I can't resign from the 'todonotes' package (too many comments in tex files). Do you know any alternative? I need to highlight the text that was added/changed possibly with a comment.

"message": "Option clash for package todonotes.

does not work:

\usepackage{changes}

with:

\usepackage[disable]{todonotes} % <- OFF
%\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes} % <- ON
% 
\newcommandx{\unsure}[2][1=]{\todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,size=\normalsize,#1]{#2}}
\newcommandx{\change}[2][1=]{\todo[linecolor=blue,backgroundcolor=blue!25,bordercolor=blue,size=\normalsize,#1]{#2}}
\newcommandx{\info}[2][1=]{\todo[linecolor=OliveGreen,backgroundcolor=OliveGreen!25,bordercolor=OliveGreen,size=\normalsize,#1]{#2}}
\newcommandx{\improvement}[2][1=]{\todo[linecolor=Plum,backgroundcolor=Plum!25,bordercolor=Plum,size=\normalsize,#1]{#2}}
\newcommandx{\thiswillnotshow}[2][1=]{\todo[disable,#1]{#2}}

main .tex file:

\documentclass{report}
%
% 

\usepackage{changes} % does not work with todonotes


%================ TO DO LIST=============================
% todonotes ON/OFF
\usepackage[disable]{todonotes} % 
%\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes} %


\begin{document}

x
\end{document}
%+++ END +++

7
  • option clash errors are easy to resolve, but you should make a small but complete example. That makes it much easier to test your issue. Nov 21, 2023 at 11:36
  • you can almost always avoid an option clash by following the advice given if you respond with h which will detail the exact options to adjust. But as you have provided no example it is hard to give any more specific advice. Nov 21, 2023 at 11:37
  • @UlrikeFischer I added my main .tex file
    – Chey
    Nov 21, 2023 at 11:53
  • 1
    It's not really reasonable to post a 100 line example for an option clash. It does not give an option clash error anyway it gives ! LaTeX Error: File `Rozdzial2.tex' not found. Please post a small complete example that gives the error you are asking about, without all the extra packages not needed to show the problem. Nov 21, 2023 at 11:55
  • 1
    You should make it easy for people to trace issues by minimising the example, but even in your real document do you really use all those packages? Don't include packages "just in case" only include them if actually used in the document. you load several packages twice (eg graphicx, siunitx) it doesn't actually load twice but makes it harder to debug option clashes as you need to work out which one really loaded. You have conflicting font packages, you can use amsfonts or newtxmath but not both at the same time Nov 21, 2023 at 12:17

1 Answer 1

2

changes loads todonotes anyway and allows you to pass options to it:

\documentclass{report}
\usepackage[todonotes={colorinlistoftodos,prependcaption,textsize=tiny}]{changes} 
\begin{document}
x
\end{document}
5
  • 1
    +1 Beautiful prose in the example text. Nov 21, 2023 at 12:02
  • @DavidCarlisle blub would be better ;-) Nov 21, 2023 at 12:04
  • Yes, but: [{ "resource": "/c:/texlive/2023/texmf-dist/tex/latex/changes/changes.sty", "owner": "LaTeX", "severity": 8, "message": "Package changes: Command comment is already defined..\n", "source": "LaTeX", "startLineNumber": 783, "startColumn": 1, "endLineNumber": 783, "endColumn": 65536 },{ "resource": "/c:/texlive/2023/texmf-dist/tex/latex/changes/changes.sty", "owner": "LaTeX", "severity": 8, "message": "Command \\comment already defined.\n", "source": "LaTeX", "startLineNumber": 794, "startColumn": 1, "endLineNumber": 794, "endColumn": 65536 }]
    – Chey
    Nov 21, 2023 at 12:07
  • 1
    changes has documentation. I recommend the section Command already defined. And learn to copy error messages from the actual log-file. That makes them much more readable. Nov 21, 2023 at 12:14
  • The problem was with the combination of commands, the solution: % \usepackage[commandnameprefix=ifneeded,todonotes={disable}]{changes} % <- TO DO notes OFF and \usepackage[commandnameprefix=ifneeded,todonotes=colorinlistoftodos,prependcaption,textsize=tiny}]{changes} <-TO DO notes ON one of the lines needs to be commented out Thank you for you help
    – Chey
    Nov 21, 2023 at 12:34

You must log in to answer this question.

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