Re: Quotes in stats

2023-05-08 Thread Pavel Sanda
On Mon, May 08, 2023 at 02:17:41PM +0200, Jean-Pierre Chrétien wrote:
> In French, the guillemets are inserted as characters ?? and ??
> (automatically translated from  typed character "), but they are associated
> to a protected space, so in ?? exemple ??, there are 9 characters without
> blanks and 11 with blanks.

But this protected space is added by user or it's LyX's doing?
Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quotes in stats

2023-05-08 Thread Jean-Pierre Chrétien

Le 08/05/2023 à 14:43, Pavel Sanda a écrit :

On Mon, May 08, 2023 at 02:17:41PM +0200, Jean-Pierre Chrétien wrote:

In French, the guillemets are inserted as characters ?? and ??
(automatically translated from  typed character "), but they are associated
to a protected space, so in ?? exemple ??, there are 9 characters without
blanks and 11 with blanks.


But this protected space is added by user or it's LyX's doing?


LyX does the job, the spaces appear in the LyX window.

Same stuff for punctuation marks : ; ? and !, which are all preceded by a 
protected space in French. the space is added by Lyx, but it does not need to 
appear in the LyX window.


But it is weirder than it looks: if the user types in a space before : ; ? and 
!, LyX does not add anything, but makes it a protected space if it is not one.


So, it is clear that the French guillemets counts for 2 characters (one if 
blanks excluded), but for the : ; ? and ! characters, it would be necessary to 
count 2 characters if the punctuation sign is not preceded by a blank.
I suppose that you count characters in the output from the analysis of the 
characters in the LyX window, is this correct ?


--
Jean-Pierre

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Quotes in stats

2023-05-08 Thread Pavel Sanda
Hi,

I almost submitted abstract overflowing in characters, because we do not count 
quotes in statistics.
Attached is the patch fixing it.

Just to make sure, isn't some of the types below to be counted as more than 1 
character?

 * e``english''  (`inner quotation') 
 * s''swedish''  ('inner quotation') 
 * g,,german``   (,inner quotation`) 
 * p,,polish''   (,inner quotation') 
 * c<>() 
 * a>>danish<<   (>inner quotation<) 
 * q"plain"  ('inner quotation') 
 * b`british'(``inner quotation'') 
 * w>>swedishg>> ('inner quotation') ["g" = Guillemets] 
 * f<>   (``inner quotation'') 
 * i<> (<>) ["in" = Imprimerie Nationale] 
 * r<>  (,,inner quotation``) 
 * j[U+300C]cjk[U+300D]  ([U+300E]inner quotation[U+300F]) [CORNER 
BRACKETS] 
 * k[U+300A]cjkangle[U+300B]  ([U+3008]inner quotation[U+3009]) [ANGLE 
BRACKETS] 
 * h,,hungarian''   (>>inner quotation<<) 
 * xdynamic style (inherits document settings)


Pavel
diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp
index 6fcc755d81..4c073da227 100644
--- a/src/insets/InsetQuotes.cpp
+++ b/src/insets/InsetQuotes.cpp
@@ -1021,4 +1021,11 @@ string InsetQuotes::contextMenuName() const
return "context-quote";
 }
 
+
+pair InsetQuotes::isWords() const
+{
+   //one character from the statistics perspective
+   return std::pair(1, 0);
+}
+
 } // namespace lyx
diff --git a/src/insets/InsetQuotes.h b/src/insets/InsetQuotes.h
index 5541af4a67..bebe9f1ec0 100644
--- a/src/insets/InsetQuotes.h
+++ b/src/insets/InsetQuotes.h
@@ -173,6 +173,8 @@ public:
 
/// Returns the current quote type
std::string getType() const;
+   ///
+   std::pair isWords() const override;
 
 private:
///
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quotes in stats

2023-05-08 Thread Jean-Pierre Chrétien

Le 08/05/2023 à 14:02, Pavel Sanda a écrit :

Hi,

I almost submitted abstract overflowing in characters, because we do not count 
quotes in statistics.
Attached is the patch fixing it.

Just to make sure, isn't some of the types below to be counted as more than 1 
character?

  * e``english''  (`inner quotation')
  * s''swedish''  ('inner quotation')
  * g,,german``   (,inner quotation`)
  * p,,polish''   (,inner quotation')
  * c<>()
  * a>>danish<<   (>inner quotation<)
  * q"plain"  ('inner quotation')
  * b`british'(``inner quotation'')
  * w>>swedishg>> ('inner quotation') ["g" = Guillemets]
  * f<>   (``inner quotation'')
  * i<> (<>) ["in" = Imprimerie Nationale]


In French, the guillemets are inserted as characters « and » (automatically 
translated from  typed character "), but they are associated to a protected 
space, so in « exemple », there are 9 characters without blanks and 11 with blanks.


--
Jean-Pierre


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quotes in stats

2023-05-08 Thread Jean-Pierre Chrétien

Le 08/05/2023 à 15:21, Jean-Pierre Chrétien a écrit :

Le 08/05/2023 à 14:43, Pavel Sanda a écrit :

On Mon, May 08, 2023 at 02:17:41PM +0200, Jean-Pierre Chrétien wrote:

In French, the guillemets are inserted as characters ?? and ??
(automatically translated from  typed character "), but they are associated
to a protected space, so in ?? exemple ??, there are 9 characters without
blanks and 11 with blanks.


But this protected space is added by user or it's LyX's doing?


LyX does the job, the spaces appear in the LyX window.

Same stuff for punctuation marks : ; ? and !, which are all preceded by a 
protected space in French. the space is added by Lyx, but it does not need to 
appear in the LyX window.


But it is weirder than it looks: if the user types in a space before : ; ? and 
!, LyX does not add anything, but makes it a protected space if it is not one.


So, it is clear that the French guillemets counts for 2 characters (one if 
blanks excluded), but for the : ; ? and ! characters, it would be necessary to 
count 2 characters if the punctuation sign is not preceded by a blank.
I suppose that you count characters in the output from the analysis of the 
characters in the LyX window, is this correct ?




Attached is an example file.

--
Jean-Pierre


ponctuation.lyx
Description: application/lyx
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Size of document settings dialog

2023-05-08 Thread Jürgen Spitzmüller
Am Montag, dem 08.05.2023 um 18:03 +0200 schrieb Jürgen Spitzmüller:
> I'd go for tabs or something similar. These contents clearly belong
> to the section they are.

Or we can introduce subsections as we have in prefs.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Size of document settings dialog

2023-05-08 Thread Jürgen Spitzmüller
Am Montag, dem 08.05.2023 um 17:26 +0200 schrieb Pavel Sanda:
> Hi,
> 
> the document settings dialog quite grew in vertical size for 2.4
> mainly due to the
> formats pane and I think we should shrink it back.
> 
> I see several options:
>   1) create tabbed pane for docbook/xhtml(and perhaps TeX)
>   2) Move content of "LyX Format" to "Output format" (not
> conceptually clean but would
>  work if properly rephrased e.g. "Save transient properties into
> LyX format").
>   3) Create completely new pane (not sure about new grouping though)
>   4) Introducing scrollbars?
> 
> I'd prefer 2), but mostly due to my laziness :)
> 
> Opinions/preferences?

I'd go for tabs or something similar. These contents clearly belong to
the section they are.

> 
> Pavel

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Size of document settings dialog

2023-05-08 Thread Pavel Sanda
Hi,

the document settings dialog quite grew in vertical size for 2.4 mainly due to 
the
formats pane and I think we should shrink it back.

I see several options:
  1) create tabbed pane for docbook/xhtml(and perhaps TeX)
  2) Move content of "LyX Format" to "Output format" (not conceptually clean 
but would
 work if properly rephrased e.g. "Save transient properties into LyX 
format").
  3) Create completely new pane (not sure about new grouping though)
  4) Introducing scrollbars?

