I have the code (image below) that I would like to insert in a document. I got it from the Stitz-Zeager Algebra Book, Corrected Edition, first chapter.

I am working in ShareLaTeX and I do not know how to insert the mfpic [10] figure that comes in the code, and which corresponds to the portion of the real number line (third column of the table).

Interval Notation Table

I also use TeXnicCenter but I do not know how to generate the metapost file there, neither in ShareLaTeX.

I know there are another ways to insert or create images by using other packages, but I would like to embed the table as it is. Is there any way to do that?

Here is the code for the first two rows.


\usepackage{import, multicol,boxedminipage}



\begin{tabular}{|c|c|c|} \hline

Set of Real Numbers & Interval Notation &  Region on the Real Number Line  \\ \hline
&  & \\
\shortstack{$\{x\,|\,a<x<b\}$ \\ \hfill}& \shortstack{$(a,b)$ \\ \hfill} & 


\axislabels {x}{{$a\vphantom{b} \hspace{4pt} $} -3, {$b$} 3}

\polyline{(-3,0), (3,0)}
\point[3pt]{(3,0), (-3,0)}

\end{mfpic}  \\ \hline


  • 1
    I think that mfpic for those diagrams is overkill. – egreg Aug 23 '17 at 9:13

I think that mfpic is overkill:


  % #1 = a (arrow), c (closed), o (open)
  % #2 = left label
  % #3 = like #1
  % #4 = right label
  $\mathstrut #2$\hfill$#4$



Set of Real Numbers & Interval Notation &  Region on the Real Number Line  \\

$\{x \mid a<x<b\}$ & $(a,b)$ & \graphicinterval{o}{a}{o}{b} \\

$\{x \mid a\le x<b\}$ & $[a,b)$ & \graphicinterval{c}{a}{o}{b} \\

$\{x \mid a<x\le b\}$ & $(a,b]$ & \graphicinterval{o}{a}{c}{b} \\

$\{x \mid a\le x\le b\}$ & $[a,b]$ & \graphicinterval{c}{a}{c}{b} \\

$\{x \mid x<b\}$ & $(-\infty,b)$ & \graphicinterval{a}{}{o}{b} \\

$\{x \mid x\le b\}$ & $(-\infty,b]$ & \graphicinterval{a}{}{c}{b} \\

$\{x \mid x>a\}$ & $(a,\infty)$ & \graphicinterval{o}{a}{a}{} \\

$\{x \mid x\ge a\}$ & $[a,\infty)$ & \graphicinterval{c}{a}{a}{} \\

$\mathbb{R}$ & $(-\infty,\infty)$ & \graphicinterval{a}{}{a}{} \\



enter image description here

  • Your code is so neat and quite brief! Thank you, I appreciate your help! And regarding mfpic, your are right. I think it is very stiff and difficult to manage. It is a shame that all the figures in the Stitz-Zeager book have been created in metapost, so it turns impossible to use them in an own project. – Cragfelt Aug 23 '17 at 21:47

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.