0
$\begingroup$

Is there a way to manually tag parts of input expressions to highlight the part?

A wrapper function that only affects input cell and is otherwise transparent to evaluation?

For example, would like to have a function such as:

 Query[All, highlightedInput[Median] /* f][<|"a" -> {1, 2}, "b" -> {2, 3, 4}|>]

Where Median would be highlighted - analogous to Highlighted for output form - but highlightedInput would not appear in the input cell. Application is instructional material where one wants some parts highlighted.

Could only find a related Q but doesn't get to a solution: Is there a way to write markdown in Mathematica notebook?

$\endgroup$
11
  • $\begingroup$ Isn't it a duplicate: mathematica.stackexchange.com/q/155180/5478? $\endgroup$
    – Kuba
    Commented Feb 24, 2018 at 22:29
  • $\begingroup$ @Kuba, yes that works, wasn't aware of evaluate in place. You can close this Q. $\endgroup$ Commented Feb 24, 2018 at 22:38
  • $\begingroup$ The accepted answer to the referenced question doesn't produce an input where the highlighted part is transparent to evaluation. $\endgroup$
    – Carl Woll
    Commented Feb 25, 2018 at 0:47
  • $\begingroup$ @CarlWoll, I had tried a couple of examples and it seemed to be transparent. Can you give a counterexample? $\endgroup$ Commented Feb 25, 2018 at 15:30
  • $\begingroup$ I added a comparison in my answer to the referenced question showing the difference in evaluation behavior. $\endgroup$
    – Carl Woll
    Commented Feb 25, 2018 at 16:43

0

Browse other questions tagged or ask your own question.