New answers tagged


The past few weeks I've gotten into customizing my Mathematica keybindings so I figured I'd share them and share what I've learned. This all works as stated on my system ($Version is 12.1.1 for Linux x86 (64-bit) (June 19, 2020)) but I have not tested these elsewhere so YMMV. If you like to use input aliases and find hitting Esc twice inconvienent then add ...


I don't think there's anything to do exactly what you want, but you should definitely look at CreateSearchIndex / TextSearch functions. You can just index the notebooks as files, but in your case it seems more useful to contruct a list of ContentObject expressions (which are just associtions with the fields you need).


Try: CreatePalette[ Button["Filename and Date", str1 = NotebookFileName[SelectedNotebook[]]; str2 = DateString[]; NotebookWrite[ InputNotebook[], {Cell[str1, "Content"], Cell[str2, "Content"]}] ] ]


The following code will create a palette and print the file name and date: CreatePalette[{Button["Filename and Date", NotebookWrite[ InputNotebook[], {NotebookFileName[SelectedNotebook[]], DateString[]}]]}] But note, that this will only work if the input notebook has a name. A new notebook needs to be saved before it acquires a name. ...


I got it to work with the command line: Mathematica "C:\*my path*\CDoc.nb" But first I had to do the following: Open CDoc.nb Select the input cells you want to execute on open and then select from the main menu: Cell > Cell Properties > Initialization Cell (Or press Ctrl+8) Open the Option Inspector by pressing Shift_Ctrl+O or by selecting ...


By default Mathematica uses $HistoryLength = Infinity, so it stores every output expression since you started Mathematica in the data associated with the System symbol Out. If a lot of your output takes a lot of memory, you can easily slow down your computer. Instead, you could use this $HistoryLength = 2; Then Mathematica will only remember the two most ...

Top 50 recent answers are included