2017-05-31 17:47 GMT+02:00 Richard Heck <rgh...@lyx.org>:

> I see what's worrying you.
>
> The way I did the code, what we record are only *manual* changes to the
> 'literal' value. Simply opening a dialog that has literal checked does
> not change the recorded setting. If you *manually* set or unset it, then
> we will remember that, and that will become the default. So we are not
> really remembering the last value that was 'used', but only the last
> value that was 'set'. This seems right to me. Just because I happen to
> open the one citation in which I do not have 'literal' set, to modify
> something else, shouldn't mean that becomes the default.
>

I see. This strikes me sensible and sane, then.


>
> Note also that we only use the remembered value for 'new' citations
> (which we detect by seeing if the key field is empty).
>
> I still think that people are going to run into the same problem I did:
> a mix of literal and non-literal dialogs causing unexpected output. So,
> in fact, I think it would be best if, for old documents (at least), we
> did default to 'literal'. But we don't do that now. We could perhaps do
> this by checking the original file format, which is held by Buffer.cpp.
> Even then, though, once the document has been saved and re-opened, so is
> now in 2.3 format, manual action will have to be taken to avoid the
> mentioned problem.
>

Hm. I see what you mean, but don't see an elegant solution.


>
> Richard
>
> PS It's probably too late for this, but is there really a good use case
> for mixing 'literal' and 'non-literal' citations in a single document?
> I.e., might this not make more sense as a document-level setting?
>

Probably depends on the personal workflow. For me, it will probably be the
default way now to use the non-literal way and just to enable literal for
specific insets as I need it (i.e., have to enter LaTeX code). I would even
prefer a setting per widget (not per dialog), but this turned out too
complicated to implement.

But maybe a preference setting for the default of new insets would fit both
workflows?

Jürgen

Reply via email to