{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
0answers
13 views

sagetex with breqn ? break line sagetex equations

When using sagetex, it often produces very long equations that are not visible anymore because they go over the page width. How to fix that? I could work around it by loading the .sagetex.sage into ...
0
votes
0answers
32 views

Figure + caption + vertical margins that corresponds to multiple of line

In a two columns document I typeset dictionary entries, including photos placed either bellow the entry or at the top of the page (max 1 photo per column). In case in each column of the page there is ...
2
votes
1answer
26 views

Centering two line caption in memoir

I'm struggling to center my two line captions. I'm using memoir and I want the second line to be the reference to where I got the figure from. I'm using the following code for the figure: ...
1
vote
1answer
50 views

Underline long url and linebreak

I have a long url which I want to appear blue and underlined. Furthermore it must linebreak if the url is to long for a single line. \documentclass[a4paper,10pt]{article} ...
0
votes
0answers
12 views

seqsplit error: \SQSPL@scani has an extra }

I created some commands to allow me to easily handle Japanese text in Latex. Recently I added seqsplit to automatically break lines, as Japanese text is handled as a single word due to the lack of ...
2
votes
1answer
80 views

How can I reduce the width of a table?

I'd like to put this table in a page: \begin{table}[h] \begin{tabular}{ccccccccc} \hline \textbf{No.} & \textbf{Author (year)} & ...
2
votes
2answers
41 views

Center in a table if the result has at maximum two lines, otherwise try harder to squeze it on two lines (and then maybe center)

This has the second cell span over three lines: \documentclass[12pt,landscape,a4paper]{article} \usepackage{microtype} \usepackage{multirow} \usepackage[T1]{fontenc} \usepackage{lmodern} ...
3
votes
3answers
68 views

No newline before scientific units without using “~”

Is it possible to define a list of units (like ml, °C, nmol, eq., etc.) and forbid latex to insert a newline before those? I know it is possible to use a ~ between number an unit, but the above ...
11
votes
3answers
8k views

amsthm: \newtheoremstyle, headspace, \mbox{}, and lists

Q: How do I define a newtheoremstyle which will start the theorem text on a newline after the header even when the theorem text starts with a list, e.g., enumerate? If there's no way of doing this, ...
71
votes
5answers
164k views

How to break a long equation?

