Math & ScienceAligning math with text

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
jkastelic
Posts: 1
Joined: Sat Oct 23, 2010 8:42 pm

Aligning math with text

Post by jkastelic »

Hello!

I am typesetting a section of a book in LaTeX however I cannot accurately reproduce attached passage (especially the area marked in red). (The book is not in English, but the text is unimportant so you can just ignore it.)

I've tried tabular and align (amsmath) environments, which can align the two sentences in parentheses, however LaTeX doesn't automatically break the line and ends up in the right margin.

My best solution is simply having the equations on separate paragraphs (see code below) but then the text in parentheses is not vertically aligned.

Code: Select all

$A_{rev}=\int P_z\d V = \int(P_n-\d P)\d V\quad$ zunanji tlak je za infinitezimalno vrednost $\d P$ manjši od notranjega tlaka

$\int(P_n-\d P)\d V = \int P_n\d V-\int \d P\d V \quad$ drugi integral je zanemarljivo majhen
p.s. Do you know how to typeset the second equation, where there is a vertical arrow from P in dPdV to 0?
Attachments
CIMG9810.JPG
CIMG9810.JPG (237.75 KiB) Viewed 1469 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Aligning math with text

Post by frabjous »

If I really wanted to reproduce that, I'd probably use some kind of tabular environment, though I find the style of the original to be rather ugly, and would strongly consider re-doing it.

Code: Select all

\documentclass[10pt]{article}
\usepackage[T1]{fontenc}
\usepackage{cmbright}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{amsmath}
\renewcommand{\d}{\mathrm{d}}
\begin{document}

\noindent\begin{tabular}{@{}>{$}l<{$}p{3in}}
A_{rev}=\int P_z\d V = \int(P_n-\d P)\d V & zunanji tlak je za infinitezimalno vrednost $\d P$ manjši od notranjega tlaka\\[\baselineskip]
\int(P_n-\d P)\d V = \int P_n\d V-\int \d; \underset{\underset{0}{\downarrow}}{P}\d V & drugi integral je zanemarljivo majhen
\end{tabular}
\end{document}
Post Reply