LaTeX forum ⇒ GeneralPackage Conflict due to new Command

LaTeX specific issues not fitting into one of the other forums of this category.
GBase
Posts: 1
Joined: Thu Nov 28, 2013 3:21 pm

Package Conflict due to new Command

Postby GBase » Thu Nov 28, 2013 3:34 pm

Hi everyone,

I have tried the example in this post to censor some parts of my text. It works as long as I'm not using the soul package in conjunction with the todonotes package. What can I do to make both packages work together? Here is the latex code:

  1. %this example only works if commenting out '\usepackage{todonotes}'
  2. \documentclass{scrbook}
  3.  
  4. \usepackage{soul}
  5. \newlength{\tokwidth}
  6. \newcommand{\black}[1]{%
  7. \settowidth{\tokwidth}{#1}%
  8. \rule[-.2\baselineskip]{\tokwidth}{\baselineskip}}
  9. \makeatletter
  10. \DeclareRobustCommand{\secret}{%
  11. \def\SOUL@everytoken{\black{\phantom{\the\SOUL@token}}}\SOUL@}
  12. \makeatother
  13. \usepackage{todonotes}
  14. \begin{document}
  15.  
  16. the word \secret{test} is secret
  17. \end{document}

This is the error message that I get.
  1. ! Package soul Error: Reconstruction failed.
  2.  
  3. See the soul package documentation for explanation.
  4. Type H <return> for immediate help.
  5. ...
  6.  
  7. l.16 the word \secret{test}
  8. is secret

P.S. both package versions are up-to-date
Last edited by Stefan Kottwitz on Thu Nov 28, 2013 10:03 pm, edited 1 time in total.

Tags:

Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests