Questions on Mathematica packages, which are self-contained bundles of Mathematica code that add new functions and other functionality.

learn more… | top users | synonyms (1)

29
votes
3answers
862 views

Custom package development: Basic steps

Every once in a while, I write a generic function that I use quite often for months to come. However, package development in Mathematica is not very well documented from what I can tell, and I was not ...
29
votes
3answers
831 views

How to distribute proprietary Mathematica code

If I want to make package-code completely unreadable, in a way that the end-user can only call my functions, but has no way to re-engineer my definitions, how would I do that? I know I can use ...
22
votes
1answer
326 views

Creating a package of special plots

In my work as a math teacher, I create lots of graphs to illustrate ideas. I have lots of math books and will often try to duplicate a particular style of graph. Below, one very simple example, ...
20
votes
4answers
457 views

Defining functions in stylesheets

Is there a way to define functions in a stylesheet? So far I have managed to write my stylesheets without the need to use my own custom functions or definitions. For instance, maybe I have some color ...
19
votes
3answers
2k views

Differential geometry add-ons for Mathematica

I need a differential geometry tool for Mathematica. Is there any add-on? Unfortunately, Mathematica does not include such functionality or I can not find it.
19
votes
2answers
443 views

What are recommended guidelines for developing packages?

This might be of general interest – I have different questions regarding naming conventions, contexts, subcontexts, shadowing, etc., but I do feel that they are closely related, thus I don't really ...
18
votes
3answers
435 views

How to load a package without naming conflicts?

