# Tag Info

1

With a lot of help from this answer: Connect Frontend to Kernel Started by JVM via JLink here is a demo that opens a notebook from .NET (via button1), allows the user to make a dynamic manipulation, and then sends the result back to .Net where it is displayed in the form. using System; using System.Windows.Forms; using Wolfram.NETLink; using ...

2

Based on the error message the ScheduledTask seems to cause the problems. Therefore here is a way how to make a palette with a clock that can be started, stopped and continued by clicking a button without using a ScheduledTask. CreatePalette@ DynamicModule[{startStop = False, last = 0, refTime = AbsoluteTime[]}, Grid[{{Dynamic[ ...

0

Modifying an example in the documentation to $Pre, one can save all output and then process it as desired. Begin by defining. SetAttributes[saveoutputs, HoldAll]; outputs = {}; saveoutputs[new_] := (outputs = {outputs, HoldForm[new]}; new);$Post = saveoutputs; Then create some output, for instance, r = 3.2 (* 3.2 *) area = Pi r^2 (* 32.1699 *) A ...

1

You can find endless ways to get what you have asked for looking Help for CreateDocument or NotebookWrite: myNb = CreateDocument[1 + 1]; NotebookWrite[myNb, 2 + 2]; Another possibility, as example, is: fileOut = "example.txt"; streamOut = OpenWrite[fileOut]; Write[streamOut, OutputForm[Log[1/x]]]; Close[streamOut]; Can you, please, describe your needs ...

2

On my Ubuntu 15.04 system Mathematica 10.2 does pick up the system settings for scaling. I can go to System Settings -> Display, adjust the scaling with the slider there, restart Mathematica, and its fonts will be adjusted just like all other applications.

3

If you highlight all the brackets on the right side of what you want, and then do File->Save Selection As you should get this. nb = CreateDocument[{TextCell["PDF Test", "Section"], {Table[PieChart@Range@5, {7}]} // TableForm}]; I transposed the list so it reads left to right and put it in table form to get rid of the brackets. nb = ...

4

You need to set the page size as well as the paper size. I can only test this in V10.1 but it works: nb = CreateDocument[{TextCell["PDF Test", "Section"],Table[PieChart@Range@5, {7}]}]; SetOptions[nb, PrintingOptions -> {"PaperOrientation"->"Landscape","PageSize" -> {1296, 864}, "PaperSize" -> {1296, 864}}]; SetOptions[nb, ...

1

With some modifications. nb = CreateDocument[ Column[{TextCell["PDF Test", "Section"], GraphicsRow[Table[PieChart@Range@5, {7}], ImageSize -> 700]}]];

1

Preferences -> Advanced -> Open Options Inspector. In the Options Inspector window: Global Options -> PrivateFrontEndOptions In the right pane: "XDefaultApplicationStyle": by default, it is "plastique". Change it to "windows", for example, or other styles defined in qt4-qtconfig. You can also change the font "Bitstream Vera Sans-10" to "Bitstream Vera ...

2

Yes, Mathematica forces to display some usual characters into Mathematica font only. This is the case of your \[WhiteKnight]: Style[\[WhiteKnight], FontFamily -> "Apple Symbols", FontSize -> 40] I clearly have a different \[WhiteKnight] symbol available in my "Apple Symbols" system font but it is not displayed here above. Actually I found some ...

6

An adaption of this answer for an ActionMenu and to your styling: assnMenuK[slowF_, a_Association, title_: "Choose"] := DynamicModule[{done = False, lastSelection = ""}, Grid[{{ ActionMenu[title, KeyValueMap[#2 :> (lastSelection = #2; done = "working"; slowF[#1]; done = True) &, a], Method -> "Queued"], ...

0

Windows 10 does copying differently than previous OSes, and often doesn't play well with weird copy formats like images from Mathematica. Bitmap should work still, but I doubt this will be fixed with updates.

1

Yes...just figured this out. Place this in an init.m file in any path called my Mathematica. This is for a center lined math cell, but you can also do the same for Marker Aligned, Equal Aligned or whatever you want. In my code below, the first column aligns to the center and next aligns in the left. You can change this however you want. Just replace ...

2

On Windows the vertical divider between the two vertical panes of the options inspector is movable, even though the mouse pointer does not change to a double headed arrow when hovering over it as one would expect. However, if you click-and-drag it, you can resize those panes at will.

0

Raplace the variable st in the following code with sat: taskQueue[input:{{title_String, mins_},__}] := Module[{getTime, remaining = <||>, taskQueue = <||>, row, grid={}, currtitle, st},... Also replace the variable st with scta in st=CreateScheduledTask[....]... startStopButton[StartScheduledTask[st], StopScheduledTask[st].... This managed ...

0

Pretty simple: nb = GenerateDocument["ExampleData/BasicTemplate.nb", <|"author" -> "Henry Jones"|>]; SetOptions[nb, {ScreenStyleEnvironment -> "Printout", Magnification -> 1.5}]

2

This works for me: CreatePalette[Button["Crazy Color Palette", ib := InputNotebook[]; If[NotebookRead[ib] === {}, NotebookWrite[ib, "RGBColor[.5,.6,.7]"], FrontEndExecute[{FrontEndToken[ib, FontColor, RGBColor[.5, .6, .7]]}]]]]

1

In version 10 and above you can use Cell Handles to program the notebook without depending on which cell is currently selected. Do[Print[l], {l, {a, b, c}}]; x = NextCell[EvaluationCell[]]; Pause[3];(* <-some time-consuming evaluation here*) If[CurrentValue[x, CellTags] === {}, NotebookDelete[x]] With the above, in the 3 second pause you can select any ...

0

Whenever I write manipulate functions I: execute the code,delete everything but the running manipulate window, and then save as a computable document (.cdf). Then whenever I open it it's just the manipulate window. I personally don't mind the extra white space, but if you do maybe check out belisarius's post in Running a function with manipulators in a ...

1

I don't know if this will help - it might be a start... After three or four other words, I looked at the following: options = Options[Notebook]; heads = First[#] & /@ options; strings = ToString[#] & /@ heads; matches = Select[strings, StringMatchQ[#, ___ ~~ "Select" ~~ ___] &] Which produced: {"Selectable", "WindowClickSelect", ...

2

You may use TableForm (you're already using this), CellTags, NotebookLocate, and NotebookRead to do this. For your Import "Output" cell add a CellTag that will be your reference. CellPrint[ExpressionCell[ ImportString["1,2,3,4,5,6,7,8,9", "CSV"] // TableForm, "Output", CellTags -> "Data1"]] This can be re-executed at any time going forward ...

1

Here is the solution which I currently use. It isn't perfect but serves quite well for my purposes. In the Notebook I define an auxiliary function which takes a variable where a data array is stored and prints an initialization Cell with two-dimensional human-readable representation of that array which will be assigned to the input variable on ...

1

Here is one approach. This code is not re-entrant (cannot open on two windows at same time) - it uses a global variable for the gotoSection function - but this could be fixed. SectionPicker[notebookName_String] := (* problem running this twice *) (* simple fix = generate only one *) Module[{notebook, cells, sectionNames }, notebook = ...

0

(Code to extract text from cell copied from John Fultz here.) This needs work but it's the start of one possible approach. To split a tagged cell at semi-colons: nb = EvaluationNotebook[]; cellObject = First[Cells[nb, CellTags -> {"MyCode"}]]; SelectionMove[cellObject, All, Cell]; text = First[ FrontEndExecute[ ...

1

The following autohotkey script works. #IfWinActive ahk_class SunAwtFrame ~LButton:: if (A_PriorHotkey <> "~LButton" or A_TimeSincePriorHotkey > 400) { KeyWait, LButton return }else{ Send {Ctrl Down}{w}{Ctrl Up} } #IfWinActive

1

Happy to summarize the solution from our chat here as requested, hopefully someone may find it helpful in the short term (I imagine a number of the questions about this issue may be eventually deleted from the site). The root cause was the same as in main question. The steps outlined there should be tried first. In this specific case we needed to restore ...

Top 50 recent answers are included