m (Created page with "= Mathematica Troubleshooting = Some recurrent problems, which I'm tired of having to solve over and over. In some installations, <tt>Ctrl+^</tt> does not produce the supers...")
 
m
 
Line 3: Line 3:
 
Some recurrent problems, which I'm tired of having to solve over and over.
 
Some recurrent problems, which I'm tired of having to solve over and over.
  
In some installations, <tt>Ctrl+^</tt> does not produce the superscript, <tt>Ctrl+/</tt> does not produce the fraction, etc. Keyboard shortcuts are defined in the file named <tt>KeyEventTranslations.tr</tt>. This should be located in the directory specified by:
+
In some installations, <tt>Ctrl+^</tt> does not produce the superscript, <tt>Ctrl+/</tt> does not produce the fraction, etc. This happens to be due ot foreign keyboards (French in my case). Keyboard shortcuts are defined in the file named <tt>KeyEventTranslations.tr</tt>. This should be located in the directory specified by:
  
 
<pre>
 
<pre>
Line 10: Line 10:
 
</pre>
 
</pre>
  
The returned directory did not exist. So I linked it to one that did:
+
However, this is also overridden by <tt>MenuSetup.tr</tt> which is <tt>TextResources/X/</tt> in my case. There I changed the line:
  
 
<pre>
 
<pre>
/usr/local/Wolfram/Mathematica/14.0/SystemFiles/FrontEnd/TextResources$ sudo ln -s French/ Unix
+
MenuItem["&Superscript", "Superscript", MenuKey["6", Modifiers->{"Control"}]],
 
</pre>
 
</pre>
  
and that fixed the problem.
+
for
 +
 
 +
<pre>
 +
MenuItem["&Superscript", "Superscript", MenuKey["^", Modifiers->{"Control"}]],
 +
</pre>
 +
 
 +
as well as
 +
 
 +
<pre>
 +
MenuItem["&Radical", "Radical", MenuKey["2", Modifiers->{"Control"}]],
 +
</pre>
 +
 
 +
for
 +
 
 +
<pre>
 +
MenuItem["&Radical", "Radical", MenuKey["@", Modifiers->{"Control"}]],
 +
</pre>
 +
 
 +
which fixed the problem. Indeed superscript can also be obtained by <tt>Ctrl+6</tt>, which always work, even after the above substitution.

Latest revision as of 19:34, 12 February 2024

Mathematica Troubleshooting

Some recurrent problems, which I'm tired of having to solve over and over.

In some installations, Ctrl+^ does not produce the superscript, Ctrl+/ does not produce the fraction, etc. This happens to be due ot foreign keyboards (French in my case). Keyboard shortcuts are defined in the file named KeyEventTranslations.tr. This should be located in the directory specified by:

FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "TextResources", 
              $OperatingSystem}]

However, this is also overridden by MenuSetup.tr which is TextResources/X/ in my case. There I changed the line:

			MenuItem["&Superscript", "Superscript", MenuKey["6", Modifiers->{"Control"}]],

for

			MenuItem["&Superscript", "Superscript", MenuKey["^", Modifiers->{"Control"}]],

as well as

			MenuItem["&Radical", "Radical", MenuKey["2", Modifiers->{"Control"}]],

for

			MenuItem["&Radical", "Radical", MenuKey["@", Modifiers->{"Control"}]],

which fixed the problem. Indeed superscript can also be obtained by Ctrl+6, which always work, even after the above substitution.