Discussion:
[Gramps-devel] making NBSP visible
Paul Franklin
2017-07-05 17:57:49 UTC
Permalink
I am having a private conversation with a user, and he
has requested that gramps make the non-breaking space
character visible, so he can see it (between given names
which should stay together, be kept together by gramps).

He wants us to "display those NBSP like making them grey
similar to what libreOffice do, or else how can I check whether
I put SP or NBSP."

So I am asking you GUI people if this can be done? Maybe
we could modify the name displayer? Is that used in views
and gramplets and other things? Would some other approach
work, if not?

I would guess that sort of thing would be built into Gtk, already,
but maybe we need to enable it or something?

Should I file a bug report (since it's not visible now)?

Thanks.
Paul Franklin
2017-07-06 17:34:47 UTC
Permalink
Funny, it makes me remember issue #9242
https://gramps-project.org/bugs/view.php?id=9242
Yes.

I would say that we need to have a preference option,
initially enabled, which enables the display of non-printing
characters whenever names are shown in the GUI.

Besides the NBSP and linefeed, it should probably also
show the obvious ones, carriage-return and tab at least.

Each such character should have its own unique glyph,
and I would suggest that we use the same ones as some
widely-available program already uses, LibreOffice or Word
for instance. (I'd vote for Word myself, since I've thought
for a long time that most of our users are on Windows.)
paul womack
2017-07-07 07:55:46 UTC
Permalink
Post by Paul Franklin
I am having a private conversation with a user, and he
has requested that gramps make the non-breaking space
character visible, so he can see it (between given names
which should stay together, be kept together by gramps).
Could you expand on the use(s) and behaviours this user
wants for NBSP, and what problems it will solve?

BugBear
Paul Franklin
2017-07-07 17:06:14 UTC
Permalink
Post by paul womack
Could you expand on the use(s) and behaviours this user
wants for NBSP, and what problems it will solve?
It has to do with possible naming conventions in different
cultures. Right now, gramps will break name elements at
a space, perhaps when a name starts near the end of a
line in a report, or in a gramplet.

Let's say the user has a person whose name is entered as
Mary Ellen Nancy Smith, but she is always known as
"Mary Ellen" and not "Mary" nor "Ellen" so the user needs
some way to be able to enter that fact, that parts of a name
are desired to never be broken up, separated.

Another example might be for a man whose name is "Ali
bin Sultan al Faisal" with "al Faisal" being the family name
and "bin Sultan" being his middle name, so he doesn't want
the "bin Sultan" to be broken up by gramps, separated.

That is (as I understand it) the function of a non-breaking
space character, that's what "non-breaking" means. So (for
instance) a line in a report will never have "Mary" on it and
then "Ellen" on the next line, or a gramplet which lists given
names will have the given name as "Mary Ellen" and not just
"Mary".

You might try a Google search for "non-breaking space" but
I got a lot of instances of such a thing and not very many which
explained it instead, when I tried. But your mileage may vary.
John Ralls
2017-07-07 17:31:20 UTC
Permalink
Post by Paul Franklin
Post by paul womack
Could you expand on the use(s) and behaviours this user
wants for NBSP, and what problems it will solve?
It has to do with possible naming conventions in different
cultures. Right now, gramps will break name elements at
a space, perhaps when a name starts near the end of a
line in a report, or in a gramplet.
Let's say the user has a person whose name is entered as
Mary Ellen Nancy Smith, but she is always known as
"Mary Ellen" and not "Mary" nor "Ellen" so the user needs
some way to be able to enter that fact, that parts of a name
are desired to never be broken up, separated.
Another example might be for a man whose name is "Ali
bin Sultan al Faisal" with "al Faisal" being the family name
and "bin Sultan" being his middle name, so he doesn't want
the "bin Sultan" to be broken up by gramps, separated.
That is (as I understand it) the function of a non-breaking
space character, that's what "non-breaking" means. So (for
instance) a line in a report will never have "Mary" on it and
then "Ellen" on the next line, or a gramplet which lists given
names will have the given name as "Mary Ellen" and not just
"Mary".
You might try a Google search for "non-breaking space" but
I got a lot of instances of such a thing and not very many which
explained it instead, when I tried. But your mileage may vary.
Non-breaking space is code point U+00A0. The only way to enter it on a normal keyboard is the alt-1-6-0 trick (which requires setting a special input method on Macs). Gramps may well respect it when parsing a given name list.

