Re: dynamic quotes

2017-01-07 Thread Guenter Milde
On 2017-01-07, Jürgen Spitzmüller wrote:
> Am Samstag, den 07.01.2017, 18:40 +0100 schrieb Guillaume Munch:

>> If you are ready to alter the style combo-box temporarily, then two
>> pairs of bindings should be enough too, isn't it? 

> No. Because I can alter the combo box to more than two values
> temporarily.

However, you can bind:

 key1: quote-insert
 key2: quote-insert inner
 
 key3: quote-insert * * dynamic
 key4: quote-insert inner * dynamic

In a document requiring 3 different German quoting styles,¹
use key1 and 2 in combination with the combo box.

In a document requiring just one German quoting style (and, maybe one
pair of "foreign" quotes) but this style may change after the first
draft, use key2 and 4 (and the menu for the "foreign" quote).


¹ I know that three different quote styles are common in German but
  usually not in one document. The only case I can imagine where one
  might need to input all these different styles in one document would be
  a compendium of transcriptions where the style rules dictate to keep
  the quoting style used in the respective sources.


How about a function to "freeze" all dynamic quotes in a document or (if
selected) region?

Use cases would be

* making sure the style is kept if it is included in a master with
  different quote style.
  
* changing the document default quote style for a part of the document:

  (Your example would then work with just 2 keybindings (for dynamic quotes)
   Before changing the document default quote style, just freeze the last
   inserted dynamic quotes.)
  

OTOH, with advanced search and replace it should be relatively easy to
change all quotes in a document from "german" to "french", say. 
Depending on presence of inner quotes, this would be 2 or 4 global
replacements: not too much for an action that will be taken just once (or a
limited couple of times) in the lifetime of a document.

Günter



Re: dynamic quotes

2017-01-07 Thread Jürgen Spitzmüller
Am Samstag, den 07.01.2017, 19:58 +0100 schrieb Jürgen Spitzmüller:
> > I tested the latest GUI-related commit and I have a bug to report.
> > Create a new document, Language: French, Quotes style: language
> > default.
> > Close and reopen the properties. Then instead of language default,
> > here
> > the selected item is "»outer» and 'inner'".
> 
> I'll have a look. Thanks.

Fixed.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-07 Thread Jürgen Spitzmüller
Am Samstag, den 07.01.2017, 18:40 +0100 schrieb Guillaume Munch:
> If you are ready to alter the style combo-box temporarily, then two
> pairs of bindings should be enough too, isn't it? 

No. Because I can alter the combo box to more than two values
temporarily.

> The only thing that
> still worries me is that the checkbox is less flexible and makes the
> assumption that one always want dynamic quote in foreign language.

I am worried by the contrary. Less flexibility without the checkbox.
But can we please top the discussion here? It's clear we have different
visions, and that's OK.

> 
> I tested the latest GUI-related commit and I have a bug to report.
> Create a new document, Language: French, Quotes style: language
> default.
> Close and reopen the properties. Then instead of language default,
> here
> the selected item is "»outer» and 'inner'".

I'll have a look. Thanks.

Jürgen

> 
> Guillaume
> 

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-07 Thread Guillaume Munch

Le 05/01/2017 à 06:39, Jürgen Spitzmüller a écrit :

Am Mittwoch, den 04.01.2017, 23:27 +0100 schrieb Guillaume Munch:

There I do not follow anymore: if without the checkbox you would need
12
key bindings, how is the checkbox helping? Or do you mean that even
the
checkbox does not address your needs?


Well, it is easier to alter the checkbox and style combo temporarily
than the bindings.



If you are ready to alter the style combo-box temporarily, then two
pairs of bindings should be enough too, isn't it? The only thing that
still worries me is that the checkbox is less flexible and makes the
assumption that one always want dynamic quote in foreign language.

I tested the latest GUI-related commit and I have a bug to report.
Create a new document, Language: French, Quotes style: language default.
Close and reopen the properties. Then instead of language default, here
the selected item is "»outer» and 'inner'".

Guillaume



Re: dynamic quotes

2017-01-05 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 14:14 +0100 schrieb Jean-Marc Lasgouttes:
> A few comments on the UI:

Please check out recent master.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 23:27 +0100 schrieb Guillaume Munch:
> There I do not follow anymore: if without the checkbox you would need
> 12
> key bindings, how is the checkbox helping? Or do you mean that even
> the
> checkbox does not address your needs?

Well, it is easier to alter the checkbox and style combo temporarily
than the bindings.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Guillaume Munch

Le 04/01/2017 à 17:54, Jürgen Spitzmüller a écrit :

