27

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


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


19

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


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


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


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

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


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

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


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

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


5

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

It is important to notice that the notebook must be saved first to use the functions Paginate and MakeContents << AuthorTools` nbkObj = SelectedNotebook[]; Paginate[nbkObj] contObj = MakeContents[nbkObj, "Book"]; I can get the contents in the same notebook with... NotebookWrite[nbkObj, NotebookGet[contObj]] but I am loosing the previous "Book" ...


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


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

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

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


3

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


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

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


2

CurrentValue knows "CounterValue": Obtaining the number in CounterBox And can be used with CellObjects: Composition[ Map[First@FrontEndExecute@FrontEnd`ExportPacket[#, "InputText"] &], Map[(NotebookRead[#] /. CounterBox[style_] :> ToBoxes@CurrentValue[#, {"CounterValue", style}]) & ], Cells[#, CellStyle -> {"Section", "...


2

Here is a function that takes a low-level expression (boxes) and resolves all named styles into explicit style specifications for opened Notebook nb: resolveAllStyles[expr_, nb_NotebookObject] := With[{ heads = Cell | StyleBox, options = Alternatives @@ Symbol /@ Names["System`" ~~ Except[{"$", "`"}] .. ~~ "Style"], resolve = Flatten[...


1

Update 2 I've send a bug report to the official support on this issue: [CASE:4409941]. Just in case, I reproduce it here: The goal is to prevent addition of page breaks between the Caption cells with numbers and the next cells. According to the Documentation, it should be possible to achieve this simply by adding PageBreakBelow->False to the ...


1

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


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