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

Insert indent in algorithm at line break of the same \State

I have the following code: \documentclass[12pt,a4paper,twoside]{book} \usepackage{graphicx} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm*}[t!] ...
1
vote
0answers
10 views

Preserve linebreaks in command argument

I'm using the pdfpcnotes.sty style from https://github.com/cebe/pdfpc-latex-notes and I'm currently trying to make it preserve newlines, i.e. if I write \pnote{ * Foo * Bar } I want this to ...
2
votes
1answer
234 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 ...
78
votes
6answers
34k views

How can I write multiple lines in a subscript?

Is there a way to force a line break inside a math mode text? My example: \[ \underbrace{....}_\text{Some long text that should be multiline} \] Trying \text{Some long text that\\ should be ...
4
votes
1answer
197 views

breaking lines in listings environment

I am trying to make listing environment brake lines. Unfortunately breaklines=true does not work for me. Here is my code: \usepackage{listings} \begin{document} ...
3
votes
2answers
23 views

When line breaking goes wrong: does \hfuzz influence \emergencystretch

I read the excellent reply by David Carlisle on a line breaking question. However, one question remained open for me. Carlisle wrote: \hfuzz does not affect the typesetting in any way but just ...
2
votes
1answer
25 views

background package - Using text with line breaks

I'm designing a very simple cover for a university publication in Sanskrit. I'm using the package "background" to add some "watermark-like" Sanskrit text on the cover, both top and bottom, while the ...
1
vote
2answers
28 views

Line breaks inside commands

Is there a way to have line breaks inside commands that don't accept line breaks. For example, \documentclass{article} \begin{document} \mbox{line 1\\line 2} \end{document}
4
votes
3answers
100 views

Line breaking in multiple cases mathematical expression

How can I align this part of my paper: \subsection{Decision variables} \noindent$y_{pij}^{mk}=\left\{\begin{array}{ll} 1, & \;\;\; \hbox{ If the robot loads or uloades a part to/from machine $m$ ...
4
votes
1answer
145 views

Line Breaking Question with Polyglossia

I am working with multiple languages (with polyglossia and XeLaTeX), and I am having issues with extra line breaks where I don't expect them, also likely related to an issue of not hyphenating where ...
2
votes
1answer
57 views

linebreak in long URL? Breakurl won't break it

There are several questions on this site (for example here and here) where people are struggling with overfill hboxes when making clickable URLs. I have read and tried the answers there and none of ...
5
votes
4answers
9k views

How to center table caption that includes a newline

My table caption spans more than on line so I added a \newline to split the caption at an appropriate position. Now, the two lines are left aligned. How do I center the two lines of the caption? ...
4
votes
3answers
1k views

break an long line in an algorithm

I have a long line in an algorithm and want to break it into two lines. For similar case in equations, split can be used. How do I do this within an algorithm? \documentclass{article} ...
1
vote
0answers
17 views

How do I minimize tabulary width, contingent on minimizing height or lines per row?

I frequently find that I want to make a table with final column (typically out of 3-5) that will automatically break over multiple lines. So I use \begin{tabulary}{\linewidth}{llL} [...] ...
3
votes
3answers
76 views

Long definition with braces

I know, maybe this topic is duplicate but I didn't find the correct answer. \begin{align*} \Theta(g(n)) = \left{f(n)|\>\> \text{existují}\>\> c_1 >0, c_2 > 0 \>\> ...
2
votes
1answer
24 views

Breaking long formula at specific characters

I have some rather long formulas that are not equations, and I would like LaTeX to break them automatically whenever necessary, preferably at the \vee symbol. I currently use the breqn package and the ...
0
votes
0answers
15 views

long word after nonbreaking hyphen overflows

I tried the solution given here and here, however the mbox mechanic seems to lead to an overflow before the linebreak depicted below. Could the mbox command somehow be modified to not show this ...
23
votes
3answers
19k views

How to break long url in an item

I have an enumerate. In an item I have a long url. I use the package breakurl and it works fine outside the enumerate but not in the item. \usepackage[margin=3cm]{geometry} \usepackage{hyperref} ...
1
vote
1answer
25 views

How can I keep everything within a variable/macro on the same line?

I know there are various techniques to keep things on the same line. I have a two-word variable input. For example, Settings App. Let's say there are a group of apps, and I would like them always ...
2
votes
1answer
45 views

How do I get a space or line break between paragraphs rather than an indent? Parskip is not working

So when I first started out with my file I had gaps between paragraphs and no indent, as I was using the parskip package as listed below in my pre amble. At some point for a reason unbeknown to me ...
2
votes
1answer
16 views

Subfig's ragged-right caption with hyphenated word breaks unaesthetically

Minimal working example \documentclass[11pt, twoside]{report} \usepackage{caption} \usepackage[]{subfig} \usepackage{graphicx} \begin{document} \begin{figure} ...
2
votes
2answers
56 views

Prevent line break before equation environment in enumerated list item

I try to accomplish the same thing as in this question: Prevent line break before equation environment in enumerated list item (to have the equation in the same line as "some text"), except that i ...
2
votes
1answer
16 views

Linebreak in overlaid figure text

As a simple example, consider this MWE: \documentclass{memoir} \usepackage{graphicx} \begin{document} \begin{figure}[h] \centering \includegraphics[width=0.4\columnwidth]{example-image} ...
1
vote
0answers
38 views

spaces in references in pdf view

I am using book document when I view my work on pdf, some of references looks like this with spaces. how to avoid them? Can I change "bibliography" to "references"?
3
votes
1answer
42 views

Prevent linebreak in URL in biblatex bibliography

Unlike most people, I'm trying to prevent breaking the URL in my bibliography. In the case below, the URL in the first item should stay the way it is, since it is not broken across the lines. The URL ...
26
votes
3answers
24k views

How to put a line-break in section heading?

I have some section headings occupying two lines and I'm not satisfied with the way XeLaTeX breaks the heading. If I manually add \\ the output looks fine, but I get the following warning: [hyperref] ...
5
votes
2answers
156 views

Breaking single equation with multiple alignment

I have a set of equations that have multiple alignments, and one of these equations I want to break since it is long. The following MWE illustrates my current solution to this problem, but it's not ...
0
votes
0answers
36 views

Line Breaks in Inline Math Mode

Is it possible to put in manual line-breaks in inline math mode? I have tried using '\\' and '\linebreak' but my equation keeps displaying as a single line. :( Sample code: \[ abcd \\ abcd \newline ...
18
votes
2answers
24k 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
1answer
82 views

Line break and text aren't working

I am new to LaTeX and I am having trouble with \text and line breaks. My code is as such $$\text{if} y^{(t)} \neq h(x; \theta, \theta_{0}) \text{then} \\ \theta^{(k+1)} = \theta^{k}+ ...
12
votes
3answers
22k views

Tabular, parbox, vertical alignment

What i want to achieve is really simple: I want to be able to align cell content at the top (which is the default behavior of tabular) while being able to manually break lines (and anything you could ...
27
votes
5answers
25k views

Prevent hyphenation and use line break in block of text

I have a custom block of text on my title page which can be longer than a single line. By default LaTeX is hyphenating a word at the end of a line, but I want it to break on to the next line. How do ...
2
votes
1answer
17 views

Numbered reference writing style: Breakable space or not?

Should a list of numbered reference be displayed with non-breakable spaces ? If I have only one, the obvious rule is to use "~", e.g. Lemma~\ref{fundamental}. But if I want to say "By Lemma 1, 2 and ...
1
vote
0answers
16 views

Nonbreakable space for bibliography

Why do we need to use a nonbreakable space ~ for the bibliography ? For example, in the book "More math into LaTeX" by G. Grätzer, on pp. 47, the following snippet of code is given: \bibitem{eM57a} ...
-1
votes
2answers
78 views

how do i create a linebreak in an inline math formula?

I tried to make a equation in Latex but the parentheses disappear near the edge of the page. How I put the equation in two lines? $\left(\omega=\frac{d\theta}{dt}=\int_{0}^{\dot{\theta}} ...
3
votes
0answers
40 views

Detecting a line break

A command inside a word will make it non-hyphenatable for latex, giving an ugly overfull \hbox, see the first line of sample output. In the following example: \documentclass{article} ...
1
vote
0answers
39 views

Problem in combination of longtable and stepcounter{rowcount}

I am making a longtable consisting of 3 columns: linenumber of the text in the table, column with a short abbreviation and a column with possible a lot of text. Since the third column contains a lot ...
3
votes
1answer
116 views

Embedding version control information returns error when file is not under version control

Consider the following MWE. Note that this uses Mercurial for illustrative purposes, but the question is not specific to Mercurial \documentclass{article} \usepackage{fouriernc} \begin{document} ...
3
votes
2answers
38 views

Auto Generate Custom Text Message for Page Break

I created a new environment that creates a box around text. I used tcolorbox. Additionally, since I wanted to break from page to page, I added 'breakable'. However, what I want it to do is to break ...
11
votes
5answers
23k views

How can I insert a newline in a framebox?

I have several frameboxes in my document, using the following command: \framebox(115,115){ R-Sq: \newline For example} I want to force a new line, but neither \newline or \\ appear to work. Is ...
6
votes
1answer
2k views

Removing Line Breaks in Bibliography compiled with Biblatex

I have a strict page limit on a paper I'm writing, and the page limit includes citations, so to save space I would like to remove the line breaks between entries in my bibliography: [1] Dr. Seuss. ...
1
vote
2answers
39 views

Some lines are formatted differently (overflowing) for a reason I can't tell

In my first attempt to use LaTeX a bit seriously, I formatted my CV using the template in ShareLaTeX. Some parts were confusing and I got some great help from here and finally produced a CV that ...
3
votes
1answer
67 views

Text in table is going outside of document. Automatic line-breaking needed

I'm facing some issues with my two-column table. The second column which contains a description is causing problems. I want the second column to automatically begin a new line whenever it is exceeding ...
2
votes
1answer
34 views

Force newline in concpets

I am following this acm-template (Zip set of TeX template files for easy download (May, 2015).) I have this minimal example: \documentclass{sig-alternate-05-2015} \usepackage[english]{babel} ...
0
votes
1answer
18 views

Obtaining only minimal line wrapping in thin columns of a custom tcolorbox

This answer: http://tex.stackexchange.com/a/170767/69378 is (to me) an incredibly useful and versatile tcolorbox. This answer has satisfied my page design for almost a year now, but I am curious to ...
4
votes
1answer
30 views

How to force \lstinline to add a line break

I have an inline piece of code in my main LaTeX document that I have included using the \lstinline command: \lstinline{template<class UIntType, UIntType a, UIntType c, UIntType m> class ...
2
votes
0answers
29 views

Put together 2 lines with their respective format

In the first picture I highlighted 2 texts in different lines, "text 1" and "text 2". I want both on the same line just separated by "-" symbol. And I want each text with their respective format. How ...
4
votes
1answer
46 views

How to make a tikz node with differently styled text and line breaks

I am trying to create a tikz node with differently styled text. Adding a line break inside a bold text breaks the rendering with: ! Undefined control sequence. \tikz@invoke@collected@onpath ...
1
vote
1answer
32 views

Customizing Memoir Class's \fancybreak

In response to No indentation after empty line @jon supplied the following \fancybreak macro lifted from memoir.cls: \makeatletter \newcommand{\fancybreak}{\@ifstar{\@sfbreak}{\@fbreak}} ...
12
votes
5answers
16k views

How to allow line break in a long hyperlink in a PDF compiled by latex-dvips-ps2pdf?

I am using latex-dvips-ps2pdf steps with -Ppdf option passed to dvips. The following code snippet \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{breakurl} ...