14
$\begingroup$

\begin{align} \forall x\in(0,+\infty), \quad f(x) > 0 \tag 1 \\[10pt] \forall x\in ]0,+\infty[, \quad f(x) > 0 \tag 2 \\[10pt] \forall x\in {]}0,+\infty{[}, \quad f(x) > 0 \tag 3 \end{align} I was instructed from an early age to use the notation in line $(1)$ above. In France apparently the one in line $(3)$ prevails, or at least has some currency. I coded line $(3)$ like this:

\forall x\in {]}0,+\infty{[}, \quad f(x) > 0

Line $(2)$, on the other hand, is coded like this:

\forall x\in ]0,+\infty[, \quad f(x) > 0

In the conspicuous difference between the appearances of lines $(2)$ and $(3)$ we see that MathJax doesn't apply the spacing conventions that it applies well in line $(1)$. (Apparently to some users this is not conspicuous until the actual juxtaposition of lines $(2)$ and $(3)$ is seen.)

If one must use the French notation, how should that be done? Just the way I did in line $(3)$? Or is there a less crude way?

$\endgroup$
22
  • 9
    $\begingroup$ I don't know, but it might be worth trying \left] and \right[ to see if that improves the spacing. $\endgroup$
    – hardmath
    Commented Dec 1, 2016 at 20:03
  • 14
    $\begingroup$ This might be a good question for the TeX SE $\endgroup$ Commented Dec 1, 2016 at 22:51
  • 4
    $\begingroup$ I don't spend much time on Meta, and no offense to the OP, but why is this not considered off topic? Typically people on this site are like hawks about that kind of thing... $\endgroup$
    – The Count
    Commented Dec 2, 2016 at 2:46
  • 5
    $\begingroup$ FWIW we (i.e. in Finland) use that notation in schools. When meeting a fresh batch of college kids among the first things I teach them is the ``proper'' notation for intervals. 'cause this is ugly as (insert unflattering comparison of choice). I sorta see the point of using this in schools, because $(a,b)$ is one of the more overloaded pieces of notation. But, imagine typesetting a union of a mixture of open/half-open intervals (I am sparing your eyes). $\endgroup$
    – Jyrki Lahtonen Mod
    Commented Dec 2, 2016 at 5:35
  • 4
    $\begingroup$ @TheCount How could this possibly be off-topic? It is a question about how to typeset something correctly/conveniently on this site. What would be off-topic are (La)teX questions (see TeX - LaTeX for this) and also general queries on MathJax (like, 'How to I configure MJ for my blog?'; yet this can go to Stack Overflow AFAIK, the main site of course not its meta) $\endgroup$
    – quid
    Commented Dec 2, 2016 at 9:19
  • 1
    $\begingroup$ @JyrkiLahtonen I quite disagree on this, but that's off-topic. It's also not clear why it is "proper." And as we are talking about doing things properly and things being ugly, ``proper'' is extremely ugly here as LaTeX syntax does not work on this site. ;-) $\endgroup$
    – quid
    Commented Dec 2, 2016 at 9:34
  • 2
    $\begingroup$ @quid, yes, the output in LaTeX is the same as MathJax for all three lines above. So asking about this on TeX - LaTeX (without mentioning MathJax) should be on-topic there. $\endgroup$ Commented Dec 2, 2016 at 13:43
  • 2
    $\begingroup$ @quid chill dude, i was ASKING. $\endgroup$
    – The Count
    Commented Dec 2, 2016 at 14:50
  • 6
    $\begingroup$ This is an exercise in the TeXbook. It’s a shame nobody reads it anymore. $\endgroup$ Commented Dec 5, 2016 at 16:57
  • 2
    $\begingroup$ It’s exercise 18.14, and I have it on page 171 (this may depend on the edition). But to be fair, now I see that it is marked with a double dangerous bend. $\endgroup$ Commented Dec 5, 2016 at 17:07
  • 1
    $\begingroup$ Should we perhaps start calling these Freedom Intervals? :-P $\endgroup$
    – Asaf Karagila Mod
    Commented Dec 6, 2016 at 16:42
  • 1
    $\begingroup$ There is already a question about this on TeX.SE: tex.stackexchange.com/questions/326237/… $\endgroup$ Commented Dec 6, 2016 at 19:44
  • 8
    $\begingroup$ It should be noted that Don Knuth doesn't spare us his opinion either in that exercise: Some perverse mathematicians use brackets backwards, to denote “open intervals.” :-) $\endgroup$
    – The Vee
    Commented Dec 6, 2016 at 20:23
  • 1
    $\begingroup$ Point taken, @quid. Admittedly I exaggerate this (in lecture halls, and apparently consequently also here) to drive home the point that the students should not expect their high school math books to be an ultimate authority. Particularly on conventions such as notation (or whether $0$ is a natural number or not). The "ugly" comes when yours truly handwrites things like $]1,2[\cup]3,4]$ when horizontal line segments of the brackets gain extra length. $\endgroup$
    – Jyrki Lahtonen Mod
    Commented Dec 8, 2016 at 7:20
  • 1
    $\begingroup$ @JyrkiLahtonen I certainly agree it is important to high-light that there are various competing and contradictory conventions. Given my shaky hand-writing, I personally am more concerned that $]$ and $)$ could morph into one another. $\endgroup$
    – quid
    Commented Dec 8, 2016 at 16:41

