Tag Info

New answers tagged

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

If you are trying to place each grid into a separate cell, change the last line to this: Scan[Print, Array[grid @ block @ # &, 4]] or this: Print ~Scan~ Array[grid@block@# &, 4] or this: Array[grid@block@# &, 4] // Scan[Print, #]& ... as suits your taste. Mathematica version 10 allows this nice-looking alternative form: Array[grid ...


0

myFigs = Table[Plot[Sin[i x], {x, -2, 2}], {i, 6}]; myTables = Table[Grid[ RandomInteger[20, {RandomInteger[10], RandomInteger[10]}], Frame -> All], {6}]; FinalFig = GraphicsGrid[Partition[Union[myFigs, myTables], 3]]; Export[".../Desktop/FinalFig.pdf", FinalFig, "PDF"];


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, ...


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 ...


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:


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@ ...


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 : ...


2

The easiest way is to evaluate this: SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[{ Cell[StyleData[StyleDefinitions -> "Default.nb"]], Cell[StyleData[All], FontColor -> GrayLevel[1], Background -> GrayLevel[0]]}, Visible -> False, StyleDefinitions -> "PrivateStylesheetFormatting.nb"] ] However as you ...


3

Not pretty but works. The trick is to inject Unique string to the box so it can be found later in whatever you wish to have in that cell. Cell expression with replaced BouttonBox is then overwritting button's parent cell. buttonEvaluate2 = Function[expr, Button["Evaluate", #; SelectionMove[EvaluationCell[], All, Cell]; ...


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], " ", ...


1

Yes I can tell you what went wrong: You forgot that a t is only a multiplication when you have a space in between them. Otherwise, it is the variable at. Therefore: Assuming[a > 0 && b > 0, Integrate[Exp[-at]*Sin[bt], {t, 0, Infinity}]] (* E^-at ∞ Sin[bt] *) but Assuming[a > 0 && b > 0, Integrate[Exp[-a*t]*Sin[b*t], t]] (* ...



Top 50 recent answers are included