{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
24 views

write a small text in an equation environment after the symbol “=” [duplicate]

I wanto to write something like this c dt = average probability that a particular 1-2 molecular pair will react according to R in the next infinitesimal time interval dt. I tried with ...
2
votes
1answer
20 views

How to tell alltt not to skip lines at beginning/end?

It seems like there is no option for specifying that, like a hack for verbatim I found on tex.stackexchange: \usepackage{etoolbox}% \makeatletter \preto{\@verbatim}{\topsep=0pt \partopsep=0pt} ...
2
votes
1answer
19 views

long table multicolumn single word without hyphen [duplicate]

I am trying to create a long table that will be multicolumn. In one of the columns, I have a DNA sequence that is very long. I am trying to use the \multicolumn but the text is not wrapping possibly ...
2
votes
2answers
44 views

Start a new line after the first page

The command to start a new line in LaTeX is \\. It works well on the first page of my document, but from the second onwards no longer works. Does anybody tell me why? This is the code: ...
2
votes
1answer
29 views

Aligning long broken equation (with brackets also split over multiple lines)

I have long equation $F=\left\{ abcdef \right\}$ which needed to break line at halfway. To do it I use \begin{multline}. \begin{multline} F = \left\{ abc \right.\nonumber\\ \left. {} + def ...
0
votes
0answers
12 views

Line break within brackets in Bibtex

When I use Bibtex, I want everything within a bracket to appear in the same line. So, for example, in the attached Bibtex, I want the phrase "Phys. Rev. A" to appear in the same line. You can try and ...
1
vote
1answer
43 views

Breakable \colorbox? [duplicate]

Given a phrase in the middle of which TeX will place a return carriage, if we place this phrase within a \colorbox, TeX no longer places the return carriage and the phrase protrudes in the margin. Is ...
4
votes
2answers
51 views

Unexpected first line break

Sometimes pdfLaTeX decides to break the first too early and I really can't understand why and how to avoid this. Unfortunately, following our standards, I had to disable word division, which seems to ...
1
vote
1answer
20 views

How to insert a break line in LaTeX just like hr tag do in HTML?

In HTML, I can insert a line below any text using <hr> tag. How can I do same thing it in LaTeX?
1
vote
0answers
25 views

How to break long sequence of fractions in math mode? [duplicate]

I tried few solutions, such as using seqsplit and breqn but no success. splitting-very-big-numbers-over-several-lines I want to break long sequence of fractions. Here is MWE ...
2
votes
1answer
14 views

Line break between two graphics in a subfig-style subfloat

What I am trying to achieve is this: AA B AA C A being one subfigure, B+C a second. However, I don't achieve the line break between B and C: \documentclass{article} \usepackage{subfig} ...
3
votes
1answer
41 views

How can I redefine verbatim to wrap lines (add break before or after spaces)?

Before continuing, I would like to inform readers that I know it is generally discouraged to reimplement functionality that packages already support. Automatically wrap the text in verbatim has an ...
0
votes
1answer
26 views

Vertical Spacing After NewEnvironment Definition

How can I modify this, \newenvironment{definition}[1][Definition]{\begin{mdframed}\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}\end{mdframed}} so that a newline (vertical ...
0
votes
0answers
24 views

Underfull hbox error using \newline and \hfill\break

I am trying to remove warnings/errors from the document I am writing that includes underfull (and overfull) \hboxs from the code below. Why does \newline and \hfill\break produce this warning? Aren't ...
2
votes
1answer
24 views

line break in “moderncv like \section” in the article class suggests missing \item

With the default definition of \section in the article class, I can make a multiline section header: \documentclass{article} \author{} \begin{document} \section{test \\ test} \end{document} The ...
2
votes
1answer
32 views

Tabular using X column not wrapping cells (tabu package)

I have the following code. \documentclass{article} \usepackage{lscape} \usepackage[table]{xcolor} \usepackage{tabu} \usepackage{multirow} \begin{document} \begin{landscape} \taburowcolors[3] ...
0
votes
1answer
26 views

How to avoid linebreak at `http:` in url

I have a long url that gets wrapped at http: in my layout (using beamer). This is the latex-code: \documentclass{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{url} ...
1
vote
2answers
38 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
30 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
77 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
34 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 ...
38
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
13 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
31 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!] ...
3
votes
2answers
27 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
34 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
30 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
110 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
18 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} [...] ...
2
votes
1answer
27 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
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
21 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
1answer
21 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
61 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
39 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
41 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
46 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
159 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
19 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
43 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
44 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
40 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
43 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
21 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
33 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
72 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
33 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
53 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 ...