pkubowicz / opendetex

Improved version of Detex - tool for extracting plain text from TeX and LaTeX sources
Other
236 stars 34 forks source link

\begin{environment} \end{enviroment} #51

Open pauloney opened 5 years ago

pauloney commented 5 years ago

There are two types of environments -- as far as preservation of of the content of options. We should separate them in two classes and deal with them appropriately.

No matter if we preserve or delete the contents (insides) of an environment, we should always delete the \begin{environment} and \end{environment}, including the name of the environment. So far, we take the \begin{} and \end{} only and leve the name of the environment back -- which is not good.

Type I:

Any content as an option of the first environment type as in:

\begin{teo}[Uniformidade transversal de $\mathscr{F}$]
    This is a content to be preserved.
\end{teo}

should be preserved.

Type II:

At the same time the contents in the options of environments like:

\begin{figure}[htb]
\includegraphics[scale=1.0]{f31}
\caption{This is a text to be preserved}
\end{figure}

should be deleted.