How to write these equations in latex?
edit: I want both equations to be in line. So that the equation is in the second equation below.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityHow to write these equations in latex?
edit: I want both equations to be in line. So that the equation is in the second equation below.
I’m sorry, but Sebastiano’s is an awful way of using the align*
environment. Let's recap a few basic facts:
The source code is:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
\begin{document}
There are several ways to achive such a layout:
\begin{enumerate}
\item
Use a plain \texttt{align*} environment:
\begin{align*}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{align*}
You could also have an equation number on, say, the first line,
but I~don't think this is what you want:
\begin{align}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \notag
\end{align}
\item
A slight variation is to replace \texttt{align*} (resp.,
\texttt{align}) with \texttt{flalign*} (resp., \texttt{flalign}),
which aligns the two blocks to the text margins:
\begin{flalign*}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{flalign*}
Note, however, the awful placement of the equation number:
\begin{flalign}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \notag
\end{flalign}
\item
With \texttt{alignat*} (resp., \texttt{alignat}) you are
responsible for specifying both the number of alignments
and the horizontal space between them:
\begin{alignat*}{2}
(T_{5}g)(t) &= g(t-5) &\hspace{4em} % = 4*\quad
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{alignat*}
With equation number(s):
\begin{alignat}{2}
(T_{5}g)(t) &= g(t-5) &\hspace{4em} % = 4*\quad
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \notag
\end{alignat}
\item
So far we have seen solutions I'd \emph{deprecate};
let's see now one I'd \emph{recommend}: use an \texttt{alignedat}
environment. With this, you can give a unique equation number
to the whole block of equations, which is probably what you want:
\begin{equation}
\begin{alignedat}{2}
(T_{5}g)(t) &= g(t-5) &\hspace{4em}
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{alignedat}
\end{equation}
Should you later change your mind and decide not to number the
equation, all you have to do is to add two asterisks
(to \texttt{equation}, not to \texttt{alignedat}):
\begin{equation*}
\begin{alignedat}{2}
(T_{5}g)(t) &= g(t-5) &\hspace{4em}
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{alignedat}
\end{equation*}
\end{enumerate}
\end{document}
align*
environment (although with some caveats) to achive the desired layout.
– GuM
Jul 19 '18 at 11:48
If you are primarily looking at writing equations, I like to use KLatexFormula for windows. It allows me to drag and drop a picture of the equation where I want. Here is quick guide I use and found online. A quick guide to latex
$(T_5g)(t) = g(t-5)$
Its very easy. – Bobyandbob Jul 17 '18 at 14:38