3

\NewDocumentEnvironment from the xparse package allows accessing environment arguments also in the code that is supposed to go after the content.

environ and newenviron allow referring to the environment body by macro.

What other extensions of the standard environment are out there and what are they good for?

Ruben
  • 13,448
hkBst
  • 545
  • 2
  • 10
  • this is the same https://tex.stackexchange.com/questions/254615/what-are-the-uses-of-being-able-to-refer-to-an-environment-body-by-a-macro no? if yes you can edit your first question – touhami Jul 10 '15 at 08:35
  • @touhami: That other question is specifically asking what the uses are of referring to an environment body as a macro. This one is asking about other extensions to environments and their uses and merely lists some examples. – hkBst Jul 10 '15 at 08:37
  • ok i am sorry i didn't understand well – touhami Jul 10 '15 at 08:46
  • There's also fancyvrb's VerbatimOut to write the content to a file (then you can do anything with the file, but requires a temporary file), and scontents which saves the content verbatim in memory (although I didn't figure out how to use it) see https://tex.stackexchange.com/a/513810/250119 – user202729 Nov 01 '21 at 17:34

0 Answers0