Linked Questions

2 votes
2 answers
943 views

Export a Package (.m) from a Notebook (.nb) [duplicate]

I recently started creating Mathematica packages. I find it easiest to develop functions in a Notebook (.nb file). This allows me to add sections, comments and examples. I don't want to duplicate ...
LBogaardt's user avatar
  • 1,605
1 vote
0 answers
1k views

Context not created when Needs was evaluated [duplicate]

I'm encountering a problem when trying to write and load my own packages. As a test case, I created a very simple package, TestPackage.m, which contains ...
FalafelPita's user avatar
2 votes
0 answers
710 views

Convert .nb to .m with a single script or command line in linux [duplicate]

I have some scripts in ".nb" format and I am more used to launch them in Linux command line in Linux but I need them in ".m" format. Usually I open the ".nb" script with the Mathematica Notebook and ...
Smilia's user avatar
  • 592
0 votes
0 answers
87 views

How to load a package [duplicate]

I have a package: BeginPackage["HNotation`"]; soma::usage = "asdfa"; Begin["`Private`"]; soma[x_] := x + 1; End[]; EndPackage[]; I save the file with ".m" ...
Mateus's user avatar
  • 1,283
0 votes
0 answers
27 views

Trouble picking up package definitions [duplicate]

I open a new notebook and type ClearAll[test]; test[x_] := x + 42; I save it as Temp.nb and also as ...
Reb.Cabin's user avatar
  • 8,693
5 votes
2 answers
171 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,787
2 votes
1 answer
154 views

No names when loading package

I want to use mu own package. This is the procedure I take: 1) In Mathematica notebook I put the following code taken from code ...
WoofDoggy's user avatar
  • 314
1 vote
0 answers
185 views

Load a Mathematica Notebook using .Net code

I have gotten a tremendous amount of information from the question posted at (Load a Mathematica Package via .Net code), which my application is very similar to. Specifically in that thread, the ...
Josh's user avatar
  • 11
1 vote
0 answers
134 views

Fail to Create a package [closed]

This is rather basic. In an empty notebook I type in a single cell ...
Dimitris's user avatar
  • 4,854
1 vote
0 answers
73 views

Automatically export .nb to a package upon saving while preserving section headings

Is it possible to automatically export a .m package when I save my .nb as can be done using the option ...
Kvothe's user avatar
  • 4,591
2 votes
0 answers
50 views

Exporting packages containing "Python Code" cells

I created a notebook with Python code cells (evaluated using External Evaluate) as can be created by typing > at the beginning of a cell. (And choosing Python ...
Kvothe's user avatar
  • 4,591