{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
2answers
44 views

Automatic Line Breaking Under Gradient Color Text

How could I add automatically line breaking for a gradient color text? I would like to add gradient color for separate words and long ones are just causing trouble. The code I am using is \...
2
votes
3answers
36 views

Odd indentation after \newline, after Math text

So this happens whenever I try to insert a new line in my source code: The center equation is no longer centered! Why does that happen? I can't seem to figure out how to center it. Here's the ...
7
votes
2answers
78 views

How does TeX break paragraphs into lines when there is only two element in a pararaph?

Suppose we have the following code: \def\tp#1#2{#1\hskip 300cm minus 300cm\hbox{#2}} \tp{Hello}{World it is} and \def\tp#1#2{#1\hskip 300cm \hbox{#2}} \tp{Hello}{World it is} The first one gives ...
2
votes
0answers
37 views

Marking line wraps

I have the following MWE to typeset two text paragraphs with the first line outdented. \documentclass{minimal} \usepackage{lipsum} \begin{document} \parindent=-1em \lipsum[1-2] \end{document} How ...
39
votes
4answers
2k views

How to create nonbreaking arbitrary length snakes for full-width justification?

This is a follow-up to the recent xkcd comic: Here is a simple version without justification: \documentclass{article} \usepackage[text={1.2in,3in}]{geometry} \raggedright \begin{document} \...
1
vote
0answers
16 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 ...
1
vote
1answer
39 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!] \caption{...
3
votes
2answers
34 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
2answers
55 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
35 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
118 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$ ...
1
vote
0answers
21 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} [...] \end{...
2
votes
1answer
32 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
17 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 ...
1
vote
1answer
29 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
38 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} \captionsetup[subfigure]{...
2
votes
1answer
29 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} ...
2
votes
2answers
70 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 ...
1
vote
0answers
41 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"?
0
votes
0answers
43 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 ...
3
votes
1answer
53 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 ...
5
votes
2answers
162 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 ...
2
votes
1answer
21 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
17 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} ...
3
votes
0answers
48 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} \usepackage{...
1
vote
0answers
49 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
2answers
51 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 ...
2
votes
1answer
59 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} \begin{...
0
votes
1answer
25 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 ...
5
votes
1answer
42 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 ...
3
votes
1answer
80 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
0answers
45 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
72 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
42 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}} \newcommand{\...
-1
votes
2answers
81 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}} d(\dot{\...
3
votes
2answers
93 views

Split text nodes multiline in tikz-cd

This LaTeX code: \documentclass{article} \usepackage{tikz-cd} \usepackage{amsmath} \begin{document} \begin{figure}[ht] \begin{tikzcd}[row sep=3cm, column sep=0.9cm] & \text{binary relations} \...
2
votes
2answers
32 views

How to align on right if there was a linebreak right before?

Consider this MWE \documentclass[a4paper]{article} \usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry} \usepackage{enumerate} \usepackage[ngerman]{babel} \usepackage{ifthen} % ...
6
votes
1answer
41 views

Using the Verse Package and Line Numbering

Does anyone have a way to make line numbers show up only on the first part of the line using verse? A reduced example: \documentclass[11pt, a5paper]{article} \usepackage{verse} \begin{document} \...
0
votes
0answers
10 views

How to enforce new lines after line break on one character conjunctions to start with a conjunction instead of leaving it at the end? [duplicate]

Current behaviour: To jest taki paragraph gdzie będę pisał o tym i o czymś jeszcze innym a o tamtym nie. Desired: To jest taki paragraph gdzie będę pisał o tym i o czymś ...
2
votes
1answer
32 views

Non-pagebreaking return in LyX

I know that in TeX, I can issue \\* to make a new line without a page break. How I do that in LyX?
1
vote
2answers
29 views

Description item label overflows through block [duplicate]

\documentclass{beamer} \usetheme{Copenhagen} \begin{document} \begin{frame}{Proton Pump Inhibitor use and the Risk of Chronic Kidney Disease } \framesubtitle{Benjamin Lazarus et al, in JAMA Intern Med....
1
vote
1answer
21 views

hbox badness with line breaking in tables and use of \raggedright

I am hunting for hbox badnesses in my document at the moment and have some problems in resolving issues with a table using tabularx. As suggested in this thread I am using \raggedright to relax the ...
4
votes
1answer
47 views

Line breaking in \newcommand

I defined a new command for highlighting some text parts: \newcommand{\keyword}[1]{\colorbox{black!5}{#1}} Unfortunately, when the text becomes to long it overlaps my margins. The keyword ignores ...
2
votes
0answers
24 views

parskip (or line spacing) for conversations

I post the example here to illustrate what i want. \documentclass{article} \setlength\parindent{0pt} \usepackage{blindtext} \begin{document} \section*{default} \setlength{\parskip}{10pt} This is the ...
2
votes
1answer
70 views

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

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 ...
0
votes
2answers
47 views

Line Break in Equation with Text

I would like to include an equation, which mostly consists of text elements, however I am having trouble with aligning the last argument which spreads over two lines in order for the equation to still ...
3
votes
3answers
455 views

How do I break a long equation?

I have a long equation that it was hard for me to break so that it appears professional. How can I do it? \begin{equation} \begin{split} &\mathbb{P}\left( \left. Z_{1}\in dx_{1},Z_{2}\...
2
votes
1answer
65 views

Centering section with label and title on separate lines

I am trying to center a section title with the section label on one line, and the section name on the next. ie: | Article II This is the Title | My attempt: \usepackage{...
0
votes
2answers
51 views

Linebreak in \raisebox-like environment + consistent height of table cell

In Frank Mittelbach's answer here, he constructs an environment to add linebreak in a \raisebox-like environment. In Alain Matthes' answere here, he shows how to get a consistent row height in a ...
0
votes
0answers
26 views

Double spacing, not in titles [duplicate]

I aim to write paragraphs with double spaces lines, so I decided to use the setspace package : \usepackage{setspace} \doublespacing But the result is that even in titles, figures, nearly ...