Let me rephrase: This is style-dependent. Some styles require you to
use "foreign" quotes for all foreign text, some for "whole sentences".
Most German style sheets I know, however, require you to use the same
quotation marks (of the matrix language) for all used languages.

Your suggestion, if I understood it correctly, would fix one and
exclude all other options.

My suggestions would leave both happy: If you need different quotes,
uncheck the setting, if you need just one overall style, have it
checked. This is an argument all for the setting. And note that this
mostly depends on your publisher or editor, so it is ultimately
document-dependent, not author-dependent.


Indeed I did not imagine that the current behaviour of dynamic quotes
was on purpose, and I am a bit surprised that it is a thing. In turn,
dynamic quotes cannot be as general-purpose as I thought.




* Assuming that the above aspect is fixed by implementing one of my
   suggestions, then I wonder what corner cases remain. You do not
   say.


I hope it is clearer now.


Yes, thank you for your explanation.



The use-cases you described would be covered by letting you assign
two
different keys, one for static and one for dynamic.


That would be four keys: static outer, static inner, dynamic outer,
dynamic inner.


Yes, I actually meant two pairs of bindings.


And 12 for my personal use case: German inverted commas
outer, German inverted commas inner, German guillemets outer, German
guillemets inner, Swiss German outwards pointing guillemets outer,
Swiss German outwards pointing guillemets inner. And yes, I use those
in one document, and the language setting does not help here (even in
the Swiss German case).


There I do not follow anymore: if without the checkbox you would need 12
key bindings, how is the checkbox helping? Or do you mean that even the
checkbox does not address your needs?




Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 17:12 +0100 schrieb Guillaume Munch:
> What is so bad about this document setting? Two things:
> 
> * If I check dynamic quotes, then it behaves in an unfriendly way
>    inside foreign language: it becomes hard to insert foreign
> language
>    quotes inside foreign language. My two suggestions are meant to
>    address this (independently of whether a document setting is
>    retained).

Let me rephrase: This is style-dependent. Some styles require you to
use "foreign" quotes for all foreign text, some for "whole sentences".
Most German style sheets I know, however, require you to use the same
quotation marks (of the matrix language) for all used languages.

Your suggestion, if I understood it correctly, would fix one and
exclude all other options.

My suggestions would leave both happy: If you need different quotes,
uncheck the setting, if you need just one overall style, have it
checked. This is an argument all for the setting. And note that this
mostly depends on your publisher or editor, so it is ultimately
document-dependent, not author-dependent.

> * Assuming that the above aspect is fixed by implementing one of my
>    suggestions, then I wonder what corner cases remain. You do not
>    say. 

I hope it is clearer now.

> There must be a good reason. The occasional use-case is already
>    covered thanks to your new contextual menu, and the expert user
> with
>    a very specific and permanent use-case can set his custom key
>    bindings.

You paint me more exotic than I actually am.

> If the first point is fixed, but that convincing use-cases for
> unchecking the box still existed, then I would agree that a document
> setting has a place.
> 
> > > But for dynamic quotes you wrote:
> > > 
> > > > There is even the need for dynamic and static quotes within the
> > > > same document.
> > > 
> > > which the document setting does not address, but additional LFUN
> > > bindings (default or custom) does. This is why I see the argument
> > > for mixing static and dynamic quotes, but not one for a document
> > > setting.
> > 
> > And then users will have to change the default lfun every time they
> > want to switch quotation marks? This is most user unfriendly.
> 
> The use-cases you described would be covered by letting you assign
> two
> different keys, one for static and one for dynamic. 

That would be four keys: static outer, static inner, dynamic outer,
dynamic inner. And 12 for my personal use case: German inverted commas
outer, German inverted commas inner, German guillemets outer, German
guillemets inner, Swiss German outwards pointing guillemets outer,
Swiss German outwards pointing guillemets inner. And yes, I use those
in one document, and the language setting does not help here (even in
the Swiss German case).

> I agree that letting
> the user define their LFUN is less user-friendly and this is why I
> suggested other solutions.
> 
> > 
> > BTW this would also mean they would also need to change the lfun
> > when switching from (static) guillemets to (static) inverted commas
> > for German, since this uses the same principle (change of default
> > lfun behavior).
> 
> If you read carefully, I am not arguing against the principle, only
> that
> I am not convinced that it is justified in this case.
> 
> > > 
> > > Your own argument why static quotes are still needed was about
> > > foreign language.
> > 
> > I said it is _one_ reason where they might be needed. I did not say
> > that it is the only one, neither that language change always
> > entails
> > quote style change.
> > 
> > You cannot make a one-for-all rule here, hence the user must be
> > able
> > to set it on document level.
> 
> I understood that it is the root of the issue, but I do not see you
> explain this point.

