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

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

Geography at the pixel level

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

How to type this arrow in math mode?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Protecting Dualbooting Windows from dangerous code (like rm -rf)

What is the meaning of the verb "bear" in this context?

Is there any way to tell whether the shot is going to hit you or not?

Is flight data recorder erased after every flight?

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

Lightning Grid - Columns and Rows?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

What is the meaning of Triage in Cybersec world?

Button changing it's text & action. Good or terrible?

Loose spokes after only a few rides

Right tool to dig six foot holes?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

Return to UK after being refused entry years previously

How to notate time signature switching consistently every measure

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

Does a dangling wire really electrocute me if I'm standing in water?

Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?

Why can Shazam fly?



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.





















  • Welcome to TeX.SE!

    – Kurt
    31 secs ago
















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.





















  • Welcome to TeX.SE!

    – Kurt
    31 secs ago














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 9 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.













  • Welcome to TeX.SE!

    – Kurt
    31 secs ago



















  • Welcome to TeX.SE!

    – Kurt
    31 secs ago

















Welcome to TeX.SE!

– Kurt
31 secs ago





Welcome to TeX.SE!

– Kurt
31 secs ago










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

Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...