# Is there a way to make the “Details” section of the documentation expand by default?

By default, the Mathematica documentation opens with the "Details" section collapsed.

This is never what I'm looking for — in fact, I've lost count of the times I've sought help on a feature and not found it anywhere on the feature's documentation page (at least not until I remember this shortcoming).

Is there a way to configure Mathematica doe that the "Details" section of the documentation opens is expanded by default?

-
New edit should be more handy, what do you think? –  Kuba Apr 29 at 13:50

## Update 2015, stylesheet approach:

We can safely customize basic stylesheets by copying them first to $UserBaseDirectory: styleDir = FileNameJoin[{"SystemFiles", "FrontEnd", "StyleSheets", "Wolfram"}] If[! DirectoryQ@#, CreateDirectory@#] &@ FileNameJoin[{$UserBaseDirectory, styleDir}]

CopyFile @@ (
FileNameJoin[{#, styleDir, "Reference.nb"}] & /@ {
$InstallationDirectory,$UserBaseDirectory}
)

SetOptions[NotebookOpen @ %, {Editable -> True, Saveable -> True}]


Now find "NotesSection" style definitions and add there

CellDynamicExpression :> Refresh[
SelectionMove[EvaluationCell[], All, CellGroup];
FrontEndExecute[ FrontEndToken[EvaluationNotebook[], "OpenCloseGroup"]]
,
None
]


Save and done.

The idea is to capture F1 (take a look at the link at the bottom) and include a code that will expand this cell group.

I have not fully tested it (and I probably won't :P) but this works so far:

### V9:

    Unprotect[DocumentationHelpLookup];
DocumentationHelpLookup[link_String, nb_, lang_String, opts : OptionsPattern[]
] := Block[{$inblock = True, test}, test = DocumentationHelpLookup[link, nb, opts]; NotebookFind[test, "NotesSection", All, CellStyle]; FrontEndTokenExecute[test, "OpenCloseGroup"] ] /; ! TrueQ[$inblock]


90% of credits goes to Simon Woods for this answer

One can put it to the init.m file so this becomes a default behaviour. I've never done this but I will try one day.

I was trying to do this via Cells[test, CellStyle->"NotesSection"] but it was terminating the session repeatedly.

This works on Win7 V9 but not on V8. Any comments appreciated.

### V8:

I can't test it and it is ugly but works on V8, thanks Michael Hale for help:

Unprotect[DocumentationHelpLookup];
DocumentationHelpLookup[link_String, nb_, lang_String, opts : OptionsPattern[]
] := Block[{$inblock = True, test}, DocumentationHelpLookup[link, nb, opts]; Pause[1]; test = Select[Notebooks[], (("DocumentType" /. NotebookInformation[#]) === "Help") &][[1]]; NotebookFind[test, "NotesSection", All, CellStyle]; FrontEndTokenExecute[test, "OpenCloseGroup"]] /; ! TrueQ[$inblock]


Unfortunatelly I can't make it work without Pause since I can;t test it. If I find V8 among my friends I will try to make a proper code.

-
Very nice. Another Necromancer badge coming up I think :-) –  Simon Woods Apr 27 '14 at 20:43
@SimonWoods Thanks to you for a lesson and SjoerdC.deVries for showing this question :) –  Kuba Apr 27 '14 at 20:45
Works fine in v9, but not in v8. –  Sjoerd C. de Vries Apr 27 '14 at 21:04
@SjoerdC.deVries CellDynamicExpression was introduced in V8, are you able to check if new method works? –  Kuba Apr 29 at 13:53
Perhaps "copying" instead of "moving" is an even safer instruction? [Seems like a trivial goal, opening the details section, but the use of CellDynamicExpression is certainly +1 material.] –  Michael E2 Apr 29 at 14:08