Skip to main content

Questions tagged [packages]

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

Filter by
Sorted by
Tagged with
6 votes
1 answer
187 views

On the new package style. Conflict using the same name in the parent and in the child packages

I am learning the new package style as current one is not working for me. I know it is probably not a good idea to use something with no official Wolfram documentation and not officially released. But ...
Nasser's user avatar
  • 145k
4 votes
2 answers
210 views

How to keep private package function private when adding package name to function name inside the package?

I like to call my package private functions using mypkg`functionName[...] i.e. add an explicit mypkg to each call. This ...
Nasser's user avatar
  • 145k
3 votes
1 answer
96 views

How to make my OOP class work inside a package?

I like to use this simple OOP setup in Mathematica that I learned from reading posts here over the years and playing around with it. This makes a Class and implement basic OOP (nothing fancy like ...
Nasser's user avatar
  • 145k
1 vote
1 answer
345 views

Gillespie (stochastic simulation) algorithm

I want to apply the Gillespie algorithm to a set of reactions. First, I run the source code presented here, and then run my model: ...
A novice's user avatar
  • 167
4 votes
2 answers
241 views

How do packages handle local variables?

According to the documentation "$Context is searched after $ContextPath," That means that when you define variables ...
ions me's user avatar
  • 991
2 votes
1 answer
76 views

Package function doesn't plot math function when given as input

I'm new to Mathematica and I'm trying to learn to write some basic code to create a DialogInput in which the user writes the function to plot. I'd like to ...
LukeTheWolf's user avatar
2 votes
0 answers
90 views

Need help to install a package in Mathematica [closed]

today I just downloaded the trial version of Mathematica for 15 days. I am completely new to CAS (Computer Algebra System) and have never used any CAS before, so I am not able to express everything. ...
Martin.s's user avatar
  • 151
2 votes
1 answer
51 views

Trouble installing the package MultipleZetaValues

I have tried to install the package MultipleZetaValues using ...
Iosif Pinelis's user avatar
5 votes
2 answers
168 views

How do I format the `expr` in the `::usage` message of functions in a mathematica .wl package (without using Workbench)?

This probably has an easy answer but I can't work it out. In Mathematica's documentation, the ::usage message has some text formatting for expr. In the ...
gpap's user avatar
  • 9,777
10 votes
3 answers
707 views

Why do people split packages in different files?

I am writing (it is my first time) and I don't understand why packages usually come in different files. I saw people saying that this is a modularization strategy, i.e. different files for functions ...
Felipe's user avatar
  • 499
1 vote
0 answers
52 views

Why I can't install this package [closed]

I am trying to run C++ in Mathematica. I got a package "LTemplate" from the answer from Szabolcs in this post: How to simplify writing LibraryLink code?. However I can't install it. This is ...
xpaul's user avatar
  • 261
0 votes
1 answer
58 views

HypExp package throwing errors when loading

I am trying to load the package HypExp by using the instructions given on the site. The package throws an error ...
QFTheorist's user avatar
2 votes
0 answers
79 views

How to effectively substitute variables in xAct?

I am trying to find the gauge field equation by varying the Born-Infeld Action with the help of xact package. I use the following ...
codebpr's user avatar
  • 2,263
2 votes
1 answer
84 views

Defining custom operators for indexed objects [closed]

I have some symbolic indexed objects $A_i$, $B_{ij}$, $C_{ijk}$, $D_{ijkl}$, etc. I want to define a symbolic differential operator $\partial_{xy}$ that acts on these indexed objects in the following ...
Franz5217's user avatar
3 votes
1 answer
112 views

Varying Einstein-Hilbert action through xAct gives extra terms

I am trying to find the associated field equation by varying this action: $$S=\int d^4x \sqrt{-g}(\kappa \mathcal{R}+\Lambda)$$ This should give me the below field equation when I vary above w.r.t the ...
codebpr's user avatar
  • 2,263
0 votes
0 answers
24 views

How to define multiple folders for JLink in PacletInfo.wl file?

I have a paclet info file setup as follows: ...
user13892's user avatar
  • 9,443
0 votes
0 answers
58 views

Can IntelliJ be made to look like notebook?

I am developing a package for my company, which has grown into multiple sub-packages. I have been using the notebook frontend for .wl files which is ok but I need ...
user13892's user avatar
  • 9,443
0 votes
1 answer
104 views

Where and how can I save a mathematica package

I want to save a mathematica package and then i want to extract and run it from there. How can i do that?
Ioannis Sklavounos's user avatar
2 votes
1 answer
77 views

How to set the same scaling for multiple density plots while using the ColorBar package or user-defined colorfunction?

I know questions with this theme have been asked before, and the one-line answer to them is- "Use ColorFunctionScaling -> False" But my specific ...
codebpr's user avatar
  • 2,263
0 votes
0 answers
23 views

This script included in a package has some error leading to one variable having context different from others

The package modt ...
florin's user avatar
  • 1,798
2 votes
1 answer
69 views

How do I make all the external contexts accessible within subcontexts of my package?

I have a package file MyPackage.wl it has the following commands: ...
user13892's user avatar
  • 9,443
2 votes
1 answer
92 views

Adding Greek letters to ToMatlab

I want to add Greek letters to the ToMatlab package. The most recent publicly available version I found is here. There is a section on symbols starting on line 242. I tried adding a line ...
Roy's user avatar
  • 101
8 votes
1 answer
254 views

Are new-style packages compatible with the Wolfram Paclet Repository?

The package I'm developing is getting hard to navigate as it gets larger. I've started experimenting with using the new-style package format described in this question to break it up to subfiles. ...
Chris K's user avatar
  • 20.3k
5 votes
1 answer
115 views

How to make "Get Help" entries for custom package?

I've got a small collection of Mathematica tools that I'd like to make into a package. One of the nicest features in Mathematica is the ability to right click on any built-in function and just select &...
smish's user avatar
  • 51
3 votes
0 answers
46 views

Strategies and practical advice for using saved compiled functions in a package

I want to use a compiled function in a package without having to rebuild it each time. This slows down unit testing and loading of the package. I have used the example in the link as my starting point:...
IntroductionToProbability's user avatar
0 votes
0 answers
48 views

Previously loaded packages not working

I'm a complete beginner at Mathematica. I was trying to learn the basics over the last couple of days. Yesterday I downloaded the GREATER2 package from here. To start using this, I downloaded the .m ...
Gleeson's user avatar
  • 101
0 votes
0 answers
56 views

Is loading several packages in the same cell safe, or it may cause probems?

My Mathematica 13.3 crashed after working 30 minutes. It produced a beep and no output. After that, it lost the capability of loading packages. I will reinstall it now. I wonder if this happened to ...
florin's user avatar
  • 1,798
5 votes
1 answer
124 views

Where should global variables be defined in a package?

I am trying to understand two of the answers to the question 114769 Package functions and symbolic calculations ...
florin's user avatar
  • 1,798
1 vote
0 answers
43 views

Why my MATLink must execute the command `OpenMATLAB[]` twice to realize once normal `OpenMATLAB[]` command?

Problem description To use Matlab code in Mathematica I have tried to use the package MATLink. However, everytime I run the code below ...
narip's user avatar
  • 381
4 votes
1 answer
99 views

How to use a personal function in Matlab within Mathematica utilizing Matlink?

Problem description I've written a function in Matlab as follows: function z = testfuncadd(x,y) z = x + y; end I want to use this function within Mathematica ...
narip's user avatar
  • 381
1 vote
0 answers
57 views

Normal order package usage [closed]

I found a package that normal orders bosonic creation and annihilation operators for me. Here is the link to the package and explanation of normal ordering: https://en.wikipedia.org/wiki/Normal_order ...
Philipp J's user avatar
1 vote
0 answers
39 views

Why a script stops working when moved from the beginning of a file into a package?

Here's a two command script defining L1, Der1 (which compute the first Lyapunov exponent of an ODE): ...
florin's user avatar
  • 1,798
1 vote
0 answers
190 views

Bifurcation and stability analyses of delay differential equations

Are there any packages in Mathematica for bifurcation and stability analyses of delay differential equations? For Matlab, there is a nice tool like: https://twr.cs.kuleuven.be/research/software/delay/...
user avatar
4 votes
0 answers
67 views

Implications of Code vs Input Initialization Cells in Package Files

When editing package files, I've noticed that there are really two options for how to format the cells, which has major implications for how they appear in the Mathematica front end. One is to have ...
Pillsy's user avatar
  • 18.5k
0 votes
1 answer
153 views

Is there a good package for solving the Einstein field equations given a metric tensor?

I have a very simple metric tensor. I've built a notebook to calculate the EFE solutions based on this metric. Does anyone know of a good package in the Mathematica library that takes a metric tensor ...
The Shepard's user avatar
0 votes
0 answers
72 views

Save inline math in packages

I can enter inline math with Ctrl+( in text cells, but saving this .wl file does not save the formatting. This can be seen by examining the source. How can I save this formatting? ...
qwr's user avatar
  • 413
1 vote
0 answers
37 views

Derivatives in the SpinWeightedSpheroidalHarmonics package

Hello I'm using the SpinWeightedSpheroidalHarmonics package from the Black Hole Perturbation Toolkit . This package includes the SpinWeightedSphericalHarmonicY, ...
Nitaa a's user avatar
  • 770
1 vote
1 answer
100 views

Variables in a Package

If I do this: func1[x_List] := Apply[Plus, x]; func2[x_List] := Apply[Plus, x^2]; func3[x_List, y_List] := Map[(fun1[x] # - fun2[x] #^2) &, y]; ...
user85407's user avatar
0 votes
0 answers
45 views

MermaidJS command not working from the paclet

I have installed the mermaid command line package and added it to the environment variable Path and it is accessible from the command line: But the following ...
user13892's user avatar
  • 9,443
1 vote
0 answers
39 views

Autocomplete for package in notebook with context "Unique To This Notebook"

I have the setting that my notebooks their context is unique for each notebook to avoid accidental lingering definitions. I really need this because I'm often distracted and e.g. overwrite files when ...
Gert's user avatar
  • 1,530
0 votes
0 answers
29 views

Insert LineLegend outside FigurePanel in SciDraw

I would like to put LineLegend outside of FigurePanel in Multipanel view created in package <...
Moonwalk's user avatar
  • 641
4 votes
1 answer
965 views

What are some Mathematica packages used for general relativity?

Could you suggest any Mathematica packages that are used for General relativity calculations? Id like to write code to solve the Schwarzchild Lagrangian equation.
Rishabh sharma's user avatar
1 vote
1 answer
117 views

Is there any Mathematica API for Z3?

Z3 has bindings for various programming languages, e.g., C, C++, Java, Python, and so on. Are there any for Mathematica? Or how to implement one?
hengxin's user avatar
  • 840
2 votes
1 answer
92 views

KnotTheory` Passing PD Encoding of a Knot Diagram to Kh

