Am 20.07.2011 03:32, schrieb Pavel Sanda:
I now wrote its documentation from scratch and saw that your module did not
work.
it depends what you mean by "works". if you just insert charstyle push character
there and start writing after charstyle inset it 'just works' (at least here).
By chance. As I said, you forgot the mandatory argument. So if the user e.g. uses a formatting in
the paragraph, you will get troubles. LaTeX is looking for the missing brace pair for the argument
and tries to take the next one it finds. But this can be a brace pair of another LaTeX command.
Attached is an example where you get a LaTeX error.
It is very important that the LaTeX code that is produced by LyX is correct, otherwise you will have
side effects that could harm to the maximum.
you get big two lines initial character and paragraph of text around it.
unfortunately it is fixed for this usage and most of lettrine advanced
features are unused since we don have machinery how to push more arguments
there (at least i'm not aware of it).
We already have the feature to add as many arguments as you like, mandatory and
optional ones.
for more advanced usage you need to go for ERT. i looked at the new style
and its not solving things completely - you still need various ERTs or opt
insets.
The argument insets are intended - that is our current UI to handle arguments. Today we discussed
how to improve this UI. The two TeX code braces are only necessary because LyX does for an unknown
reason not support arguments in InsetLayout. (Must have been forgotten when InsetLayout was
implemented, but Richard is now aware if that.) When LyX has this feature, they can go.
However, the two TeX code braces are acceptable, because previously one had to do everything as TeX
code and thus needed to know the names of the commands.
moreover there is no intuitive way how to typeset big initial without
reading manual where special construct needs to be learned.
the charstyle path is not clean, but for the basic usage works without any need
to read manual pages.
What do you expect? No style is self-explanatory. Of course one needs to read first how it works. I
don't like the attitude to accept a lower quality just because it doesn't need to be documented. Our
aim should be to provide features that do work in all cases and don't interfere with other ones, or
even lead to LaTeX errors.
In general I don't understand your intention. What was the benefit of your module? It was designed
to work only for one special case and only worked by chance. As a user I will surely sooner or later
have the case were the predefined layout is not suitable for me (I for example need an inital over 3
lines. Then I had to use TeX code and to do this, I had to read the lettrine manual and learn LaTeX.
So in the end I had to read and learn much more than with the current version.
you are probably right that when you use combinations of
lettrine with weird stuff around, weird things can happen. like with many other
insets in lyx.
Sorry, but I cannot agree to this. We worked hard that this doesn't happen otherwise LyX would be
quite useless for real life documents like a thesis or a business report. Where do you see that
problems? If there is one it is a bug we need to fix.
For compatibility reasons I left your style definition
first of all - as far as compatibility reasons is concerned - your last changes
will cause lyx 2.0.0 not being able to compile some 2.0.x>0 files due to
missing style
You mean because I added a style? Yes, LyX 2.0.0 will tell you that a style is unknown when loading
a file made with LyX 2.0.1 that usess my new style. But this cannot be avoided. Take for example the
various layout files we need to update from time to time when there are new versions. Especially for
example the scientific paper classes we have to add new styles or rename some LaTeX commands all the
time.
but I think we should remove it.
in branch? then some files produced by lyx 2.0.x>1 wont be compilable with
lyx 2.0.0.
As I said, better we get rid of the buggy code right now than to wait longer. Currently the
probability that people use the feature is relatively low because there was no documentation and LyX
2.0.0 is still quites new (many users I know wait for the 0.1 release before they switch from 1.6 to
2.0). And we cannot wait until LyX 2.1 because this might be a year and it is in my opinion not
acceptable to provide a style that could lead to LaTeX errors.
regards Uwe