How to resolve clashing definitions of comment in comment.sty and changes.sty without affecting either's...

Is bread bad for ducks?

Can someone be penalized for an "unlawful" act if no penalty is specified?

Identify boardgame from Big movie

What do the Banks children have against barley water?

Deal with toxic manager when you can't quit

What does ひと匙 mean in this manga and has it been used colloquially?

Pokemon Turn Based battle (Python)

Did Section 31 appear in Star Trek: The Next Generation?

Why can Shazam fly?

How come people say “Would of”?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Does the shape of a die affect the probability of a number being rolled?

When should I buy a clipper card after flying to OAK?

Origin of "cooter" meaning "vagina"

Do these rules for Critical Successes and Critical Failures seem Fair?

Time travel alters history but people keep saying nothing's changed

Resizing object distorts it (Illustrator CC 2018)

How to deal with fear of taking dependencies

Why not take a picture of a closer black hole?

Why isn't airport relocation done gradually?

How to type this arrow in math mode?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Geography at the pixel level

Should I use my personal e-mail address, or my workplace one, when registering to external websites for work purposes?



How to resolve clashing definitions of comment in comment.sty and changes.sty without affecting either's interface?



The 2019 Stack Overflow Developer Survey Results Are InMark portions of text without affecting spacingComment out lines without using % and comment enviromentGenerating a list with macros using tasks packageCreating removable comment command without extra spacecomment-package and macro definitionsLaTeX error trying to close comment environmentPutting custom environment (using environ package) start and ends in commandsAlias for an lstlisting environmentA way to “execute” only latex procedural code (def, let) in a sequence ignoring the rest?mapsto and function definition / definition environment












0















I'm writing a package that uses both changes (v3.1.2) and comment (v3.8), and I'd like to expose their functionality to consumers of my package without having to modify either one's interface.



The problem is that both changes.sty and comment.sty define comment. Hence



documentclass{article}
usepackage{comment}
usepackage{changes}
begin{document}end{document}


throws the error




Command comment already defined.




I understand this can be fixed using savesym by (essentially) modifying changes.sty's interface, e.g.



documentclass{article}
usepackage{savesym}

usepackage{changes}
savesymbol{comment} % rename comment -> origcomment
usepackage{comment}

begin{document}
origcomment{pdf comment using 'changes.sty'}
begin{comment}
code comment using 'comment.sty'
end{comment}
end{document}


Alternatively, comment.sty provides excludecomment for defining custom comment environments, e.g.



documentclass{article}
usepackage{savesym}

usepackage{comment}
savesymbol{comment}
excludecomment{mycomment}
usepackage{changes}

begin{document}
comment{pdf comment using 'changes.sty'}
begin{mycomment}
code comment using 'comment.sty'
end{mycomment}
end{document}


but changes.sty breaks the default comment environment.



Is it possible to build a layer in my package which mediates between changes.sty's comment command and comment.sty's comment environment? The aim is to expose the original interface of each to a consumer of my package.





The two clashing definitions are as follows:



