{line-breaking} is about how (La)TeX breaks paragraphs into lines and how those breaks can be influenced.

learn more… | top users | synonyms (1)

7
votes
3answers
2k views

How to split optimisation problem over two lines?

I have this expression involving minimisation. How do I split it over two lines? The problem is \min seems to be separated from the objective function. breqn does not seem to work, as this is not an ...
6
votes
1answer
346 views

Automatic camel case breaking

Based on my old question Push long words in a new line, I search for a possibility to allow linebreak before a capital character in camel case terms. For example the term ...
6
votes
1answer
734 views

\input only part of a file using catchfilebetweentags package

I would like to include only a part of a .tex file into a different .tex file. The part I want to include is delimited by some comment tags, as it is used by catchfilebetweentags package. I tried the ...
6
votes
1answer
662 views

Overfull \hbox produced by ntheorem subtitles

I switched from using the standard AMS theorem package to ntheorem so I can put alternative end marks on theorem environments (I want my examples to have an end mark, but not the same one as proofs). ...
6
votes
4answers
1k views

Splitting very big numbers over several lines [duplicate]

Possible Duplicate: Wrapping long lines that contain no spaces I'm writing a report (in LaTeX) in cryptology and I have to work with very large numbers. I want those big numbers to be on ...
5
votes
1answer
422 views

Chemfig new line reaction scheme

I just recently started using LaTeX and chemfig and have a question in regard with making a new line in the text below or above the reaction arrow. I am trying to place MW, 160C, 5min under Na2CO3, ...
5
votes
3answers
3k views

Push long words in a new line

I have sometimes very long words, which are for example method names and so on. Is there any possibility to force LaTeX to push them to a new line, if they overflow the margins? It is possible to ...
4
votes
1answer
141 views

The equation is too long to fit in the beamer frame, but split environment does not work

