8
$\begingroup$

Now that Wolfram|Alpha Notebook Edition, which is in essential Mathematica with a special front end:

enter image description here

is free for 6 months, I'm playing with it. Default cell type of Wolfram|Alpha Notebook Edition is Wolfram|Alpha Input:

enter image description here

Can I change the default style to Input? Stroking Alt+0, Enter is way too cumbersome.

So long the best solution I found is to

  1. remove the original WolframAlphaNotebook.nb under

    $InstallationDirectory <> 
     "\\SystemFiles\\Components\\WolframAlphaClient\\FrontEnd\\StyleSheets" // SystemOpen
    
  2. copy the Default.nb under

     $InstallationDirectory <> "\\SystemFiles\\FrontEnd\\StyleSheets" // SystemOpen
    

to the directory above and rename it to WolframAlphaNotebook.nb.

But now Wolfram|Alpha Input cell becomes hard to create.

Is there a better way to tackle this? Ideally I would like Input style to be the default and Wolfram|Alpha Input to be available with a shortcut, say, Alt+9.

I'm on Windows 10, version 1809.

$\endgroup$
1
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$
    – Kuba
    Jun 16, 2020 at 11:33

2 Answers 2

5
$\begingroup$

I figured out the answer myself. The problem can be solved by editing the stylesheet with a text editor.

To be specific:

  1. Backup the original WolframAlphaNotebook.nb.

  2. Open the WolframAlphaNotebook.nb with any text editor you like, search for TraditionalForm, and you'll see the following segment:

    DefaultNewCellStyle->"NaturalLanguageInput",
     CommonDefaultFormatTypes->{"Output"->TraditionalForm},
    
  3. Modify it to

    DefaultNewCellStyle->"Input",
     CommonDefaultFormatTypes->{"Output"->StandardForm},
    

    and save.

  4. Open the modified WolframAlphaNotebook.nb with Wolfram|Alpha Notebook edition, Click File ▶ Save As in the menu, and replace the WolframAlphaNotebook.nb we just modified with this new one.

Now the default new cell style becomes Input, and Wolfram|Alpha Input remains the first choice when we click the +:

enter image description here

I've modified the default style of output to StandardForm BTW.

Remaining Issues

  1. One may think text editor isn't necessary here, "Why not replacing with Mathematica?" I thought so, too, and wrote the following:

    nb = Import[$InstallationDirectory <> 
        "\\SystemFiles\\Components\\WolframAlphaClient\\FrontEnd\\\
    StyleSheets\\WolframAlphaNotebookBackup.nb"];
    
    newnb = nb /. 
       cell : _[__, DefaultNewCellStyle -> "NaturalLanguageInput", 
          CommonDefaultFormatTypes -> {"Output" -> 
             TraditionalForm}, __] :> (cell /. {"NaturalLanguageInput" -> 
            "Input", TraditionalForm -> StandardForm});
    
    Export["WolframAlphaNotebook.nb", newnb]
    

    But strangely, using this stylesheet, the default style in the + also becomes Input. I don't know why.

  2. As one can see from the GIF, style of the first cell is still Wolfram|Alpha Input. This doesn't seem to be controlled by stylesheet.

The bounty will be awarded to any answer that finds solution(s) for the issues above, or other solutions for my original problem.

$\endgroup$
2
  • $\begingroup$ Thank you. For readers interested in using this method to change the default new cell style of the DarkMode stylesheet in the Wolfram Repository after setting the stylesheet as default with ResourceFunction["DarkMode"]["SetDefault"] . Searching directly for "DefaultNew" this helped me to change the default style although I had to manually search for the highlighted text due to line wrapping on my editor. On my text editor (Kate from the linux KDE distro) there was a mention " ... was opened and contained lines longer than the configured line limit ". According to the message... $\endgroup$ Sep 20, 2022 at 18:39
  • $\begingroup$ ... because of this line wrapping issue, the document was set to read only on my editor. But there was an option/button "temporarily raise limit and reload file" which allowed me to modify the document although the search function did not work correctly as mentioned before. $\endgroup$ Sep 20, 2022 at 18:43
2
$\begingroup$

Wolfram documentation for setting the default cell type for Mathematica, this also works with Wolfram Notebook Edition.

enter image description here

$\endgroup$
2
  • $\begingroup$ Oh finally here comes an answer. Does the Global Preferences option value works properly in Wolfram|Alpha Notebook Edition, too? (My half-year license expired so can't test… ) $\endgroup$
    – xzczd
    Apr 27, 2021 at 11:12
  • $\begingroup$ I've tried setting it in Global Preferences but it did not work whenever I created a new notebook. I tried the method that you showed above, which gave me an error somewhere along the lines of "this notebook has been edited outside of wolfram notebook and will not effect your evironment", I'm not sure if this affects the changes you make in the Global Preferences. $\endgroup$
    – brandii-co
    May 2, 2021 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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