Regards,
John Ralls
Paul Franklin
2017-07-07 18:31:11 UTC
Permalink
Post by John Ralls
Non-breaking space is code point U+00A0.
Yes, I know.
Post by John Ralls
The only way to enter it on a normal keyboard is the alt-1-6-0
trick (which requires setting a special input method on Macs).
Well, I think it depends on your o.s., since IIRC some people can
enter it with a ctrl-alt-space. But how the user will enter it is a
different problem as far as I am concerned, but perhaps related.
Post by John Ralls
Gramps may well respect it when parsing a given name list.
That's one of my goals (and a bug), but what I'd like to get
help on is how to have gramps show it, perhaps optionally,
how to get gramps to display it (some glyph which the user
will quickly learn -- or already know, if we pick a "standard"
one -- means a non-breaking space). I'm not a GUI person.
Paul Culley
2017-07-07 22:17:41 UTC
Permalink
I'm hardly an expert, but I have done some searching and I cannot find any
obvious way to just show nbsp and other hidden punctuation marks using Gtk
facilities.

So I expect that we would have to do some work ourselves. Probably we
should look at substituting certain characters with others as the easiest
mechanism.

Msoft Word seems to use the following when showing hidden characters:
space: interpunct u+00B7 '·'
nbsp: degree sign, U+00B0 '°'
tab: one of the right arrows U+2192 '→' (this might not be right, it is not
an exact match)
paragraph: pilcrow U+00B6 '¶'

I looked at LibreOffice and it appeared to use a colored space for the
nbsp; seems this would be more difficult to implement, we would have to use
markup type text displays and do a markup in our substitutions.

Just some thoughts.

Paul C.
Post by Paul Franklin
Post by John Ralls
Non-breaking space is code point U+00A0.
Yes, I know.
Post by John Ralls
The only way to enter it on a normal keyboard is the alt-1-6-0
trick (which requires setting a special input method on Macs).
Well, I think it depends on your o.s., since IIRC some people can
enter it with a ctrl-alt-space. But how the user will enter it is a
different problem as far as I am concerned, but perhaps related.
Post by John Ralls
Gramps may well respect it when parsing a given name list.
That's one of my goals (and a bug), but what I'd like to get
help on is how to have gramps show it, perhaps optionally,
how to get gramps to display it (some glyph which the user
will quickly learn -- or already know, if we pick a "standard"
one -- means a non-breaking space). I'm not a GUI person.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Paul Franklin
2017-07-08 07:26:00 UTC
Permalink
Post by Paul Culley
I'm hardly an expert, but I have done some searching and I cannot find any
obvious way to just show nbsp and other hidden punctuation marks using Gtk
facilities.
That's too bad. (I have heard them called "format effectors"
also, but I am not sure that's right.)
Post by Paul Culley
So I expect that we would have to do some work ourselves. Probably we
should look at substituting certain characters with others as the easiest
mechanism.
I could believe that, too. But I'm guessing we'd only need
to do it to display them, not store them in the DB (or XML).
Post by Paul Culley
space: interpunct u+00B7 '·'
nbsp: degree sign, U+00B0 '°'
tab: one of the right arrows U+2192 '→' (this might not be right, it is not
an exact match)
paragraph: pilcrow U+00B6 '¶'
I looked at LibreOffice and it appeared to use a colored space for the
nbsp; seems this would be more difficult to implement, we would have to use
markup type text displays and do a markup in our substitutions.
Just some thoughts.
Thank you for doing the checking. I appreciate it.

Personally, I will happily accept any solution which
seems possible to implement, and which somehow
gives our users the feedback some might want. But
I suggest it should be a preference ("show non-printing
characters" maybe, say in Edit=>Preferences=>Display).

I'm not sure about tab being shown as a right-arrow though,
as right-arrow is already used in gramps, somewhere (IIRC).

Does Word show a linefeed? The bug Jerome cited was a
user copying-and-pasting and including a linefeed accidentally.

Thanks again.

Paul Franklin
2017-07-07 17:18:30 UTC
Permalink
Users under Windows OS should always use all Microsoft products like Word ?
Yes, that's what they did. That's why M$ was so successful
and why they made so much money. And why the EU made them
unbundle IE from Windows years ago (not that it did much good).
As far as I know LibreOffice is available for Windows OS too ?
I do not feel like having a "linux vs. Windows" discussion, and
diverting this thread from "making a non-breaking space visible",
but I'd be willing to bet money that an honest poll of the average
typical Windows user would show at least 80% have heard of
Word and never heard of LibreOffice or OpenOffice.

A less-extreme example would be an owner of an XXX car who
always has it serviced by an XXX dealer, even though there are
mechanics out there who know about XXX cars too.
Loading...