4 edited title
| link

Show StyleSheets and Palettes from custom directory in Format / StyleSheets menuMathematica's Menu

3 edited title
| link

StyleSheet for Show StyleSheets from custom applicationdirectory in Format / StyleSheets menu

    Tweeted twitter.com/#!/StackMma/status/629671713538707457
2 Added "front-end" tag. Edited text for clarity, added link to tutorial.
source | link

I'm working on a package that for some reasons needs to be installed into aan arbitrary, "non standard" path (i.e., that means neithernot $BaseDirectory or $UserBaseDirectory). I have added the package's path to the variable $Path so to have the possibilityin order to use Get/Needsallow Mathematica to load the package via (and itGet or Needs, and this works) well. The

My problem is that, inside that the package, I also have aneeds to include custom palettestylesheets and stylesheetcustom palettes, and theythese are not visible fromavailable in the menufront-end menus (Format->StylesheetFormat-->Stylesheet and PalettesPalettes, respectively). On when the tutorial/WorkingWithStylesheets therepackage is loaded from a non-standard location.

If I put the following sentencepackage files in $BaseDirectory the custom stylesheet and palette are accessible from the front-end menus, since the package follows the standard structure:

  • package\FrontEnd\StyleSheets\mystyle.nb

  • package\FrontEnd\Palettes\mypalette.nb

but this doesn't seem to work if it is loaded from an arbitrary path.


This Wolfram tutorial says that:

Stylesheet are discovered by the front end in the following locations.

Stylesheet are discovered by the front end in the following locations.

FrontEnd`FileName[{$UserBaseDirectory,"SystemFiles","FrontEnd","StyleSheets"}]

FrontEnd`FileName[{$InstallationDirectory,"SystemFiles", "FrontEnd","StyleSheets"}]
 
Stylesheets contained in directories are grouped under submenus in the Stylesheet menu. 
Add-on applications following the same layout also add stylesheets to the menu.

So, I thought it was possible to have stylesheet accessible from my own package, being and "Add-on application" that follows the standard structure, e.g.:

Stylesheets contained in directories are grouped under submenus in the Stylesheet menu. Add-on applications following the same layout also add stylesheets to the menu.

package\FrontEnd\StyleSheets\mystyle.nb package\FrontEnd\Palettes\mypalette.nb

 

Of course, if I move the package under $BaseDirectory everything works fine. So, the question: ifHow can I install a package in a directory that's not $UserBaseDirectory or $BaseDirectory, areand still make the stylesheets and palettes still visibleavailable in the Mathematica menu? If so, how toMathematica menus? I'm not able to have them. Thanks and regards, Roberto

I'm working on a package that for some reasons needs to be installed into a "non standard" path, that means neither $BaseDirectory or $UserBaseDirectory I added the package's path to the variable $Path so to have the possibility to use Get/Needs to load the package (and it works). The problem is that, inside that package, I also have a custom palette and stylesheet and they are not visible from the menu (Format->Stylesheet and Palettes, respectively). On the tutorial/WorkingWithStylesheets there is the following sentence:

Stylesheet are discovered by the front end in the following locations.

FrontEnd`FileName[{$UserBaseDirectory,"SystemFiles","FrontEnd","StyleSheets"}]

FrontEnd`FileName[{$InstallationDirectory,"SystemFiles", "FrontEnd","StyleSheets"}]
 
Stylesheets contained in directories are grouped under submenus in the Stylesheet menu. 
Add-on applications following the same layout also add stylesheets to the menu.

So, I thought it was possible to have stylesheet accessible from my own package, being and "Add-on application" that follows the standard structure, e.g.:

package\FrontEnd\StyleSheets\mystyle.nb package\FrontEnd\Palettes\mypalette.nb

Of course, if I move the package under $BaseDirectory everything works fine. So, the question: if I install a package in a directory that's not $UserBaseDirectory or $BaseDirectory, are stylesheets and palettes still visible in the Mathematica menu? If so, how to? I'm not able to have them. Thanks and regards, Roberto

I'm working on a package that needs to be installed into an arbitrary, "non standard" path (i.e., not $BaseDirectory or $UserBaseDirectory). I have added the package's path to $Path in order to allow Mathematica to load the package via Get or Needs, and this works well.

My problem is that the package also needs to include custom stylesheets and custom palettes, and these are not available in the front-end menus (Format-->Stylesheet and Palettes, respectively) when the package is loaded from a non-standard location.

If I put the package files in $BaseDirectory the custom stylesheet and palette are accessible from the front-end menus, since the package follows the standard structure:

  • package\FrontEnd\StyleSheets\mystyle.nb

  • package\FrontEnd\Palettes\mypalette.nb

but this doesn't seem to work if it is loaded from an arbitrary path.


This Wolfram tutorial says that:

Stylesheet are discovered by the front end in the following locations.

FrontEnd`FileName[{$UserBaseDirectory,"SystemFiles","FrontEnd","StyleSheets"}]

FrontEnd`FileName[{$InstallationDirectory,"SystemFiles","FrontEnd","StyleSheets"}]

Stylesheets contained in directories are grouped under submenus in the Stylesheet menu. Add-on applications following the same layout also add stylesheets to the menu.

 

How can I install a package in a directory that's not $UserBaseDirectory or $BaseDirectory, and still make the stylesheets and palettes available in the Mathematica menus?

1
source | link