% changes.sty line 791
newcommand{comment}[2][@empty]{%
setkeys{Changes@comment}{#1}%
Changes@output%
{comment}%
{Changes@comment@id}%
{}%
{}%
{#2}%
{changescommentname}%
{#2}%
}


% comment.sty line 241
defexcludecomment
#1{message{Excluding comment '#1'}%
csargdef{#1}{endgroup message{Excluding '#1' comment.}%
begingroup
DefaultCutFileName defProcessCutFile{}%
defThisComment####1{}ProcessComment{#1}}%
csargdef{After#1Comment}{CloseAndInputCutFile endgroup}
CommentEndDef{#1}}
% ...
% line 292
excludecomment{comment}








share







New contributor




wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I'm writing a package that uses both changes (v3.1.2) and comment (v3.8), and I'd like to expose their functionality to consumers of my package without having to modify either one's interface.



    The problem is that both changes.sty and comment.sty define comment. Hence



    documentclass{article}
    usepackage{comment}
    usepackage{changes}
    begin{document}end{document}


    throws the error




    Command comment already defined.




    I understand this can be fixed using savesym by (essentially) modifying changes.sty's interface, e.g.



    documentclass{article}
    usepackage{savesym}

    usepackage{changes}
    savesymbol{comment} % rename comment -> origcomment
    usepackage{comment}

    begin{document}
    origcomment{pdf comment using 'changes.sty'}
    begin{comment}
    code comment using 'comment.sty'
    end{comment}
    end{document}


    Alternatively, comment.sty provides excludecomment for defining custom comment environments, e.g.



    documentclass{article}
    usepackage{savesym}

    usepackage{comment}
    savesymbol{comment}
    excludecomment{mycomment}
    usepackage{changes}

    begin{document}
    comment{pdf comment using 'changes.sty'}
    begin{mycomment}
    code comment using 'comment.sty'
    end{mycomment}
    end{document}


    but changes.sty breaks the default comment environment.



    Is it possible to build a layer in my package which mediates between changes.sty's comment command and comment.sty's comment environment? The aim is to expose the original interface of each to a consumer of my package.





    The two clashing definitions are as follows:



    % changes.sty line 791
    newcommand{comment}[2][@empty]{%
    setkeys{Changes@comment}{#1}%
    Changes@output%
    {comment}%
    {Changes@comment@id}%
    {}%
    {}%
    {#2}%
    {changescommentname}%
    {#2}%
    }


    % comment.sty line 241
    defexcludecomment
    #1{message{Excluding comment '#1'}%
    csargdef{#1}{endgroup message{Excluding '#1' comment.}%
    begingroup
    DefaultCutFileName defProcessCutFile{}%
    defThisComment####1{}ProcessComment{#1}}%
    csargdef{After#1Comment}{CloseAndInputCutFile endgroup}
    CommentEndDef{#1}}
    % ...
    % line 292
    excludecomment{comment}








    share







    New contributor




    wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I'm writing a package that uses both changes (v3.1.2) and comment (v3.8), and I'd like to expose their functionality to consumers of my package without having to modify either one's interface.



      The problem is that both changes.sty and comment.sty define comment. Hence



      documentclass{article}
      usepackage{comment}
      usepackage{changes}
      begin{document}end{document}


      throws the error




      Command comment already defined.




      I understand this can be fixed using savesym by (essentially) modifying changes.sty's interface, e.g.



      documentclass{article}
      usepackage{savesym}

      usepackage{changes}
      savesymbol{comment} % rename comment -> origcomment
      usepackage{comment}

      begin{document}
      origcomment{pdf comment using 'changes.sty'}
      begin{comment}
      code comment using 'comment.sty'
      end{comment}
      end{document}


      Alternatively, comment.sty provides excludecomment for defining custom comment environments, e.g.



      documentclass{article}
      usepackage{savesym}

      usepackage{comment}
      savesymbol{comment}
      excludecomment{mycomment}
      usepackage{changes}

      begin{document}
      comment{pdf comment using 'changes.sty'}
      begin{mycomment}
      code comment using 'comment.sty'
      end{mycomment}
      end{document}


      but changes.sty breaks the default comment environment.



      Is it possible to build a layer in my package which mediates between changes.sty's comment command and comment.sty's comment environment? The aim is to expose the original interface of each to a consumer of my package.





      The two clashing definitions are as follows:



      % changes.sty line 791
      newcommand{comment}[2][@empty]{%
      setkeys{Changes@comment}{#1}%
      Changes@output%
      {comment}%
      {Changes@comment@id}%
      {}%
      {}%
      {#2}%
      {changescommentname}%
      {#2}%
      }


      % comment.sty line 241
      defexcludecomment
      #1{message{Excluding comment '#1'}%
      csargdef{#1}{endgroup message{Excluding '#1' comment.}%
      begingroup
      DefaultCutFileName defProcessCutFile{}%
      defThisComment####1{}ProcessComment{#1}}%
      csargdef{After#1Comment}{CloseAndInputCutFile endgroup}
      CommentEndDef{#1}}
      % ...
      % line 292
      excludecomment{comment}








      share







      New contributor




      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm writing a package that uses both changes (v3.1.2) and comment (v3.8), and I'd like to expose their functionality to consumers of my package without having to modify either one's interface.



      The problem is that both changes.sty and comment.sty define comment. Hence



      documentclass{article}
      usepackage{comment}
      usepackage{changes}
      begin{document}end{document}


      throws the error




      Command comment already defined.




      I understand this can be fixed using savesym by (essentially) modifying changes.sty's interface, e.g.



      documentclass{article}
      usepackage{savesym}

      usepackage{changes}
      savesymbol{comment} % rename comment -> origcomment
      usepackage{comment}

      begin{document}
      origcomment{pdf comment using 'changes.sty'}
      begin{comment}
      code comment using 'comment.sty'
      end{comment}
      end{document}


      Alternatively, comment.sty provides excludecomment for defining custom comment environments, e.g.



      documentclass{article}
      usepackage{savesym}

      usepackage{comment}
      savesymbol{comment}
      excludecomment{mycomment}
      usepackage{changes}

      begin{document}
      comment{pdf comment using 'changes.sty'}
      begin{mycomment}
      code comment using 'comment.sty'
      end{mycomment}
      end{document}


      but changes.sty breaks the default comment environment.



      Is it possible to build a layer in my package which mediates between changes.sty's comment command and comment.sty's comment environment? The aim is to expose the original interface of each to a consumer of my package.





      The two clashing definitions are as follows:



      % changes.sty line 791
      newcommand{comment}[2][@empty]{%
      setkeys{Changes@comment}{#1}%
      Changes@output%
      {comment}%
      {Changes@comment@id}%
      {}%
      {}%
      {#2}%
      {changescommentname}%
      {#2}%
      }


      % comment.sty line 241
      defexcludecomment
      #1{message{Excluding comment '#1'}%
      csargdef{#1}{endgroup message{Excluding '#1' comment.}%
      begingroup
      DefaultCutFileName defProcessCutFile{}%
      defThisComment####1{}ProcessComment{#1}}%
      csargdef{After#1Comment}{CloseAndInputCutFile endgroup}
      CommentEndDef{#1}}
      % ...
      % line 292
      excludecomment{comment}






      macros environments package-writing comments changes





      share







      New contributor




      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 mins ago









      wfschwfsch

      1




      1




      New contributor




      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      wfsch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          wfsch is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f484233%2fhow-to-resolve-clashing-definitions-of-comment-in-comment-sty-and-changes-sty-w%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          wfsch is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          wfsch is a new contributor. Be nice, and check out our Code of Conduct.













          wfsch is a new contributor. Be nice, and check out our Code of Conduct.












          wfsch is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f484233%2fhow-to-resolve-clashing-definitions-of-comment-in-comment-sty-and-changes-sty-w%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

          Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

          How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...