28

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


20

2021 Edit Upon request, a(n old) version of solarised file can be found here: https://ufile.io/bffds84j 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 ...


20

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


14

AFAIK there's nothing built-in. On the other hand I use this sort-of functionality all the time. Here's a quick way to generate a table of contents palette: nbTOC[nb_] := Button[ Mouseover[#, Style[#, "HyperlinkActive"]] &@First@NotebookRead@#, SelectionMove[#, All, CellContents], Appearance -> None, BaseStyle -> "...


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

I found many posts here that address different aspects of my question. Some of them go far beyond my needs and understanding. They convince me that even complicated documents can be nicely typeset in MA. Most of all I was inspired by the post of Mike Honeychurch with several nice examples. Other posts from where learned include Writing aligned equations in ...


9

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


7

I made a nbTOC based on b3m2a1's nbTOC to make it more ready to use. Improvements are listed below: Hierarchical TOC levels with different indent, fontsize, boldness and color width control of the TOC panel add a scrollbar to support arbitrary long TOC automatically open inner cell after clicking buttons an update button at the top of TOC. By clicking it, ...


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


6

For many years I use Mma for writing the texts that I used to call "Formulars." The formulars are the scientific reports to myself and my co-authors containing text, formulas, graphics, and their mathematical derivations in the form of the Mma code. The code I, however, hide such that it can be visualized if needed. These are not intended to be ...


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

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


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

You can use CellGroupingRules: CellPrint[{ExpressionCell[HoldForm[Integrate[x^2, x] == x^3/3], Background -> Yellow, "DisplayFormulaNumbered", CellGroupingRules -> "OutputGrouping"]}] More info: Any manual on cell grouping management?


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

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


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

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


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


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