[Tex/LaTex] Equation does NOT go new lines, while using \newline

amsmathequationsline-breakingmath-mode

I've been trying to typset an equation which, at a certain point, spans several lines, but is a single step (so no numbering may occur). For this I used newline, but this doesn't seem to work. How do I resolve this?

code:

% SLOPPY EQUATION!!!! EDIT !!!!
\begin{equation}
K_t = [\hspace{1pt}^{1}K_t ,\hspace{1pt}^{2}K_t, \ldots, \hspace{1pt}^{m}K_t]^T \in \mathbb{R}^m , \hspace{1cm} t = 1, 2, \ldots, M \newline
\hspace{1pt}^{i}f_{j_{1}j{2}\ldots j{M}} = \frac{\delta^{M}f(z)}{\delta^{j1}z\delta^{j2}z\ldots \delta^{jM}z} \newline
e_i = [0,0,\ldots,0,1,0,\ldots,0]^T \in \mathbb{R}^m \newline
\textit{met 1 op de i-de plaats in $e_i$ .}
\end{equation}

Best Answer

To make your multiline equation work, and to add the spacing that you want more easily and in a way that will make TeX complain less, there are some things you should do.

  1. You're already using the amsmath package, which is good. You can use the multiline math environments in it, such as align and align*, which are in my experience the most useful numbered and un-numbered environments for multi-line equations, respectively. This will allow you to typeset nice multi-line equations with a certain amount of control.

    In those environments, just the command \\ is used for making new lines. You can also tweak the vertical spacing, if nexeccary, with an optional argument, e.g. \\[1ex] or \\[-0.5ex].

  2. For spacing in mathematics, you should use the \mspace command rather than \hspace. The arguments of \mspace are measured in units of mu, which are 1/18 of an em. There are also shortcuts for spacing in mathmode:

    • \qquad = \mspace{36mu}
    • \quad = \mspace{18mu}
    • \; = \mspace{5mu}
    • \: = \mspace{4mu}
    • \, = \mspace{3mu}
    • \! = \mspace{-3mu}
  3. To make your mathematics also a bit easier to read, you can use macros to take care of some of the more picky or repetitive bits of typesetting, which might help make the markup easier to read. For instance, in your case, I would put the following into the pre-amble:

    % A macro to take care of "pre-superscripts"
    % (spacing chosen to make it tight against the symbol to follow, adjust to taste)
    \newcommand\psup[1]{{}^{#1\!}}
    
    % Short macro for the real number set
    \newcommand\R{\mathbb{R}}
    
    % Semantic macro for transposition
    \newcommand\trans{^T}
    

    Adding some extra whitespace will also make it easier for you to read and edit your equations later.

Here's what the markup for your equations look like after a makeover:

Markup.

% ---
% Insert chimes to indicate sparkliness upon the revelation
% ---

% consider using subequations if these equations all "belong" together
\begin{subequations}
\begin{align}
   K_t 
   &=
   [\, \psup{1}K_t , \psup{2}K_t,\, \ldots, \psup{m}K_t]\trans \in \R^m ,
   % extra tabulator stops to separate the "remark" from the equation
   &&
   t = 1, 2, \ldots, M
 % newline with extra vertical space
 % to improve spacing from the large fraction
 \\[1ex]
   % Fixed some of the subscripts
   \psup{i}f_{j_1 j_2 \ldots j_M} 
   &=
   % Fixed some of the subscripts, and
   % added spacing to separate the differentials;
   \frac{\delta^{M}f(z)}{\delta^{j_1}z\; \delta^{j_2}z\; \cdots\; \delta^{j_M}z}
 % newline with extra vertical space
 % to improve spacing from the large fraction
 \\[1ex]
   e_i
   &=
   [0,0,\ldots,0,1,0,\ldots,0]\trans \in \R^m
   % extra tabulator stops to separate the "remark" from the equation
   &&
   \textit{met 1 op de i-de plaats in $e_i$.}
\end{align}
\end{subequations}

Result.

image of a multiline equation

Related Question