54
votes
Accepted
How to distribute Mathematica packages as paclets?
The following answer is not complete, but does give one possible solution. There's a lot more to learn about the paclet manager, so please contribute another answer if you can, or correct this answer ...
44
votes
Accepted
PacletInfo.m documentation project
This is a community project to produce useful documentation for PacletInfo.m. Feel free to edit and improve this answer.
While the Paclet Manager is loaded from <...
Community wiki
36
votes
Declaring Package with dependencies in multiples files?
Preamble
I will interpret your question as a general question on how one can organize multi-file projects in Mathematica / WL. There are two main axes in this problem, and they are
Loading procedure ...
32
votes
Accepted
What to be aware when using new-style package?
I will give a FAQ-style presentation of some things I became aware of while transitioning one of my packages to this format. Leonid's description of the new package format is required reading before ...
Community wiki
31
votes
Accepted
Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?
Update: 2/7/2019 I have just released a new version of the package: MathematicaStan v2.0
I just have released a beta version of MathematicaStan, a package to interact with CmdStan.
https://github....
28
votes
Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?
For the sake of completeness let me advertise someone else's code which implements MCMC in mathematica.
Josh Burkart has implemented Mathematica Markov Chain Monte Carlo
which is available on github....
28
votes
Pop-up appeared and then disappeared during first documentation search in 11.2
Version 11.2 features a completely rewritten documentation search system. This version is incompatible with the search indices created by previous versions, nor can previous versions read the new ...
28
votes
Accepted
3D rigid body physics engine
Since this answer was originally posted, the Blender software package has undergone significant revision causing the Python scripts to break. I have modified the scripts so that they should work from ...
25
votes
How to distribute Mathematica packages as paclets?
Szabolcs answer shows how we can build a .paclet, but the PacletManager also contains the possibility to serve packages from an own site. As I realized after writing this, most of the information here ...
23
votes
What are the recommended settings for git when using with Mathematica projects?
The solution I am currently using is to work with *.wls script files.
You can do nearly all the things you do with usual *.nb notebooks files (as shown in my screen shot).
The big advantage is ...
22
votes
Is there any harm or benefit to Removing unneeded private symbols in packages?
I decided to take one of my large packages and Remove all symbols in the Private` context that have no definitions attached to them
...
And is there any risk if only those symbols that are not used ...
22
votes
Accepted
How can I install packages distributed as .paclet files?
Update: The paclet-related functionality is documented in Mathematica 12.1. See PacletInstall.
This answer is for people who are not interested in package ...
22
votes
Accepted
How to download "ResourceFunction" packages onto a notebook, so I can place it in a USB and access it on a different computer
Putting my comment into an answer, since it seems to have solved the question
You can use ResourceFunction["PacletizeResourceFunction"] to package a ...
21
votes
Accepted
Package organization
The key point is not to set the usage message between BeginPackage and Begin["`Private`"], but just to mention the symbol.
A ...
20
votes
What is the difference between a .wl package and a .m package?
As after half a year there is still no answer, here are some very short answers from my comments:
the difference is just the file ending as far as I know.
if you have installed MATLAB (or another ...
18
votes
Package organization
It is possible, your code works. I don't see any downsides which aren't a matter of taste.
I like to keep usages next to definitions too. But I hate using full names, you can just mention symbols in ...

Kuba♦
- 136k
17
votes
Accepted
Second argument of BeginPackage with nested package loading
I've certainly encountered this behavior before. While I can't speak authoritatively, I'd think this is as designed, although it does introduce certain inconsistency. I also think that this issue is a ...
17
votes
Accepted
17
votes
Mathematica Syntax Coloring in GitHub README
It seems to have been possible at least since March 16th 2016 and probably earlier (thanks to jkuczm) I found it here (cannot remember how I ended up there). Here's another example using it.
If we ...
16
votes
Creating Mathematica packages
Quick start tutorial
This is a quick start guide on how to set up a package following the typical structure. It does not explain why it is usually done that way, and it does not discuss other ...
16
votes
What are the recommended settings for git when using with Mathematica projects?
A new possibility is to use mathematica-notebook-filter which parses Mathematica notebooks and strips all output cells and metadata so that these are not committed ...
16
votes
Accepted
How to remove a paclet downloaded from Wolfram Research Server?
Use PacletFind to find the installed versions, of the paclet, for exmaple:
...
16
votes
Accepted
Attempts at backwards compatibility
If you just want backwards compatibility, there is no need to create any symbols in the System context. It seems like a bad idea to do such things. A package should create symbols only within its ...
15
votes
Accepted
Why SciDraw can not handle the StreamPlot?
In short, this is due to a behaviour in Mathematica's graphics rendering that seems intentional, but it is very strange in this particular context: Scaled ...
15
votes
Accepted
Bulletproofing packages against SetOptions of built-ins
The approach
This seems to be a good case for applying some run-time metaprogramming / introspection. The idea would be to patch the already constructed definitions after they have been created, at ...
15
votes
Making a website with Mathematica
In my opinion, Mathematica's XML template feature makes this quite easy. You'd write your HTML code for each page using XML templates, and then populate the templates with data as necessary using <...
14
votes
Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?
This answer gives explicitly a (parallel) MCMC implementation in mathematica following closely this Wolfram Demonstrations Project. This basically involves only a few lines:
...
14
votes
Accepted
What is the reason that $zz^*$ is not written as $ |z|^2$ sometimes?
Running FullSimplify I get
FullSimplify[z Conjugate[z] + 2 Abs[z]^2]
3 z Conjugate[z]
...
14
votes
Package MathWorld
Yes, unfortunately, it has proved not feasible to keep the 5000+ MathWorld notebooks as well as the packages you refer to up-to-date with the latest Mathematica functionality. As a result, I wouldn't ...
14
votes
Sharing small code snippets
Gists API Snippets
My first version of this involves the Gists API for GitHub. As Leonid notes, the Gists API makes sharing small pieces of code pretty easy.
I also cooked this into my general ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
packages × 849contexts × 79
front-end × 29
documentation × 29
plotting × 27
functions × 26
physics × 26
paclets × 26
compatibility × 23
feyncalc × 23
scoping × 22
differential-equations × 21
programming × 21
development × 21
notebooks × 20
import × 19
tensors × 17
symbols × 16
graphs-and-networks × 15
workbench × 15
function-construction × 13
files-and-directories × 13
scripting × 13
evaluation × 12
symbolic × 12