Well, I can only repeat my arguments.

Depends on what is chosen eventually: if static quotes become a rare
> use-case as with my second suggestion, then they would become the
> "special" one.

We have a different notion of "special".

Jürgen


signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Guillaume Munch

Le 04/01/2017 à 15:42, Jürgen Spitzmüller a écrit :

Am Mittwoch, den 04.01.2017, 15:02 +0100 schrieb Guillaume Munch:


Starting with the important point:


So, here are two suggestions for improving dynamic quotes, good
enough (AFAIU) to be a default behaviour, sparing the need for a
document setting.


What is so bad about a document setting?


What is so bad about this document setting? Two things:

* If I check dynamic quotes, then it behaves in an unfriendly way
  inside foreign language: it becomes hard to insert foreign language
  quotes inside foreign language. My two suggestions are meant to
  address this (independently of whether a document setting is
  retained).

* Assuming that the above aspect is fixed by implementing one of my
  suggestions, then I wonder what corner cases remain. You do not
  say. There must be a good reason. The occasional use-case is already
  covered thanks to your new contextual menu, and the expert user with
  a very specific and permanent use-case can set his custom key
  bindings.

If the first point is fixed, but that convincing use-cases for
unchecking the box still existed, then I would agree that a document
setting has a place.


But for dynamic quotes you wrote:


There is even the need for dynamic and static quotes within the
same document.


which the document setting does not address, but additional LFUN
bindings (default or custom) does. This is why I see the argument
for mixing static and dynamic quotes, but not one for a document
setting.


And then users will have to change the default lfun every time they
want to switch quotation marks? This is most user unfriendly.


The use-cases you described would be covered by letting you assign two
different keys, one for static and one for dynamic. I agree that letting
the user define their LFUN is less user-friendly and this is why I
suggested other solutions.



BTW this would also mean they would also need to change the lfun
when switching from (static) guillemets to (static) inverted commas
for German, since this uses the same principle (change of default
lfun behavior).


If you read carefully, I am not arguing against the principle, only that
I am not convinced that it is justified in this case.



Your own argument why static quotes are still needed was about
foreign language.


I said it is _one_ reason where they might be needed. I did not say
that it is the only one, neither that language change always entails
quote style change.

You cannot make a one-for-all rule here, hence the user must be able
to set it on document level.


I understood that it is the root of the issue, but I do not see you
explain this point.




I am really discussing whether it is a "special character",


It is.


This really does not contribute to the discussion.




and how it should be presented to all users. The idea is that if it
becomes the default, then there is the possibility of making the
change transparent to users.


And how do you distinguish a static guillemet from a dynamic one?



Depends on what is chosen eventually: if static quotes become a rare
use-case as with my second suggestion, then they would become the
"special" one.




Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 16:34 +0100 schrieb Jean-Marc Lasgouttes:
> This is an interesting point actually. In an ideal world, I'd like an
> UI 
> which is not intimidating to people who just want, well, quotes, but 
> which can additionally cater for the needs of typography die-hards.

The world is not ideal. In the (academic) world I live, usually the
publishers request a specific quote style after the text has been
written.

> Actually, what I miss is that the quote type that has been selected
> by 
> LyX when I changed language is the right default for my language,
> and 
> that I should not have to worry about it if I do not know what I am
> doing.

Ah, now I understand. Yes, this can be added as a separate feature.
Note, though, that my research revealed multiple errors in the quote
style designations (of the languages no developer speaks).
So I would be rather reluctant to make it anything else than a
"proposal".

> It is to the "quote style" menu that I proposed to add a "language 
> default" value. Most users would leave it as it is and not have to
> see 
> the scary list of quotes.

The menu or the combo?

> My point is that the user will probably not want to change a 
> french-style left outer quote to a german style right inner quote
> very 
> often. And this is precisely the feature proposed by the 10 submenus.
> I 
> think it is overkill and that the submenus could just be normal
> entries 
> with check boxes.

Well, then we can just ditch everything except for the first four
entries.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Jean-Marc Lasgouttes

Le 04/01/2017 à 16:19, Jürgen Spitzmüller a écrit :
> Except if you need to change from French "vernacular" quotation style
> to the French Imprimerie Nationale style

This is an interesting point actually. In an ideal world, I'd like an UI 
which is not intimidating to people who just want, well, quotes, but 
which can additionally cater for the needs of typography die-hards.



