
Meu problema é que quero reutilizar o espaçamento em uma determinada equação matemática como:
\begin{equation}
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
... & := & ... \\[4mm]
& =: & ...
\end{array}
\end{equation}
Esta equação é seguida por algum texto e então quero repetir a equação acima com os mesmos espaçamentos entre as colunas do array. É possível? Fora da caixa, pegarei outro espaçamento feito por tex com base nos símbolos matemáticos.
Talvez seja possível manter um ambiente de equação e inserir o texto na equação. Contudo \mbox{...}
ou \text{...}
não é bom o suficiente porque o textodeveaparece no modo de parágrafo, alinhado à esquerda na página.
Escreva a resposta de Harish Kumar, um MWE do meu problema:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{relsize}
\usepackage{stmaryrd}
\usepackage{bm}
\begin{document}
\noindent
Example 1 (not ok):
\begin{align}
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
a \cdot b & := & a \cdot \mathlarger{\llbracket\,} 0, \, b \mathlarger{\,\rrbracket} \\[4mm]
& =: & ...
\end{array}
\intertext{In the group this means that ... }
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
a & = & b.
\end{array}
\end{align}
Example 2 (ok):
\begin{align}
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
a \cdot b & := & a \cdot b \\[4mm]
& =: & ...
\end{array}
\intertext{In the group this means that ... }
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
a & = & b.
\end{array}
\end{align}
\end{document}
Responder1
Você pode usar align
e (short)intertext
:
\documentclass{article}
\usepackage{mathtools,lipsum}
\begin{document}
\begin{align}
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
... & := & ... \\[4mm]
& =: & ...
\end{array}
\intertext{\lipsum*[1]} %% or \shortintertext{\lipsum*[1]} from mathtools
\begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}
... & := & ... \\[4mm]
& =: & ...
\end{array}
\end{align}
\end{document}
Lidando com a questão editada:
Você também pode se livrar de array
:
\documentclass{article}
\usepackage{showframe} %% just for demo
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{relsize}
\usepackage{stmaryrd}
\usepackage{bm}
\newcommand{\h}[1]{\widehat{\bm{#1}}}
\newcommand{\he}{\ensuremath{\tfrac{1}{2}}}
\newcommand{\quat}[2]{\mathlarger{\llbracket\,} \cos{(\he#2)}, \, \sin{(\he#2)} \,\h{#1} \mathlarger{\,\rrbracket}}
\newcommand{\quatv}[1]{\mathlarger{\llbracket\,} 0, \,\h{#1} \mathlarger{\,\rrbracket}}
\begin{document}
\begin{align}
\quatv{b} \cdot \quatv{a} & := \mathlarger{\llbracket} -\h{b}\cdot\h{a}, \, \h{b}\times\h{a} \mathlarger{\,\rrbracket} \quad \equiv \quad \mathlarger{\llbracket\,} \h{a}\cdot\h{b}, \, \h{a}\times\h{b} \mathlarger{\,\rrbracket} = \\[4mm]
& =: \quat{n}{\gamma}.\\
\intertext{In the group this means that ... }
L_b \circ L_a & =: R(\gamma \h{n}).
\end{align}
\end{document}
Se isso durar muito, você pode adicionar \allowdisplaybreaks
seu preâmbulo.
Responder2
Outra solução com um código um pouco mais simples e, portanto, mais legível. Eu uso mathtools
no lugar de amsmath
, e xparse
, com permite definir um \Braket
comando com uma sintaxe simples (1 argumento). Eu uso os comandos coloneqq
e eqqcolon
, que produzem dois pontos centralizados verticalmente (o que não é o caso :=
). O alinhamento e a numeração são obtidos através de aligned
ambientes de aninhamento em um align
contêiner.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{stmaryrd}
\usepackage{bm}
\newcommand{\h}[1]{\widehat{\bm{#1}}}
\newcommand{\he}{\ensuremath{\tfrac{1}{2}}}
\newcommand{\myquat}[2]{\Brackets[\big]{\cos{(\he#2)}, \sin{(\he#2)} \,\h{#1}}}
\newcommand{\myquatv}[1]{\Brackets[\big]{0,\h{#1}}}
%
\usepackage{xparse}
\DeclarePairedDelimiterX{\Brackets}[1]{\llbracket}{\rrbracket}{\setargs{#1}}
\NewDocumentCommand{\setargs}{ >{\SplitArgument{1}{,}}m }
{\setargsaux#1}
\NewDocumentCommand{\setargsaux}{ m m }
{#1,\,#2\mkern1.5mu}
\begin{document}
\begin{align}
\myquatv{b} \cdot \myquatv{a} &
\begin{aligned}[t]{}\coloneqq {}& \Brackets[\big]{-\h{b}\cdot\h{a},\h{b}\times\h{a}}\equiv \Brackets[\big]{ \h{a}\cdot\h{b}, \h{a}\times\h{b}} = \\[4mm]
\eqqcolon {}& \myquat{n}{\gamma}.% \mathllap{}
\end{aligned}
\intertext{In the group this means that ... }
L_b \circ L_a &\begin{aligned}[t]
{}\eqqcolon{} & R(\gamma \h{n}).
\end{aligned}
\end{align}
\end{document}