The main code is as follow: \begin{frame} \frametitle{Householder Transformation} \begin{equation} %\onslide<1-> \mathop{ \begin{pmatrix} \times & \times &\times \\ ...
4
votes
1answer
101 views

In table cell, how to break long words after “::” or “_”?

I have a software program can generate tables which may be very long and may contains words with many letters,so i use longtabu package. Some words may look like this: AAA_BBB_CCCC_DDDDD_CC ...
4
votes
1answer
1k views

How to force latex to put a quote in one line?

I am currently writing a CV on LaTeX. I want to have a quote on the head of my modernCV, but latex puts ONE word into a second line. Can I make LaTeX put all the quote into one line? ...
3
votes
1answer
73 views

condense non-numbered bibliography into one line

What I am trying to do is basically the same as (almost) answered here: http://tex.stackexchange.com/a/5574/39336 The difference is that I am using a different bibstyle. This bibstyle creates the ...
3
votes
1answer
1k views

URL in new line Bibtex

I'm being asked to put the url field in a new line after the reference information. Is there a way to do this using IEEEtran? Edit: Noting the initial suggestions, you can find the idea of the task ...
3
votes
1answer
877 views

Line Breaks in Text Mode not Working

This is a follow up from my previous question I am writing a large document in LaTeX, part of which is giving me much grief. Specifically, I have described an algorithm in several numbered steps. I ...
2
votes
1answer
339 views

How should I do manual line breaks?

How do I break lines manually? Methods I use: \linebreak \\ \n Which is the recommended one? Example: If I just put like this in my tex file, This is for people who love VIM and for people who ...
1
vote
1answer
776 views

How to remove line breaks before and after theorems?

By default, in the amsthm package, when you begin a theorem, LaTeX begins on a new line, and when you end the theorem, it also jumps to a new line. How can you prevent this behavior? For example, I ...
13
votes
5answers
633 views

How to split a long formula and make it beautiful?

My method: \documentclass[UTF8]{ctexart} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{inputenc} \begin{document} \begin{equation} \begin{split} ...
41
votes
1answer
5k views

Breaking equations with breqn

I am new to using the breqn package. It looks good, but I get an odd behaviour when an equation can almost fit in the page but not quite: the alignment gets completely wrong. Is there a way to fix ...
25
votes
4answers
10k views

Prevent line breaking in inline math, but allow flexible spacing

How can I easily tell Latex to prevent line-breaks inside a part of an inline formula, without affecting inter-word spacing? Writing something like $ab(c+d)$ in Latex is bad: Latex might put a line ...
22
votes
2answers
803 views

Repetition of a word on two lines

This question led to a new feature in a package: impnattypo There have been questions about rivers asked in the past. I'm wondering about words that are repeated in the same place on two ...
22
votes
1answer
6k views

Underfull \hbox in bibliography

I am getting lots of "Underfull \hbox" warnings that point to the *.bbl file. It looks like these messages appear only when URLs are very long, like in the below example: @techreport{nistguidesec, ...
30
votes
2answers
5k views

What is the difference between \nobreak and \nolinebreak?

What is the difference between \nobreak and \nolinebreak? I noticed that a lot of solutions in TeX.SE use the former, but I thought the latter is LaTeX while the former is plain TeX. And LaTeX macros ...
12
votes
1answer
2k views

Typeset a dialogue?

I need to typeset a dialogue in LaTeX, it's for a translation assignment. The original dialogue does something like this: - I found it, I told him. My finger was in the book, where George Best's ...
19
votes
1answer
3k views

Difference between \\ and \tabularnewline

What is the difference between \\ and \tabularnewline? Is it same as the difference between \\ and newline? Is \tabularnewline preferred over \\ when creating tables?
11
votes
4answers
5k views

Text out of margins

I don't know why, but a line in my text is out of margins. How can I avoid this issue? I'm using classicthesis in TeXworks. Edit: with the command \overfullrule=5pt I can see a black square ...
9
votes
2answers
435 views

How to deal with very long lstinline-phrases like long class names?

According to this Question: listing: How to deal with very long lines that do not contain spaces? My problem is that my \lstinline-phrases does not contain any special character like "-". In my ...
9
votes
2answers
528 views

Environment to allow line breaks at “,” in math mode

I find the question and accepted answer to Allowing line break at , in inline math mode? very useful, BUT I would like to make an environment (e.g. "allowbreaks") out of it. The problem is that I'm ...
9
votes
2answers
914 views

Avoiding a line break at the beginning of an enumerate

How can I avoid the line break at the begin of an enumerate environment? I've noticed that theorem-style environments succeed in doing so. I'm using the enumitem package and my concrete example is: ...
8
votes
3answers
857 views

An environment for setting \emergencystretch locally

The following environment, copied from this website about dealing with overfull hboxes, allows one to change the \tolerance parameter for just the paragraph(s) it encloses: ...
8
votes
1answer
2k views

How to print in algorithmic package for some If condition or For loop in one line?

How to print \FOR{$j:=0,\ldots,i-1$} \STATE{$\C_{ij}:=\C_{ii}\cdot\C_{ij}$}; \ENDFOR in one line instead of two line?
7
votes
1answer
339 views

Right-aligned line-break with long verses in verse

I'm happily using the verse environment to typeset French poetry. However, I'm unsatisfied with the behavior of long-line breaks (when the verse is too long to fit on the page). The verse behavior is ...
18
votes
1answer
1k views

Knuth's line breaking algorithm

I'm trying to understand the basics of Knuth's line breaking algorithm. At the beginning of Chapter 12: Glue of his TeXbook, there is a figure like the one below. My question is: where did those ...
17
votes
1answer
2k views

How to join paragraphs with a pilcrow \P?

Background There are many typographically distinct ways to separate paragraphs from one another, the most common being starting each paragraph on a new line with either an indent or additional ...
17
votes
1answer
719 views

Is it still worthwhile to let TeX try line-breaking without hyphenation?

Here's TeX's line-breaking approach (as I understand it) in a nutshell: If \pretolerance is positive, try to break a paragraph into lines without inserting discretionary hyphens and without ...
14
votes
1answer
35k views

In-line \verb — overfull hbox problem

I'm having a problem that I've had before and I'm tired of hacking my way through it and hope that there is some supported solution. I'll go ahead and create a document for example: \documentclass ...
14
votes
1answer
7k views

in-cell newlines (in tabular environments)?

I'm working on a table containing multi-line cells and I wonder if the following concept is supported by LaTeX. The concept itself is simple: allow a cell to span multiple lines by increasing the ...
10
votes
3answers
2k views

Why \linebreak doesn't work when text width is not set?

This is the code I have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \tikz \node[rectangle split, rectangle split parts=2] ...
10
votes
2answers
266 views

Place TikZ coordinate or \zlabel at every (base)line

I'm currently adjusting the code shown in Test if a paragraph has a page break in it? to support underlining and highlighting using TikZ similar as shown in Cool Text Highlighting in LaTeX, but ...
9
votes
2answers
192 views

stacking text for cryptography

What is the best way to stack long passages of (fixed-wdith) text on top of each other? I am writing exercises and solutions for a cryptography class and would like to be able to have plaintext above ...
8
votes
4answers
4k views

How can I force long chapter names (including page numbers) to stay in the margins on the table of contents?

I'm somewhat new to LaTeX and have been tasked with satisfying some strict formatting requirements for this LaTeX document using a custom class. Currently, if there is a long chapter name (within a ...
7
votes
1answer
380 views

Penalty or badness for linebreak near start or end of sentence

I would like to set a penalty or badness for breaking a sentence (or the contents of some \command{...}) too early. More specifically, I would like the penalty of a line break to be dependent on the ...
6
votes
1answer
3k views

line break inside cases environment

I have an equation using a cases environment, with one case with a long description text: \begin{eqnarray*} \begin{cases} 1 \text{too long description of the first case, not ...
5
votes
1answer
282 views

How to apply \looseness=-1 to ALL the paragraphs?

I'm writing a short document of (3-4 pages), and try to condense it into the allowed space. Putting \looseness=-1 at the end a paragraph helps quite a lot. Is there a way to tell LaTeX to treat ...
2
votes
0answers
89 views

break line at comma inside listings [closed]

I'm trying to do some listings environments, but I'm encountering problems. The ideal output is this: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦ ⤷ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
19
votes
3answers
1k views

LaTeX word wrapping poorly

LaTeX is not word wrapping this anything close to sanely: \documentclass{article} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{geometry} \usepackage{lipsum} \geometry{margin=1in} ...
12
votes
1answer
164 views

Does \\* within footnotes have any effect?

One is taught that \\* is an alternative to the line-breaking \\ that tries (often unsuccessfully) to inhibit a page break. Normally \\* would be used in ordinary ("body") text. (And I hereby ...
11
votes
4answers
345 views

How to break this long radical into multiple lines?

I've got a very long radical in a display-math environment, so long that the equation spills in the right margin. How can I break that equation over multiple lines, so that it doesn't go into the ...
11
votes
3answers
623 views

What to do when a line in a bibliography entry overflows?

The usual solution to fix lines that overflow is to rewrite it. However, that hardly works with bibliography entries that experience the same problem. So what can I do to fix it? I can't rewrite ...
10
votes
3answers
3k views

Proof environment - line break after the “Proof.”

I want to make the proof environment in amsthm package to auto add a line break right after the "Proof." I tried the following code, which also removed the QED sign, but it doesn't work: No linebreak ...
9
votes
1answer
4k views

Line break in edge labels in tikz graph

I'm using tikz and pgf to draw state machines in a document, and I'd like to be able to have a multiline edge label between two nodes. Something like the following would be ideal: \begin{center} ...
8
votes
1answer
128 views

Use non-breaking space after name initials with biblatex macros

I want to enforce biber/biblatex to place non-breaking spaces between initials and last names of authors. Example: \documentclass{article} \usepackage[backend=biber,natbib=true]{biblatex} ...