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

learn more… | top users | synonyms (1)

1
vote
1answer
13 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} ...
1
vote
2answers
46 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
18k 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
23 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 ...
3
votes
0answers
83 views

Which algorithms does (La)TeX use? [on hold]

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
21 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, ...
0
votes
1answer
48 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
42 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)} & ...
38
votes
4answers
53k 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
48 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} ...
2
votes
1answer
39 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
9k 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
45 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 ...
0
votes
0answers
26 views

Bibliography not aligned properly

Using the lines \begingroup \let\clearpage\relax \printbibliography \endgroup within my .tex document in combination with a .bib file created by Mendeley as well as the command biber ...
4
votes
2answers
95 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 ...
0
votes
0answers
48 views

Is there away to force linebreaking at all costs?

I try to force linebreaks at all costs. I am not looking for an answer that tells me it is a good things that Latex lets you manually fix this. I have a script that produces pdf files via latex that ...
6
votes
1answer
175 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 ...
3
votes
2answers
36 views

formating lines in the paragraphs

I'm writing report in latex .But my document appear with not good style all lines in paragraphs not in same length >How to get that ? edit: \documentclass{book} \begin{document} \pagestyle{empty} ...
26
votes
2answers
16k 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 ...
1
vote
1answer
35 views

issue with newline

i would like to return to a new line but it shows me this error : ! LaTeX Error: There's no line here to end. \begin{center} {\huge {\fontfamily{pzc}\selectfont } Introduction générale } ...
0
votes
2answers
28 views

Vertically centered text in tabularx (again)?

I have seen Table with 100 % width and vertical / horizontal alignment, Vertically center text in tabularx table, Vertical alignment in tabularx X column type - and I'm trying what they suggest, but ...
1
vote
1answer
30 views

linebreak in bibliography with url and date

I have an issue with urls and urldate. The line is a little bit too long for one line, but I have no idea how to fix a manual linebreak in urldate. I've had a look into the bbl-file, but the ...
8
votes
5answers
4k views

How can I force long chapter names (including page numbers) to stay in the margins on the table of contents?

I'm somewhat new to LaTeX and have been tasked with satisfying some strict formatting requirements for this LaTeX document using a custom class. Currently, if there is a long chapter name (within a ...
6
votes
1answer
5k views

URLs in bibliography: LaTeX not breaking line as expected

I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document. I have seen a number of questions about breaking URLs in bibliography, but after trying ...
16
votes
6answers
29k views

LaTeX equivalent of <br><br><br> in HTML?

In HTML, all I would have to do is: This is line one <br>.<br>.<br> This is line two to get the following output: This is line one . . This is line two I've been playing around ...
3
votes
0answers
30 views

linebreaking of name-year citation style in arxiv version

I was trying to submit a manuscript to the arXiv using the imsart package: see here. I am using the name-year citation style, and it works well in my own tex compiler. However the version that the ...
1
vote
1answer
27 views

Large Brackets Make Line Breaks too Small

\documentclass[10pt,letterpaper]{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{parskip} ...
3
votes
2answers
41 views

Aligning multiple lines in long equations and arranging the line breaks in `\align` environment

I have the following code sample: \begin{align} \pi^{(1)}_{i j} \enspace & = \enspace -\frac{1}{4}\eta^{\lambda \sigma} \left( \eta^{\mu \alpha}\eta^{\nu \beta} + \eta^{\mu \beta}\eta^{\nu ...
2
votes
1answer
19 views

In Longtable, In multirow greater than \textwidth

MWE \documentclass[a4paper,12pt]{book} \usepackage[left=1.5cm,right=1cm,top=3cm,bottom=1.5cm,marginparwidth=5.5cm,marginparsep=1cm,outer=8cm]{geometry} \usepackage{array} \usepackage{longtable} ...
1
vote
1answer
40 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} ...
1
vote
1answer
64 views

Integral domain on two lines [duplicate]

Consider the following integral: $$\int_{\text{One line \\ Second line}} \text{Loss}\left(\text{Foo, Bar} \vert \alpha\right)$$ which renders: How can I have One line and Second line on two ...
14
votes
1answer
550 views

What is the meaning of \fussy, \sloppy, \emergencystretch, \tolerance, \hbadness?

There are many way to influence line breaking, and avoiding overfulls on long unbreakable pieces of text. I'm puzzled. We are told that using \sloppy document-wide is not good , that an alternative ...
1
vote
1answer
64 views

Automatic fallback from \fussy to \sloppy

If I activate \sloppy document-wide, will the paragraphs that render well with \fussy be affected? If answer to the above is yes, is it possible to have \fussy by default, but automatically enforce ...
2
votes
1answer
56 views

New line avoiding errors and following WYSIWYM philosophy

I understand that using \\ is not a good idea. It's better to use just the "enter" key or the \par command. Anyway, I don't like what I get. I would like to have a blank line between two pieces of ...
68
votes
5answers
157k 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 ...
0
votes
0answers
48 views

New line, line breaking, `\\`: a definitive answer [duplicate]

In most basic courses of latex, they say that to separate two block of texts, you need to use \\ at the end of the first one. Anyway, this seems to be a bad practice according to lot of people (see ...
0
votes
0answers
28 views

What is the difference between \\, \par, and blank line [duplicate]

Checking today this topic, they talk about the difference between \\, \par, and even a new line. And that people does not know the difference. And indeed, I don't know it. Can you enlight me? And ...
2
votes
1answer
54 views

How to make listings package break TeX code only after control sequences?

Package listings always likes to break TeX code after backslashes. How to make it always break before backslashes? \documentclass{article} \usepackage{listings} \begin{document} ...
1
vote
3answers
83 views

How to force a newline

I want to have a new line after a bold written text. Sadly the following LaTeX code does not work (this is my original section): \section{Analyse des Firefox-Source-Code} Der Source Code von Firefox ...
2
votes
1answer
56 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 ...
5
votes
2answers
56 views

Breaking inline math within longtable or tabular

So, I've got the following code: \documentclass{memoir} \usepackage{longtable} \begin{document} \begin{longtable}{p{0.4in}cp{2.75in}p{1.8in}} Symbol & Unit & Describes & Equivalent ...
0
votes
2answers
41 views

List of values does not fit line

Have a look at the code below. The list of values for \alpha and \beta are too long to fit one line and the last values of each list disapears. Therefore I want them to break as soon as the edge of ...
3
votes
1answer
97 views

New line size. What can I do?

I'm writing my Ph.D. thesis and I'm using a format that a colleague of mine gave me. I noticed a strange situation: there are all around blocks of text that I separate with \\ only. Anyway, on pdf ...
2
votes
0answers
61 views

R-code linebreaks AND themes in knitr

hpesoj626 provides two great minimal working examples for how to get R-code linebreaks AND code highlighting in knitr. I was wondering if it was possible to use Yihui's knitr themes within either of ...
2
votes
1answer
44 views

Colorful prebreak and postbreak tokens with listings package

I want to get colorful prebreak and postbreak tokens with listings package, but the following code doesn't work: \documentclass{article} \usepackage{xcolor,listings} \begin{document} ...
14
votes
4answers
2k views

Splitting root symbol

How can the \sqrt command be modified to split root symbol into two or more lines automatically? Example: \documentclass{standalone} \begin{document} \begin{minipage}[t]{0.8\textwidth} ...
19
votes
6answers
3k views

Is it possible to skip the first line in a theorem environment?

I'm currently writing up some solutions, and I like to rewrite the problem before answering it. I've set exercise to be a theorem environment, and the code I'm using is \begin{exercise} ...