# Clearing the definition of an environment

I need to render the minipage environment ineffective (the reason is that I need to sometimes compile latex documents for a visually impaired reader with a huge point size, not compatible with the general layout of the document).

\renewenvironment{minipage}[1]{\relax}{\relax}


fails because of the optional arguments sometimes passed to \begin{minipage}

I guess I can use \renewcommand on \minipage and \endminipage to adapt their definitions from latex.ltx but I was wondering if there isn't a more straightforward way to do it.

• Use the xparse package to make a new version of the minipage with 3 optional and one mandatory argument. Something like (untested) \RenewDocumentEnvironment{minipage}{ o o o m }{}{}. – daleif Sep 8 '20 at 10:51
• I might have misunderstood. Should the contents of the minipage go away as well? Becasue xparse can handle that as well: just add +b after m in the argument list in my previous comment – daleif Sep 8 '20 at 11:20
• Another option is \usepackage{comment}\excludecoment{minipage} – user30471 Sep 8 '20 at 12:54
• @daleif solution works just fine thanks. And no, I didn't need to clear the contents of the minipage. You should post it as an answer so that I can accept it :-) – wilk Sep 9 '20 at 12:10

 \RenewDocumentEnvironment{minipage}{ o o o m }{}{}