[Tex/LaTex] Is it possible to close a subsection

sectioning

So I want to insert text that's not related to a subsection, but rather to the top section the subsection parts from. This is the idea:

\section{fruits}
All these are fruits:
\subsection{orange}
color orange
\subsection{grape}
color purple
\subsection{banana}
Yellow and long fruit
\end{subsection}
a fruit is a part of a flowering plant that derives from specific tissues of the flower, one or more ovaries, and in some cases accessory tissues
\section{foo}
\subsection{unrelated bar}

So what I want to be able to do, is make a short description, a few examples with subsections and explanations about them, and then, close the last subsection, and continue the explanation on what fruits are and, taking stuff from subsections, draw similarities. Is this possible? Thanks!

Edit: It has been suggested to use description and enumerate, but the problem here is that I want the subsections to contain item lists, descriptions and enumerations, and I also want the subsections to appear in the ToC so people can quickly jump to each detailed description of each fruit (in this example).

Edit 2: This is the ideal output generated with MS Word (I'm not sure, I'm assuming the person has used Word).
enter image description here

As you can see, there's an space before after the end of the subsection 5.6, like if it was starting a new section, as well as the adequate indentation.

Best Answer

What you aim at is not the usual structure. Usually, everything that is general to one section comes before all subsections.

A simple vertical space will not make it clear to the reader, that the former subsection has ended and we're structurally back on the section level. You should support your reader further.

Some possibilities:

  • Start a new subsection, that makes it clear. Something like "In general" or so.
  • Add vertical side lines or background or at least a horizontal line after the last specific subsection.

\documentclass{article}
\usepackage{environ}
\usepackage{xcolor}
\NewEnviron{specifics}{\colorbox{red}{\begin{minipage}{\textwidth}\BODY\end{minipage}}\par\noindent}
\begin{document}
\section{fruits}
\begin{specifics}
All these are fruits:
\subsection{orange}
color orange
\subsection{grape}
color purple
\subsection{banana}
Yellow and long fruit
\end{specifics}
a fruit is a part of a flowering plant that derives from specific tissues of the flower, one or more ovaries, and in some cases accessory tissues
\section{foo}
\subsection{unrelated bar}
\end{document}

Even if you do something like this, the Table of Contents might mislead the reader:

1. Fruits  -- 15

1.1 Orange -- 15

1.2 Grape -- 16

1.3 Banana -- 17

2. Foo -- 20

What happens on pages 18 and 19. Is it about Bananas or Fruits in general?

Related Question