PROBLEM: LibreOffice Writer do not comply with the basic orthography in Spanish, regulations from 2010 The regulation in question is available here, in Spanish https://preview.ibb.co/e9T7qV/RAE1.jpg Translated into english the regulation state very clearly that, to separate the thousands in figures, is necessary to insert a "THIN SPACE" between the groups of 3 numbers. Example: With a normal Space: 4 727 174 The space you saw above is a standard space, the same space you get when pressing the space bar in your keyboard. *** However, the regulations in Spanish forces you to use a thiner space than a normal space or hard space. *** This is a thin space: With thin Space (Unicode 200A) 4 727 174 *** As you may see there is a huge difference between the normal and thin space. *** Without any Space 4727174 This is a thin space: https://en.wikipedia.org/wiki/Thin_space This is a normal or standard space (the same you get when pressing the space bar) https://en.wikipedia.org/wiki/Space_(punctuation) To see the differences among a normal, thin and long space, please, see this picture: https://preview.ibb.co/jhvRjq/RAE2.jpg ------------------- SUGGESTED SOLUTION: ------------------- LibrOffice writer should be able to insert different kind of spaces when pressing spacebard on the keyboard with a combination of keys. The proposed combination is as follows Spacebar ----------> Insert a normal space Ctrl + Spacebar ---> Insert a thin space Alt + Spacebar ----> Insert a EN space Note to the programmers: The spaces can be inserted easily just using the Unicode code. Basically is necessary to create a combination of keys associated to the spacebar that insert the unicode code for thin space, EN space, etc. More space combinations could be obtained by playing the combination of keys: Alt + Shift + Spacebar, Tab + Spacebar, Ctrl + Alt + Spacebar A list of the Unicode spaces are here: -------------------------------------- http://jkorpela.fi/chars/spaces.html https://en.wikipedia.org/wiki/Whitespace_character#Hair_spaces_around_dashes REMINDER TO THE LIBREOFFICE COMMUNITY ------------------------------------- As you may know LibreOffice is being adopted by many governments in the world, and they are switching to the Open Source software. In Spain the government is paying special attention to follow the basic rules of grammar, so I consider this enhancement is absolutely necessary and IT IS NOT just an "asthetic matter". Not accepting this enhancement or considering it just as non-important imply going against the basic grammar rules. Please, have that in mind before taking any decission.
The character is also called hair space. You can insert it easily per special characters (add to favorites). So the question is if we want to assign special whitespaces by default to shift/alt/ctrl+space. I would say yes but hard to say which one/s is/are the most needed https://en.wikipedia.org/wiki/Whitespace_character
(In reply to Heiko Tietze from comment #1) > > So the question is if we want to assign special whitespaces by default to > shift/alt/ctrl+space. I would say yes but hard to say which one/s is/are the > most needed https://en.wikipedia.org/wiki/Whitespace_character The <Shift>, <Ctrl>, <Alt> + <Space> keys are available to assign as Keyboard shortcuts for the U+200A (HAIR SPACE), U+2009 (THIN SPACE), or U+2002 (EN SPACE) so my +1 to shortcut assignment by default. Document canvas needs some indication when any of these reduced/expanded spaces are present [1]. It would be appropriate that these codepoints be handled as current set of NPC, so that toggling the paragraph marks will also show them. Finally, would there be enough variation in "official" typography that this set of spacing shortcuts need to be localized with a stanza added i18npool/source/localedata/data/*.xml? =-ref-= [1]https://en.wikipedia.org/wiki/Whitespace_character#Unicode
We discussed this in the design meeting and agree on the benefit of a shortcut. However, ctrl+space is occupied in many OS/DE and likely alt+space is also used in some so we suggest to have only one shortcut for ctrl+alt+space, which is ideally the U+200A thin space.
(In reply to Heiko Tietze from comment #3) > We discussed this in the design meeting and agree on the benefit of a > shortcut. However, ctrl+space is occupied in many OS/DE and likely alt+space > is also used in some so we suggest to have only one shortcut for > ctrl+alt+space, which is ideally the U+200A thin space. REasonable, but the U+200A "HAIR SPACE" will need some treatment as a NPC, either Field shading <Ctrl>+<F8> or the NPC of the Formatting marks <Ctrl>+<F10> toggle. We'd be causing real problems with hidden characters if we do not address bug 58434
Please note : On macOS : Ctrl-Alt-Space launches the Finder Search dialog Cmd-Alt-Space toggles keyboard configuration language Please don't start messing with these.
(In reply to V Stuart Foote from comment #2) > Finally, would there be enough variation in "official" typography that this > set of spacing shortcuts need to be localized with a stanza added > i18npool/source/localedata/data/*.xml? For number formatting, if the group separator in normal writing is a space then a U+00A0 NO-BREAK SPACE (NBSP) should be used (as also defined in locale data where applicable) instead, because you don't want your numbers wrap to the next line. Similar, if the group separator should be a thin space then for number formatting purposes it should be a U+202F NARROW NO-BREAK SPACE (NNBSP). Whatever keyboard shortcuts would be assigned to enter various spaces is beyond the scope of i18npool's locale data. However, programmatically the es-ES locale uses '.' dot as group (thousand) separator, see also https://ssl.icu-project.org/icu-bin/locexp?d_=en&_=es_ES under "Numbers : Western Digits" and https://unicode.org/cldr/charts/latest/verify/numbers/es.html The cited article (attached screenshot) seems to talk about ISO 31-0 ("la normativa internacional"), in which the decimal separator can be either dot or comma and the group separator a small space, see https://en.wikipedia.org/wiki/ISO_31-0#Numbers
(In reply to Eike Rathke from comment #6) > For number formatting... Maybe far-fetched but would it be feasible to have some kind of number style in Writer like known from Calc that formats the selection according the locale? U+202F sounds like a good idea. Will implement that...
Created attachment 148540 [details] Layout with Space, U200A, U202F Somehow U202F is not really narrow (using Liberation Serif). Going with 200A for the first patch, also because of the difficult autocorrection in textsh.cxx line 156.
Here is the patch https://gerrit.libreoffice.org/#/c/66776/ comments welcome
(In reply to Heiko Tietze from comment #9) > Here is the patch https://gerrit.libreoffice.org/#/c/66776/ comments welcome PS: I assigned the command to shift+alt+space which seems not to be occupied on macOS (at least on my system).
(In reply to Heiko Tietze from comment #8) > Created attachment 148540 [details] > Layout with Space, U200A, U202F > > Somehow U202F is not really narrow (using Liberation Serif). Going with 200A > for the first patch, also because of the difficult autocorrection in > textsh.cxx line 156. U+200A HAIR SPACE is the thinnest available space of all and probably in some fonts barely makes a difference, do we really want that? It is not a commonly used space character, apparently used only between quotation characters of different levels and around EM dashes. Plus it is a breaking space not very suitable for the groups (aka thousands) separator, which was the original case of the request. SI defines a thin space, see https://www.bipm.org/en/publications/si-brochure/section5-3-4.html Maybe we should define the purpose and use case first. How does the actually used space character relate to "the difficult autocorrection in textsh.cxx line 156"? (which is sw/source/uibase/shells/textsh.cxx in case someone wants to look it up)
heiko tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/16bd9c99b8116f36e4f0825860e699d79cdf0d58%5E%21 Resolves tdf#121596 - Include a key combination to insert thin spaces It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 101909 has been marked as a duplicate of this bug. ***
Seth Chaiklin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/1c54900b4d40d11cbef8f14d2907d8d9f12c9f7b (related)tdf#107447 update option names; tdf#121596 add "narrow no-break space"