The way I saw it was:
1/ there is  a default style for each language, and it would be nice
to
have a 'default' setting for quotes, like we have for encoding. This
was
already the case for for 2.2-era quotes


Right.


I forgot: « and this does not require csquote, just adjusting the dialog 
UI. »


Actually, what I miss is that the quote type that has been selected by 
LyX when I changed language is the right default for my language, and 
that I should not have to worry about it if I do not know what I am doing.



Not wrong. But you miss the fact that after LyX made a proposal for a
default quote style for a given language, you might adjust that to your
or your publisher's need. And the dynamic quotes will output that and
not the "language default". Therefore such a label would be inadequate.


It is to the "quote style" menu that I proposed to add a "language 
default" value. Most users would leave it as it is and not have to see 
the scary list of quotes.



Well, I am certainly open to proposals, but you will have to convince
me. Of course I have pondered quite some time before implementing this,
so my views might be pretty cemented.


My point is that the user will probably not want to change a 
french-style left outer quote to a german style right inner quote very 
often. And this is precisely the feature proposed by the 10 submenus. I 
think it is overkill and that the submenus could just be normal entries 
with check boxes.



Hm ... I see, but then we would have to tinker with the GUI strings
depending on the buffer language.


It is not very easy, I know. Then I am not sure that we need a separate 
UI string for each case, a translation of "outer" and "inner" may 
suffice (optimistic, I know)


JMarc



Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 15:45 +0100 schrieb Jean-Marc Lasgouttes:
> I see. I probably do not need dynamic quotes, then :)

Except if you need to change from French "vernacular" quotation style
to the French Imprimérie Nationale style ;-)

> The way I saw it was:
> 1/ there is  a default style for each language, and it would be nice
> to 
> have a 'default' setting for quotes, like we have for encoding. This
> was 
> already the case for for 2.2-era quotes

Right.

> 2/ dynamic quotes are quotes of the type declared in Document
> Settings. 
> If I change document settings, they change.

Right.

> 3/ the 'dynamic quotes' checkbox in Document settings means "create
> all 
> new quotes as dynamic"

Right.

> How wrong am I?

Not wrong. But you miss the fact that after LyX made a proposal for a
default quote style for a given language, you might adjust that to your
or your publisher's need. And the dynamic quotes will output that and
not the "language default". Therefore such a label would be inadequate.

IOW the dynamic quotes feature includes what you describe, but it
exceeds that.

> > No. It shows the current style on top level and then all other
> > varieties in submenus. This strikes me more in line with the usual
> > writing workflow, where you usually stick with one style and might
> > want
> > to change outer to inner (or vice versa) or correct left to right.
> > This
> > were at least the use cases I had in mind when designing the menu.
> 
> So be it. You are the one who wrote the feature, after all ;)

Well, I am certainly open to proposals, but you will have to convince
me. Of course I have pondered quite some time before implementing this,
so my views might be pretty cemented.

> > How can we properly display this if the space depends on the
> > linguistic
> > context? "French" quotes will have no space when used in a (babel)
> > German text.
> 
> I am not sure actually. Doing it when the language is French would
> be 
> nice to users, but I imagine there are cases where it would deliver
> the 
> wrong idea.

Hm ... I see, but then we would have to tinker with the GUI strings
depending on the buffer language.

Jürgen

> 
> JMarc
> 

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Jean-Marc Lasgouttes

Le 04/01/2017 à 15:31, Jürgen Spitzmüller a écrit :

Again, this is a separate feature. Dynamic quotes, on the contrary, is
strong if letting you quickly change between different styles of a
given language (such as ,,this``and >>this<< both current in German).


I see. I probably do not need dynamic quotes, then :)
The way I saw it was:
1/ there is  a default style for each language, and it would be nice to 
have a 'default' setting for quotes, like we have for encoding. This was 
already the case for for 2.2-era quotes


2/ dynamic quotes are quotes of the type declared in Document Settings. 
If I change document settings, they change.


3/ the 'dynamic quotes' checkbox in Document settings means "create all 
new quotes as dynamic"


How wrong am I?


No. It shows the current style on top level and then all other
varieties in submenus. This strikes me more in line with the usual
writing workflow, where you usually stick with one style and might want
to change outer to inner (or vice versa) or correct left to right. This
were at least the use cases I had in mind when designing the menu.


So be it. You are the one who wrote the feature, after all ;)


How can we properly display this if the space depends on the linguistic
context? "French" quotes will have no space when used in a (babel)
German text.


I am not sure actually. Doing it when the language is French would be 
nice to users, but I imagine there are cases where it would deliver the 
wrong idea.


