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

learn more… | top users | synonyms (1)

3
votes
2answers
94 views

Why linebreaks break the line height within certain environments with size-changing macros?

Why linebreaks break the line height within certain environments with size-changing macros? I'm trying to understand what's the difference between these three approaches: \newenvironment between {} ...
3
votes
2answers
413 views

Adding extra lines/spaces in source, *not* affecting semantics

I'm editing a file with quite huge interleaves of text and formulas like this lorem ipsums \begin{align} foo & bar\\ qux & rofl\\ & toto \end{align} lorem ipsums … And I face ...
1
vote
1answer
966 views

How to fit the title into a single line?

I think I am just too new to the LaTeX environment. Do I just change the font size to fit the title into a single line? Then how do one change the font size of the title? Is there any other ...
21
votes
3answers
7k views

Quote environment with reference at the end right

I want to define a quote environment such that after the quote on the right occurs the author with page number. My solution is yet the redefinition of the quote environment \usepackage{amsthm} % ...
32
votes
4answers
3k views

How to prevent linebreaks after hyphen if word starts with hyphen?

(Remark: Maybe this is a typically German problem, I'm not sure in which other languages that might be relevant) Sometimes there are words which start with a hyphen, as they are connected with a word ...
62
votes
5answers
34k views

Description list - How to put the definition on a new line?

I have the following LaTeX code: \documentclass{article} \begin{document} \begin{description} \item[foo] bar \item[baz] bang \end{description} \end{document} and it produces the following PDF: ...
30
votes
2answers
1k 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 ...
36
votes
5answers
4k views

one-letter word at the end of line

This question led to a new feature in a package: impnattypo I come from Poland and I'm writing some text in my native language. One of our typography standards is that we do not leave ...
16
votes
2answers
14k views

How to put a line-break in section heading?

I have some section headings occupying two lines and I'm not satisfied with the way XeLaTeX breaks the heading. If I manually add \\ the output looks fine, but I get the following warning: [hyperref] ...
13
votes
2answers
5k views

Hyperref + \url: long URL with dashes won't break

I've discovered a rather weird behaviour of PdfLaTeX. In this example \documentclass{article} \usepackage[breaklinks]{hyperref} \begin{document} ...
16
votes
3answers
1k views

How to wrap text around a figure? (revised)

This question has been asked before (and in fact I stole the diagram below from that question) but the answers are not sufficient for my needs (at least near as I can tell). What I want is the ...
10
votes
4answers
13k views

Newline in a table cell which is centered

This question may look like a duplicate but, none of the answers given to the possible duplicates contain the answer to this specific case. I have a tabular, say \begin{tabular}{ccc}. While adding a ...
9
votes
2answers
924 views

Fixing a code to highlight formulas and text on several lines

In this post I've found the following amazing code to highlight text on several lines. The problem is that code dosen't work well with formulas : for example, fraction using the mode display are ...
4
votes
1answer
74 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 ...
9
votes
1answer
2k views

Does amsmath provide any medium to auto-break equations?

I'm writing large equations in texlive with amsmath, and I want them to be automatically broken at the end of the line. Is there any way to do that with amsmath? What would you recommend me to do ...
5
votes
1answer
607 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 ...
8
votes
1answer
2k 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
2answers
6k views

How do I keep a string of text together without it doing a line break?

I'm writing up a long paper, in which in prose I have various equations. However, I do not want a line break to occur within the equation - I want the equation to stick together. I want to do this ...
18
votes
2answers
4k 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 ...
12
votes
2answers
2k views

Is it possible to have hyphenations in \underlined{text}?

In a document I was writing, I had some really long captions and I wanted to emphasize the important parts in them. I tried to use \underline{} but no hyphenation was used at both the caption and at ...
11
votes
3answers
382 views

Asterism and similar breaking / non-breaking options

What are the options that can be considered an alternative to the old asterism (⁂) symbol ? I would like to denote a small break in the flow of the text, I noticed that this days many people like to ...
7
votes
4answers
8k 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} ...
6
votes
1answer
437 views

How do \widowpenalty and \clubpenalty interact for a 2-line paragraph?

Sometimes \\* does not suffice to prevent a linebreak. Adding {\widowpenalty10000 \par} or {\clubpenalty10000 \par} helps if the separated line is paragraph-final and stranded at the top of a page ...
6
votes
3answers
4k 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 ...
6
votes
3answers
2k views

Underscore makes text go past end of line into margins

In my LaTeX document, I have a few special terms that contain underscores, such as AAA_BBB_CCC. In one case, such a token is placed at the end of the line, and for some reason it reaches into the ...
4
votes
3answers
681 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 ...
15
votes
1answer
2k views

Difference between control space and non-breaking space

In my answer to How can I get following layout? I've used non-breaking spaces ~ (ties) to align monospaced text. Actually I rather meant control spaces \ , but they're less convenient to type (and ...
13
votes
2answers
11k 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
2answers
9k 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}[ ...
8
votes
2answers
496 views

How to wrap text in a table when there are no spaces at which to break the line?

I have a lot of text in table. I want to wrap it with in 2cm. In the last column, I have [1][2][3].....[89][100] but the column width is only 2 cm. It is supposed be wrapped by itself. How can I ...
7
votes
1answer
7k views

Tabular: Underfull \hbox (badness 10000) in paragraph at lines

I read all the questions regarding the error message Underfull \hbox (badness 10000) in paragraph at lines but I am still not sure if my code is correct. The problem is with the tabular of a table. ...
7
votes
2answers
2k 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 ...
6
votes
2answers
725 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
2k 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
926 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
1k views

Pandoc: Markdown to PDF, without cutting off code block lines that are too long

I'm trying to convert a Markdown file into a PDF file using Pandoc. I have a lot of code blocks in my Markdown. And if I have a line of code that is too long, it will just be cut off in the PDF. How ...
5
votes
2answers
164 views

Problem with references! Need to line-break urls

I am writing a paper and I have already added the references through bibtex. There is something I don't like about the online references, they get to stretched out, from one side of the page to the ...
5
votes
2answers
547 views

References in margins `biblatex`

How can I use biblatex and not have the references run into the margins? I've seen some posts and solutions to this problem pertaining to URLs but I'm not using web links so it's a different problem. ...
4
votes
2answers
379 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 ...
4
votes
1answer
3k 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
98 views

How to write a mathematical formula in 2 lines?

I have a mathematical formula with many symbols and Greek characters, but it is too big. So I want to split it in two lines. I use \\ between $, but it doesn't work. Does anybody know how to fix it?
1
vote
1answer
472 views

Prevent the overflow of text

I'm having some Yiddish text overflow it's box in a XeLaTeX document. I suspect there is a simple command to stop this from happening. Does anyone know an easy solution or do I need to make and post a ...
1
vote
2answers
849 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 ...
21
votes
3answers
2k views

When can I safely add an empty line?

I really like spacing my LaTeX to stay organized, but I'm always scared that adding a space will affect the output when all I really wanted to do was separate the "code" a bit. So most of the time I ...
11
votes
3answers
923 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
102 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, ...
8
votes
1answer
96 views

Applications of various strength of \linebreak command

This is a curiosity-driven question. The LaTeX \linebreak command comes with five options, from 0 to 4, determining its strength. \linebreak[0] allows TeX to break a line where he normally does not ...
8
votes
1answer
190 views

Tweak showlabels/showkeys - wrap the label

Can showlabels wrap the label in the margin? A very similar question is showlabels: wrap labels in marginpar, but the solution of @DavidCarlisle does not solve the more general case. Consider the ...
8
votes
3answers
350 views

“Fill in the missing words” needs line breaking before a \phantom{word}, and a list of removed words

Apologies for the very long title. I'm writing a "fill in the missing words" document. I have made a makro \fjern{} ("remove" in Norwegian) which underlines the argument and places it in a phantom ...