I have a long equation but long enough to occupy two lines. I want to break it to improve readability. How can I break it? \begin{equation} F = \{F_{x} \in F_{c} : (|S| > |C|) \cap (minPixels ...
1
vote
2answers
98 views

Redefining \section command

I'm writing a draft of my notes with Latex. They are basically definitions related to a particular concept from different sources. Therefore I have used the command \section to highlight the concept ...
2
votes
2answers
67 views

New line after reaching margins

I wonder if there is a way to tell to WinEdt (or TexStudio) to start a new line when a word reaches the margins of a document. The reason is that I don't like to have long expressions and I don't ...
5
votes
3answers
3k views

Automatic line-breaks in tables?

I'm writing a short tabular CV that I have to add to my thesis. I thought a quick way would be to use a table for that purpose: \begin{tabular}{ll} 2009-present & very long text 1, very ...
0
votes
1answer
29 views

How to force long lines to automatically split into several to fit on the page? [duplicate]

Intro I have a list of elements in a tabular, where some elements of the last (3rd) column sometimes are long enough to overpass the width of the page. It is quite boring to have to go line by line ...
7
votes
1answer
603 views

Listings - break on whitespace+

I'm using listings for the first time, and have some rather long lines of code. I get that I can break lines automatically with breaklines=true, and I can break only on whitespace with ...
0
votes
1answer
53 views

unbold title and no line break for a subsection

How can we unbold the title of a subsection and suppress the line break, like it was done in the following image? The answers in the duplicate deal with how to do that for all the subsection. I want ...
2
votes
1answer
69 views

How to deal with many overfull \hboxes in large document?

I am in the process of proofreading a major XeTeX document of more than 600 pages. It is hardly surprising that there are quite a few cases of overfull \hboxes; I usually get about 150 of them. I am ...
9
votes
2answers
2k views

Avoid putting statements on the same line with algorithmicx

I'm writing a simple pseudocode, but I have a problem with a repeat..until block. Basically what happens is that the return statement that follows the end of this loop gets rendered on the same line ...
2
votes
2answers
61 views

Automatic wrapping of displayed long formula (e.g., with the same algorithm used for inlined formulae)

Typographers warn against automatic wrapping of long formulae; however, there are cases in which this makes sense. Here is one: \documentclass[twocolumn]{article} \usepackage{lipsum,framed,amsmath} ...
13
votes
5answers
18k 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 ...
2
votes
0answers
39 views

Proper way of line breaking [duplicate]

I know 2 options to break the line. Option 1: Abcdef\\ Ghijkl Result: Abcdef Ghijkl Option 2: Abcdef Ghijkl Result: Abcdef Ghijkl Are there any rules when to use which? PS: I'm using ...
2
votes
1answer
24 views

changing fontsize in pstricks

I'd like to create a contour diagram based off the following template \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add,pst-eucl} \psset { PointName=none, ...
8
votes
2answers
704 views

Title of beamer presentation runs outside the screen

the title does not continue on a second line but runs outside the screen Different .sty files are used but i'm not sure where the problem is located. The main .tex files is as follows ...
0
votes
2answers
23 views

Making url package customized break settings apply only to specific urls

I have an huge url consisting mostly of letters. I found Marco's answer to a url breaking question, and using \g@addto@macro{\UrlBreaks}{\UrlOrds} and \g@addto@macro{\UrlBreaks}{% ...
4
votes
2answers
40 views

Affiliations with multiple lines of information

I want to format affiliations for a paper in a certain way - so that is looks like the following I have tried the following code \title{TITLE} \author[1]{Author1} \affil[1]{School \\ University ...
2
votes
1answer
3k 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=--} ...
6
votes
1answer
179 views

Preventing line break at the start of a long name in `\lstinline`

This question has developed from How to deal with very long lstinline-phrases like long class names?. That question is about line breaking inside a \lstinline phrase. I have provided an answer which ...
58
votes
2answers
2k views

Was the Knuth-Plass line breaking output ever subjected to a blind experiment?

Have any blind trials been organized to test to which extent "the average reader" prefers paragraphs typeset by the Knuth-Plass algorithm (or more advanced variants) over those typeset using the ...
0
votes
1answer
10 views

Figure caption has line break problems when using subfig

I'm using the subfig package and I'm getting words that are broken in captions. Can anyone explain why, or how to stop it? \documentclass[11pt,a4paper, draft]{report} \usepackage{gensymb} ...
2
votes
2answers
51 views

Writing additional \section commands

My company has a Word document with lots of styles based on the basic headings. I need to create LaTeX equivalents and am struggling with how to do so because I need to do more than just redefine ...
0
votes
2answers
50 views

How can I force a new line after a subsection?

I have this code: \subsection{Definitions} \subsection{Two important results} \textbf{Proposition}. Let $(\mathbb R^{n},d)$ be a metric space and suppose $X,Y\subset \mathbb R^{n}$ are compact ...
1
vote
1answer
32 views

TeXworks adding bogus endline characters

I realise this is not exactly a TeX question, but I figured someone here might know what this is about, and in any rate, this is a question a LaTeX user might encounter. If it is not appropriate, do ...
6
votes
1answer
132 views

The LaTeX \obeylines command not working for the entire document if document contains a table

I'm using MikTeX 9.6.0.5 on windows 8.1. The following displays all the four lines in a new line, as expected: \documentclass{article} \begin{document} \begin{obeylines} This is first line. And the ...
8
votes
4answers
152 views

Paragraph break only if insufficient space to end of line

I want to write source like Lorem ipsum dolor sit amet. \smallnote{Smaller.} and have it render so that if there is enough room for a \parindent plus the start of the \smallnote (the first word, ...
2
votes
1answer
25 views

Creating a newline breaks entire page?

I'm using LuaLaTeX and I tried using a template found at: http://www.latextemplates.com/template/deedy-resume-cv However, when I try running it using Texmaker, the page splits into 2. Any idea how I ...
4
votes
2answers
580 views

How to prevent \cite at the end of the sentence start a new line with a dot

When I end a sentence like this: Here is something you should read \cite{name}. Sometimes the end of the sentence coincies with the end of a row. In this case the next line begins with the dot at ...
1
vote
1answer
30 views

Selective breaking of biblatex urls?

Based on Avoiding inelegant splits on URLs, I have this MWE: \documentclass{article} \usepackage[backend=biber]{biblatex} \usepackage{filecontents} \usepackage{trace} \usepackage{hyperref} ...
2
votes
2answers
79 views

Is it true that when using \newline to stay in horizontal mode, the information will be on the same page?

I read here that using \newline keeps horizontal mode engaged. Is it true, then, that when I opt for \newline in for example \noindent\rule{\textwidth}{\heavyrulewidth}\newline Here is some text. ...
4
votes
3answers
2k views

Why doesn't \newline work inside lstlisting?

I am new to LaTeX and am using a template provided by a friend: \subsection{P2P library} The library is implemented in C-Sharp and provides two basic facilities - maintaining a member list at every ...
35
votes
4answers
19k views

How to get long \texttt sections to break

I often format path names with \texttt which can be very long. Usually Tex will not break this text. The line will just create a hbox overflow. It looks like this: ................ ...C:\documents ...
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 ...
0
votes
2answers
28 views

Long set description

I want to define the following set whose description is too long. How do I break it into two? $L_4 =\lbrace{ w \mid w \text{ every } 1 \text{ in } w \text{ is either preceeded or followed (not ...
4
votes
0answers
93 views

Which algorithms does (La)TeX use? [closed]

People often talk about the many "typesetting wonders" (La)TeX can do because of the countless algorithms it uses. But exactly what are these typesetting algorithms? Concrete examples I have gathered ...
0
votes
0answers
29 views

Paragraph skip preserving titlesec, titletoc, table of contents, list of figures and indentation

I have hard time dealing with paragraph skip while keeping titlesec/titletoc, table of contents, list of figures and indentation the same (this is a french book). I have the following class: ...
0
votes
0answers
26 views

Aligning the equations [duplicate]

How do I align the two equations and label them? \begin{equation} \begin{split} \pd{EU}{\alpha} &= d(\theta) U'(\pi_{1}) [G_{\alpha}(\alpha, \theta, \epsilon) - \widebar{P} C_{\alpha}(\alpha, ...
38
votes
4answers
56k views

Error message: There's no line here to end

In a letter-class document that had no previous errors I am suddenly getting the error message: "There's no line here to end" \opening{text} I've used this file many times and today it starts ...
2
votes
1answer
41 views

No line break after special character for entire document

I want "GAD65(+/--)" never to be broken in my entire document. When I put \mbox{GAD65(+/--)} it works, but I don´t want to edit each single "GAD65(+/--)". Can I set this for the entire document? I ...
10
votes
2answers
10k views

Automatic line-break in tabular

I'm making a tabular and I'd like to automatically do a like break rather than going beyond the page. This is my tabular code: \begin{table}[h] \begin{tabular}{|l|l|l|} Use Case Navn: ...
3
votes
0answers
47 views

Automatic line breaking for English

I have c. 80 pages of English text that naturally contains (in)definite articles. The text is block-aligned. The problem is that the article sometimes remains in the end of line and the noun starts on ...
4
votes
2answers
121 views

Long title in table of content doesn't break properly

My table of contents doesn't seem to be handling well titles which are just a little bit too long. Here is a screenshot: As you can see some lines are breaking, but some (like the title of section ...