Helge Hafting wrote:
> "Adding an enabled branch around any selection should not
> affect output at all, and disabling the branch should affect
> output the same way as a cut would".

Agreed.

> I don't think this will be possible in absolutely all cases though.
> Removing a list item that has an embedded sublist will change
> the environment depth of the embedded sublist. Doing that
> with branches forces the question: should the
> environment depth (and on-screen enumeration/bullet symbols)
> really change as the user turns a branch on and off?

It shouldn't.

However, this case is not easy to solve. The problem is that a second 
\begin{enumerate}, which is used inside the branch, increases the depth, 
because that's how LaTeX nesting works. The second environment is added, 
because the branch inset knows nothing about the surrounding paragraphs. 
That's what I meant when I stated that branches need to be context sensible.

For instance:

1. one
<branch>
2. two
3. three
</branch>
4. four

is exported now as

\begin{enumerate}
\item one
% begin of branch
\begin{enumerate}
\item two
\item three
\end{enumerate}
% end of branch
\item four
\end{enumerate}

while it should be exported as

\begin{enumerate}
\item one
% begin of branch
\item two
\item three
% end of branch
\item four
\end{enumerate}

BUT the following

one
<branch>
2. two
3. three
</branch>
four

should be exported as

one
% begin of branch
\begin{enumerate}
\item two
\item three
\end{enumerate}
% end of branch
four

And:

1. one
<branch>
a. two
b. three
</branch>
2. four

should be exported as

\begin{enumerate}
\item one
% begin of branch
\begin{enumerate}
\item two
\item three
\end{enumerate}
% end of branch
\item four
\end{enumerate}

I don't know how this can be solved properly

Jürgen

Reply via email to