3

I frequently encounter the situation of wanting to, say, write a set where the set-membership condition involves some text. If I wanted to describe, say, the set of all even integers this way, then would it be better to write

\{x \in \mathbb Z : \text{$x$ is even}\}

or

\{x \in \mathbb Z : x\text{ is even}\}

? Of course there are obvious quibbles (maybe you like \mathbb{Z} rather than \mathbb Z; maybe you like some other delimiter than :, or some manual space around it), but I'm asking only which way is preferable for writing intermingled text and math in math modeβ€”and, if possible, a reason why other than personal preference.

(I was convinced long ago to use the former by someone who argued that it's semantically more sensible, but I don't know if it's the best practice, or, if it is, whether there's any TeXnical reason for it.)

0

Note Do not use this method for your actual work or in your professional capacity. It is a mere jeu d'esprit. This is not recommended for actual maths, which is 99% layout (such as glyph shapes, spacings and proportions and so on, to convey meaning in a standardized way), but is meant only to illustrate that all unicode glyphs are just that, glyphs, and so are "text-able" (as far as that can take anyone). There is a (natural) tendency to consider the (996) mathematical alphanumeric symbols as just a text glyph with formatting applied (e.g. bold, italic), or originating from a different font file/style altogether (e.g., sans, fraktur, script), but, in Unicode, all these 𝐱π‘₯π’™π“π”π”΅π•©π–π—‘π˜…π˜Ήπ™­πš‘ are completely different glyphs (in the same font), not just the same text x codepoint in fancy dress (from potentially a mixture of different fonts).


Just to celebrate end-of-year, without delimiters ...

If I type directly in unicode:

π‘₯ ∈ β„€ : π‘₯ is even

(and the font has text Latin in it as well, like XITS Math does), then I get:

everything is text

MWE

\documentclass[border=6pt]{standalone}
\usepackage{fontspec}
\setmainfont{XITS Math}
%\usepackage{unicode-math}
%\setmathfont{XITS Math}
\begin{document}
%\[x \in \mathbb Z : \text{$x$ is even}\]

π‘₯ ∈ β„€ : π‘₯ is even

\end{document}

... so the question is moot, perhaps. :)

| improve this answer | |
  • 4
    Sorry, but I don't recommend this way. The π‘₯, ∈ and β„€ are treated as in text mode, so unexpected things may happen. Moreover, the spacing is not the "standard" consistent math spacing, but only a normal text-mode space. – Fractal is at topanswers.xyz Dec 30 '19 at 10:59
  • I agree with @Fractal, this is not the way to go, sorry but -1 – CarLaTeX Dec 30 '19 at 11:01
  • @CarLaTeX I don't think a downvote is necessary. From his wording, it is quite clear that this answer is not meant to be serious. It is kind of "just for fun". – Fractal is at topanswers.xyz Dec 30 '19 at 11:03
  • @Fractal I like fun posts but not if they give wrong information. – CarLaTeX Dec 30 '19 at 11:10
  • @CarLaTeX Ah, I remember that sad episode. – Fractal is at topanswers.xyz Dec 30 '19 at 11:11

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.