# Tag Info

53

Seeing as there are no good repositories for Mathematica stylesheets and packages, I created a github account for the community. The account resides at github/stackmma. I know there's library.wolfram.com, but we should be independent of WRI. On the topic of this question, I created a public stylesheets repository and I've added halirutan and jmlopez as ...

29

A bit of warning from the OP: this code locked-up my Mathematica session, so be sure to save everything before you try this. Update: Problem seems to be related to a problem MMA has with paginating a particular notebook of mine (see comments). This code creates a separate TOC for a notebook saved at the location bookUrl. It works by iterating over all ...

23

FWIW here are some styles I use when collaborating -- i.e. I am doing the programming but others are commenting on outcomes and providing feedback: The basic cell style is: Cell[StyleData["Mike", StyleDefinitions -> StyleData["Text"]], CellFrame->{{4, 0}, {0, 0}}, CellMargins->{{66, 10}, {7, 7}}, CellFrameLabels->{{ PaneBox[ ...

21

If you are skilled in particular code or packages then the switching costs (in time, possibly also money) to adopt a new software/package are usually prohibitive. In the context of typesetting, if you already are well versed in a typesetting software, e.g. LaTeX then I don't see any reason to attempt publication quality documents with Mathematica. So the ...

17

This is not documented but I hope it gets better supported in future versions: TableView[] Since the use of TableView is not immediately apparent:

15

Inspired by the posts on this thread, I've made a Solarized stylesheet after mucking around with the text options and asking stupid questions on here--thank you so much for those who made the time to answer them! I know you can change the syntax highlighting by running option-setting commands [1][2][3], but I'd rather have a stylesheet that takes care of all ...

14

Check out the Mathematica Journal style-sheet. Just download an article and if you like what you see, you can just copy the style from the Style Description window that is brought up by choosing the "Format -> Edit Stylesheet" menu item.

14

Mathematica already has some of these features: e.g Regarding your comment about the appearance when you do this in a text cell. Here is what it looks like for me on a Mac: So the font is Courier which, unless you have reconfigured your system, is not the default font for text cells. You can fix this by changing the grid box options: To do this -- in ...

12

Add the following option to your CreateDocument call: StyleDefinitions -> CurrentValue[EvaluationNotebook[], StyleDefinitions] This works for both embedded stylesheets and stylesheets on the StyleSheetPath. In this case, I use EvaluationNotebook to refer to the notebook containing the button but it could, of course, be whatever NotebookObject you ...

10

OK, FrontEnd: After creating the "overview" button below just click first on your function definition and then on the button and under the function definition you will get (nearly) what you want, i.e. : Part 1. Step 1. Local variables Part 1. Step 2. Option variables Part 2. Step 1. Check for null Input Part 2. Step 2.:1 Check for groups Part 2. ...

9

I would suggest something more simple-minded than Rolf's sophisticated implementation: Clear[extractComments]; extractComments[boxes_] := StringJoin@ Riffle[ Cases[boxes, r : RowBox[{"(*", ___, "*)"}] :> StringJoin@Cases[r, _String, Infinity], Infinity], "\n"]; and the palette: CreatePalette[ ...

7

this is (now a very long) comment not an answer. The objective is to write a book using Mathematica. Within the book equations are generated from LaTex rather than typeset directly using Mathematica. By definition if this was to be done entirely using Mathematica, the equation typesetting would not be done in an input cell. It would be done either in one of ...

6

I guess my questions are 1) why you are not doing the typesetting in Mathematica; 2) for those of us unfamiliar with MaTeX are the equations rendered as vectors or bitmap or what? Here is a solution to part 2 of your question. Step 1. Make a new style. I am going to call it "MaTeX". In this style you will use the CellEpilog option to change the output cell ...

5

I did not notice this post until today. MaTeX has two options for setting the size of the output: Magnification just scales everything (i.e. the PDF file output by LaTeX) proportionally. FontSize passes the font size to LaTeX and thus gives access to the special variants for each point size. When I work with MaTeX, I tend to set all its option to my ...

4

The documentation on Automatic Numbering mentions how to number section titles automatically. Section numbers can be tracked by creating an automatic numbering object linked to a counter. This can be done using the menu commands in the notebook interface: Insert --> Automatic Numbering. The created object updates automatically if sections are moved or ...

3

You could set it up it manually: SetOptions[MaTeX, "Preamble" -> {"\\usepackage{amsmath,amssymb,array}"}, Magnification -> 1.5]; MaTeX["\\begin{tabular}{>{\\raggedright}m{12cm} c} $\\displaystyle\\mbox{}\ \\int\\limits_{x = \ -\\infty}^\\infty\\!\\!\\! |f(x)|^2 dx = \\dfrac{1}{2\\pi} \ \\int\\limits_{\\omega = ... 3 CreateDocument[ExpressionCell[myChart, ShowStringCharacters -> False]] 2 If presentation / formatting is a priority then I would use a program that excels in that and export / import the Mathematica results I need. See this Wolfram note: http://library.wolfram.com/howtos/exporting/ 2 Why not myApplication/FrontEnd/Palettes and myApplication/FrontEnd/StyleSheets (where myApplication is the name of the aplication)? Many applications in my$UserBaseDirectory <> "Applications" directory use that.

2

Unless you want group openers for all groups -- which you probably don't, since that would put one at the very top level for the entire notebook -- then you can edit the notebook's style sheet, select the kind of cell (Section, Subsection, e.g.) for which you want the group opener, and then use the Option Inspector on that cell in the style sheet to include ...

2

Without more details the short answer is that you need to add e.g. MenuCommandKey->"7" to a style to use that key for a style.

2

In my documentation (Mathematica 9.0.1, Linux) I found Hyperlink[StatusArea[Framed["Wolfram"], "Makers of Mathematica"], "http://www.wolfram.com"] It works fine!

2

Code: ClearAll["Global*"]; gau[x_, v_] := Exp[-(x^2)/(2 v)]/Sqrt[2*Pi*v]; f[x_, m_, v_] = gau[x + m, v] + gau[x - m, v]; g[x_, m_, v_] = gau[x + m, v] - gau[x - m, v]; h[x_, m_, v_] := 2*Log[f[x, m, v]/f[0, m, v]] + (x^2)/v + 6 x*g[x, m, v]/f[x, m, v]; Plot[h[x, 3, 1], {x, 0, 3}] Example: *.png example Export["example1.png",Plot[h[x, 3, 1], {x, 0, 3}]] ...

2

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

2

Here's one solution (that needs a bit of improvement to make it useful): functionList[context_String] := TableForm@Sort[ HoldForm @@@ Flatten[ (ToExpression[#, InputForm, DownValues] & /@ Names[context <> "*"])[[All, All, 1]]]] Now just do functionList["Global"]. It does not handle UpValues, SubValues, OwnValues, but most of your ...

2

There is something close to what you ask for built into Mathematica. It is the function called Information. In the form you would use to get what you asked about, there is a keyboard shortcut, the question-mark character. a = 42; f[arg1_, arg2_] := Module[{}, {arg1, arg2}] g[t_] := t^2 ?"Global`*" Each of the symbols shown above is actually a button and ...

1

Use the expression cell style, "Print":- CreateDocument[ExpressionCell[myChart, "Print"]]

1

I do this kind of things regularly. The view of the PDF documents I obtain I find to be satisfactory. Sometimes there appears a conflict of the embedded figure and the page length. This may give rise to something like a part of the page with no text. If this is strongly unwanted, I fix this up manually (also not a big deal). To make the PDF file I simply ...

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