Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
5  
Take a look at for example How can I split an equation over two lines In short, use another environment, e.g. multline from amsmath instead of equation. –  Torbjørn T. Dec 12 '12 at 15:09
    
Do you have an image of what you are looking for? –  azetina Dec 12 '12 at 15:22
    
Here i have one: !Desired Equation –  viraxis Dec 12 '12 at 15:30

2 Answers 2

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

share|improve this answer
    
Thanks! This helps a lot! Probably one of the most clean answers I've read. –  viraxis Dec 12 '12 at 17:52
\begin{align*}
K_t &= [~{}^{1}K_t,~{}^{2}K_t, \ldots, ~{}^{m}K_t]^T \in \mathbb{R}^m, &  t = 1, 2, \ldots, M \\
{}^{i}f_{j_{1}j_{2}\ldots j_{M}} &= \frac{\delta^{M}f(z)}{\delta^{j_1}z\delta^{j_2}z\ldots \delta^{j_M}z} \\
e_i &= [0,0,\ldots,0,1,0,\ldots,0]^T \in \mathbb{R}^m & \mbox{met 1 op de $i$-de plaats in $e_i$ .}
\end{align*}
share|improve this answer
    
Nice to know this option exists; I already thought that breaking lines was impossible to force in math mode.. –  viraxis Dec 12 '12 at 17:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.