7
$\begingroup$

I'm at a loss on understanding how to get Mathematica use a customized MenuSetup.tr. Actually I can't even find where is the default MenuSetup.tr used by the default Mathematica configuration when a notebook is opened.

I found that, after a fresh install of Mathematica 14.1, there was a MenuSetup.tr file, located in $InstallationDirectory\SystemFiles\FrontEnd\TextResources\Windows
(Actually there are many others for different languages/OS)

Anyway this doesn't correspond to the one used in Mathematica Notebooks. In fact the last entry in this file in the "Help" section is

HelpMenu["&Help", ... MenuItem["&About Mathematica...", "AboutBoxDialog"]

Whillst in an open Notebook the last entry of the "Help" item is "About Wolfram..." and not "About Mathematica..."

In the previous installations of Mathematica (i.e. 13.2) I had a custom MenuSetup.tr that worked fine. I don't remember if I had edited the one in the $InstallationDirectory (that is "*C:\Program Files\Math&Physics\Mathematica 14.1\SystemFiles\FrontEnd\TextResources\Windows*) or the one in the UserBaseDirectory/ (that is C:Users\myusername\AppData\Roaming\Wolfram\SystemFiles\FrontEnd\TextResources\Windows)

(Note the important change of version 14.1 that uses the subdir "Wolfram" i/o "Mathematica" in both the BaseDirectory and the UserBaseDirectory. This could potentially break the customizations made with Mathematica 14.0 or previous versions).

Anyway before Mathematica 14.1 the modified MenuSetup.tr worked as intended.

Now it seems with Mathematica 14.1 any modification in the MenuSetup.tr is totally ignored.

Maybe I'm missing something (some other location to put the custom MenuSetup.tr in or other modification to do to other files potentially involved with the menu customization (init.m, DefaultFrontEndInit.tr, KeyEventTranslations.tr, SystemMenuSetup.tr)) but I'd like to know how to proceed to get my customizations acknowledged by Mathematica 14.1.

$\endgroup$
5
  • 1
    $\begingroup$ I don't think there is anything significantly changed. Yes, MenuItem["BLABLABLA", "AboutBoxDialog"] will show up as About Wolfram..., regardless of what you put in the first argument. But other than that, I can normally add new menu items or change other ones in $InstallationDirectory\SystemFiles\FrontEnd\TextResources\Windows\MenuSetup.tr, and it works as expected. $\endgroup$
    – Domen
    Commented Aug 7 at 13:58
  • 1
    $\begingroup$ And a screenshot. $\endgroup$
    – Domen
    Commented Aug 7 at 14:09
  • $\begingroup$ You may want to try using this utility function to move your configuration from 14 to 14.1: resources.wolframcloud.com/FunctionRepository/resources/… $\endgroup$
    – Searke
    Commented Aug 8 at 16:23
  • $\begingroup$ Though, I'm not sure it will copy over a .tr file $\endgroup$
    – Searke
    Commented Aug 8 at 16:24
  • $\begingroup$ @Searke, it won't, because this file is not something even supposed to be modified. $\endgroup$
    – Domen
    Commented Aug 8 at 17:02

1 Answer 1

8
$\begingroup$

This is because of the change to an App (See here and here). You now have several of these files and you can find them with something like this (this code was given to me, when I asked about this):

ToFileName /@
    AbsoluteCurrentValue[$FrontEndSession, {PrivatePaths,
        "TextResources"}] //
  Select[FileNames["MenuSetup.tr", #, Infinity] =!= {} &]

I think you are looking for the MenuSetup.tr in "Components/Mathematica/FrontEnd/TextResources/" and not the one in "SystemFiles/FrontEnd/TextResources/"

$\endgroup$
6
  • 1
    $\begingroup$ My usual disclaimer, modifying the contents of the layout is not an endorsed/supported thing. $\endgroup$
    – ihojnicki
    Commented Aug 7 at 15:30
  • $\begingroup$ @ihojnicki, absolutely! What would be the correct way to add / change something in the menu? $\endgroup$
    – user21
    Commented Aug 7 at 17:46
  • 1
    $\begingroup$ Changing the menu around was never officially supported. It previously happened to work, but now that it is part of a paclet... it will just be overridden whenever the paclet is updated. There will be a need to make the menu extensible in a future version, but I don't know exactly when that will happen. The clock for MenuSetup.tr is ticking though, and it's time will likely run out beforehand. $\endgroup$
    – ihojnicki
    Commented Aug 7 at 18:29
  • $\begingroup$ Problem solved. Thanks to all. $\endgroup$
    – Luca M
    Commented Aug 10 at 7:47
  • $\begingroup$ I'm unsure of the conclusion here? Does this mean that the file in the installation tree needs to be edited? That is, as opposed to the previous method of overriding the installation file with a file in the user's space? $\endgroup$ Commented Sep 4 at 10:16

Your Answer

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

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