6

The XXXX in (* ::XXXX:: *) can be any named style such as you might find in the Format > Style menu. If you look at the underlying cell expression in the frontend, you'll see: Cell[..., "XXXX"] Note that the XXXX is automatically turned into a string when the frontend is reading the file, so you can't use this to apply arbitrary styling ...


3

You could try the following approach, with a secondary kernel (K2) and using CellInformation to check if a cell or notebook is currently in the "Evaluating" state: Get the current evaluator names: evaluators = EvaluatorNames /. Options[$FrontEnd, EvaluatorNames]; Add a "K2" kernel if there isn't one: SetOptions[$FrontEnd, Union[Join[...


3

How about this?: format[l_List] := ToBoxes@# /. {"set", "[", RowBox[{a_, ",", b_}], "]"} :> {a, "=", b, ";", "\n"} & /@ l // RowBox // BoxData // Cell[#, "Code"] & // CellPrint; format@{set[a, 1], set[b, 2], set[c, 2]}


2

SelectionMove[EvaluationNotebook[], Next, Cell] SetOptions[NotebookSelection[EvaluationNotebook[]], Background -> Red] data = Reverse[Sort[RandomReal[1, 5]]]; Module[{t = 0, len = Length[data], sum = Total[data]}, Graphics[Table[{Hue[i/len], EdgeForm[Opacity[.8]], Disk[{0, 0}, 1, {t, t += 2 Pi data[[i]]/sum}]}, {i, len}]]] To change the ...


2

I think it has been used. For Windows OS, it's MenuItem["Re&do", "Redo", MenuKey["y", Modifiers->{"Control"}]].


2

An example of evaluating the expression outside the notebook and then write the result in the notebook. exampleNB = CreateDocument[]; NotebookWrite[exampleNB, Cell["example of evaluating input programmatically", "Text"]]; NotebookWrite[exampleNB, Cell["D[Sin[ RandomReal[] x],x]", "Input", CellTags -> 1]]; ...


2

Yes, put the cursor on FunC and triple click your left mouse button.


1

An alternative approach without For loops: SeedRandom[1] loop = 1; {range1, range2} = {{1/4, 1 - loop/400}, {loop/100, 1}}; tupB = Tuples[Random[Real, #, 4] & /@ {- Reverse @ range1, - Reverse @ range1, range2, range2, 1 - range2, 1 - range2, range1, range1}, 3]; sumB = ConstantArray[0, {532, 532, 3}]; sumB[[;; Length @ tupB, All]] = tupB; sumB ...


1

Sorry to answer my own question, but v6 to v12 is a complete rewrite, and it runs quickly: bckrow =.; bckcol =.; sum =.; bckrow = RandomReal[{0, 0}, {532, 532, 3}]; bckcol = RandomReal[{0, 0}, {532, 532, 3}]; tup = Tuples[{ Random[Real, {(-1.0 + (loop/400)), -0.25}, 4], Random[Real, {(-1.0 + (loop/400)), -0.25}, 4], Random[Real, {(0 + (loop/...


1

After contacting Wolfarm support, I got the following answer: "Hello Jiri, Our developers have confirmed that it is not possible to add other languages in Mathematica. However, I have filed a suggestion report to include a feature that would enable users to add other languages in future versions of Mathematica. If you have any further questions, please ...


1

Alignment is not an option for Cell: Options[Cell Alignment] Use TextAlignment instead: SelectionMove[EvaluationNotebook[], Next, CellGroup] SetOptions[NotebookSelection[EvaluationNotebook[]], Background -> Red, TextAlignment -> Center]


Only top voted, non community-wiki answers of a minimum length are eligible