以下に示すように LaTeX 出力を生成しようとしています。
ただし、型が適切に整列されていません。以前の配列環境にサブスクライブしているようです。エラーを指摘していただけますか?
私のコードは次のとおりです -
\documentclass{article}
\usepackage{amssymb,amsmath}
\def \R {\mathbb{R}}
\begin{document}
\begin{equation}
M_2=\left\{
\begin{array}{r}
variables : \left\{ \begin{array}{r}
inputs : x \\
outputs : y
\end{array}
\right.\\
types : x,y \in \R \\
behaviors : y = e^x \\
\end{array}
\right.
\end{equation}
\end{document}
答え1
必要なものは次のとおりです:
\documentclass{article}
\usepackage{amssymb,amsmath}
\def\R{\mathbb{R}}
\begin{document}
\begin{equation}
M_2=\left\{
\begin{array}{rl}
\text{variables :} & \left\{
\begin{array}{r}
\text{inputs :} x \\
\text{outputs :} y
\end{array}
\right.\\
\text{types :} & x,y \in \R \\
\text{behaviors :} & y = e^x \\
\end{array}
\right.
\end{equation}
\end{document}
出力は次のようになります。
環境と同様にtabular
、 で複数の列を定義しarray
、 で区切ることができます&
。
さらに、テキストを入力して\text{}
ローマ字でタイプセットすることもできます。
答え2
ここでは以下を使用しますcases
:
% arara: pdflatex
\documentclass{article}
\usepackage{amssymb,mathtools}
\newcommand*\R{\mathbb{R}}
\begin{document}
\begin{equation}
M_2 = \begin{cases}
\text{variables:} &\begin{cases}
\text{inputs:} &x\\
\text{outputs:} &y
\end{cases}\\
\text{types:} &x,y \in \R\\
\text{behaviors:} &y = e^x
\end{cases}
\end{equation}
\end{document}