Rather than craft my own stylesheets for documentation, I'd like to emulate (copy? ape? borrow?) the Wolfram style. Here is a very small example (type this in the help-box, which you get by pressing F1
)
Quaternions/ref/UnitQuaternionQ
Here is a very large example
ContourPlot3D
I have zero experience creating styles, and I have only the most foggy understanding of how Notebooks work. I have gotten this far: If I scrape over the orange-and-yellow text at the top of the UnitQuaternionQ
example, the cell just underneath the heading, then press Command-Shift-E
or use the Cell>Show Expression
menu item, then I see this magnificent bouillabaisse:
Cell[BoxData[GridBox[{
{"", Cell[TextData[{
Cell[BoxData[
RowBox[{"UnitQuaternionQ", "[",
StyleBox["q", "TI"], "]"}]], "InlineFormula"],
"\[LineSeparator]gives ",
Cell[BoxData[
TemplateBox[{Cell["True"],"paclet:ref/True"},
"RefLink",
BaseStyle->"InlineFormula"]], "InlineFormula"],
" if ",
Cell[BoxData[
StyleBox["q", "TI"]], "InlineFormula"],
" is a unit quaternion and ",
Cell[BoxData[
TemplateBox[{Cell["False"],"paclet:ref/False"},
"RefLink",
BaseStyle->"InlineFormula"]], "InlineFormula"],
" otherwise."
}]]}
}]], "Usage",
GridBoxOptions->{
GridBoxBackground->{
"Columns" -> {{None}}, "ColumnsIndexed" -> {}, "Rows" -> {{None}}, "RowsIndexed" -> {}}},
CellID->16193]
This gives me a lot of clues, but also a large number of things to look up, understand separately, and then piece back together, namely Cell
, GridBox
, TextData
, BoxData
, RowBox
, StyleBox
, TemplateBox
, paclet
s as URIs, and everything they depend on. I also find out that when I paste that expression into a new notebook and do Command-Shift-E
, I get errors, most of which imply that there is a missing stylesheet. From this I infer that notebooks have a secret, implicit "style sheet" attribute, but I don't know how to set it or get it in a general way. When my mouse-focus is in the help box, the Format
menu does not contain an obvious way for me to snip, copy, borrow, ape, or otherwise access the style sheet.
I tried looking for an author's guide in the documentation, but a few quick searches didn't turn up anything on-point.