Math & Science ⇒ Sentence in Equation
Sentence in Equation
Eq(2)=> E=mC^2
where E=Energy
m=mass
C= velocity of light
How can I write this above two equations in this template and if length of a sentence is long then what to do?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Sentence in Equation
Code: Select all
\documentclass{article}
\usepackage{mathtools}
\usepackage{array}
\begin{document}
\begin{align}
\mathrm{Daily~average~load~}&=\mathrm{No.~of~units~(kWh)~
generated~in~a~day/24~hours}\\
E&=mC^2
\end{align}
where \begin{tabular}[t]{>{$}l<{$}@{~=~}l}
E&Energy\\
m&mass\\
C& velocity of light
\end{tabular}
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Sentence in Equation

Code: Select all
\documentclass{article}
\usepackage{mathtools}
\usepackage{siunitx}
\DeclareSIUnit\E{E}
\DeclareSIUnit\c{c}
\begin{document}
\begin{equation}
\text{Daily average load} =
\text{No. of units (\si{\kWh}) generated in a day / 24 hours}
\end{equation}
\begin{equation}
\si{\E} = \si{\m\c\squared}
\end{equation}
\end{document}
Stefan
Re: sentence in equation

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Sentence in Equation
i would argue that Energy, mass and speed of light have units to measure them, but are not units themselve. Einsteins formula looks really queer written as SI units.
Another thing i came around a while ago was that using
\text
isn't always a good idea. If that equation is used in a theorem with italic text, the text in the formula will also be written in italics, which would be inconsistent.- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Sentence in Equation
siunitx
does, furthermore it takes care of spacing between numbers and units, and more.Johannes is right, that E and m are variables, but c is a constant, to be written upright, and a mix would look even more strange... so I took the freedom to define them kind of symbolic upshape because we don't really calculate with those variables, or do we ...
The photo is by Lienhard Schulz - Own work, CC BY 2.5, https://commons.wikimedia.org/w/index.php?curid=795152.
Stefan
Sentence in Equation
Code: Select all
where \begin{tabular}[t]{>{$}l<{$}@{~=~}l}
x&Measurement interval (1 hour).
The value of x can be up to 8760 in a year, if the plant operates throughout.
In case the plant has been shut down for some period
in year y, in that year, use the number of measurement
for x for the operational hour only\\
\end{tabular}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Sentence in Equation
l
(ell) when defining the columns with p{.8\linewidth}
.I recommend to read LaTeX for complete novices.
On the other hand, i think that in a sserious paper, the description of what a variable or constant is, belongs into the text. In text, the meaning can be written in clear sentences. A proper list of symbols at the begin or end of a paper with a short description for a quick look-up is the usal way to go.
Having the description glued to the equation is one of the most hideous things i see in academic papers and technical reports.