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;

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.

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 Yes, you are right...

Originally Posted by: mkraska

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

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.

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

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.

Best regards,

Davide

--- If you like my plugins please consider making a donation to SMath Studio

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.

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 .

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.

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

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.

- 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

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

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)

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).

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

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.