Math & Science ⇒ Sentence in Equation
Sentence in Equation
Eq(1)=> Daily average load =No. of units (kWh) generated in a day/24 hours
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?
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?
Last edited by hafizur on Mon Feb 08, 2016 11:23 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Sentence in Equation
One proposal since i don't understand the question:
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}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Sentence in Equation
Here is another example showing the use of
siunitx. It may look strange here, but in bigger documents it's very useful for consistent scientific units and constants.
For the rest, see Johannes' post.
Stefan

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
LaTeX.org admin
Re: sentence in equation
Thank you very much... 

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Sentence in Equation
Stefan,
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
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.The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Sentence in Equation
By the way, you may notice that I wrote constants and units upright. That's what
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
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
LaTeX.org admin
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}
Last edited by hafizur on Mon Feb 08, 2016 4:11 pm, edited 1 time in total.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Sentence in Equation
Substitute the final
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.
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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.