Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 02 March 2014 13:11:25(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
This plugin adds a couple of items in the "options" menu to add new text regions with custom fonts and/or with links.

A "Toolbox" region is provided to do more actions on the worksheet (edit text/links, add links from paths, convert TextRegions into WriterRegions, search and replace text in the whole worksheet)

NOTES:
- the font dialog uses only Font-Size, Font-Family, Bold, Italic and Underline attributes;
- the font size is taken from the built-in toolbar, but the choosen font settings are not applied to the standard font;
- to use a link between worksheets, the file in which you add the link must exist (the empty temporary file provided launching SMath must be saved before clicking the link created with this plugin);
- the toolbox region requires a refresh of the worksheet before using it.

  • requirements: to have all the features, SMath Studio 0.97.5737 or later and WriterRegion 0.3.5800 or later; for previous versions of SMath Studio the password is test;
  • installation: SMath Studio: Tools > Plugins... > Online Gallery (be sure to have "Exclude beta-versions" unchecked);
  • documentation: refer to the interactive handbook of Martin Kraska (Tools > Plugins > Interactive books);
  • sources: the updated sources are available in the SVN repository.


Beta >>> PLEASE REPORT IN THIS THREAD ANY ISSUE, MORE DETAILED AS POSSIBLE <<< Beta

Edited by user 07 February 2016 14:05:46(UTC)  | Reason: plugin updated

Davide Carpi attached the following image(s):
2014-03-04 02_26_22-SMath Studio Desktop - [Page1].png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 5 users thanked Davide Carpi for this useful post.
on 02/03/2014(UTC),  on 02/03/2014(UTC),  on 02/03/2014(UTC),  on 02/03/2014(UTC),  on 05/03/2014(UTC)
Offline mkraska  
#2 Posted : 02 March 2014 13:48:31(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,157
Germany

Was thanked: 581 time(s) in 392 post(s)
Davide, again something very nice from your highly productive plugin forge!

If I understand correctly, the specification of fonts or targets is limited to the very instant of creating the region.

Is there any chance to hook the dialogs to the context menu of existing text regions?

Also, could you allow for typing in the "text" entry of the link dialog without changing the contents of the "link" entry?
It is surely convenient to take the link entry contents as default for the text, but if you can't change the text independently, then there is no need for a second entry in the dialog.

Would be great to have a file selector dialog for the link entry. Then Kay could learn how to do that for selecting the Maxima path in the Maxima Settings window.

Note for users:
  • When following a link by Ctrl-click (be it existing or just created) in a given worksheet, then take care that all changes are saved, because the current document is silently replaced by the contents of the link target.
  • The SMath window title won't update when you follow links, unless the currently open document is saved.

Edited by user 02 March 2014 13:57:36(UTC)  | Reason: Not specified

Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 02/03/2014(UTC)
Offline Davide Carpi  
#3 Posted : 02 March 2014 15:34:05(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
Originally Posted by: mkraska Go to Quoted Post
Davide, again something very nice from your highly productive plugin forge!

If I understand correctly, the specification of fonts or targets is limited to the very instant of creating the region.

Thank you very much Martin Good
Yes, you are right...

Originally Posted by: mkraska Go to Quoted Post
Is there any chance to hook the dialogs to the context menu of existing text regions?

Looking the Text Region code, I think that is not possible...

Originally Posted by: mkraska Go to Quoted Post
Also, could you allow for typing in the "text" entry of the link dialog without changing the contents of the "link" entry?
It is surely convenient to take the link entry contents as default for the text, but if you can't change the text independently, then there is no need for a second entry in the dialog.

This is already possible, doesn't work for you? (screencast)

Originally Posted by: mkraska Go to Quoted Post
Would be great to have a file selector dialog for the link entry. Then Kay could learn how to do that for selecting the Maxima path in the Maxima Settings window.

I know, but to build a relative path is needed the path of the file, and I've not found a way to access this property...

Originally Posted by: mkraska Go to Quoted Post
Note for users:
  • When following a link by Ctrl-click (be it existing or just created) in a given worksheet, then take care that all changes are saved, because the current document is silently replaced by the contents of the link target.
  • The SMath window title won't update when you follow links, unless the currently open document is saved.

Good
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 2 users thanked Davide Carpi for this useful post.
on 02/03/2014(UTC),  on 02/03/2014(UTC)
Offline mkraska  
#4 Posted : 02 March 2014 16:08:47(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,157
Germany

Was thanked: 581 time(s) in 392 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
Originally Posted by: mkraska Go to Quoted Post
Also, could you allow for typing in the "text" entry of the link dialog without changing the contents of the "link" entry?
It is surely convenient to take the link entry contents as default for the text, but if you can't change the text independently, then there is no need for a second entry in the dialog.

This is already possible, doesn't work for you? (screencast)

It works, I can't reproduce the mentioned problem, sorry for making useless noise.
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline omorr  
#5 Posted : 02 March 2014 19:19:22(UTC)
omorr


Rank: Administration

Groups: Registered, Administrators, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,567
Man
Serbia

Was thanked: 259 time(s) in 223 post(s)
Hello Davide,

Thanks for this one Good

By the way, when using text region for linking to a worksheet you mentioned in the first post "(the empty temporary file provided launching SMath must be saved before clicking the link created with this plugin)". I just did this (empty new worksheet and the link to nonexisting doc.sm) and SMath reported an Unhandled exception Blush .

Is there any way to edit this link if we made a mistake and a "non existing file" has been reported after CTRL+link.? I suppose that deleting and inserting another one would also not be a big deal.

Regards,
Radovan

Edited by user 02 March 2014 19:22:36(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#6 Posted : 02 March 2014 22:12:55(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
Hello Radovan Good

The unhandled exception is generated because SMath can't build a relative url if a "physical" file doesn't exist... because (until now) the only way to add a link in a worksheet is to work with the xml code of an existing file, the exception should be considered a "missing feature" of the Text Region...

AFAIK there's no way to edit the link, just delete it and create a new one (you can copy and paste the text to save a little bit of work); however, I hope this is better than editing the worksheet code Laugh wild

Edited by user 02 March 2014 22:14:33(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline Davide Carpi  
#7 Posted : 03 March 2014 02:11:57(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
Hello Ioan Good

Originally Posted by: ioan92 Go to Quoted Post
Would it be possible, please, to allow the format data (font size, font name etc.) modification, even after the region definition ?
When using such a text region, usually it's hard to take the right decision (for format data) from the very bigging, without any correction possibility.

I'll try other ways; with this approach seems to me that is not possible... anyway now the problem is "only" the change of the font-family or the target of the link; size/bold/italic/underline are easily driven from the existing toolbar and the keyboard shortcuts.


Best regards,

Davide

Edited by user 03 March 2014 13:22:54(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 03/03/2014(UTC)
Offline Davide Carpi  
#8 Posted : 03 March 2014 23:05:08(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
UPDATED

- Added a "toolbox" region; this region requires a refresh of the worksheet before using it. Use the context menu items to set the font properties of existing text regions...

Because this plugin is intended to be a temporary patch to a missing feature, I suggest as "best practice" to delete the region before closing your worksheets; this will ensure you the backward compatibility when this plugin will be removed.


Originally Posted by: mkraska Go to Quoted Post
Would be great to have a file selector dialog for the link entry. Then Kay could learn how to do that for selecting the Maxima path in the Maxima Settings window.

I've left a The 2nd menu item , that doesn't work (I don't know why) but does your job. The sources are on the repository. Feel free to contact me if there are issues (but the code it's really simple).

Originally Posted by: ioan92 Go to Quoted Post
Of course, the ideal (if there could be one) should be a similarity with a famous text editor as MS Word, where many formats can coexist in a zone and all are permanently editable.

This requires an improvement of the built-in Text Region. Actually the text is formatted in a single "block"; something like a rich text editor requires more job (the code to get/set the styles piece by piece)


Best regards,

Davide

Edited by user 04 March 2014 13:36:55(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 03/03/2014(UTC)
Offline Davide Carpi  
#9 Posted : 04 March 2014 13:35:54(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
UPDATED

- toolbox: "edit links..." now works

Edited by user 04 March 2014 13:37:30(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 04/03/2014(UTC)
Offline Davide Carpi  
#10 Posted : 04 March 2014 15:26:52(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
Hi Ioan,

- The toolbox needs a refresh of the page to capture all the text regions;
- Then you can choose a text region and add (or delete) a link to another worksheet;

screencast

If there are problems, let me know...

Edited by user 04 March 2014 15:40:17(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 04/03/2014(UTC)
Offline mkraska  
#11 Posted : 04 March 2014 15:51:46(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,157
Germany

Was thanked: 581 time(s) in 392 post(s)
Editing links has become much more easy and consistent, thanks a lot for that.

I also like the "select all" button.

There are cursor placement issues in texts with non-monospaced fonts. May be that is a reason why font change is not supported natively so far.

BTW Arial 11pt perfectly matches the grid.

I think it is safe to leave the control regions in the document, because so far SMath just silently removes any unknown regions (which is bad if you edit and save a file with some plugin missing in the system).
mkraska attached the following image(s):
Arial.PNG
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline Davide Carpi  
#12 Posted : 06 March 2014 13:14:39(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
Just a little cookie...

who want can download and compile an improved version of this plugin, that can change the fonts of the math regions; this is not shared in the EM because the changes are not persistant (you can't save the changes), thus can be used only to make screenshots on the fly and few other things...


Best regards,

Davide
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 2 users thanked Davide Carpi for this useful post.
on 06/03/2014(UTC),  on 06/03/2014(UTC)
Offline mkraska  
#13 Posted : 10 March 2014 19:16:18(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,157
Germany

Was thanked: 581 time(s) in 392 post(s)
Davide, could you please add the link target selector button to the "Worksheet link" dialog just like it already is present in the edit link dialog?

Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline Davide Carpi  
#14 Posted : 10 March 2014 21:43:52(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
Sure... however, as I've written before, only absolute links will be available from that feature.


Best regards,

Davide
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline mkraska  
#15 Posted : 11 March 2014 02:11:49(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,157
Germany

Was thanked: 581 time(s) in 392 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
Sure... however, as I've written before, only absolute links will be available from that feature.

What do you mean? For me, the links picked by the dialog look perfectly relative.
mkraska attached the following image(s):
linkpath.PNG
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline Davide Carpi  
#16 Posted : 11 March 2014 02:48:41(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
From the canvas the toolbox get a FileName property from the Store; this contains the location of the file, thus it is possible to build a relative path.

From the insert menu I've not found a way to have an initialized FileName (as usual any hint is welcome Happy ).
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline Davide Carpi  
#17 Posted : 18 March 2014 03:00:31(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
UPDATED

(SMath Studio 0.97.5189)

- code updated to fit the new APIs features;
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline Davide Carpi  
#18 Posted : 12 August 2014 00:00:14(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
UPDATED SMath Studio 0.97.5329

- Plugin recompiled (fix SS-203 on Linux systems)
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline Davide Carpi  
#19 Posted : 04 September 2014 15:45:34(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,629
Man
Italy
Location: Italy

Was thanked: 852 time(s) in 564 post(s)
UPDATED SMath Studio 0.97.5346

- Toolbox: new feature "add links (batch)";
- Fixed bug on auto calculation disabled;
- Libraries updated.


add links (batch)

  • This feature explore all folders and sub-folders from the path of the worksheet, looking for *.sm and *.smz files;
  • If the worksheet is new (not saved somewhere) the option is disabled (if the file is saved and the option is still disabled try refreshing the worksheet);
  • You may include or not the files using checkboxes on a tree view;
  • Any link created is relative to the current location of the worksheet;
  • Links are added below the toolbox, regardless what is already on the canvas, using the same horizontal alignment.

Edited by user 04 September 2014 19:39:01(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
2014-09-04 14_41_40-SMath Studio Desktop - [xxx.sm].png
2014-09-04 15_06_27-SMath Studio Desktop - [contents.sm_].png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 04/09/2014(UTC)
Offline mkraska  
#20 Posted : 04 September 2014 15:59:45(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,157
Germany

Was thanked: 581 time(s) in 392 post(s)
Really nice. I like the batch scanning feature.
How about using the Document title property from the file header as (possibly multilingual) text in the link regions?
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Users browsing this topic
Similar Topics
Text Region Utilities Plugin (Extensions)
by ndtma 12/10/2016 14:09:25(UTC)
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.