
Estou escrevendo sobre tensores agora e preciso descrever a fusão de dois estados em um único tensor. No momento eu tenho algo parecido com isto:
com o seguinte código:
\begin{align}
& r \begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix} + & s \begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix} + & t \begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix} + & u \begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix} \\
\text{with the basis} & \biggr(\begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix}, & \begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix}, & \begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix}, & \begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix}\biggr) \\
\text{can be written as} & \Biggr(\begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}, & \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}, & \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}, & \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix}\Biggr)
\end{align}
Algumas coisas me incomodam.
- Os aparelhos não se ajustam às matrizes. (Eu tentei
\left(
e\right)
, mas isso não funciona ... - O pior de tudo é que não consigo alinhar as colunas verticalmente (de preferência centralizadas)
Já tentei de tudo que pude imaginar, mas não consigo... Se alguém tiver alguma sugestão, comente!
Responder1
Você poderia usar um array
:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\setlength{\arraycolsep}{0pt}
\begin{array}{ r c c c c c c c l }
r &
\begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix} &
{} + s &
\begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix} &
{} + t &
\begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix} &
{} + u &
\begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix} &
\\[10pt]
\text{with the basis}\:\biggr( &
\begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix} &
, &
\begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix} &
, &
\begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix} &
, &
\begin{bmatrix} 0 \\ 1 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix} &
\biggr) \\[10pt]
\text{can be written as}\:\Biggr( &
\begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} &
, &
\begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} &
, &
\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} &
, &
\begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} &
\Biggr)
\end{array}
\]
\end{document}
Responder2
Sugiro retirar os textos da equação, onde eles não pertencem.
O alinhamento pode ser obtido com alguns truques baseados emIEEEeqnarray
.
\documentclass{article}
\usepackage{mathtools}
\usepackage{IEEEtrantools}
\newcommand{\colv}[1]{\begin{bmatrix}#1\end{bmatrix}}
\begin{document}
The tensor
\begin{IEEEeqnarray}{rcCrcCrcCrcl}
r & \colv{1 \\ 0} \otimes \colv{1 \\ 0} & + &
s & \colv{1 \\ 0} \otimes \colv{0 \\ 1} & + &
t & \colv{0 \\ 1} \otimes \colv{1 \\ 0} & + &
u & \colv{0 \\ 1} \otimes \colv{0 \\ 1}
\\
\noalign{\vspace{2\jot}}
\noalign{\noindent with the basis}
\noalign{\vspace{4\jot}}
\biggr( &
\colv{1 \\ 0} \otimes \colv{1 \\ 0}\mathrlap{,} &&&
\colv{1 \\ 0} \otimes \colv{0 \\ 1}\mathrlap{,} &&&
\colv{0 \\ 1} \otimes \colv{1 \\ 0}\mathrlap{,} &&&
\colv{0 \\ 1} \otimes \colv{0 \\ 1} &
\biggr)
\\
\noalign{\vspace{2\jot}}
\noalign{\noindent can be written as}
\noalign{\vspace{4\jot}}
\left(\vphantom{\colv{0\\0\\0\\0}}\right.\kern-\nulldelimiterspace &
\mathllap{r}
\colv{1 \\ 0 \\ 0 \\ 0}\mathrlap{,} &&&
\mathllap{s}
\colv{0 \\ 1 \\ 0 \\ 0}\mathrlap{,} &&&
\mathllap{t}
\colv{0 \\ 0 \\ 1 \\ 0}\mathrlap{,} &&&
\mathllap{u}
\colv{0 \\ 0 \\ 0 \\ 1} &
\left)\vphantom{\colv{0\\0\\0\\0}}\right.\kern-\nulldelimiterspace
\end{IEEEeqnarray}
\end{document}
Adicionei os escalares na última linha, remova-os se achar melhor.
Os tipos de colunas são
r
para uma coluna alinhada à direitac
para uma coluna centralizadal
para uma coluna alinhada à esquerdaC
para uma coluna centralizada com um operador binário ou relação
Em vez de \mathrlap
(fazer uma caixa de largura zero com conteúdo saliente para a direita) e \mathllap
(semelhante para a esquerda) eu poderia ter usado \IEEEeqnarraymulticol
, mas isso é demais.