Text Region Utilities - Helps to set some Text Region properties - Messages
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)
- requirements: to have all the features, SMath Studio 0.97.5737 or later and WriterRegion 0.3.5800 or later;
- 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.
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.
OLD VERSIONS:
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.
WroteDavide, 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

Yes, you are right...
WroteIs 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...
WroteAlso, 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)
WroteWould 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...
WroteNote 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.

WroteWroteAlso, 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.
Thanks for this one

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.
Regards,
Radovan

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


WroteWould 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
- 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.
WroteWould 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.
WroteOf 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
- toolbox: "edit links..." now works
- 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...
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
WroteSure... 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.
From the insert menu I've not found a way to have an initialized FileName (as usual any hint is welcome

(SMath Studio 0.97.5189)
- code updated to fit the new APIs features;
- 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.
How about using the Document title property from the file header as (possibly multilingual) text in the link regions?
-
New Posts
-
No New Posts