I'd prefer 2), but mostly due to my laziness :)

Opinions/preferences?

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quotes in stats

2023-05-08 Thread Jean-Pierre Chrétien

Le 08/05/2023 à 15:45, Pavel Sanda a écrit :

On Mon, May 08, 2023 at 03:21:05PM +0200, Jean-Pierre Chrétien wrote:

So, it is clear that the French guillemets counts for 2 characters (one if
blanks excluded),


Well, I would presume that even if we output space, it's sort of typographic
adjustment and not blank as a character but as you wish, I can easily return
2 chars instead of 1 for guillemets.


In fact, it is a thin space...


What libreoffice/word think about this situation?


libreoffice finds 34 words instead of 28, ,which I do not understand. 
EWhenounting the number of characters excluding blanks, it finds 249 instaed of 
247...





but for the : ; ? and ! characters, it would be necessary
to count 2 characters if the punctuation sign is not preceded by a blank.


This is getting more tricky, because we generaly do look on the context when we
counting the characters (except of catching blanks/.?/etc around words).


In that case too, the blank character si a thin space.

--
Jean-Pierre


ponctuation.odt
Description: application/vnd.oasis.opendocument.text
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quotes in stats

2023-05-08 Thread Pavel Sanda
On Mon, May 08, 2023 at 06:06:48PM +0200, Jean-Pierre Chrétien wrote:
> Le 08/05/2023 ?? 15:45, Pavel Sanda a écrit :
> >On Mon, May 08, 2023 at 03:21:05PM +0200, Jean-Pierre Chrétien wrote:
> >>So, it is clear that the French guillemets counts for 2 characters (one if
> >>blanks excluded),
> >
> >Well, I would presume that even if we output space, it's sort of typographic
> >adjustment and not blank as a character but as you wish, I can easily return
> >2 chars instead of 1 for guillemets.
> 
> In fact, it is a thin space...

