4
$\begingroup$

It used to be that if I typed == or -> these would automatically be rendered as \[Equal] and \[Rule].

Now, for some reason, this feature has disappeared in 12.3.1.

I would like to have it back but I can't find any relevant option neither in the Settings nor in the Options Inspector.

I can still obtain what I want by typing esc->esc etc... But this is cumbersome.

$\endgroup$
9
  • $\begingroup$ I not using 12.3.1 yet, but i guess you can still edit KeyEventTranslations.tr to add key bindings. For part I use: Item[KeyEvent["i", Modifiers -> {Control, Command}], FrontEndExecute[{FrontEnd``NotebookWrite[FrontEnd``InputNotebook[], "\[LeftDoubleBracket]", After]}]] and similar for the right one to write them with alt gr+i/o $\endgroup$
    – Coolwater
    Aug 18, 2021 at 12:13
  • $\begingroup$ Thanks for the tip. Though this doesn't quite achieve what it used to be because 1. The Rule character should be rendered after two keystrokes and 2. in principle they don't need to be in sequence. I can type a -, come back, type >+space and it works. $\endgroup$
    – MannyC
    Aug 18, 2021 at 13:12
  • 1
    $\begingroup$ You look for InputAutoReplacements. Try CurrentValue@InputAutoReplacements. If it returns {} then effectively your InputAutoReplacements must be restored. Tell me the results of your tests $\endgroup$
    – hieron
    Aug 18, 2021 at 14:13
  • 1
    $\begingroup$ @hieron That was it. You solved it. If you can make it into an answer I'll accept it. If you can further copy-paste your current setting I will be eternally grateful and, of course, upvote it. $\endgroup$
    – MannyC
    Aug 18, 2021 at 14:34
  • 1
    $\begingroup$ The option is still there and it still works, it just interferes with ligature support. So maybe obsoleted is a better choice of word. As for disabling ligatures, that is accomplished via CurrentValue[$FrontEnd, {StyleHints, "OperatorRenderings"}] = {}. $\endgroup$
    – ihojnicki
    Aug 18, 2021 at 20:49

2 Answers 2

2
$\begingroup$

Since I can't test it in MMA 12.3, (my version 12.1) try this>

SetOptions[$FrontEnd, 
 InputAutoReplacements -> {"->" -> "\[Rule]", 
   ":>" -> "\[RuleDelayed]", "<=" -> "\[LessEqual]", 
   ">=" -> "\[GreaterEqual]", "!=" -> "\[NotEqual]", 
   "==" -> "\[Equal]", "@>" -> "\[InlinePart]", 
   "<->" -> "\[TwoWayRule]", ParentList}]

To get the current setting you type

CurrentValue[InputAutoReplacements]

To restore the original setting made in $FrontEnd

SetOptions[$FrontEnd, InputAutoReplacements -> Inherited]
$\endgroup$
3
$\begingroup$

I discovered this answer afterwards.

It turns out that that didn't work for me. I had to set this option instead

CurrentValue[$FrontEnd, {StyleHints, "OperatorRenderings"}] = <|
  "|->" -> "\[Function]", 
  "->" -> "\[Rule]",
  ":>" -> "\[RuleDelayed]",
  "<=" -> "\[LessEqual]",
  ">=" -> "\[GreaterEqual]",
  "!=" -> "\[NotEqual]", 
  "==" -> "\[Equal]",
  "<->" -> "\[TwoWayRule]", 
  "[[" -> "\[LeftDoubleBracket]",
  "]]" -> "\[RightDoubleBracket]",
  "<|" -> "\[LeftAssociation]",
  "|>" -> "\[RightAssociation]"
|>

For some reason when I updated Mathematica this option was not set. What's more confusing to me is that setting AutoOperatorRenderings had no effect whatsoever.

Note that this is a new feature of 12.3.1 and it is much better because

  1. You can use it for Part delimiters and it will automatically detect when an expression is enclosed in parts
  2. You can go back inside the rendered object and change it without having to delete the symbol and retype it
  3. It is only a rendering so the underlying representation is unchanged
$\endgroup$
2
  • $\begingroup$ Thank you for the update. Today I downloaded Version 12.3, I couldn't see these updates in 12.1, and of course it is better. $\endgroup$
    – hieron
    Aug 19, 2021 at 19:57
  • 1
    $\begingroup$ This should be the accepted answer, imho. This has fixed the problem for me, even across kernel restarts. Fantastic! Thanks so much for solving this problem! $\endgroup$ Aug 31, 2021 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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