# French notation for intervals ]x,y[ [duplicate]

I use French notation for intervals, like ]x,y[. But the brackets behave funny --- they try to surround wrong thing, like

] x,y [∪] a,b [


Writing \left]x,y\right[\cup\left]a,b\right[ solves the problem in most cases. But I want these brackets to have the same size, but they become larger on something like ]a,B^c[.

P.S. My question is closely related to "How to input open intervals", but not the same.

you can use \mathopen]x,y\mathclose[

• @AntonPetrunin: Consider using mleftright and then \mleft] x, y \mright[. Dec 20 '17 at 21:24
• @DavidCarlisle Wouldn't it be better to use \mathopen]x,y\mathclose[ instead of \mathopen{]}x,y\mathclose{[}? Suppose you want to write ]x,y[²: If you use \mathopen{]}x,y\mathclose{[}^2 the vertical positioning of the superscript "²" is bad. (Note that the braces aren't argument delimiters here because \mathclose is a TeX primitive. See also tex.stackexchange.com/a/110220/227621.) Nov 5 '20 at 22:17
• @user227621 er, yes, done, thanks. Nov 5 '20 at 23:36

The interval package by Lars Madsen has been designed to take care of this kind of problem (and some others):

\documentclass{article}
\usepackage{interval}
\begin{document}
$\interval[open]{x}{y} \cup \interval[open]{a}{b}$
\end{document}


• Thanks for sharing this clean package!
– Diaa
Nov 6 '20 at 0:13

If you have many of these intervals, you may want to create a dedicated macro called, say, \frint (short for "French-notation interval"...), as follows:

\documentclass{article}
\usepackage{mathtools} % for "\DeclarePairedDelimiter" macro
\DeclarePairedDelimiter{\frint}{]}{[}

\begin{document}
$\frint{x,y}\cup\frint{a,b}$
%% same output as '$\mathopen{]}x,y\mathclose{[} \cup \mathopen{]}a,b\mathclose{[}$'
\end{document}


Then, write \frint* to auto-size the "fences", and write \frint[\big], \frint[\Big], \frint[\bigg], or \frint[\Bigg] to enlarge the fences to a specific, fixed size.

Time ago, I created my own french notation intervals with several commands depending on type of interval (they added some unnecessary extra space). Now I implemented the \mathopen{]} and \mathclose{[} (as in David Carlisle answer). I use (in preamble)

\newcommand{\cord}{\mathopen{]}}
\newcommand{\cori}{\mathclose{[}}
\newcommand{\intsai}[2]{\cord #1,#2\cord}

$\arraycolsep=10pt \renewcommand{\arraystretch}{1.5} \begin{array}{cc} \textbf{bounded} & \textbf{unbounded} \\ \inta{x}{y} & \inta{-\infty}{y} \\ \intc{x}{y} & \intsai{-\infty}{y} \\ \intsad{x}{y} & \inta{x}{+\infty} \\ \intsai{x}{y} & \intsad{x}{+\infty} \\ \end{array}$
$\inta{x}{y}\cup\inta{a}{b}$