Am Donnerstag, 1. Februar 2007 21:05 schrieb Abdelrazak Younes: > Why would a user put a label in the middle of the section title? LyX is > about automatic formatting. It is about doing _the_ _right_ _thing_. > There is no logic to put the label in the middle of the text for a section.
So why is it a problem if putting a label in the middle of a section is not possible? This is actually a very good argument for disabling label insertion in sections :-) > > If inserting a label in a > > section is not possible, because the button is greyed out the user more > > likely sees that this was done on purpose. > > I strongly disagree. It is very natural to insert a label when the > cursor is inside a section. The label is a _markup_... the concept is > not very far from the numbering of the caption labels. Do we have user > complaining about not being able to change the section number by hand? > The answer is no because they learned about the LyX way. But in contrast to section numbers labels need to be inserted manually, so there is a fundamental difference. > > I really would prefer to educate the user rather than doing undocumented > > black magic (as I wrote here: > > http://bugzilla.lyx.org/show_bug.cgi?id=2154#c5). > > This is not black magic. Or the automatic caption creation upon float > creation is also "back magic" for example. Yes, it is, and it annoyed me already a lot, because I always have to delete the caption before I can insert the contents of the float. It is simply my style of work to first insert the figure and later think about a caption (or not - not all figures need one). > I could say the same for > dEPM, automatic enumerate, etc. dEPM is a border case, but automatic enumerate is definitely not something I would consider as black magic. > I would like to go even further and insert labels automatically upon > section and caption creation. When we do that, we can even say bye-bye > to this caption label. That is something different IMHO: http://bugzilla.lyx.org/show_bug.cgi?id=1624 Being able to use cross references without knowing how the LaTeX label mechanism works would be very nice. However, if a user needs to insert a label manually this should be straightforward without surprises. Fact is that labels in sections do not always work in LaTeX. If we meet LaTeX restrictions, we usually do one of two things: 1) Generate LaTeX code to overcome them. An example for this is the fix for footnotes in tables that I have in my personal branch. 2) If we are not able to do 1), forbid the creation of constructs that would lead to invalid LaTeX code. An example for this are multiple paragraphs in table cells. I do not see any reason to do it differently in this case. In fact, if 1) would be possible I would prefer it over disabling the labels. Georg