4 Answers 4

13
$\begingroup$

Since my comment under the other answer got about three times more votes than the answer, maybe it's worth converting it into a full answer:

The correct way would be, as far as I can tell, to convert the brackets into opening and closing delimiters through the use of \mathopen and \mathclose:

\forall x \in \mathopen{]} -1, 1 \mathclose{[}, f(x) > 0

$$\forall x \in \mathopen{]} -1, 1 \mathclose{[}, f(x) > 0$$

Compared to \left and \right, this does not scale the delimiters (which may become too big), and the spacing is slightly different (at least in LaTeX, I don't know about MathJax precisely). See What is the correct way to do delimiters? and Spacing around \left and \right at TeX.SE.

Though to be honest I'm French and was taught the French notation since (the equivalent of) sixth grade, and I don't think I've ever used it on this website, just like I don't put spaces before exclamation/interrogation marks when I write in English (even though I do prefer the French notation: is $(0,1)$ a pair or an interval?).

$\endgroup$
6
  • 14
    $\begingroup$ It's obviously the greatest common divisor of $0$ and $1$. $\endgroup$
    – Daniel Fischer Mod
    Commented Dec 6, 2016 at 10:14
  • $\begingroup$ The meaning of $(0,1)$ is always clear from the context. $\endgroup$ Commented Dec 6, 2016 at 13:06
  • 7
    $\begingroup$ @MathematicsStudent1122 that's obviously an exaggeration. Maybe 'usually' or 'most of the time' instead of 'always' would be more sensible. $\endgroup$
    – quid
    Commented Dec 6, 2016 at 14:53
  • 2
    $\begingroup$ @quid Prove me wrong by finding a counterexample. $\endgroup$ Commented Dec 6, 2016 at 14:58
  • 5
    $\begingroup$ @MathematicsStudent1122 'clear' not being an objective notion, you could always maintain it is clear. Thus giving particular examples here is an exercise in futility. I know for a fact that I get asked questions for clarification what is meant by $(a,b)$ sometimes, some of which I would not get when it'd say $(a,b)$ or $]a,b[$ or $\gcd(a,b)$ or $\langle a, b \rangle$ depending on whether it's the couple, the open interval, the gcd or the ideal generated. // Separately, the notation with the inverted brackets is arguably also somewhat more intuitive re what is open and what is closed. $\endgroup$
    – quid
    Commented Dec 6, 2016 at 16:28
  • 13
    $\begingroup$ @MathematicsStudent1122 Perhaps, but I prefer a notation where you don't even need the context. I don't think it's necessary to continue this argument. $\endgroup$ Commented Dec 6, 2016 at 16:43
10
$\begingroup$

Plain $\mathrm{\TeX}$ defines

\mathcode`\[="405B
\mathcode`\]="505D

\delcode`\[="05B302
\delcode`\]="05D303