This question applies to any package, but I encountered this problem while working with graphs. There are symbols in the Combinatorica package (such as ...
18
votes
2answers
576 views

What is a “Paclet”?

I often see references to "paclets", for example the PacletManager` context, the PacletInfo.m file in some packages and next to ...
17
votes
2answers
261 views

What's the difference between these two ways of specifying dependent packages?

What's the difference between these two ways of specifying dependent packages? Method 1: BeginPackage["foo`bar`", {"xxx`", "yyy`"}] Method 2: ...
17
votes
2answers
223 views

When to use Get vs Needs

When should I use << vs Needs? I just always use Needs as ...
16
votes
2answers
320 views

Automated testing for compatibility with older Mathematica versions

I have several packages which I actively develop and maintain. I try to stay up to date with new releases of Mathematica and usually update within a couple of months of a new version coming out. As a ...
16
votes
2answers
619 views

Mathematica vs. $\LaTeX$? Replacement for Legacy “Authoring Tools” package?

I'd rather write in Mathematica than in $\LaTeX$, but it's not really practical, especially for big works (> 100 pages) without good tooling. I'm just starting to look into what's available for big ...
16
votes
1answer
358 views

What is the proper method to load a Mathematica package inside a DynamicModule

I have a DynamicModule that requires loading of Mathematica packages. The usual methods do not seem to apply (...
15
votes
3answers
365 views

Listing the functions defined in a package

Assume that I know a package's (Context?) name that is loaded. Now I want to list the functions defined in this package. How can I do it? I remember that I found a way once, but I cannot re-find it. ...
15
votes
2answers
274 views

How safe is Encode?

How safe is an encoded package (using locked, etc)? If I don't specify a personal key, I understand that the encoding key must be somewhere in the Mathematica program itself, and so it is not a ...
15
votes
1answer
241 views

Mathematica package manager

I want to bundle up a Mathematica package that I've written and distribute it as open source. It has a couple of dependencies that I'd like to automatically download independently from my package as ...
13
votes
2answers
980 views

How to install packages?

This is always a problem when I distribute my packages to colleagues working on different platforms. I have my packages installed into a private directory and I autoload some of them when Mathematica ...
13
votes
1answer
454 views

Installing CRAN Packages

When I install RLink: Needs["RLink`"] InstallR[] then evaluate the command ...
12
votes
1answer
115 views

Predictive code completion and custom functions in contexts

Suppose I work for organisation PQR, and have been developing a suite of packages, PQRUtilities, PQRVisualization etc, all of ...
12
votes
1answer
238 views

Creating a R DataFrame like construct in Mathematica

I kept getting my data mixed up so I decided to see if I could construct a package adding a R DataFrame like construct to Mathematica. I managed to cobble something together that sort of works, but ...
11
votes
3answers
277 views

What is the purpose of tags like :Name:, :Context:, etc. in packages?

I noticed that all of the packages that come with Mathematica start with a header that is in a standard format. (See e.g. the header of NIntegrateUtilities` at the ...
11
votes
3answers
290 views

How can I return private members of a Mathematica package as the output of package functions without the “PackageName`Private`” prefix?

I have created a Mathematica package that manipulates various types of input physics data into a common form of output data for further analysis. To make this process more efficient and manageable, I ...
11
votes
4answers
308 views

Strategies for avoiding and handling shadowing

When dealing with namespaces in Mathematica (BeginPackage, $ContextPath ...) one is unavoidably confronted with the problem of ...
11
votes
1answer
183 views

Can Wolfram's Player Pro use proprietary packages?

A few entwined/related questions: Can Wolfram's Player Pro use proprietary packages? I have searched Wolfram's site pages on Player Pro and don't see anything that provides a clear answer to this ...
11
votes
3answers
271 views

Best Practice to write ::usage for own package functions

I'm writing an own package with Mathematica, that I would like to make available for others. In order to do that (and for my own usage of the package), I would like to write ...
10
votes
2answers
193 views

How to abbreviate context names?

It's convenient to abbreviate often-used function names, eg Dim = Dimension. Is it possible to abbreviate long context symbols, e.g. Combinatorica when the context ...
10
votes
2answers
412 views

How do I compute sidereal time and JD?

There was once a package that provided a wide range of functions for computing astronomical information. This package now appears to be out of date; but as near as I can tell, many of the useful ...
10
votes
2answers
360 views

How to unload automatically loaded packages?

I know that this has been discussed here (How do I clear all user defined symbols?), but my case is somewhat different. How does one unload packages during runtime that were loaded with the start of ...
10
votes
2answers
346 views

How to make a parallel auto-generated .m package from Initialization cells?

according to the documentation at ref/InitializationCell, When you first save a notebook that contains initialization cells, you have the option to make a ...
10
votes
2answers
118 views

Globally loading packages while using a CellGroup as the default context

I have a notebook I wish to set up where the sections are conceptually related to each other. But, I wish to isolate them from each other programmatically, so that they do not interfere with one ...
10
votes
1answer
327 views

Using a different R version with RLink

I wish to use a different version of R than what is provided by Mathematica 9. For example, I want to use the Macports version of R, where R_HOME is ...
10
votes
1answer
198 views

Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
9
votes
2answers
251 views

Mathematica “prelude”

Is there any way to have the functions from a mathematica file be loaded on startup? For example, in this excellent answer, Jens helps me out and gives me some functions for creating legends for ...
9
votes
2answers
263 views

Compile for deployment

Is there any way (other than the manual one) to grab all the functions a notebook uses from the different user-defined packages and putting everything into one file to deploy the code for e.g. CDF? I ...
9
votes
1answer
306 views

FiniteFields package is very slow. Any fast substitute for Mathematica?

I want to compute the inverse of matrix, say with dimensions $100 \times 100$, defined over a large finite field extension such as $GF(2^{120})$. I am using the package FiniteFields, but Mathematica's ...
9
votes
1answer
93 views

Package automated way of ReadProtecting all symbols

My template for building packages has, at the end, the following expression that automatically ReadProtects all symbols defined in my ...
9
votes
1answer
142 views

Future-proofing access to packed array tools

Most of the Mathematica users beyond beginner level will be aware of the phenomenon of Packed Arrays. The user-accessible functions related to packed arrays live in the ...
9
votes
1answer
128 views

Preserving indentation when creating a new line (when editing in a package)

Background: This is the third question in a row of questions about how to make editing packages in the front-end much more bearable (the other two are here and here). It seems that the front end is ...
8
votes
2answers
372 views

Why is JLink loaded every time I start Mathematica?

When I start a Mathematica 8 session (either command line or with the notebook front end), I notice that there are several packages that have already been loaded for me (using ...
8
votes
1answer
148 views

user defined functions, how to save them for future use?

I need certain user defined functions over and over. I was wondering how can I define and where and how to save them such that each time I start a notebook, these functions are available and need not ...
8
votes
4answers
223 views

Numerical integration of a numeric data available as a nested list

I have some numerical data in the form of a list with the following structure: {...{x,y,z},...} defining a surface z=z(x,y) in a 3D space (x,y,z). The data came from a simulation, and I am ...
8
votes
2answers
124 views

Problem with PlayerPro recognizing a proprietary package

This question follows on from my earlier question Can Wolfram's Player Pro Use Proprietary Packages. That question appeared to have established that, yes, PlayerPro can use proprietary packages. ...
8
votes
1answer
265 views

How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...
8
votes
1answer
148 views

What is the purpose of Dump contexts?

Motivation I've been trolling through some internal code, trying to glean design practices WRI developers employ when extending Mathematica using top-level code. During my ...
7
votes
3answers
124 views

How to define a package without adding it to $ContextPath

How can you introduce a package, so that it is listed in $Packages, without adding it to $ContextPath? Note that this question ...
7
votes
2answers
350 views

Automatically load packages at startup

I'm a physics student and I try to simplify my day with Mathematica. Every time I use Mathematica I need Div[], Grad[], ...
7
votes
1answer
744 views

How do I create and use Mathematica packages?

I have created a package following the tutorial in Mathematica 8 virtual book. However this tutorial is quite, let's call it, "short". I have a TestPackage.m file: ...
7
votes
1answer
79 views

Attaching the same message to several symbols

It is common in many packages, as well as system symbols, that the same message can be issued by several functions. Here's an example: One mechanism that can be used for this is to define the ...
7
votes
1answer
271 views

FeynRules vs FeynCalc (or anything else?)

I was looking for a Mathematica package that can take Lagrangians and calculate Feynman diagrams for any given n-point function. (..like if a software can draw and calculate arbitrary loop corrections ...
7
votes
1answer
252 views

Mathematica File Organization

Last year I asked how to integrate notebooks to the documentation center in stackoverflow. Back then I was only interested in seeing those notebook and being able to search for them. Unfortunately, it ...

1 2 3