{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
1answer
1k views

Background color in inline code listings with linebreak

I want to highlight code inline with a gray background. Preferably with listings. This question is related to Colored background in inline listings. But as my MWE shows it doesn't work with line ...
4
votes
1answer
707 views

correct the hyphenation

How to correct the hyphenation in my paper that is entirely wrong? For example, in my paper, there are wrong hyphenations like result-s, s-mall, s-pace, etc. How can I fix this problem. I don't use ...
28
votes
2answers
18k views

No hyphen for a word

I want to put pdflatex to not put a hyphen in a word went it comes to the end of the line. I tried to put a \- in the beginning or the end of that word but it doesn't work. For example if I put:This ...
6
votes
3answers
5k 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 ...
23
votes
2answers
554 views

What is “\\” called?

I’ve seen it take arguments, and apparently there’s a starred version, but I can’t find any documentation because it is ungooglable!
2
votes
1answer
186 views

Listings not breaking up

I have a code listing as shown in the picture (number 4) that goes a bit out of the margin although breaklines=true. When I try to break new line it gives me an error Listings Error: lstinline ended ...
2
votes
1answer
189 views

Listings package does not break with mwrep document class

I cannot get listings package to break lines with any of the methods described in previous questions: Listings package does not break, ...
7
votes
1answer
481 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 ...
7
votes
3answers
1k views

Automatic linebreak on specific character

Based on my old question Push long words in a new line, I search for a possibility to allow linebreak on specific character. For example in my case I want to break on "_" (underscore). ...
7
votes
1answer
1k views

Implicit newline at the end of each paragraph?

In certain styles of text I define \parindent 0pt in the preamble and write the text in this manner: paragraph 1\\ paragraph 2\\ and so forth. I wonder if there is anything I can include in the ...
2
votes
1answer
801 views

Quote exceeding quote right margins

I have a quote that displays long chains of words, such as hippopotamus/hippo The quote environment does not break words, so I have text exceeding the right margin of the quote. How can I ...
18
votes
1answer
934 views

Best choice between using \\ or leaving space after each paragraph to end the paragraph

Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a ...
7
votes
3answers
1k views

Alternative to \substack{} for a related purpose

I would like to write something like the following, but involves mathematical symbols: I tried using the \substack{} but it makes the font smaller. I'd like a novel alternative to achieve this. ...
5
votes
1answer
449 views

Linebreaks in KOMA-script captions

Using the captions package, linebreaks can be incorporated into figure-captions easily: \documentclass[12pt]{book} \usepackage{graphicx} \usepackage{caption} \begin{document} \begin{figure}[htbp] ...
4
votes
1answer
2k 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? ...
17
votes
2answers
284 views

Could TeX typeset note text between two lines of the body?

How to typsetting the note text like There is body blahblah blahblah I need a note here and then blah blah The note about word blahblah blahblah ...
10
votes
1answer
3k views

Listings package does not break

The following code does not break even though the breaklines and breakatwhitespace is set: \lstset{ language=XML, numbers=left, numberstyle=\tiny\color{gray}, stepnumber=1, ...
12
votes
3answers
1k views

No indentation after empty line

Indentation can be selectively suppressed using \noindent or completely with the option parindent=full to the KOMA document classes. Books (fiction) are usually structured using paragraphs, indented ...
3
votes
1answer
163 views

Line breaking and floating

I have a matrix and I want to show some lines of text floating right to the matrix. The problem is that the following code shows two lines of text without executing \\ break-line. \[ M = \left( ...
6
votes
1answer
708 views

Command \obeylines in a macro

I need to collect data (a sequence of input strings) in the preamble of a document, but the strings are to be typeset later in the document and must obey the line breaks set when typing the strings at ...
7
votes
1answer
1k views

Avoid line breaks after \lstinline

I'm writing a computer science paper with LaTeX and have a lot of inline code. Now, when this code is followed by a comma and is at the end of line, the line break is inserted before the comma, which ...
5
votes
2answers
589 views

Text created with a \newcommand overflows into margin (not xspace question)

I am aware of the use of xspace to handle the space after a macro in different situations. However, it seems that I cannot avoid having my text created with a \newcommand from running into the ...
9
votes
2answers
2k views

Mutliple inputs with line breaking

I am trying to write an algorithm with multiple inputs in algorithm2e. The result I would like to have is something like Algorithm ------------------- Input: Input number 1 Input number 2 ...
6
votes
1answer
3k views

Breaking an array of equations

I wanted to break long equations in an array environment. To do this, I used dmath environment from breqn package but it did not work. How can I write long equations in an array environment with line ...
17
votes
1answer
32k views

Inserting a specific number of blank lines

I'm new to LaTeX and trying to format my Honors Thesis, which has very specific formatting rules to prepare the manuscript for publication. For instance, on the Abstract page, I am required to place 3 ...
5
votes
1answer
3k views

Newline in \multirow environment

One element of a multirow column is long. How can I split it so that it spans over multiple line. The following code \documentclass{article} \usepackage{multirow,array} \usepackage{booktabs} ...
2
votes
1answer
648 views

split a \xrightarrow into two lines

I'm using the command \xrightarrow{}[] in a two column document. The problem is that the string above the arrow is too long and the arrow ends outside the column. Is there a way to "split" the arrow ...
0
votes
2answers
2k views

New line instead of word-breaking [duplicate]

Possible Duplicate: Prevent hyphenation and use line break in block of text When some word at the end of sentence does not fit in the line - I would like it to be moved to the new line, and ...
9
votes
2answers
559 views

Overfull \hbox from printindex

I've got a index generated with makeindex but when compiling the file again, when the index is generated, I get a bunch of overfull \hbox. This is an example of an index that results in overfull: ...
3
votes
1answer
350 views

Mhchem overfull boxes

I am using the mhchem package in-line and the equations don't break lines and thus cause overfull boxes. Any way to force them to follow the rules for line breaks. i.e. the following sentence: ...
1
vote
2answers
2k views

How to force a linebreak in itemization?

I have a proposition which consists of two itemized bullets. I want both to be displayed in an offset way, but the first one keeps getting displayed as a continuation of the Proposition in bold. How ...
6
votes
3answers
777 views

lualatex and line breaks after em-dashes

I’ve just installed TeX Live 2012. As mentioned elsewhere on this site, the release history explains that “the parameter \XeTeXdashbreakstate is set to 1 by default, for both xetex and xelatex. This ...
3
votes
1answer
800 views

Pseudocode overflow out of column

I am writing pseudocode using the algorithmicx package in IEEEtran class (double column). My problem is, some of the statement in the code are quite long which I expected to wrap to next line. ...
8
votes
1answer
233 views

Hyphenation on next-to-last line

On the next-to-last line of a paragraph, I have some hyphenation and on the last line, I only have the end of the word. blablabla cou- cou. New paragraph I thought the command \finalhyphendemerits ...
6
votes
3answers
5k 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 ...
3
votes
1answer
688 views

Algorithmic package for loop and comment at the same line

I want to have the following output using algorithmic package: for i = 1 : z do // number of rows x = 1 end for I use the following tex code: \begin{algorithmic} \FOR{$p=1:r$} // number of ...
1
vote
2answers
345 views

Tables environment

I have a question about breaking lines and pages in table environment. I know, there are some solutions as using longtable package, however, it is quite complicated and I don't know how to work with ...
8
votes
1answer
6k views

moderncv - newline within a cventry

The information that I want to provide isn't fitting into one line. I am working with \cventry{}{}{}{}... I want to put information into a new line, still positioned to what is in the line above. I ...
9
votes
1answer
277 views

Using discretionary linebreaks in centering environment

I am having trouble with the interaction between discretionary line breaks and centering. I have defined macros for math mode that contain discretionary line breaks to help TeX lay out inline ...
8
votes
4answers
873 views

Within a single paragraph, hang a wrapped line, but do not hang new lines

I'm writing a list, and would like the line hanging to work like this I do not want to use separate paragraphs for each item in the list, and I do not want to use the list environments; I will be ...
3
votes
1answer
343 views

Nomenclature and line breaks

I'm trying to format the nomenclature such that there is, ideally, a curly bracket around a series of items with 1 definition. If that's not possible then at least having a line break in between ...
8
votes
2answers
570 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 ...
8
votes
1answer
8k 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. ...
2
votes
2answers
277 views

Ignore badness 10000 in \ttfamily

Due to zero stretch in \ttfamily the lines get Underfull \hbox (badness 10000) often. I would like to ignore these, still being informed about other badnesses in the same paragraph. See the example: ...
7
votes
1answer
4k views

How do I manually break a line in a custom title?

I'm using my university's LaTeX class package to write my thesis, but I'm running into an issue with line breaks in the title. I'm required to break my title manually in a certain spot, but the ...
11
votes
4answers
8k views

Newlines after section headings in amsart

This latex code: \documentclass[9pt]{amsart} \begin{document} \subsubsection*{Animals} Rabbit horse monkey cow \end{document} Generates something that looks approximately like this: ...
2
votes
1answer
200 views

subsubsection description and title not separated

When I have \subsubsection{sub sub section} Some Contents and some description for it. I cannot distinguish between the title and description as they appear in the same line. For instance if I do: ...
3
votes
1answer
90 views

Long lines don't wrap when characters are input by number

Why doesn't the following long line wrap and how to force it to? \documentclass[a4paper]{article} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{arabic} ...
2
votes
2answers
715 views

enumitem nextline style: nested item shouldn't start on description label's line

I use enumitem description style nextline to emulate a sort of TOC entry with the following code: \documentclass{article} \usepackage{enumitem} \newenvironment{DLdescription}[1][*]{% ...
1
vote
1answer
483 views

How to break this function up between multiple lines?

I need to split the equation $$f(x)=\bigg(\prod_{i=1}^n((y(\lceil\frac{i-1}{i}\rceil)+1|(\lceil\frac{i-1}{i}\rceil)-1|) ...