Issue 109020 - Possibility to remove extra white space from expressions
Summary: Possibility to remove extra white space from expressions
Status: CLOSED FIXED
Alias: None
Product: Math
Classification: Application
Component: code (show other issues)
Version: OOO310m9
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-07 04:45 UTC by logari81
Modified: 2013-08-07 14:55 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch adding a nospace {} feature (9.06 KB, patch)
2010-02-07 04:47 UTC, logari81
no flags Details | Diff
toolbar icon1 (191 bytes, image/png)
2010-02-07 04:50 UTC, logari81
no flags Details
toolbar icon2 (198 bytes, image/png)
2010-02-07 04:50 UTC, logari81
no flags Details
Screenshot demonstrating the problem and the implemented fix (86.94 KB, image/png)
2010-02-07 04:52 UTC, logari81
no flags Details
Screen shot of the toolbar and contextual menu (48.35 KB, image/png)
2010-06-19 09:39 UTC, sgautier.ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description logari81 2010-02-07 04:45:35 UTC
In case that a variable consists of characters with different attributes, extra
white space is added between them. The user has no possibility to remove this
whitespace.

Examples:
{d bold X}
and
{%delta x}
are respectively rendered more like d X and δ x instead of dΧ and δx.
Comment 1 logari81 2010-02-07 04:47:50 UTC
Created attachment 67687 [details]
patch adding a nospace {} feature
Comment 2 logari81 2010-02-07 04:50:13 UTC
Created attachment 67688 [details]
toolbar icon1
Comment 3 logari81 2010-02-07 04:50:54 UTC
Created attachment 67689 [details]
toolbar icon2
Comment 4 logari81 2010-02-07 04:52:08 UTC
Created attachment 67690 [details]
Screenshot demonstrating the problem and the implemented fix
Comment 5 logari81 2010-02-07 05:09:49 UTC
The attached patch adds a new operator called "nospace" which removes all extra
spaces from an expression. Its use is demonstrated in the attached screenshot.

This fix could also be considered as a workaround for issue 56746

Besides its normal use as:
nospace {a b c}
the new operator has been tested to work reasonably in cases like
nospace {} //empty group
nospace a ... // missing group
in such cases the nospace operator is ignored.

The attached icons are needed for the selection toolbar. They belong to
./default_images/starmath/res

Concerning the positioning of the new button in the selection toolbar I would
propose a modification which has not been included in the patch. I think it is a
good idea to interchange the positions of the new button for "nospace" and the
button for "newline".

Pros:
1) The newline button will be the only button in the row, which is favorable
since it is an important and very often used feature.
2) All gap related buttons: nospace, `, ~ can be found in the same (last) column.
Comment 6 thomas.lange 2010-02-12 11:34:49 UTC
.
Comment 7 thomas.lange 2010-04-23 13:35:17 UTC
Patch applied to CWS tl80.

Two small changes made:

a) merged the code for
        case TNOSPACE :
and
        case TLGROUP :
to avoid ulicated code.

b) omitted the changes to the toolbox (and thus smres.src as well). The
reasoning for this is that graphics (like the small icons needed for this
change) are always created in-house because they have to met the overall design
specifications. But for the time being the respective person to do that still
has other things to do at hand. But we don't want to defer this patch just
because of that. Thus it is now applied without the toolbox changes.

tl->logari81: If you want the toolbox changes to be done as well later on it
would be kind of you if you could submit a new issue for that task and state
that one to be a follow-up to this one.

Anyway: Good work. Thanks for the patch! :-) 
Comment 8 thomas.lange 2010-05-14 06:58:41 UTC
tl->mru: please verify. Thanks!
Example text to show the effect
"" nitalic {H K} newline
"" nitalic nospace {H K}
Comment 9 thomas.lange 2010-05-14 09:15:23 UTC
tl->mru: please verify. Thanks!
Comment 10 michael.ruess 2010-05-19 11:31:22 UTC
Checked this in CWS tl80 with a variety of scenarios - great work!
Comment 11 sgautier.ooo 2010-06-19 09:38:37 UTC
Hi, in DEV300m83 .deb version, the toolbar icon doesn't appear. The contextual
menu item works well. I join a screenshot - Sophie
Comment 12 sgautier.ooo 2010-06-19 09:39:43 UTC
Created attachment 70091 [details]
Screen shot of the toolbar and contextual menu
Comment 13 michael.ruess 2010-06-21 09:59:16 UTC
Setting as fixed/verified.
Comment 14 michael.ruess 2010-06-21 10:03:51 UTC
Verified.

Michael->Sophie: please see TL's comment from Apr. 23 regarding Toolbox change -
this will be solved in a follow-up.
Comment 15 michael.ruess 2010-06-21 10:04:17 UTC
Closed, checked functionality in DEV300m83.