JMarc



Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 15:02 +0100 schrieb Guillaume Munch:
> But for dynamic quotes you wrote:
> 
> > There is even the need for dynamic and static quotes within the
> > same
> > document.
> 
> which the document setting does not address, but additional LFUN
> bindings (default or custom) does. This is why I see the argument for
> mixing static and dynamic quotes, but not one for a document setting.

And then users will have to change the default lfun every time they
want to switch quotation marks? This is most user unfriendly.

BTW this would also mean they would also need to change the lfun when
switching from (static) guillemets to (static) inverted commas for
German, since this uses the same principle (change of default lfun
behavior).

> > > What about having quote-insert input dynamic quotes by default
> > > except
> > > in
> > > foreign language?
> > 
> > I don't see how this is connected to foreign languages.
> 
> Your own argument why static quotes are still needed was about
> foreign
> language. 

I said it is _one_ reason where they might be needed. I did not say
that it is the only one, neither that language change always entails
quote style change.

You cannot make a one-for-all rule here, hence the user must be able to
set it on document level.

> So, here are two suggestions for improving dynamic quotes,
> good enough (AFAIU) to be a default behaviour, sparing the need for a
> document setting. 

What is so bad about a document setting?

> The one below makes the more sense, I find. But maybe 
> I misunderstood the specific use-cases you have in mind.

We probably have different use cases. And while a document setting
might just disturb you, since you don't need it, a missing document
setting will severely affect my use cases.

> I am really discussing whether it is a "special character", 

It is.

> and how it
> should be presented to all users. The idea is that if it becomes the
> default, then there is the possibility of making the change
> transparent
> to users.

And how do you distinguish a static guillemet from a dynamic one?

Jürgen


signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 14:47 +0100 schrieb Jean-Marc Lasgouttes:
> This is not what I meant. Rather "Language default" that auto, if
> you 
> prefer.
> If we use this setting then the quote type changes with document 
> language, but if we set a given one, it will not change with
> document 
> setting. No csquote needed here.

Again, this is a separate feature. Dynamic quotes, on the contrary, is
strong if letting you quickly change between different styles of a
given language (such as ,,this``and >>this<< both current in German).

> > > * concerning the context menu: what about separating a few check
> > > boxes
> > >   [ ] left
> > >   [x] right
> > >   [x] outer
> > >   [ ] inner
> > >   [ ] dynamic
> > > and then a list of quotes type as in the dialog menu? This seems
> > > easier
> > > than the complicated submenus we have now.
> > 
> > I do not understand.
> 
> I guess that we can agree that the current context menu is a bit
> heavy 
> on submenus. What I propose is to separate three family of things
> * what type of quote ? (left/right, outer/inner)
> * quoting scheme (dynamic or one in the list)

The number of items will not decrease with this.

> The current menu is a developed tree of all possibilities.

No. It shows the current style on top level and then all other
varieties in submenus. This strikes me more in line with the usual
writing workflow, where you usually stick with one style and might want
to change outer to inner (or vice versa) or correct left to right. This
were at least the use cases I had in mind when designing the menu.

> > > * there is still the issue of the additional spacing in French
> > > text
> > > that
> > > is not visible in the UI.
> > 
> > Can you send a minimal example? It is correct here.
> 
> I meant in the dialog/menu UI, not in the workarea.

How can we properly display this if the space depends on the linguistic
context? "French" quotes will have no space when used in a (babel)
German text.

Jürgen

> 
> JMarc
> 

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Guillaume Munch

Le 04/01/2017 à 14:23, Jürgen Spitzmüller a écrit :

Am Mittwoch, den 04.01.2017, 13:52 +0100 schrieb Guillaume Munch:

I find too that the above does not make the case for a new document
setting that changes the default behaviour of a LFUN.


Note that the quote document setting has done that since always.


But for dynamic quotes you wrote:


There is even the need for dynamic and static quotes within the same
document.


which the document setting does not address, but additional LFUN
bindings (default or custom) does. This is why I see the argument for
mixing static and dynamic quotes, but not one for a document setting.



What about having quote-insert input dynamic quotes by default except
in
foreign language?


I don't see how this is connected to foreign languages.


Your own argument why static quotes are still needed was about foreign
language. So, here are two suggestions for improving dynamic quotes,
good enough (AFAIU) to be a default behaviour, sparing the need for a
document setting. The one below makes the more sense, I find. But maybe 
I misunderstood the specific use-cases you have in mind.





