In an earlier question, I defined a modified version of the quoting environment using \tcolorboxenvironment.

But now I want a different, and hopefully better, modified version of the quoting environment, while leaving the original altered version in place for backward compatibility purposes.

I thought I'd called the second one boxquoting. And I also want to redefine it using \tcolorboxenvironment.

It seems like first making a copy of the quoting environment called boxquoting, and then altering that using \tcolorboxenvironment was the correct approach.

Does the following example test code look correct?

I used Duplicating Environments and When to use \LetLtxMacro? for reference.

The upshot seems to be that using \LetLtxMacro is best from a defensive point of view, though I did not understand the nuances.



% Keep this modified version for backwards compatibility

  boxrule=2pt,sharp corners,breakable,skin=enhanced,colback=white}

% Now want to create a different environment, also based on the
% quoting environment, called boxquoting.

% First, make a copy of the quoting environment called
% boxquoting.


% Then modify it with \tcolorboxenvironment

  beforeafter skip=\baselineskip,
  boxrule=2pt,sharp corners,breakable,skin=enhanced,colback=pink}


Some text.
  Original modified quoting environment
Some more text.\\
And yet more.\\
And yet more.
  New modified box quoting environment.
Yes more text.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.