In several discussions about relatives merits of LaTeX v. xml, a xml supporter complained that in LaTeX sections, subsections etc are not properly closed, so it is hard to tell where a section ends. Of course it is typically possible to recognize an end of a section, but there is actually a number of ways how a section can end: start of another section, start of the next chapter or part, start of \endmatter
, bibliograpy, index, etc, or the end of document. That makes it hard if you want to write a script that would in some way manipulate sections (change their order, write each of them into a separate file, ...). The same is of course true for subsections, paragraphs etc.
One answer to that is that it is actually possible in LaTeX2e to use sectioning commands as environments, and write
\begin{section}{Blah blah}
...
\end{section}
and because of the way environments are handled in LaTeX2e, it will work. I he recently seen several comments discouraging such use of regular commands as environments, and it seems that in LaTeX3 it will no longer be possible (on the other hand, it seems that you will be able to define a section
environment without causing a conflict with the \section
command).
I wanted to know what people think about using sectioning commands as environments. Is it a good idea, is it OK, or should it not be done?
\begin{section}...\end{section}
does not currently do this, I wouldn't recommend using it. – Joseph Wright♦ Sep 25 '12 at 6:10