Or, have the dynamic quote as default, but have it behave like a
foreign
code's default quote in foreign language. This default is not
configurable, but it is the same with the static quote.





If it is going to be the default then please do not have it in blue.


Well, blue is our color for "special characters" (which this is).

Of course, you can alter the special characters color in the prefs, if
you don't like it.



I am really discussing whether it is a "special character", and how it
should be presented to all users. The idea is that if it becomes the
default, then there is the possibility of making the change transparent
to users.




Re: dynamic quotes

2017-01-04 Thread Jean-Marc Lasgouttes

Le 04/01/2017 à 14:28, Jürgen Spitzmüller a écrit :

to the language. I understand that the second menu changes with
language, but this is not intuitive IMO. I'd prefer a line
   Auto («outer» and "inner")
that shows better what is happening.


This is an unimplemented and orthogonal feature, actually. We do only
adapt to the language on main language switch (both for static and
dynamic quotes). Automatic adaptation (as done by csquotes) would be
much more tricky, since we'd need to consider multilingual text.


This is not what I meant. Rather "Language default" that auto, if you 
prefer.
If we use this setting then the quote type changes with document 
language, but if we set a given one, it will not change with document 
setting. No csquote needed here.



* concerning the context menu: what about separating a few check
boxes
  [ ] left
  [x] right
  [x] outer
  [ ] inner
  [ ] dynamic
and then a list of quotes type as in the dialog menu? This seems
easier
than the complicated submenus we have now.


I do not understand.


I guess that we can agree that the current context menu is a bit heavy 
on submenus. What I propose is to separate three family of things

* what type of quote ? (left/right, outer/inner)
* quoting scheme (dynamic or one in the list)

The current menu is a developed tree of all possibilities.


* there is still the issue of the additional spacing in French text
that
is not visible in the UI.


Can you send a minimal example? It is correct here.


I meant in the dialog/menu UI, not in the workarea.

JMarc



Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 14:14 +0100 schrieb Jean-Marc Lasgouttes:
> A few comments on the UI:
> 
> * concerning the dialog: there is something that I miss in this
> dialog, 
> but I have difficulties to express what it is. First, I think there 
> should be a Auto setting for quote types, which gives the type
> adapted 
> to the language. I understand that the second menu changes with 
> language, but this is not intuitive IMO. I'd prefer a line
>    Auto («outer» and "inner")
> that shows better what is happening.

This is an unimplemented and orthogonal feature, actually. We do only
adapt to the language on main language switch (both for static and
dynamic quotes). Automatic adaptation (as done by csquotes) would be
much more tricky, since we'd need to consider multilingual text.

> * concerning the context menu: what about separating a few check
> boxes
>   [ ] left
>   [x] right
>   [x] outer
>   [ ] inner
>   [ ] dynamic
> and then a list of quotes type as in the dialog menu? This seems
> easier 
> than the complicated submenus we have now.

I do not understand.

> * there is still the issue of the additional spacing in French text
> that 
> is not visible in the UI.

Can you send a minimal example? It is correct here.

Jürgen

> 
> I apologize in advance if I am rehashing old arguments.
> 
> JMarc

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Mittwoch, den 04.01.2017, 13:52 +0100 schrieb Guillaume Munch:
> I find too that the above does not make the case for a new document
> setting that changes the default behaviour of a LFUN.

Note that the quote document setting has done that since always.

> > > Also note that an LFUN change is all but user friendly. This
> > > would hide
> > > the dynamic quotes from most users.
> > 
> > I propose to change the pre-set keybinding for " from "quote-
> > insert" to
> > "quote-insert * * dynamic".
> 
> What about having quote-insert input dynamic quotes by default except
> in
> foreign language?

I don't see how this is connected to foreign languages.

> Or, have the dynamic quote as default, but have it behave like a
> foreign
> code's default quote in foreign language. This default is not
> configurable, but it is the same with the static quote.
> 
> > 
> > This would expose the new quote inset variant to users, especially
> > as it is
> > now blue.
> > 
> 
> If it is going to be the default then please do not have it in blue.

Well, blue is our color for "special characters" (which this is).

Of course, you can alter the special characters color in the prefs, if
you don't like it.

Jürgen



signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-04 Thread Jean-Marc Lasgouttes
I come late into this thread, which I kind of neglected (shame on me!). 
A few comments below.


Le 04/01/2017 à 13:41, Jürgen Spitzmüller a écrit :

Yes, this is why we need static quotes (or just a convenient way to
insert
Unicode quote characters) besides the "dynamic" quotes.


Indeed. And no, not unicode characters. Real quote insets with proper
semantics (such as "open"/"close", "inner"/"outer"), which can easily
be modified.