I have a bunch of knot diagrams I would like to use the Kh function in KnotTheory to compute the Khovanov homology for. Almost ...
gdd's user avatar
  • 133
2 votes
2 answers
109 views

Avoid context mark in Plot labels in package

Minimal example: ...
LittleCat1's user avatar
1 vote
0 answers
163 views

How to output TeX with FeynArts?

I've recently installed FeynArts since I can use mathematica to generate topologies and it comes with a set of commands to make diagrams in LaTeX. However, nowhere in the manual can I find a command ...
Guy's user avatar
  • 285
5 votes
0 answers
69 views

What is the most convenient way to organize dependencies from paclets?

Do you have any ideas on how to most conveniently and easily organize package dependencies for Wolfram Language projects. I would like to have something like a list of packages in projects for .Net ...
Kirill Belov's user avatar
4 votes
0 answers
55 views

Viewing your own documentation

I am currently making a paclet, writing documentation for my package. When writing documentation with the Documentation tools, it is displayed in an ``unfinished way". How would it be possible to ...
Mstislav Keldysh's user avatar
0 votes
0 answers
72 views

How to install AceFEM in MacOS?

I downloaded the Evaluation/student version and ran Install.nb according to the official installation instructions^1, it returned some errors as follows. Cannot load installation package. Problematic ...
lumw's user avatar
  • 593
2 votes
0 answers
91 views

How to obtain documentation on functions inside some of the packages that are automatically loaded by Mathematica?

Mathematica comes with lots of useful functions which seems not to be documented. At least I do not know how to find the API documentation to learn more about these functions and how to use them. <...
Nasser's user avatar
  • 145k

1
2 3 4 5
18