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

learn more… | top users | synonyms (1)

6
votes
3answers
2k views

Break an inline math formula

I have a theorem that looks like this: Now I would like to break the (A....D) math expression. The problem is, that nothing I did from the solution of this answer helped (since probably people will ...
4
votes
3answers
588 views

Line break in lines with colons

I noticed that if I've got something like this: one::two::three::four one::two::three::four one::two::three::four something weird happen: % the right page margin would be here ...
26
votes
5answers
6k views

Allow line break, but without inserting a dash

I have a sentence that contains a number of long dataset names. I would like to allow LaTeX to break these names at certain positions that I would like to specify somehow just like I can use \- to ...
16
votes
2answers
3k views

What's the difference between \tolerance and \badness ?

I'm having some difficulty understanding this sentence on page 29, Chapter 6 of Knuth's TeXbook: Run TeX again, and begin this time by saying \hsize=2in \tolerance=1600 \input story ...
14
votes
2answers
662 views

Temporarily increase the limit on space size?

I often see those warnings about "overfull \hbox" when I'm preparing my document. Because the document is still in the early stage, I see no point in correcting them on-the-spot - since the document ...
11
votes
2answers
9k views

Why is \linebreak failing?

Consider the following minimal, using \linebreak: \documentclass{article} \begin{document} It is impossible to say how first the idea entered my brain, but, once conceived, it haunted me day and ...
11
votes
2answers
1k views

Disallowing line break before dash (en dash and em dash)

In Polish typography dash (pol. myślnik) should not be put after a line break. Below you can find badly and correctly typed samples using en dash (pol. półpauza) and em dash (pol. pauza). ...
10
votes
1answer
18k views

underfull \hbox (badness 10000) in paragraph

Why do I get the message: Underfull \hbox (badness 10000) in paragraph at lines 107--108 I want a blank line between the problem name and the table, but if I use \\ or \newline along with a ...
8
votes
2answers
7k views

Line breaks in TikZ nodes [duplicate]

I have this code that outputs a small family tree \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[ ...
7
votes
4answers
6k views

How to allow line break in a long hyperlink in a PDF compiled by latex-dvips-ps2pdf?

I am using latex-dvips-ps2pdf steps with -Ppdf option passed to dvips. The following code snippet \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{breakurl} ...
7
votes
4answers
28k views

Bold text and newlines inside equations.

What I'm doing: \usepackage{amsmath} \usepackage{amsthm} \usepackage{eucal} \usepackage{amssymb} \usepackage{mathrsfs} % don't know what some of those do, but i think all the math related ones are % ...
6
votes
2answers
534 views

latex tabular issue

I am creating a tabular in LaTeX. I want one column to be as small as possible, with no inter column spacing, so that it's just enough to fit the text. I know the answer to this question: I need to ...
6
votes
1answer
1k views

How to force line breaks within a fancyvrb verbatim environment?

Consider the following LaTeX document: \documentclass{article} \usepackage{fancyvrb} \DefineVerbatimEnvironment{example}{Verbatim}{commandchars=\\\{\}} \begin{document} \begin{example} Foo\\{}Bar ...
6
votes
3answers
736 views

longtabu and scrpage2: line breaks in page header cause compilation errors

Please consider the following MWE: \documentclass{scrartcl} \usepackage{longtable,tabu} \usepackage{lipsum} \usepackage{scrpage2} \chead[Headline 1\\ Headline 2]{Headline 1\\ Headline 2} ...
5
votes
1answer
667 views

URLs in bibliography: LaTeX not breaking line as expected

I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document. I have seen a number of questions about breaking URLs in bibliography, but after trying ...
4
votes
1answer
282 views

wrapping inline long lines and adding background color

Objective I'm trying to achieve the following output. Here's the code I used to produce it. I had to hack it \begin{document} \begin{description} \item In ...
4
votes
2answers
344 views

What is the ConTeXt or plain TeX equivalent of \nolinebreak?

The command \nolinebreak[4], if placed between two characters, should prevent a line break from appearing in that location. This command does not seem to be defined in ConTeXt. Is there an equivalent ...
3
votes
1answer
2k views

How to make (force) line-break in Chapter Title (in ToC, Chapter, Header) - if possible?

I've found how to make different text for Title appearing in ToC, Chapter and headers Chapter title in header too long : \chapter[medium-length title for TOC, if wanted]{full title name} ...
1
vote
2answers
495 views

Linebreak in equations

I have a very simple LaTeX problem with the following LaTeX fragment: The function computes: \[ e \leftarrow (((x||a) + (y||b)) \oplus y,\\ r \leftarrow x + y \] The result should then be in ...
10
votes
3answers
572 views

force long text inside \item[{\texttt{}] to wrap

I have a LaTeX document that is automatically generated and then inserted as part of my own larger document with \input. This other document has a description environment for examples, one item for ...
9
votes
0answers
100 views

How to typeset long numbers in LaTeX [duplicate]

Possible Duplicate: How to typeset large numbers I saw the posts on how to typeset long formulas into LaTeX, but I just want to output a really long number into LaTeX. 2011^2011 is long, ...
9
votes
2answers
5k views

amsthm: \newtheoremstyle, headspace, \mbox{}, and lists

Q: How do I define a newtheoremstyle which will start the theorem text on a newline after the header even when the theorem text starts with a list, e.g., enumerate? If there's no way of doing this, ...
7
votes
1answer
127 views

Environment prints same character at beginning of each output line

I am writing a Latex document with pseudocode interspersed with theorems and discussion. Some of the comments in the pseudocode are long. I would like to automatically start (and end) each output line ...
7
votes
3answers
1k 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
303 views

\penalty-10000 or \linebreak?

What are the practical differences between \penalty-10000 and \linebreak? Do both make \allowbreak redundant? \documentclass{article} \begin{document} Text text text text text. This is a paragraph ...
6
votes
1answer
293 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
570 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
580 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
952 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
3answers
2k 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
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
827 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
687 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
245 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
559 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
586 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} ...
22
votes
2answers
746 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 ...
23
votes
4answers
8k 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 ...
20
votes
1answer
5k 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, ...
4
votes
1answer
59 views

Specify number of columns in brqalign

Some time ago David Carlisle wrote an awesome brqalign function in this answer: http://tex.stackexchange.com/a/51543/4011. See the cited code below. How to modify the brqalign environment such that ...
40
votes
1answer
4k 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 ...
5
votes
1answer
412 views

Manually URL linebreak with Biblatex

First I should say that I don't have much experience with LaTeX. I'm using BibLaTeX and Biber. My Problem: I have a (justified) bibliography with long URL's containing long words. BibLaTeX makes a ...
18
votes
1answer
2k 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?
9
votes
2answers
815 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
559 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
2answers
315 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 ...
8
votes
1answer
1k views

Adjust the indentation whithin the algorithmicx-package when a line is broken

I have this code \documentclass{article} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm} \caption{Minimal Working Example for my Problem} ...
8
votes
1answer
1k 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?
30
votes
2answers
3k 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 ...
18
votes
1answer
960 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 ...