1

I'm wondering if there is a method to make such matrix: enter image description here

I've tried this solution, but the description text cannot be aligned left: enter image description here

Any suggestions are appreciated!

BTW, as suggested by CarLaTeX, I've posted my latex code here for the convenience of all the later readers:

\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{blkarray} %block array
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters

\begin{document}
\begin{align*}x = \begin{blockarray}{cc}
\begin{block}{(c)c}
  \dots & \dots \\
  0 & \text{android.hardware.wifi} \\
  1 & \text{android.hardware.telephony} \\
  \dots & \dots \\
  1 & \text{SEND\_SMS} \\
  0 & \text{DELETE\_PACKAGES} \\
  \dots & \dots \\
\end{block}
\end{blockarray}\end{align*}
\end{document}
  • 1
    Welcome to TeX.SX! Instead of putting an image of your code, cut and paste it in your question, using the edit button (bottom on the left). In this way we can copy your minimal working example (MWE) and help you much more easily. – CarLaTeX Dec 13 '16 at 07:07
  • 1
    For the downvoter of my incorrect answer: that was clearly a comment posted like an answer by mistake, a simple comment telling me to correct it would have been sufficient. I don't mind about reputation points lost (I've regained them) but I don't think you have acted in the correct way. – CarLaTeX Dec 13 '16 at 07:14
  • I can suggest a fast link where you can create your matrix, http://www.tablesgenerator.com/latex_tables. It is wysiwyg editor. – Sebastiano Dec 13 '16 at 07:48
  • Never thought about there is a way to create matrix in a website and it will generate latex code for you :) that's cool – Chushu10 Dec 13 '16 at 11:22

1 Answers1

2

With blkarray it is possible. Just specify l for the text column.

\documentclass[12pt]{report}
\usepackage{blkarray}
\usepackage{multirow, bigdelim}
\begin{document}

\[
\phi(x) \mapsto 
\begin{blockarray}{(c) l l}
    \cdots & \cdots & \rdelim\}{3}*[$S_1$] \\
    0 & \mathtt{android.hardware.wifi} & \\
    1 & \mathtt{android.hardware.telephony} & \\
    \cdots & \cdots &  \rdelim\}{3}*[$S_2$] \\
    0 & \mathtt{SEND\_SMS} & \\
    1 & \mathtt{DELETE\_PACKAGES} & \\
    \cdots & & \cdots \\
\end{blockarray}

\]

\end{document}

enter image description here

  • Great solution! I've tride the '&' align symbol, but it's behavior is wired. There might be many hidden tricks in blkarray I've never heard about. – Chushu10 Dec 13 '16 at 11:25