{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
5answers
25k 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 ...
7
votes
1answer
382 views

How do I get multiple ToC entries in the same line?

I need that, in the ToC, all the \paragraph references appear in the same line, like. 1 First Chapter................................................1 1.1 First ...
2
votes
1answer
3k views

Loop conditions in multiple lines using algorithmic package

I am working on a paper in double-column format, and I am using the algorithmic package to typeset my algorithms. One of my while loops' condition is a bit long hence doesn't fit into the column. ...
4
votes
2answers
1k views

How to make text in math mode which would cause an `overfull \hbox` automatically start on the next line?

I have text within $s following normal text, which runs off the end of the line and creates an overfull \hbox warning. By default, LaTeX doesn't let the stuff in math mode run off the end of the ...
6
votes
3answers
2k views

Defining rules for line breaks in \newcommand

Thanks to the help of this answer, I've defined a command for creating a blank line: \newcommand{\blank}[1]{\rule{#1}{0.4pt}} However, because this is a user-defined command, LaTeX doesn't seem to ...
7
votes
1answer
201 views

The Title of Document Runs off the page, as part of header on page 3

Here's my preamble: \documentclass[11pt]{amsart} \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. \geometry{letterpaper} % ... or ...
1
vote
1answer
4k views

Multiple header lines with fancyhdr in LyX?

Is it possible break up a long header or footer line so that they are positioned in two or more vertically aligned lines using fancyhdr? For example I want to break up "This is an example of a ...
5
votes
2answers
14k views

Theorem environment - line break after label [duplicate]

Possible Duplicate: ntheorem environment with indentation Skipping line after “Proof” in proof environment \begin{theorem}[label] The theorem text. \end{theorem} I want to ...
0
votes
1answer
3k views

“There's no line here to end” error when pages break at unfortunate locations

I'm recieving seemingly random There's no line here to end errors at different parts in my code. At first I thought they were truly random and that I had some weird configuration error somewhere, but ...
2
votes
2answers
274 views

Environment with breakable text

In the following code, I would like to use \begin{tiScreen} 12345678901 234567890123456789 12345678901234567890123456789 \end{tiScreen} instead of \begin{tiScreen} \breakabletexttt{12345678901} ...
9
votes
3answers
6k views

Linebreak in Package algorithm2e

I'm using the algorithm2e package for pseudocode. I got some very long lines that needed to be wrapped. Is there a way to indent the following (breaked) lines and/or put a mark at the first line to ...
1
vote
1answer
1k views

Lines don't wrap in my list of tables

On my "List of Tables" page, the descriptions of tables don't wrap. Instead, the text proceeds on the same line all the way to the far-right margin of the page (past the point where the page number of ...
12
votes
4answers
10k 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 ...
11
votes
3answers
6k views

Skipping line after “Proof” in proof environment

Like the OP in Is it possible to skip the first line in a theorem environment?, I would like to be able to skip a line after the word "Proof" so that the first line of the proof is actually part of ...
2
votes
1answer
394 views

Force minted to insert new space in code that won't fit on the page

Essentially I would like to have listings' breaklines option on minted. I can't seem to find it. I could manually insert new lines but it becomes difficult when the code comes from an external file.
0
votes
0answers
818 views

Multiline text under/over arrows [duplicate]

Possible Duplicate: How can I write multiple lines in a subscript? Force line break inside a \lim argument in align environment I want to write some multi-line text under a long arrow. ...
1
vote
2answers
2k views

Dealing with overhanging text

I have a document with many long, unbreakable words. On A5, there are about 8 words per line. This creates a problem as on many lines, some words trail off the edge and well into the margins. I have ...
13
votes
4answers
4k views

Avoid hyphenation in chapter title

I wonder if there is a way to avoid hyphenation of words in the title of a chapter. I have tried \mbox but that makes the word run over the margin. I've also tried inserting a \\ in front of the ...
2
votes
1answer
362 views

Unwanted line breaks after equation tag when using fleqn and leqno

When you use fleqn and leqno and assign your own equations tags with \tag to equations in environments such as gather and align and you assign a tag with a certain length, then there's a line break ...
2
votes
1answer
4k views

How can I add line feed after itemize?

How can I add line feed after itemize? Some vertical spacing would be even better, I think. My document: \documentclass[12pt,a4paper]{mwrep} \usepackage{enumitem} \setlist[itemize]{label=--} ...
11
votes
3answers
5k views

linebreak in description title

In my document I have a description environment. One of the titles in the description is too long to fit in one line and I want to break it. I know this is a bad styling but I can't think of any way ...
5
votes
3answers
155 views

Allowing breaks at a location with no spaces or hyphens

I have two letters: A and B. In most situations, I'd like them to appear together with no space, e.g. ("AB"), however, if TeX feels it needs a linebreak or to split these across two pages, this is ...
13
votes
5answers
6k views

Why do hyphenated words cause margin violations (and how can I prevent it)?

Sometimes my text goes past the right margin when there is a hyphenated word involved in the sentence. For example, in the figure below, the line that contains "inter-member" extends further right ...
1
vote
1answer
224 views

Using package listings with sciposter

Could you please provide a working example in which a source code delimited by listings environment word wraps its lines, without breaking the column layout of sciposter? Whenever I put a long line ...
13
votes
1answer
520 views

Error with table

\begin{table}[ht] \makebox[\textwidth][c]{ \begin{tabular}{ccccc} \hline \hline [] & [] & [] & [] & []\\ [] & [] & [] & [] & []\\ ...
5
votes
1answer
581 views

Linebreak after section number in memoir toc?

I'm trying to finish my thesis and have received a bunch of formatting corrections that I need to do, one of which I'm beating myself senseless trying to figure out. I have to make the chapter ...
5
votes
2answers
2k views

Badbox with Bibtex, how to fix it?

The problem: How to fix bad boxes done by bibtex? Latex copy and paste bibtex formatted entries to the text, but these entries exceed the correct space. Details: I using main.tex with this header: ...
28
votes
4answers
16k views

Include a line break in algorithmic while maintaining indentation

I have this code: \DeclareCaptionFormat{algor}{% \hrulefill\par\offinterlineskip\vskip1pt% \textbf{#1#2}#3\offinterlineskip\hrulefill} ...
5
votes
0answers
503 views

tocloft recipe to simulate the titlecontents* behaviour of titletoc [closed]

I can't use titletoc, since there are incompatibilities between this package and others that I am using. However, tocloft works fine. I would like to simulate the \titlecontents* effect using ...
0
votes
1answer
380 views

Begin document with blank lines [duplicate]

Possible Duplicate: Start off a page by adding vertical space I'm entirely new to LaTex, but I've been googling for a while and haven't found out how to do the following: How can I start a ...
19
votes
3answers
13k views

Automatic line breaking of long lines of text?

Here, it is just a example. I have a line: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa Now, I want to let LaTeX automatically ...
15
votes
3answers
3k views

How to deal with very long lines that do not contain spaces?

I have a problem with a lstlisting environment. I want to use it for displaying several very long lines that can not be reformatted. Independently of the option breakatwhitespace=true or false my ...
2
votes
2answers
940 views

How to linebreak part ToC entries using tocloft/titletoc and the book class

I'm currently writing a LaTeX document in the book documentclass. In my ToC I want the actual titles of certain entries (parts in my case) to come in a newline after a generic name of the section-type ...
1
vote
2answers
284 views

How to create newlines?

I am new to Latex and found out how to use it a bit. Newlines are created by \\ I get the following error: \\ can only appear in a matrix or array How do you create newlines between matrix or ...
9
votes
2answers
1k views

Avoid line break between em-dash and the next word

I'm writing a text in Spanish, and I have a phrase wrote between em-dashes (that work like parentheses). The problem is that if the "opening" em-dash is too near the end of the line, then it may ...
0
votes
3answers
5k views

Why gap + indent after \\ and [return]

I'm using TeXLive (pdftex) with TexShop on my Mac and usually, I don't format my .tex files. Now that I have to write some bigger ones, the code soon gets too messy to read and I tried to insert some ...
31
votes
2answers
57k views

New line after paragraph? [duplicate]

Possible Duplicate: paragraph style - how to force line break? \paragraph{} \\ - make paragraph a header? I have the following problem. I have a paragraph and only after this single ...
8
votes
1answer
4k views

Automatic line breaking for two-column text

I am using the following document class: \documentclass[twocolumn]{svjour3} Unfortunately, the two columns of output text just look horrible as they are not properly aligned on the right-hand side ...
4
votes
1answer
758 views

How can I create my own listings style/format?

I'm trying to format some SQL statements using the listings package. It looks OK for small statements but the long ones look bad. select * from Customers where C_nID=10; to select * from customers ...
3
votes
1answer
666 views

Line breaking words with apostrophe gets overflows

I'm using this Latex document class (that's the class used for the CHI/TEI conferences) and I'm facing a strange problem with automatic newlines with words having apostrophes: in Italian we are used ...
12
votes
2answers
3k 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 ...
9
votes
2answers
5k views

Line breaks in subfig

I'm trying to put some text in a subfloat using the subfig package. (It's supposed to be part of the figure, not the caption.) I can't figure out how to add a line break. When I try this code: ...
7
votes
1answer
2k views

Table of contents (minitoc, parttoc) and line breaks

I have to make a table of contents for each part of a book document. I use minitoc package, and \parttoc command. I have line breaks (\\) in the chapters and sections titles in both [] and {} ...
7
votes
1answer
23k views

New line in math mode and indent this line

How can I have a indented new line in math mode? The line after \newindentedline should be indented and start in a new line. \[ X \subset Y \Rightarrow \forall x \in X: x \in Y \newindentedline ...
8
votes
1answer
5k views

Newline within underbrace in math environment [duplicate]

Possible Duplicate: How can I force a line break within \text{…}? In the MWE below, is it possible to force a line break in the text under the Z so that the overall equation is more ...
10
votes
2answers
3k views

Force line break inside a \lim argument in align environment

Inside an align environment I have a \lim with two variables which should be displayed in two lines: \begin{align} ... f & = \lim _ {a \rightarrow -\infty \linebreak b \rightarrow \infty} ... \\ ...
2
votes
1answer
552 views

Use of marginpar: problems with Underfull \hbox

I'm using the latex commnad \marginpar{}, however for some reason I get the warning: Underfull \hbox <badness 10000> in paragraph ... each time I create a comment on the margin. Is there ...
6
votes
1answer
1k views

How to remove the extra line?

I use this command to show the headword in dictionary. \newcommand{\entry}[2]{\hangpara{2em}{1}\textsf{\textbf{#1}}\ #2 \markboth{#1}{#1}\par}\nopagebreak[4] When the headword is exactly as long as ...
1
vote
0answers
122 views

How to prevent contents of verbatim text from running off the page? [duplicate]

Possible Duplicate: Verbatim environment that can break too long lines? How to prevent contents of verbatim text from running off the page? \documentclass[12pt,a4paper]{article} ...
8
votes
2answers
2k views

Section titles, hyphenation, manual line breaks - and how to avoid them

I have several section titles in my document that are getting hyphenated, which is quite ugly. I am now looking for some way to avoid the hyphenation, which is is somewhat related to this question, ...