1

In the following code, I would like to build an environment that just hides its content, this content can use any standard LaTeX code like enumerated lists, tables...

\documentclass[10pt]{article}

\newenvironment{forshort}{}{}


\begin{document}

Something in the whole course.


\begin{forshort}
    Just a summary...
\end{forshort}

\end{document}

Is there a ready-to-use package ?

I have tried tagging but this is only for "textual" contents : this not seems to work with the enumerate environment.

The package scontents could be hacked but the problem I've met is that I can't define an environment using \begin{scontents}[store-env = donotshow] ... \end{scontents}.

5
  • 1
    Much more simple : 1) load the package version 2) define forshort with \newenvironment{forshort}{\relax}{\relax} 3) add in preamble \excludeversion{forshort}
    – Jhor
    Sep 24, 2019 at 14:16
  • There are censor packages, couldn't you use those? ctan.org/pkg/censor
    – Sango
    Sep 24, 2019 at 14:17
  • Version 1.8 of scontents has built-in \newenvsc command that covers this specific case, you can use \newenvsc{forshort}[store-env=forshort,print-env=false]. Nov 17, 2019 at 19:15
  • Thanks a lot for this new feature !
    – projetmbc
    Nov 18, 2019 at 18:59
  • @projetmbc you're welcome :) Nov 18, 2019 at 20:08

2 Answers 2

4

The latest version (1.8) of scontents has built-in \newenvsc command that covers this specific case:

% arara: pdflatex
% arara: clean: { extensions: [ aux, log] }
\documentclass[10pt]{article}
\usepackage{scontents}
\newenvsc{forshort}[store-env=forshort,print-env=false]
\begin{document}

Something in the whole course.

\begin{forshort}
    Just a summary...
\end{forshort}

\end{document}
6

There is a package for this:

\documentclass[10pt]{article}

\usepackage{comment}
%\includecomment{forshort}
\excludecomment{forshort}



\begin{document}

Something in the whole course.


\begin{forshort}
    Just a summary...
\end{forshort}

\end{document}
1
  • Good done ! Thanks. Such a shame ! I was looking forward harder things to do.
    – projetmbc
    Sep 24, 2019 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .