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

learn more… | top users | synonyms (1)

19
votes
6answers
34k views

LaTeX equivalent of <br><br><br> in HTML?

In HTML, all I would have to do is: This is line one <br>.<br>.<br> This is line two to get the following output: This is line one . . This is line two I've been playing around ...
6
votes
1answer
317 views

Is there a (standard) font with a literal end-of-line character in it?

For ... complicated ... reasons (which I'll explain in a moment), I want to be able to put a literal end-of-line character in my document. Simply putting ^^J results in an Ω. Looking at the ...
2
votes
1answer
371 views

Testing for multi-line paragraphs

I'm running into a situation where I need to insert some code (specifically, \hfill) only if my paragraph runs more than one line. This isn't a simple alignment thing, as I'm working with ...
2
votes
1answer
400 views

Oddly wide spaces in subsection title

I have a problem, this is what it looks like: And this is the code: \subsection{Bakterienst\"amme und Anzuchtbedingungen} Where does the huge whitespace come from?
3
votes
2answers
2k views

How to prevent verbatim from generating linebreak?

I tried: \begin{verbatim} is_terminating() \end{verbatim} function can be implemented as follows: But the text after verbatim section will be printed in a next line, is there a way to prevent this ...
12
votes
2answers
5k views

URL linebreak in footnote

I use a footnote with a too long url, so that I'd like to see a linebreak. The url package does linebreaks automatically as far as i know, but in the footnote it won't do it. Anyone have a solution to ...
5
votes
1answer
7k views

Multirow and lines - how to draw line going through selected columns

I was wondering if it is possible to draw line which goes through some columns in table(not all columns). I have a table which looks like that \begin{longtable}{|c|c|c|c|c|c|c|c|c|c|c|c|} ...
14
votes
3answers
2k views

Hyphenating hyphens: how to change the default \discretionary

My language, Portuguese, have undergone another orthography reform (those committees simply can't avoid themselves from doing this mess from time to time.) Now we have to adapt, which brings us to my ...
20
votes
1answer
5k views

URL line breaks with biblatex

How do I allow long URLs to have line breaks at any point. This is in the bibliography not the main text. I am trying to save space so don't want extra spaces to be added to make it only break at ...
0
votes
1answer
104 views

Space for generated text

Throughout my PDF document, generated text on the end of the line is spilled out to the margin. That is, if I use, e.g., \ref{} or \cite{}, then LaTeX does not consider the actual size of the ...
8
votes
2answers
2k views

How can I stop TeX from bleating about an underfull \hbox?

I have a paragraph that contains an underfull \hbox. (It's loaded with huge proper nouns that don't hyphenate easily.) It's not going to be fixed (badness is only 1330), but I'd like to get TeX to ...
0
votes
0answers
677 views

Why does doing \\ in LaTeX causes Undefined control sequence error [closed]

I have a weird LaTeX error here. It seems as if the newline (\\) command is the culprit of a compilation error. The error shows up at the ending line of the .tex document: the \end{document} line, ...
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?
6
votes
2answers
3k views

Suppress black box at end of line

Under TeX, when I write a line too long, it prints a fat black box at the end of the line. That is probably a feature, but I dislike it. How to turn that OFF? Is there a command-line option or ...
12
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). ...
0
votes
0answers
237 views

Unwanted line breaks in middle of words [duplicate]

Possible Duplicate: How to prevent LaTeX from hyphenating the entire document? I have a two-column article with custom margins. In some points of the text, line breaks occur in the middle ...
9
votes
1answer
444 views

Adding overfull hbox 'slugs' to final document version

I'm using a documentclass which looks dramatically different in draft mode compared to final. I'm preparing my document for the final formatting, so I don't want to pass the draft option. However I ...
3
votes
2answers
2k views

Underlined blank that wraps

I'd like to create an "answer blank" in a document. It should basically look like an underline with nothing above it. I found a question about it ( How does one TeX a blank? ), but that doesn't deal ...
4
votes
2answers
4k views

Change style of printing acronyms with glossaries package

I'm using the glossaries package to define my acronyms and print them out. I'm using this style: \newglossarystyle{super3colleft}{% \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% ...
1
vote
2answers
1k 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 ...
2
votes
1answer
649 views

Macro for tabbing with complex line breaks (or similar environment)

I have a complicated transcription with mid-line aligned text. I've been using tabbing to do it automatically, but it obviously doesn't do line breaks. I want to write a macro (unless something ...
3
votes
1answer
751 views

Breaking formulas before and after binary operators

Page 195 of the TeXBook reads: Although formulas within a paragraph always break after binary operations and relations, displayed formulas always break before binary operations and relations. ...
35
votes
2answers
2k views

How to visualize the underfull box in final output PDF files

I am finalizing a document. There are a few underfull vbox I just cannot figure out where they are. Sometimes it is easy to figure out which page is underfull vbox from the log file, but sometimes it ...
10
votes
4answers
15k 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
1answer
1k views

Emergency stretch hook

Is there a way to automatically set parameters when emergency stretch is required? Here is my situation. After I implemented the solution chosen for unbreakable spaces in Bible verse references, I ...
5
votes
2answers
746 views

line break aware custom environment

I have a use-case where I would like to specify some special formatting for the text being input via the \input command. This text is customer's address being printed in some sort of a form. Ideally ...
9
votes
2answers
2k views

Fixing an overfull box

I have an overfull box in a French text which looks like this: The sequence at the end of the line is: d'Ananias~: \og Vous "Vous" cannot be hyphenated and \og inserts a non-secable space, so ...
15
votes
4answers
1k views

How can I make (La)TeX prefer to fill centered lines

My thesis formatting requirements ask for multiline chapter and section titles to be a maximum of 4.5 inches wide with any subsequent lines being wrapped such that they are sucessively shorter, ...
14
votes
1answer
10k views

Change text background within paragraph (with automatic linebreaks)

How do I change the text color as well as the text background color for e.g. a sentence within a paragraph? I know \textcolor for coloring the font and \colorbox for background coloring ...
7
votes
1answer
726 views

How to avoid line breaking after subsection in Memoir?

\documentclass{memoir} \usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage{bbm} ...
19
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 ...
21
votes
2answers
6k 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 ...
11
votes
1answer
2k views

“Allowing line break at ',' in inline math mode” breaks citations

In answering another question allowing line break at ',' in inline math mode, Stefan Kottwitz suggested two excellent ways to allow line breaks in inline math mode after ,. One way was to use the ...
2
votes
1answer
1k views

Unwanted line-breaking of hyphenated word in bibliography

In .bib file: @article{Kurahashi_Yokota2004, author = "Kurahashi, M. and Yokota, A.", title = "Agarivorans albus gen. nov., sp. nov., a $\gamma$-proteobacterium isolated from marine animals", journal ...
28
votes
2answers
26k views

How to format an inline source code

I have a document where I quiet often refer to source code element, such as class names, I wanted to format these strings differently, but at the beginning I didn't want to fiddle with various options ...
0
votes
1answer
372 views

revtex reporting underfull hbox at every newline

So I'm working on a seminar, and I was wondering, why revtex, every time I make newline after a paragraph (\), reports underfull hbox warning? I mean, everything looks fine once in pdf (I would expect ...
3
votes
2answers
353 views

Figure with long list of predicates and conjunctions (\wedge)

I have a figure with a long list of predicates connected with \wedge, here is the code: \begin{figure}[h] \small{ $ Defined\_in(subject\_state, concrete\_subject) ...
14
votes
3answers
3k views

How to use \sloppy for just some references?

I’m using XeLaTeX within MiKTeX and also the biblatex package for the literature. I’ve noticed that my bibliography set using \printbibliography is not set with the \sloppy option by default, which ...
7
votes
1answer
2k views

Control breaking of overlong section titles

I have following code: \section{This is some long text and probably it will be broken} I would like to prevent word division like: This is some long text and pro- bably it will be broken And the ...
31
votes
4answers
15k 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 ...
4
votes
1answer
490 views

How to adjust macro to respect current \linewidth?

I'm having issues with text going past the end of the specified \textwidth. I posted this question about why text was being placed beyond the specified line width. The MWE provided there produced ...
6
votes
1answer
249 views

Discouraging line break in an alignment

In the question Generate table with dynamic number of columns the OP posed a question to which my initial reaction was "No". However, now I've run into something interesting which, if I'm reading it ...
7
votes
2answers
4k views

Why is text being placed beyond the specified line width?

I thought that I knew a few things, but looks like I have some basic misunderstanding on how TeX is supposed to typeset material. I thought that settings by the geometry package would force the text ...
5
votes
1answer
1k views

How to prevent line break in citation with an argument?

If I cite a bibliography item with an additional argument, for example \cite[p.~6]{bib_item}, it can happen that there is a line break before the automatically inserted argument, such as: text ...
4
votes
1answer
313 views

Add a break between theorem head and theorem body if theorem note (the #3 arg) exists

I'm using the amsthm package for theorem style setting. I want the style like: Theorem 1 A triangle ... Theorem 2 (someone) A square ... that is, when the theorem includes a note, the ...
2
votes
2answers
1k views

bibtex large spacing

I couldn't find a solution to my problem searching. Apologies if it has been asked before. My problem is: on a few of my bibliography entries, there are massive spaces in the text to pad out the ...
7
votes
2answers
3k views

How do you get TeXShop to automatically insert line breaks?

As I am using version control (hg) it is convenient to have hard line breaks in my tex files. Is there a way to set up TeXShop so that it automatically inserts line breaks? (For instance, as I ...
7
votes
2answers
3k views

Line break in the table item

I am creating table in LaTeX and I need to get the text to perform line break automaticaly when it's too long. And if possible, I'd like to get the text alignment to the left. Is it possible to handle ...
8
votes
2answers
416 views

Passing text containing linebreaks as command or environment parameter?

I just tried to write some commands which used its argument to check whether they were empty (isempty{...} from package ifthen) or not. The problem was that the text to check contained a linebreak, ...
8
votes
2answers
2k views

ragged2e: “newcommands” option produces “underfull \hbox” warnings

The ragged2e package provides the commands \Centering, \RaggedRight and \RaggedLeft for setting ragged text while allowing hyphenation. The package offers a newcommands option that sets the standard ...