Math & Science ⇒ How to mix text with math
-
- Posts: 17
- Joined: Fri Sep 24, 2010 8:50 pm
How to mix text with math
I now understand how to mix math within text but I don't know how to mix text within math. For example, if I want to add text within a \begin{equation} . . .\end{equation}. It would help if I could turn off the line feed following the \end{equation} or if I could overprint.
I have seen a \begin{overprint} . . \end{overprint} on the web but I don't know what package to add.
Thanks, Clark
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
How to mix text with math
I'm afraid I don't really understand what you have in mind by this:
Could you be more specific by what you have in mind here?mikkelstuff wrote:
It would help if I could turn off the line feed following the \end{equation} or if I could overprint.
I have seen a \begin{overprint} . . \end{overprint} on the web but I don't know what package to add.
The only overprint environment I know of comes from the beamer document class, but I'm not sure it's what you have in mind. I don't think it has much to do (in particular) with mixing math and text. (Instead it has to do with making sure that a certain portion of a presentation slide takes up the same amount of room even if it changes from one overlay to another.)
-
- Posts: 17
- Joined: Fri Sep 24, 2010 8:50 pm
Re: How to mix text with math
Is there any position control I can use with this? For the most part, all I want to do is center an equation with \begin{equation} . . .\end{equation} and add either a comma or period spaced off to the right for good English composition.
Thanks
How to mix text with math
But that would look odd. It is customary to place the punctuation signs right after the formulae, as in the following example:mikkelstuff wrote:...For the most part, all I want to do is center an equation with \begin{equation} . . .\end{equation} and add either a comma or period spaced off to the right for good English composition.
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
A = \bigl\{\, \{a_i\}_{i\in I} \mid a_i = 0, \text{ for all but a finite number of } i\in I \,\bigl\}.
\end{equation*}
\begin{align}
\psi_{1}(\theta) &= \dfrac{m-1}{p}\psi(\theta), \\
\psi_{2}(\theta) &= \dfrac{p-m+1}{p}\psi(\theta).
\end{align}
\end{document}
-
- Posts: 17
- Joined: Fri Sep 24, 2010 8:50 pm
Re: How to mix text with math
Now suppose I want to add a parenthetical remark after an equation and on the same line but with only the equation centered. Seems like I should have control of the text separately from the equation.
How to mix text with math
In that case, you can do something like this:mikkelstuff wrote:...Now suppose I want to add a parenthetical remark after an equation and on the same line but with only the equation centered. Seems like I should have control of the text separately from the equation.
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
a &= b+c. && \text{(by Axiom 3.)}
\end{align}
\end{document}
How to mix text with math
But I have to agree that if it's just a period or comma, it would indeed be very strange not to put it immediately right after the end of the equation or formula.
-
- Posts: 17
- Joined: Fri Sep 24, 2010 8:50 pm
Re: How to mix text with math
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to mix text with math
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10