And we are back to square one :)

Let me put it in different way: if you are to submit some short 
french text in web text form (say an article abstract) - so there
are no fancy typographic options. 
Or you are putting french comment to your source code containing
someone's quotation.

Would you rather add guillemets with normal space or you'd rather
put no space at all?

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Size of document settings dialog

2023-05-08 Thread Jean-Marc Lasgouttes

Le 08/05/2023 à 17:26, Pavel Sanda a écrit :

Hi,

the document settings dialog quite grew in vertical size for 2.4 mainly due to 
the
formats pane and I think we should shrink it back.


Why is this called Formats and not Output, BTW?

I also think that a subpanel Output Options, with TeX/XHTML/DocBook 
tabs, would work well.


JMarc

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: What is missing for LyX 2.4?

2023-05-08 Thread Pavel Sanda
On Fri, May 05, 2023 at 12:17:46PM -0400, Richard Kimberly Heck wrote:
> On 5/4/23 12:33, Pavel Sanda wrote:
> >On Thu, May 04, 2023 at 05:00:27PM +0100, José Matos wrote:
> >>>Also as I mentioned in other subthread, would you mind posting the
> >>>current
> >>>version of /etc/ImageMagick-6/policy.xml in fedora (please make sure
> >>>you
> >>>did not tweak the file on your own :)?
> >>The file is /etc/ImageMagick-7/policy.xml and follows attached.
> >Thanks, Fedora clearly choses to walk on the wild side.
> 
> This sounds like the biggest issue left. Is GraphicsMagick an option, or
> does it have the same issues?

Worth checking indeed. But even if it works the only thing left for us to do
is to suggest packagers changing dependencies.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quotes in stats

2023-05-08 Thread Pavel Sanda
On Mon, May 08, 2023 at 03:21:05PM +0200, Jean-Pierre Chrétien wrote:
> So, it is clear that the French guillemets counts for 2 characters (one if
> blanks excluded),

Well, I would presume that even if we output space, it's sort of typographic
adjustment and not blank as a character but as you wish, I can easily return
2 chars instead of 1 for guillemets.
What libreoffice/word think about this situation?

> but for the : ; ? and ! characters, it would be necessary
> to count 2 characters if the punctuation sign is not preceded by a blank.

This is getting more tricky, because we generaly do look on the context when we
counting the characters (except of catching blanks/.?/etc around words).

> I suppose that you count characters in the output from the analysis of the
> characters in the LyX window, is this correct ?

Yes. Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel