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

learn more… | top users | synonyms (1)

2
votes
1answer
2k views

How to break lines in conditions using algorithm2e?

I am trying to (partially) reproduce the algorithm displayed in Figure 4 from NetFlow: Information Loss or Win? My problem is with the multi-line conditions present in the "IFs". I want them to be ...
6
votes
1answer
491 views

Insert a linebreak only if there was none before

I am looking for a way to tell TeX: Please break that line if and only if you are not on new line already. I need this for a new environment which should always start in a new line. But I don't ...
2
votes
1answer
139 views

Prevent underful hbox in custom environment

I created an environment for a thesis about a framework, which formats documentation of some methods. The method(s) are at the top with one line per method, set with \lstinline from the listings ...
8
votes
3answers
8k views

How to wrap a word in line without hyphen?

I m writing one article in which i need to write a paragraph full of medical terms. How can i wrap a text in a line without using line break (or hyphen)? Regards
8
votes
1answer
1k views

How to get XeLaTeX do proper hyphenation and full justification?

I want to use XeLaTeX to design a paperback (11x19cm) using Adobe's Garamond and Myriad as custom fonts. It is entirely written in German. However, both hyphenation and full justification are a mess: ...
3
votes
1answer
2k 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 ...
3
votes
1answer
264 views

The statement of a theorem appearing on a new line

I'm using the amsthm package. The statement of the theorem currently appears immediately after the words "Theorem X." I'd like the statement of the theorem to appear on a new line. Is this possible?
1
vote
1answer
321 views

Problem with sizing side-by-side minipages

I've been writing up my resume in LaTeX (for the flashiness and also to get better with LaTeX), and I've been having some trouble with one of the macros I wrote, called \nrccolstring. \nrccolstring ...
4
votes
1answer
212 views

Creating an enumerate-description style environment

I've been trying to create a list environment to produce something that does the following: It has a counter (like the enumerate environment). The first line of each item is an overview of the item ...
8
votes
1answer
2k views

Automatically prevent line-break at hyphen of specific words (e.g. “dual-self”)

Usually questions about hyphenation and line-breaks are concerned about how to allow hyphenation when a word already contains a hyphen. That's not what I'm after: I would like to prevent the word ...
3
votes
0answers
599 views

Problem with Table of Contents chapter line breaking [closed]

I am working with the book document class. Concerning the table of contents, is there any way to break the chapter title as you like? For example, instead of e.g. How to effectively feed swiss ...
5
votes
1answer
794 views

Line breaks in listings with long lines

This is a follow-up question to Line breaks in listings My MWE with a very long line demonstrate the problem: \documentclass{report} \usepackage{listings} \lstdefinelanguage{text}{} ...
5
votes
1answer
151 views

Overfull hbox with British English

I write in British English and occasionally I get an overfull hbox warning because LaTeX does not know how to break a word correctly in its British form. For example, the word 'analysing' causes an ...
9
votes
3answers
3k views

How can I make a pair of words stick together in line breaks?

How can I make a pair of words stick together in line breaks? For example, "MS Access". I don't want a line break in the middle. But, I'd like to set this up once, not at every occurrence of that ...
9
votes
2answers
761 views

Automatically line breaking text, or extending arrows in tikz

Is it possible to automatically make the text line break so that it does not overflow into the nodes? An alternative is to have the nodes automatically moved farther away to accommodate the longer ...
3
votes
2answers
399 views

line break in tabular

I try to set a line break within a tabular environment where the column is not definded with p{$width}. I've tried the following without the expected result \documentclass{article} \begin{document} ...
2
votes
2answers
1k views

Multiline listing within multicolumn row

I have a problem putting a listing (using lstlisting package) within a table. The problem is that I want to put a multiline listing in a row taking 2 columns. The following minimal example shows ...
0
votes
1answer
190 views

How to wrap text in table with delimiter?

I have one long text in a column of table. I want to wrap this it into a cell by using delimiter "/". How can I do it in longtable? ABCDEFGHIJ/DATSET Format: ABCDEFGHIJ DATSET
4
votes
3answers
391 views

How are space tokens and empty lines processed by long commands (as their potential arguments)?

How are spaces and empty lines processed by long commands (i.e., those that do not accept paragraph breaks inside)? Are there different space tokens aside from " " and an empty line? It appears that ...
5
votes
2answers
225 views

Disable chapter separation in \listoffigures and \listoftables

I use \listoffigures and \listoftables. Both commands create line breaks for items from different chapters. How can you stop that? Screenshot:
3
votes
0answers
386 views

Sudden “Overfull \hbox” warning messages [closed]

(Apologies if this is a duplicate; I didn't see my question among the many overfull \hbox questions already asked.) My TeX file had been typsetting without any problems for a few days, when suddenly ...
4
votes
2answers
4k views

Over citation in Springer template with pdflatex

I'm writing a paper for a Springer journal. So I downloaded the LaTeX template. http://www.springer.com/cda/content/document/cda_downloaddocument/LaTeX.zip The problem is that multiple citations ...
25
votes
4answers
833 views

unexpected interaction between \raggedright and \parshape

While answering Random start of line, I came upon a strange interaction between \raggedright and \parshape. If a ragged-right paragraph ends in a short line, this line will be "the most ragged". ...
8
votes
1answer
297 views

Line breaks in listings

Is there a way like wrap the line after at most 60 letters but it should not break inside some commands like listings does? Example: \documentclass[a5paper]{article} \usepackage[T1]{fontenc} ...
2
votes
1answer
1k views

llncs and caption - underfull hbox

I'm using the llncs document class and try to get two figures side-by-side. I found a solution, but I get a hbox underflow if my captions have a bad length. Here is a minimal example: ...
2
votes
1answer
248 views

\lstinline break at punctuation

I need listing package (\usepackage{listing}) to break at punctuation namespace::subnamespace::class ^ ^ at either these two locations
3
votes
1answer
94 views

How can I make an em-dash to allow for a linebreak on either side?

How can I make an em-dash allow a linebreak on either side? Optionally, how do I preserve the hyphenation points of the word on both sides? The following code allows for refrigerator---refrigerator ...
1
vote
1answer
1k views

Big Table with line and pagebreaks

For a technical documentation (two columns: function name left, description right) I need a way for automatic line and page breaks in a table environment in case the descriptions get a bit longer. I ...
3
votes
1answer
602 views

How to remove newline character after case statement in algorithm2e?

I don't want any newline character after case statement. How can I do that? This is my code: \begin{algorithm}[t] \SetInd{0.5em}{0.5em} \KwIn{Data $\mathsf{D}$} \KwOut{List of Simple Hints} ...
4
votes
2answers
2k views

Line break (continuation) for commands (options, arguments)

How to do proper line breaking (continuation) for commands, i.e. their options and/or their arguments? For example, in order to transform this: \usepackage[top=1.0cm, bottom=1.0cm, left=1.0cm, ...
6
votes
2answers
191 views

How can I get a very wide table to wrap all three rows within the margins?

I have a series of tables that are going to be very (very!) wide, but with only 3 rows. Is there any way I can get the tables to wrap within my margins, without having to break the rows within the ...
2
votes
1answer
822 views

Problem using enumerate environment in a proof newenvironment definition

I want to define a simple environment to enclose my proofs, actually I just wanted to put a little square right at the end. So, I made this new environment definition: \newenvironment{Proof}{ ...
5
votes
2answers
854 views

How to avoid bad boxes in the index?

I'm currently writing a larger document, which will also contain an index. Unfortunetely, the index produces a lot of bad boxes. Plase find a small example at the bottom. My simple (but hopefully not ...
11
votes
1answer
1k views

How to wrap the 90 degrees rotated text in a table cell

in Microsoft word I have a table which has the following structure. Now, I need to make a similar table in LaTex to submit a publication, I tried with the following code, ...
3
votes
1answer
721 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 ...
13
votes
3answers
1k 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 ...
1
vote
1answer
530 views

Newline in adjustbox caption

Is it possible to have a paragraph break or a newline in the caption of an adjustbox? \\ \newline and \tabularnewline don't seem to work. Thanks \documentclass{article} \usepackage{adjustbox} ...
4
votes
1answer
190 views

Several nameref and page margins

I've been struggling with nameref for some time now. I am trying to make them respect the available space there is on a line, but I can't seem to find how. The LaTeX code is the following: ...
5
votes
1answer
1k views

About autoindent and postbreak in the package listings [closed]

I am using the package listings to show my Matlab code. The code was pre-typed in a file and everything will be loaded from the file and a .tex file will be generated automatically to show the code ...
3
votes
2answers
3k views

Shorthand for empty line or \\ \indent

This page says that \\ starts a new paragraph. However, it does not end up looking the same as inserting an empty line in my source code (which I have always used to define paragraphs), which also ...
7
votes
1answer
183 views

Automatic line breaking of camel case within \url

I would like to break camel case text that is handed to the \url{} macro of url.sty. The solution here does not work for text in captions, so it seems, ans in particular does not work for \url{}. Is ...
4
votes
1answer
1k views

How to prevent breaklines inside \cvcomputer in moderncv

I'm writing my CV in Latex using the package moderncv and I've realized that the default behavior of the \cvcomputer command is to insert automatic breaklines inside the text, making it about as long ...
5
votes
1answer
622 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 ...
7
votes
1answer
2k views

Enforce a line-break inside \lstinline

I use \lstinline{foo} from the listings package to set pieces of code in regular text. To get automatic line-breaks I use the following options: \lstset{ breaklines=true, breakatwhitespace=true, ...
2
votes
1answer
530 views

Table column fixed width does not fire

I have the springer svjour3 template and the user guide says that for tables the usual Latex 2e commands are used. Now, I would like to produce a table that goes over the whole page (the error is the ...
9
votes
2answers
847 views

New line for footnote without blank space

Writing texts I found it visually more appealing to type footnotes in a new line, because it enhances the readability of the document. The problem is that it leads to a blank character in the output. ...
2
votes
1answer
237 views

Line break after header of theorem environment followed by multicols body causes header-body overlap

I use TeXLive 2011. I use ntheorem and multicol. In a theorem environment, I want the theorem header to be separated from the body by a line break such that the multicols-environment get's that and ...
4
votes
1answer
186 views

Can LuaTeX do something to alter linebreaks inside math inline automatically?

This is kind of a follow up to this question. Consider the sample code: \documentclass{minimal} \begin{document} A text with an inline equation which is broken in to two parts but is not wanted right ...
32
votes
2answers
7k 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 ...
3
votes
1answer
3k views

New line after subsubsection with llncs class

I get a new line after each chapter, section, and subsection, but not after anything lower than subsection, e.g. subsubsection or paragraph. MWE: \documentclass[runningheads]{llncs} ...