Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

enter image description here

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?

share|improve this question

1 Answer 1

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[Documentation`HelpLookup];
    Documentation`HelpLookup[link_String, nb_, lang_String, opts : OptionsPattern[]
     ] := Block[{$inblock = True, test},

                test = Documentation`HelpLookup[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[Documentation`HelpLookup];
Documentation`HelpLookup[link_String, nb_, lang_String, opts : OptionsPattern[]
   ] := Block[{$inblock = True, test},

   Documentation`HelpLookup[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.

share|improve this answer
    
Very nice. Another Necromancer badge coming up I think :-) –  Simon Woods Apr 27 at 20:43
    
@SimonWoods Thanks to you for a lesson and SjoerdC.deVries for showing this question :) –  Kuba Apr 27 at 20:45
    
Works fine in v9, but not in v8. –  Sjoerd C. de Vries Apr 27 at 21:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.