63

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


31

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


26

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


26

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


20

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


19

Edit: my Dropbox account expired, deleting the stylesheet file (linked below) along with it. Since I'm no longer using Mathematica on a regular basis, it might take a while for me to recreate it. Perhaps someone could help to create a Solarized stylesheet of their own and add in to this answer. Sorry for the inconvenience guys :( Inspired by the posts on ...


17

Since no one dares an answer, let me make some statements that you probably won't like since you seem keen to switch to Mathematica. I don't think this is a good idea. It is just not the right tool for this. My background is academic, I'm using Mathematica on a daily basis and I love it. For writing I'm using LaTeX for manuscripts and persistent documents, ...


15

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


15

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

Wolfram Notebook is definitely my choice, because it is a story within a story within a story... - what I mean by this I'll explain in the end. Wolfram Notebook is the first thing I open, when I want to record ideas, poke at data, experiment, explore, get creative, make beautiful things :-), etc. (For instance, all my blogs, were written in a Wolfram ...


13

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


11

Here is a quick way of doing it: NotebookFind[nb = EvaluationNotebook[], "Print", All, CellStyle]; CreateDocument[NotebookRead[nb]]


11

In general when you have an element in a notebook that you want to reproduce you can right click on the bracket to the right of it, and choose "Copy as" and then "Cell expression". The cell expression of the line in the documentation looks like this: Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", ...


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[ Button["...


8

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


7

Another approach which doesn't change the selection and should be more efficient when working with huge Notebooks: CreateDocument@NotebookRead@Cells[CellStyle -> "Print"]


6

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


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


6

The "EquationNumbered" style uses the following CellFrameLabels setting: CurrentValue[{StyleDefinitions, "EquationNumbered", CellFrameLabels}] {{None, Cell[ TextData[{"(", CounterBox["BookChapterNumber"], ".", CounterBox["EquationNumbered"], ")"}]]}, {None, None}} As you can see, the label only depends on the "BookChapterNumber" style, and ...


5

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


4

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


4

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 = -\\infty}^\\infty\\!\\!\\! |F(\\...


4

You can determine the "ExampleDelimiter" style by setting your notebook style sheet to the one used by function pages: SetOptions[EvaluationNotebook[], StyleDefinitions -> "Wolfram/Reference.nb"] and then using CurrentValue to obtain the styles: CurrentValue[EvaluationNotebook[], {StyleDefinitions, "ExampleDelimiter"}] {Editable -> False, ...


3

CreateDocument[ExpressionCell[myChart, ShowStringCharacters -> False]]


3

Here're some sheets I use for development: SyntaxHighlighting This one's here It implements extensible syntax highlighting by providing a slew of styles to restyle (plus setting up the options right for that). For example if I set some random notebook to that stylesheet I can then do this: SSEdit["UndefinedSymbolStyle", FontColor -> Pink, "MakeCell"...


3

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


3

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


3

I guess you want to make a PDF file with what you have described here Try this : images=Image[ImageTake[#,200+{0,100}],ImageSize->Full]& /@ {ExampleData[{"TestImage","House"}],ExampleData[{"TestImage","Lena"}]}; text={StringTake[ExampleData[{"Text","PlatoMenoEnglish"}],1000],StringTake[ExampleData[{"Text","OriginOfSpecies"}],200]}; pagesToExport=...


3

Here is a workaround, the idea is to extract cells you need, evaluate them in separate notebooks and insert results back. The limitation is that it does not handle output cells that already exist for input you want to evaluate. You may want to grab them too or delete generated cells via token or something. nb = CreateDocument[{ ExpressionCell[Defer[1 + ...


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