
Estoy intentando escribir algunas ecuaciones alineadas, pero obtengo una gran brecha en el resultado. Aquí está mi ejemplo:
\usepackage{amsmath}
\begin{document}
\begin{align}
\mathbf{x}(0)&=\mathbf{x}_0; && \mathbf{v}_x(0) &=\mathbf{v}_{x0}; && \dot{\mathbf{v}}_x(0)&=\omega_c\mathbf{v}_{y0}; \\
\mathbf{y}(0)&=\mathbf{y}_0; && \mathbf{v}_y(0) &=\mathbf{v}_{y0}; && \dot{\mathbf{v}}_y(0)&=-\omega_c\mathbf{v}_{x0}; \\
\mathbf{z}(0)&=\mathbf{z}_0; && \mathbf{v}_z(0) &=\mathbf{v}_{z0}; && \dot{\mathbf{v}}_z(0)&=0.
\label{eq1}
\end{align}
\end{document}
Y este es el resultado:
¿Cómo puedo deshacerme del espacio en la segunda fila?
Respuesta1
En el align
entorno hay pares de columnas alineadas a derecha e izquierda; el espacio calculado automáticamente separa esos pares de columnas. Para pasar de una columna a la siguiente se utiliza &
.
Por lo tanto, su código debería ser
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\mathbf{x}(0)&=\mathbf{x}_0; & \mathbf{v}_x(0) &=\mathbf{v}_{x0}; & \dot{\mathbf{v}}_x(0)&=\omega_c\mathbf{v}_{y0}; \\
\mathbf{y}(0)&=\mathbf{y}_0; & \mathbf{v}_y(0) &=\mathbf{v}_{y0}; & \dot{\mathbf{v}}_y(0)&=-\omega_c\mathbf{v}_{x0}; \\
\mathbf{z}(0)&=\mathbf{z}_0; & \mathbf{v}_z(0) &=\mathbf{v}_{z0}; & \dot{\mathbf{v}}_z(0)&=0.
\label{eq1}
\end{align}
\end{document}
Sin embargo, parece que desea etiquetar esto con un solo número, a juzgar por la etiqueta única que configuró, por lo que probablemente desee aligned
anidarlo en equation
.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{eq1}
\begin{aligned}
\mathbf{x}(0)&=\mathbf{x}_0; & \mathbf{v}_x(0) &=\mathbf{v}_{x0}; & \dot{\mathbf{v}}_x(0)&=\omega_c\mathbf{v}_{y0}; \\
\mathbf{y}(0)&=\mathbf{y}_0; & \mathbf{v}_y(0) &=\mathbf{v}_{y0}; & \dot{\mathbf{v}}_y(0)&=-\omega_c\mathbf{v}_{x0}; \\
\mathbf{z}(0)&=\mathbf{z}_0; & \mathbf{v}_z(0) &=\mathbf{v}_{z0}; & \dot{\mathbf{v}}_z(0)&=0.
\end{aligned}
\end{equation}
\end{document}