and $\mathrm{\LaTeX}$ does essentially the same. One could get extensible French brackets by something like

\def\lfb{\delimiter"405D303 }
\def\rfb{\delimiter"505B302 }

Compiling the following file

\def\lfb{\delimiter"405D303 }
\def\rfb{\delimiter"505B302 }

$$
\lfb 0,1\rfb\cup \lfb 2,3\rfb
$$

$$
\left\lfb {1\over2},3\right\rfb
$$

\bye

with plain $\mathrm{\TeX}$ produces

enter image description here

with the correct spacing and extensible brackets. Also \bigl\lfb and similar commands would work.

However, MathJax doesn't understand this syntax, for obvious reasons, so it should be a feature request for them. On the other hand, simply typing

\bigl]0,1\bigr[ \cup \bigl]2,3\bigr[

produces $\bigl]0,1\bigr[\cup\bigl]2,3\bigr[$, which might be deemed sufficient. For normal sized delimiters, I see no other choice than

\mathopen]0,1\mathclose[ \cup \mathopen]2,3\mathclose[

that produces $\mathopen]0,1\mathclose[ \cup \mathopen]2,3\mathclose[$.

$\endgroup$
2
  • $\begingroup$ I'm sorry, but what's the point of this answer? The whole discussion about latex is irrelevant, and your conclusion is the same as my answer no? $\endgroup$ Commented Dec 11, 2016 at 7:42
  • 6
    $\begingroup$ @NajibIdrissi Two points: first, showing what's behind the scenes in TeX; second, that one needs a fearure request to the MathJax people. $\endgroup$
    – egreg
    Commented Dec 11, 2016 at 9:25
3
$\begingroup$

The problem with (2) is that the $\in$ sign is inside the interval. Hence we can wrap the brackets in a \newcommand:

\newcommand{\ointerv}[1]{\left] #1 \right[}

which generates

$$\newcommand{\ointerv}[1]{\left] #1 \right[} \forall x \in \ointerv{-1,1} $$

$\endgroup$
3
  • 13
    $\begingroup$ \left and \right will scale the brackets, which may be undesirable. The correct way in LaTeX (and, I guess, MathJax) would be \mathopen and \mathclose: $\forall x \in \mathopen{]} -1, 1 \mathclose{[}$. $\endgroup$ Commented Dec 2, 2016 at 9:56
  • $\begingroup$ @NajibIdrissi: Why should scaling be undesirable? As I understand, \left and \right are the correct, semantic way to do things... $\endgroup$ Commented Dec 5, 2016 at 22:01
  • 2
    $\begingroup$ @darijgrinberg tex.stackexchange.com/q/1454/14965 $\endgroup$ Commented Dec 6, 2016 at 7:04
1
$\begingroup$

Here's an idea: try

\newcommand{\]}{{]}}
\newcommand{\[}{{[}\,}

With that, coding \]0,+\infty\[ yields $$ \newcommand{\]}{{]}} \newcommand{\[}{{[}\,} \forall x \in \]0,+\infty\[, \quad f(x) > 0 $$

$\endgroup$
3
  • 9
    $\begingroup$ \[ and \] is a standard delimiter for displayed equations in MathJax (granted it's hardly used on this site as one would have to escape the characters due to interactions wit Markdown, but it does work even here), and the standard delimiter for this in LaTeX. I do not think it's a good idea to use this particular syntax, but it'd be easy to rename it. $\endgroup$
    – quid
    Commented Dec 2, 2016 at 9:29
  • 1
    $\begingroup$ Wow, that seems obvious in retrospect $\endgroup$ Commented Dec 2, 2016 at 13:43
  • 2
    $\begingroup$ Still a good answer I think, but the macros would maybe need to be renamed. $\endgroup$ Commented Dec 2, 2016 at 22:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .