Tag Info

New answers tagged


No need to go through all the machinations of trimming/applying a cascade of functions, simply: CurrentValue["NotebookFileName"]


You have to add a few extra commands to NotebookFileName to remove the directory. Last@FileNameSplit@NotebookFileName[] Hope this helps.


What he says in the video is that he used Shift-Control-N to convert to StandardForm because that's more readable. (On Mac, replace Control by Command). It can also be done by going to the Cell menu and choosing "Convert To... > StandardForm". If you want TraditionalForm, the N key is replaced by T. But the command acts on the whole cell, not a single ...


This question is closely related to Automatically use InputOnly style and it can also be done with CellFrame and CellMargins. Here is a Button to automate the process. Button["Frame Multiple Cells", With[{cells = Cells[NotebookSelection[InputNotebook[]]]}, MapThread[ Function[{frame, pos}, MapAt[ SetOptions[#, CellMargins -> ...


Try FE`Evaluate[FEPrivate`GetPopupList["MenuListNotebooksMenu"]] It works in my machine :) Then you may try something like this to open the notebooks: ActionMenu["Open History", Rest@FE`Evaluate[FEPrivate`GetPopupList["MenuListNotebooksMenu"]] /. HoldPattern[a_ -> b_] :> (a :> NotebookOpen[$HomeDirectory <> b])] Edit The ...


One can use $Pre to check if an input expression defines the correct variable and is doing so using the correct value. SetAttributes[check, HoldAll] check[new_Set] := (Print["You guessed it!"]; new) /; HoldForm@new == HoldForm@Set[foo, 23] check[new_Set] := (Print[ "You've guessed the right variable name, but not the right value yet."]; new) /; ...


Something, that more or less does what you asked for, can be achieved by creating a hidden InitializationCell using a DynamicWrapper DynamicWrapper["xxx", If[foo == 23, MessageDialog["You guessed it!"], MessageDialog["You've guessed the right variable name, but not the right value yet."]]]

Top 50 recent answers are included