Agreed.


I propose to change the pre-set keybinding for " from "quote-insert"
to
"quote-insert * * dynamic".


We could make dynamic quotes the default, if this finds a majority. But
I am strictly opposed to require fiddling with lfuns to change quote
style.


Why do we need to specify in the lfun whether dynamic is the default? 
Isn't the document setting doing exactly that?



Also, the UI is much cleaner the way it is now.


A few comments on the UI:

* concerning the dialog: there is something that I miss in this dialog, 
but I have difficulties to express what it is. First, I think there 
should be a Auto setting for quote types, which gives the type adapted 
to the language. I understand that the second menu changes with 
language, but this is not intuitive IMO. I'd prefer a line

  Auto («outer» and "inner")
that shows better what is happening.

* concerning the context menu: what about separating a few check boxes
 [ ] left
 [x] right
 [x] outer
 [ ] inner
 [ ] dynamic
and then a list of quotes type as in the dialog menu? This seems easier 
than the complicated submenus we have now.


* there is still the issue of the additional spacing in French text that 
is not visible in the UI.


I apologize in advance if I am rehashing old arguments.

JMarc


Re: dynamic quotes

2017-01-04 Thread Guillaume Munch

Le 01/01/2017 à 18:29, Guenter Milde a écrit :

On 2016-12-31, Jürgen Spitzmüller wrote:

Is there a use case for the document specific setting?
(I.e. is there someone in need for one keybinding inserting "dynamic"
quote insets in one document but "static" quote insets in another
document?)



Yes. I prefer to use static quotes in some documents, dynamic in the
other.




There is even the need for dynamic and static quotes within the same
document. If I need different quote styles within one document (e.g.,
English style within English quotations within a German document), I
need to use static quotes. Nevertheless I could still need to use a
dynamic type for the main quotes. The latter lets me switch from
inverted commas to guillemets (or vice versa) if my publisher requests
this.


Yes, this is why we need static quotes (or just a convenient way to insert
Unicode quote characters) besides the "dynamic" quotes.

But in any case the "foreign" quotes require either modifying the
once-inserted quote (via context menu) or insertion via LFUN with arguments
or the Insert>Character>... menu.

This would be independent of the value of an eventual (and in my view not
necessary) document setting.


I find too that the above does not make the case for a new document
setting that changes the default behaviour of a LFUN.




Also note that an LFUN change is all but user friendly. This would hide
the dynamic quotes from most users.


I propose to change the pre-set keybinding for " from "quote-insert" to
"quote-insert * * dynamic".


What about having quote-insert input dynamic quotes by default except in
foreign language?

Or, have the dynamic quote as default, but have it behave like a foreign
code's default quote in foreign language. This default is not
configurable, but it is the same with the static quote.



This would expose the new quote inset variant to users, especially as it is
now blue.



If it is going to be the default then please do not have it in blue.




Re: dynamic quotes

2017-01-04 Thread Jürgen Spitzmüller
Am Sonntag, den 01.01.2017, 17:29 + schrieb Guenter Milde:
> > There is even the need for dynamic and static quotes within the
> > same
> > document. If I need different quote styles within one document
> > (e.g.,
> > English style within English quotations within a German document),
> > I
> > need to use static quotes. Nevertheless I could still need to use a
> > dynamic type for the main quotes. The latter lets me switch from
> > inverted commas to guillemets (or vice versa) if my publisher
> > requests
> > this.
> 
> Yes, this is why we need static quotes (or just a convenient way to
> insert
> Unicode quote characters) besides the "dynamic" quotes.

Indeed. And no, not unicode characters. Real quote insets with proper
semantics (such as "open"/"close", "inner"/"outer"), which can easily
be modified.

> But in any case the "foreign" quotes require either modifying the
> once-inserted quote (via context menu) or insertion via LFUN with
> arguments
> or the Insert>Character>... menu.

I don't understand this statement.

> This would be independent of the value of an eventual (and in my view
> not
> necessary) document setting.

Neither this.

> > Also note that an LFUN change is all but user friendly. This would
> > hide
> > the dynamic quotes from most users.
> 
> I propose to change the pre-set keybinding for " from "quote-insert"
> to 
> "quote-insert * * dynamic". 

We could make dynamic quotes the default, if this finds a majority. But
I am strictly opposed to require fiddling with lfuns to change quote
style.

Also, the UI is much cleaner the way it is now.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2017-01-03 Thread Guenter Milde
On 2016-12-31, Jürgen Spitzmüller wrote:
> Am Freitag, den 30.12.2016, 22:39 + schrieb Guenter Milde:

