Hi
I am having trouble with latex putting an inline math formula so that part of it falls outside the text margin. How do I force it to be put on the next line instead?
SandsofTime
Math & Science ⇒ Inline math spanning out of text margin
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
-
- Posts: 8
- Joined: Mon Sep 21, 2009 9:04 pm
Inline math spanning out of text margin
Code: Select all
..... and the reconstructed image denoted by $\left\langle R^{q}\left(x,z,\overrightarrow{\tau},\overrightarrow{\theta},\overrightarrow{\mathbf{r}}\right)\right\rangle $ . The objects can be tracked ....
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Inline math spanning out of text margin
When asked for an example, always post a complete sample document that is compilable as is. This is also called a minimal working example (MWE). I have no problem with the following sample code.
You can additionally try the microtype package to improve the typesetting quality.
Best regards
Thorsten
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
%\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage{amsmath}
\usepackage{blindtext}
\usepackage{lmodern}
\begin{document}
\ldots and the reconstructed image denoted by $\bigl\langle R^{q}\bigl(x,z,\overrightarrow{\tau},\overrightarrow{\theta},\overrightarrow{\mathbf{r}}\bigr)\bigr\rangle $ . The objects can be tracked \ldots \blindtext
\end{document}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Inline math spanning out of text margin
TeX must fulfill certain constrains specified by parameters in its paragraph breaking algorithm. These constrains are supposed to prevent "ugly" line breaks. Although they can be weakened, I suggest to avoid that and to use a displayed equation in your case. This also solves the problem that the formula is to high to fit in one line:sandsoftime wrote:I don't understand why latex would simply not shift it to the next line by itself.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
%\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage{amsmath}
\usepackage{blindtext}
\usepackage{lmodern}
\begin{document}
\blindtext \ldots and the reconstructed image denoted by
%
\begin{equation*}
\left< R^{q} \left( x, z, \vec{\tau}, \vec{\theta}, \vec{\mathbf{r}} \right) \right>.
\end{equation*}
%
The objects can be tracked \ldots \blindtext
\end{document}