3
$\begingroup$

In a Mma notebook math cell, how can one write an interval with Hoare-Ramshaw (two dots) interval notation? The obvious answer (\:2025) does not seem to work; two full stops produces odd spacing; and the inferior but crudely acceptable two full-stops surrounded by spaces produces an unwanted times symbol.

$\endgroup$
10
  • $\begingroup$ What do you want to do with the resulting expression though? Is this only for notation / printing purposes, or do you need Mathematica to interpret that format mathematically and operate on it? $\endgroup$
    – MarcoB
    Commented Jan 25, 2016 at 18:19
  • $\begingroup$ It is only for the text. (So it will be printed.) $\endgroup$
    – Alan
    Commented Jan 25, 2016 at 18:29
  • $\begingroup$ Can't you simply make the expression a string then? "(1..3)" perhaps? Perhaps a bit more context as to your intended use may help us generate better answers. $\endgroup$
    – MarcoB
    Commented Jan 25, 2016 at 18:34
  • $\begingroup$ Please point to a proper typesetting anywhere online. $\endgroup$ Commented Jan 25, 2016 at 19:19
  • $\begingroup$ What is the "data type" that you want to display this way? Interval? Truth-value expression of the form a < x < b? $\endgroup$
    – march
    Commented Jan 25, 2016 at 19:20

1 Answer 1

4
$\begingroup$

You can type \:2025 to get the unicode character.

If you prefer to use a keyboard alias, evaluate

SetOptions[
  SelectedNotebook[], 
    InputAliases -> 
      Join[Options[SelectedNotebook[], InputAliases][[1, 2]], {"hr" -> "\:2025"}]]

in your note book, then EschrEsc will insert the unicode character into the cell where you currently typing.

Either way you will be able to produce text cells like

$\qquad$text

$\endgroup$
2
  • $\begingroup$ I mentioned this possibility as not working in the original question. Do you actually get a display of the character? If so, what's your version and platform? I'm using Mma 10.2 on Win 64. $\endgroup$
    – Alan
    Commented Jan 27, 2016 at 23:16
  • $\begingroup$ @Alan. I'm running V10.3.1 on OS X 10.10.2. but it worked in earlier versions as well. I know you mentioned you tried typing in \:2025 -- my post is meant to tell you that it should work. $\endgroup$
    – m_goldberg
    Commented Jan 28, 2016 at 12:17

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.