>> Currently, there are two ways to activate a keybinding for inserting
>> "dynamic" quote insets:

>> a) add or change a keybinding in Tools>Preferences>Editing>Shortcuts

>> b) change the default behaviour of the "quote-insert" LFUN with the
>> new
>>    buffer setting "dynamic_quotes"
>>    (The setting does not change the behaviour of existing quote
>> insets.)

>> Variant a) works LyX-wide, variant b) document specific.
...
>> Is there a use case for the document specific setting?
>> (I.e. is there someone in need for one keybinding inserting "dynamic"
>> quote insets in one document but "static" quote insets in another
>> document?)

> Yes. I prefer to use static quotes in some documents, dynamic in the
> other.


> There is even the need for dynamic and static quotes within the same
> document. If I need different quote styles within one document (e.g.,
> English style within English quotations within a German document), I
> need to use static quotes. Nevertheless I could still need to use a
> dynamic type for the main quotes. The latter lets me switch from
> inverted commas to guillemets (or vice versa) if my publisher requests
> this.

Yes, this is why we need static quotes (or just a convenient way to insert
Unicode quote characters) besides the "dynamic" quotes.

But in any case the "foreign" quotes require either modifying the
once-inserted quote (via context menu) or insertion via LFUN with arguments
or the Insert>Character>... menu.

This would be independent of the value of an eventual (and in my view not
necessary) document setting.

> Also note that an LFUN change is all but user friendly. This would hide
> the dynamic quotes from most users.

I propose to change the pre-set keybinding for " from "quote-insert" to 
"quote-insert * * dynamic". 

This would expose the new quote inset variant to users, especially as it is
now blue.

Günter




Re: dynamic quotes

2016-12-31 Thread Jürgen Spitzmüller
Am Freitag, den 30.12.2016, 22:39 + schrieb Guenter Milde:
> Currently, there are two ways to activate a keybinding for inserting
> "dynamic" quote insets:
> 
> a) add or change a keybinding in Tools>Preferences>Editing>Shortcuts
> 
> b) change the default behaviour of the "quote-insert" LFUN with the
> new
>    buffer setting "dynamic_quotes"
>    (The setting does not change the behaviour of existing quote
> insets.)
> 
> Variant a) works LyX-wide, variant b) document specific.
> 
> 
> Now my question: do we need b) or could we keep things more simple.
> 
> Is there a use case for the document specific setting?
> (I.e. is there someone in need for one keybinding inserting "dynamic"
> quote insets in one document but "static" quote insets in another
> document?)

Yes. I prefer to use static quotes in some documents, dynamic in the
other.
There is even the need for dynamic and static quotes within the same
document. If I need different quote styles within one document (e.g.,
English style within English quotations within a German document), I
need to use static quotes. Nevertheless I could still need to use a
dynamic type for the main quotes. The latter lets me switch from
inverted commas to guillemets (or vice versa) if my publisher requests
this.

Also note that an LFUN change is all but user friendly. This would hide
the dynamic quotes from most users.

Jürgen

> 
> Thanks for your work,
> 
> Günter
> 
> 
> 

signature.asc
Description: This is a digitally signed message part


Re: dynamic quotes

2016-12-30 Thread Guillaume Munch

Le 30/12/2016 à 23:39, Guenter Milde a écrit :

Dear Jürgen, dear LyX developers,

I am glad to see the "dynamic quotes" and optional arguments to the
quote-insert LFUN are implemented. Now,

  M-x quote-insert * * dynamic

inserts a quote-inset that

* is rendered blue in the GUI, so we can see it is not a "normal" character

* can be changed:
   + on a case-by-case basis via the context menu,
   + globally by changing the "quote style" in Document>Settings>Language.


Currently, there are two ways to activate a keybinding for inserting
"dynamic" quote insets:

a) add or change a keybinding in Tools>Preferences>Editing>Shortcuts

b) change the default behaviour of the "quote-insert" LFUN with the new
   buffer setting "dynamic_quotes"
   (The setting does not change the behaviour of existing quote insets.)

Variant a) works LyX-wide, variant b) document specific.


Now my question: do we need b) or could we keep things more simple.

Is there a use case for the document specific setting?
(I.e. is there someone in need for one keybinding inserting "dynamic"
quote insets in one document but "static" quote insets in another
document?)



Thanks for your detailed explanation. I was wondering the same. I find
the new buffer parameter redundant with a LFUN. One possible answer,
though, is that a buffer parameter helps homogenize a document in the
case of a collaborative work.