Veto! (Last time I used this word, Lars told me I am not allowed to do so :-))1) A user interface (in document->extra) to define a "branch list",
which contains pairs of branch names (English, Finnish, ...) and
"representation colours" (red, green, magenta, ...). The branch names
are editable and represent the semantics (Michael's proposal). The
representation colours are fixed, eight of them (could be generalized
later.) In my devel code I define the branch list as a vector of pairs
in BufferParams in bufferparams.[Ch]. (Good idea?)
The branch table must be carried in the .lyx format.
2) Also in document->extra, you can choose the "active branch", i.e. the one that will be currently output to LaTeX. Choose it by name, i.e. "English". (Currently choice by colour.)
The active branch may be carried in the .lyx format, although I don't
see why it should. (We don't store current cursor position etc.
either.)
I think the implementation should go on top of character styles. Which, of course, somehow mean we have to get char style working...
IMHO it is not sufficient to define branches on the character level. What if you want to introduce a whole table in a particular branch? Remember the already existing problems that are caused by the fact that it makes a difference whether you mark all cells of a table or you mark the whole table with the cursor outside the table.
How about this simple approach:
1. A user interface as sketched above in item 1)
2. In "Document > Extra", the user can activate/deactivate "branches"
(not only one branch, but potentially several independent branches)
3. The "note" inset is extended in such a way that it gets a dialog in which the user
can assign a "branch" to it.
That's all. This solution seems to be easily implementable, more flexible, and fool-proof. And we are finally able to print notes! Of course, we would have to think about more suitable terms than "branches" and "notes" that don't make much sense in this context...
Any comments?
Michael