Theses, Books, Title pagesequation wrapping for Masters/Doctoral Thesis

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
confused_user
Posts: 2
Joined: Tue Jul 05, 2016 6:07 pm

equation wrapping for Masters/Doctoral Thesis

Post by confused_user »

I'm having problems with inline equations in the "Masters/Doctoral Thesis" template. Typing a line of the form:

Welcome to this \LaTeX{} Thesis Template, a beautiful and easy to $\int dx \cos(x)\sin(x), \exp\left( \frac{1}{2} \right)$ use template for writing a thesis using the \LaTeX{} typesetting system.

results in an equation which overflows over the margin.

Has anyone else experienced this problem?

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: equation wrapping for Masters/Doctoral Thesis

Post by Johannes_B »

That's normal. LaTeX cannot decide where to break the line, it is a computer program. Easiest thing to do: Rewrite the paragraph or add a manual line break.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

equation wrapping for Masters/Doctoral Thesis

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

Actually, LaTeX can automatically break such inline formulas. It knows good places for line breaks, so it would do a line break at equal signs =, relation signs in general, plus + and minus -, but not just anywhere because it could harm the meaning otherwise. You could try that by inserting = or +, just for fun.

If there's no place where LaTeX can see a break, you can allow the break yourself by ending end starting the math mode, such as: $\int dx $ $ \cos(x)\sin(x)$. or you simply tell it to LaTeX by inserting \allowbreak everywhere you would allow it - LaTeX would choose the best.

Code: Select all

$\int dx\allowbreak \cos(x)\allowbreak\sin(x)
But I would be careful: such longer formulas should be displayed in its own paragraph, such as by

Code: Select all

Welcome to this \LaTeX{} Thesis Template, a beautiful and easy to
\[
  \int dx \cos(x)\sin(x), \exp\left( \frac{1}{2} \right)
\]
use template for writing a thesis using the \LaTeX{} typesetting system.
That's what good math books do: they display equations on their own, outside the text, to keep the text flow readable and the math understandable.

Stefan
LaTeX.org admin
confused_user
Posts: 2
Joined: Tue Jul 05, 2016 6:07 pm

Re: equation wrapping for Masters/Doctoral Thesis

Post by confused_user »

Thanks for the rapid answer, I understand the problem
Post Reply