Tag Info

Hot answers tagged

9

You can put it to the last cell and evaluate, it will resize all images from InputCells to the width of 100px. You can of course change affected cell set and output parameters. Do[ With[{nr = NotebookRead[cell]}, If[! FreeQ[nr, "ImageGraphics"], SelectionMove[cell, Cell, All]; NotebookWrite[ EvaluationNotebook[], nr /. g : ...


7

Like Mike said in a comment, the key is to use the second argument of Dynamic. In this case I've built a function updateCurrencies which modifies a global variable currencies which holds an Association object with all the currency values in it. currencies = <| "USDollars" -> 0, "Euros" -> 0, "BritishPounds" -> 0, "SwedishKronor" ...


5

It is unclear whether the checklist reflects the total number of boxes checked or the position of the boxes. For example if you only has the second box checked do you want to see [1/2] or [2/2]? Having said that here is something quick to try: x = {False, False}; CellPrint@ TextCell["Tasks", "Subsection", ShowStringCharacters -> False] CellPrint@ ...


4

To add a cell below is trivial because we have the built in option ReturnCreatesNewCell which can be set to True for a given cell style. To add a cell above when you hit Return you can use CellEventActions like this: Cell[StyleData["ToDo", StyleDefinitions -> StyleData["Text"]], CellDingbat->StyleBox["\[FilledSmallSquare]", Alignment -> Baseline, ...


4

Your assumptions are correct. Every front end process that is started up will show in the dock. Certain operations, such as rasterization, require a front end. If you rasterize in parallel, each subkernel will start its own front end, which will show up in the dock.


2

To type this into Mathematica and have it displayed in the same way, you can either use the Column and Row from the "Typesetting" part of one of the first three Pallets or use their keyboard shortcuts Ctrl + Return and Ctrl + ,.


2

You can do this with Front End Tokens. Here is a button that turns the selected text red: Button["Color", FrontEndTokenExecute["FontColor", Red]] In a Notebook:


2

If it were a venn diagram, clicked would be a subset of dragged (at least in the mind of whoever implemented this). You can reproduce what (I think) you want by adding a null event for "clicked": EventHandler[ Framed[1], {"MouseClicked" :> Null, "MouseDragged" :> (Print@RandomReal[])}] ---EDIT--- Or, for that matter, as per your comment, it is ...


1

Edit I was thinking about some automation of your request. With the the following approach you can create a new notebook, show your tables and graphs and save a new notebook as PDF. SetDirectory@NotebookDirectory[]; some Code ... some Code List all global variables, see here: names = Select[Names["Global`*"], Head@Symbol[#] =!= Symbol && ...


1

So the only way that came to my mind and worked was to use CellTags and NotebookLocate. selectCells = Function[cells, With[{tag = ToString @ Unique[]}, SetOptions[#, CellTags -> Flatten[{Options[#, CellTags][[1, 2]], tag}]] & /@ cells; NotebookLocate[tag]; SetOptions[#, CellTags -> Drop[Options[#, CellTags][[1, 2]], -1]] & /@ ...


1

For a variety of reasons I still use V9 most of the time and when I ran your code on my Mac (OS 10.10) I found the same problem. Mr Wizard has provided an alternative way for you to achieve what you want but the question remains why your code didn't work. I made some changes to your code that should make it work: CreatePalette[ Column[{Button["Courier ...


1

Actually, it is really interesting task :) So, this code is working so as I understood your goal: list = {{1, 2}, {3, 4}, {5, 6}}; Manipulate[list[[i]], {i, 1, Length@list, 1}] searchBar = ExpressionCell[ Row@{InputField[Dynamic[search], String, ContinuousAction -> True], " ", Button["search", sdm], " ", ...



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