Math & Science ⇒ Formula Conditional
Formula Conditional
Thanks so much
- Attachments
-
- formula-conditional-01.jpg (9.64 KiB) Viewed 29496 times
-
- formula-conditional-02.jpg (14.75 KiB) Viewed 29496 times
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Formula Conditional
{equation}
environment. The second one would need the empheq package for the brace on the left side.Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Formula Conditional
I used {equation} environment like this:
Code: Select all
\begin{equation}
Th(flow1) = Th(flow2) = G, if G < \frac{B}{3}
\end{equation}
The second one need the empheq package but I dont know how to install additional package in LateX, I searched in wiki, but I dont understand.
Moreover, I'm using LateX in windows7, when I want to extract file to .pdf, I must write text in .txt document, then I type "platex filename.txt", then "dvipdfmx filename.dvi" in C command. This is so difficult to check .pdf file before they become finished.
Please help me, thank you!
- Attachments
-
- formula1.jpg (9.46 KiB) Viewed 29471 times
Formula Conditional
\text{}
macro to mark them correspondingly:Code: Select all
% preamble:
% \usepackage{amsmath}
\begin{equation}
Th(\text{flow1}) = Th(\text{flow2}) = G, \text{ if } G < \frac{B}{3}
\end{equation}
Regards
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Formula Conditional
amsmath
package is installed on your computer, since this is standard for good math typesetting.A personal opinion first, I would write Th and flow1 in upright letters, since italic letters are used for variables, operators and text commonly upright. Definign a macro or an operator would be convenient. So my text would be
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Th}{Th}
\DeclareMathOperator{\flow}{flow}
\begin{document}
\begin{equation}
\Th(\flow_1) = \Th(\flow_2) = G, \text{ if } G < \frac{B}{3}
\end{equation}
\end{document}
empheq
, with \left\{
and \right.
and an aligned
environment (of amsmath
):Code: Select all
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Th}{Th}
\DeclareMathOperator{\flow}{flow}
\begin{document}
\begin{equation}
\left\{
\begin{aligned}
\Th(\flow_1) &= G \\
\Th(\flow_2) &= \ldots
\end{aligned}
\right.
\end{equation}
\end{document}
Formula Conditional
First opinion, I know the
{equation}
environment but the most thing I want here is the space between , and if. This is my code:
Code: Select all
\begin{equation}
Th(\text{flow1}) = Th(\text{flow2}) = G, \:\:\:\:\:\:\:\text{if} \:\:\:G < \frac{B}{3}
\end{equation}
Second opinion, special thanks to Stefan_K for teaching me
aligned
environment. Here is my code:
Code: Select all
\begin{equation}
\left\{
\begin{aligned}
Th(\text{flow1}) &= G \\
Th(\text{flow2}) &= \dfrac{B-G}{2}
\end{aligned}
\right.
\:\:\:\:\:\text{if} \:\:\:\dfrac{B}{3} \leq G < B_1 - B_2
\end{equation}
Moreover, my PC can't run this command
\DeclareMathOperator
but it's ok 
- Attachments
-
- formula2.jpg (13.34 KiB) Viewed 29459 times
-
- formula1.jpg (9.21 KiB) Viewed 29459 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Formula Conditional
This is a bit fuzzy. Therefore some questions.ArataFan wrote:[…] The second one need the empheq package but I dont know how to install additional package in LateX, I searched in wiki, but I dont understand. […]
- What did you try to install the package? Package installation is usually by the package manager of your TeX distribution. What exactly does not work?
- Which wiki do you mean? A TeX distribution usually has a manual where its handling is explained. What exactly did you not understand?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Formula Conditional
Then, I read how to install .dtx package in this site: http://en.wikibooks.org/wiki/LaTeX/Inst ... a_Packages
I couldn't install, so when I type
Code: Select all
\documentclass{article}
\usepackage{empheq}
\begin{document}
\begin{equation}
Th(flow1) = Th(flow2) = G, \text{ if } G < \frac{B}{3}
\end{equation}
\end{document}
LaTeX Error: File 'empheq.sty' not found.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Formula Conditional
So I ask once again: Why don't you just use the package manager of your TeX distribution to install packages?ArataFan wrote:First, I downloaded full .dtx file in this site: http://ctan.org/tex-archive/macros/latex/contrib/mh
Then, I read how to install .dtx package in this site: http://en.wikibooks.org/wiki/LaTeX/Inst ... a_Packages
I couldn't install […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Formula Conditional
Sorry, I don't know how to use the package manager of TeX, this is the most important thing I want to tell. Can you teach me how to use this one?localghost wrote: So I ask once again: Why don't you just use the package manager of your TeX distribution to install packages?