Questions tagged [line-breaking]

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

Filter by
Sorted by
Tagged with
2 votes
2 answers
199 views

How to split a long set

I have this MWE where there are two long set \documentclass[a4paper,12pt]{article} \usepackage{amsmath,amssymb} \begin{document} Supponiamo che l'insieme sia $A=\{a,b,c\}$. L'insieme delle parti di $...
Sebastiano's user avatar
  • 52.6k
1 vote
3 answers
30 views

Breaking Long Radical Over Multiple Lines

I need help making this monstrosity look presentable: \documentclass[12pt, a4paper]{article} \usepackage{graphicx} \usepackage{amsmath} \usepackage{parskip} \usepackage{enumitem} \usepackage{float} \...
Yasen Y.'s user avatar
1 vote
1 answer
33 views

First tag of nested description environment with newline style wont appear on new line

I have the next document: \documentclass[12pt]{article} \usepackage[english, ukrainian]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{enumitem} \setdescription{style=...
Vladyslav Rehan's user avatar
2 votes
1 answer
59 views

How do I highlight text or formulas?

I want to highlight newlined sentences and formulas. The following code will allow me to highlight newlined sentences, but I get an error if they contain quotations (\cite) or formulas (\begin{...
ayato kanada's user avatar
2 votes
1 answer
99 views

I'm having a problem with sentences breaking when writing input and output in a latex algorithm

In my algorithm, I wrote input and output as follows. \begin{algorithm}[htb!] \caption{Data Preprocessing} \label{alg:data_preprocessing} \textbf{Input} input data \\ \textbf{...
Tim's user avatar
  • 21
0 votes
1 answer
80 views

How to correctly separate paragraphs with a blank line

I want to end a paragraph with a blank line and start a new paragraph. When I use first paragraph\\ second paragraph I get an underfull hbox error. When I use first paragraph\par second paragraph ...
stimulate's user avatar
  • 107
2 votes
2 answers
47 views

Long url doesn’t break in theorem optional argument (under amsthm, hyperref, xurl)

In most situations, the xurl package (presented here) ensures that long urls break across lines appropriately. However, inside the optional “caption” argument of a theorem, long urls stay unbroken, as ...
Peter LeFanu Lumsdaine's user avatar
1 vote
3 answers
170 views

How to force a line break right after the name of the proof environment?

I'm not experienced with LaTeX and so I couldn't really judge if this is a trivial fix. I want to have a proof-statement on it's own line. Currently, things get displayed like this: Beweis. G1 (a ∗ b) ...
Eldinur the Kolibri's user avatar
0 votes
1 answer
28 views

Changing \autocite format to include page number

absolute Latex beginner here with a question: I changed the \autocite command to add in-text citation in the following format: (Author year: [page number]) (for example: (Dylan 1967: 5)). I used the ...
Hans Tydecks's user avatar
0 votes
1 answer
28 views

Is it possible to programmatically add line breaks inside \makecell?

I've found myself in a situation where I need to dynamically add a list of strings inside a tabular cell in multiple instances, each string in their own line. To tackle this, I tried to go with the ...
StrikeAgainst's user avatar
2 votes
3 answers
116 views

Cannot fit align environment into page even with multiline* or \resizebox

I have the following code: \documentclass{article} \usepackage{amsmath} \title{latex debugs} \author{Naitik Mundra} \date{September 2023} \begin{document} \begin{align*} & E(a, b)-E\...
Naitik Mundra's user avatar
1 vote
1 answer
43 views

Prevent Overfull \hbox

I am new to LaTeX. Recently I have taken it up to do some math note taking on my laptop. I have found a template which seems quite useful for this. Nonetheless, after some time spent doing the set up, ...
Below Average C Programmer's user avatar
7 votes
4 answers
622 views

How to stop long words with "+" in them from going into the margins?

I have a long word with plus signs in it (e.g. This+Is+A+Long+Word) that often ends up going into the margins of my page. Both \sloppy and \emergencystretch 3em fix this issue, but they also add a lot ...
Jenna's user avatar
  • 73
3 votes
3 answers
206 views

Landscape table to fit entire page by automatic line breaks

I want to include a large table into my document. I use the landscape environment to make it sideways and managed to make it fill out the entire width of the page by using \linewidth, but my table ...
Idiza's user avatar
  • 31
3 votes
3 answers
120 views

Individually indent wrapped lines of lines broken with \\

I have long lines like this: Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, \\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine ...
Geremia's user avatar
  • 2,141
8 votes
1 answer
409 views

Modified Bourbaki problem

The expex package has a nice macro \trailingcitation which typesets a citation at the right margin of the same line if there is space, or flushed right on the line if there is no space (first two ...
Keelan's user avatar
  • 5,373
1 vote
1 answer
24 views

How to adjust the text within table

I am creating a table with long text separable by comma; I have defined the text width for 2nd column as 11 cm. Now, I want to present the text in the aligned form, but it does not result as expected. ...
Rohan Vaidya's user avatar
2 votes
1 answer
66 views

One line doesn't respect right margin

What could be causing one single line of this text not being aligned to the right (first line of third paragraph)? \documentclass[11pt, twoside]{article} \usepackage[headsep=14pt, paperwidth=14cm, ...
Raphael's user avatar
  • 554
0 votes
1 answer
21 views

Splitting labels on multiple lines not working for .dot file used in an Overleaf document

I would like to split a label in a .dot file across multiple lines in Overleaf. I reviewed this which suggests various forms of \n which doesn't seem to work. Here's a minimal example: \documentclass{...
me_online's user avatar
  • 125
2 votes
2 answers
88 views

Gap inside parshap in one line

General overview I try to put a custom lettrine with \parshape command and I get the following rendering: The problem But, the hand of the goddess Hator fall under the baseline of the N wile the text ...
fauve's user avatar
  • 2,437
1 vote
0 answers
23 views

Custom line breaks in maketitle with authblk

I am trying to modify the output of the affiliations defined with authblk to print each entry on consecutive lines, and when the text width is exceeded break the line at the symbol separating the ...
Brendan Kochunas's user avatar
0 votes
0 answers
23 views

Prevent LaTeX listings from line breaking before comas and dots

I have a PostgreSQL script that I insert in article using the listings package and I constantly run into two problems trying to format the style of the code: Line breaks before dots and comas or ...
Tristan Benoit's user avatar
1 vote
1 answer
60 views

How to add a new line in item list

If an \item (in \begin{enumerate) contains a long line, I need to add a linebreak so the rest goes to another line (but with the same enumeration number). In the following code, I add \allowbreak in ...
Eugene Zhang's user avatar
0 votes
1 answer
27 views

Preventing text lines to end with a grammatical article (or with short words)

I am revising a paper before submitting it, and I realized I really dislike when a line ends with an article, and the "articled" word follows on the next line. I found no strict rule for ...
Ondřej Janča's user avatar
0 votes
1 answer
37 views

Manually breaking URL in bibliography adds ASCII characters [duplicate]

I'm trying to break a URL in the bibliography. I used \\, thinking that it would solve the problem but while it broke the URL it also added the ASCII code for \. \documentclass{report} \usepackage{...
Dunno's user avatar
  • 317
0 votes
0 answers
20 views

Prevent the line feed on the multiple-line minted code at the footnote

When I add a multiple-line minted code at the footnote, the minted code block is (automatically) line fed. See the image below. I'd like to print the code at the same line as the footnote mark. How to ...
Lars Malmsteen's user avatar
3 votes
1 answer
166 views

Breaking equation with LuaLaTeX

The following code works as expected. It breaks mathematics expression in multi-lines. \documentclass{article} \usepackage{breqn} \begin{document} \begin{dmath*} f(1.02) + f (1.06) + f (1.1) + f (1....
user61681's user avatar
  • 1,729
6 votes
2 answers
90 views

Removing trailing newline in custom environment

I am relying on the output of a 3rd party tool which I cannot really modify at the moment. It generates a soup of commands corresponding to a semantically annotated translation of some source code. By ...
gallais's user avatar
  • 195
0 votes
0 answers
43 views

How can I do automatic line breaks in LaTeX math mode?

i have a Latex document with some very long equatations inside an align* element. They overflow the page width. My question is: How can I tell Latex to automatically insert linebreaks when the lines ...
axolotlKing0722's user avatar
3 votes
3 answers
137 views

How to automatically wrap lines in scriptio continua

How to wrap lines automatically for scriptio continua (contexts in which there are no devices whereby to separate distinct words)? I am using XeLaTeX. For example, the following code does not produce ...
Noah J's user avatar
  • 443
0 votes
1 answer
45 views

How to insert vertical material in a paragraph

What is the proper way to insert some vertical material inside a paragraph? Like what quote or display math do. I want to have a parbox or a minipage inserted at a given point of my paragraph ...
Alexey's user avatar
  • 2,007
0 votes
1 answer
61 views

Making a line break in the table header breaks tabularray?

As the title suggests, I'm trying to achieve a linebreak in the first table between Endkonzentration \\ N-Acetylcystein but it ends up making the table look weird, giving me a LaTeX Error: Something's ...
m0n74g3's user avatar
  • 67
1 vote
0 answers
59 views

Line break between the number and the exponent

In the Latex source I have the following text $q_\text{v} = \SI{2.26e6}{\J\per\kg}$ and the line break happens right between the number and the exponent as ... qv = 2.26 × 106 J/kg... Is there any ...
Pygmalion's user avatar
  • 6,155
0 votes
2 answers
51 views

Overfull hbox too wide (how to break lines)?

I'm trying to list examples of weak compositions of 4, and my code looks like the following: Weak compositions of $4$ into three parts are: \[(4,0,0), (0,4,0),(0,0,4),(3,1,0),(3,0,1),(0,1,3)\linebreak(...
lifeisfun's user avatar
2 votes
0 answers
36 views

Automatically choose between different options depending on which one produces the least badness

Is there a way in TeX (preferably plain XeTeX, but other engines are fine) to automatically choose between different options (e.g. between "and" and "&") so that the badness of ...
user avatar
2 votes
0 answers
49 views

Content is going outside of the margin

I'm trying to add sample content to my document, but it seems like whenever I use \texttt or \lstinline tags my content still goes out of the margin. Is there any suggestions ?
John J's user avatar
  • 21
1 vote
3 answers
97 views

add line break to the label in Tikz

How can I add line break to the label (description) of diagram in Tikz? This is my code: \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{matrix,decorations.pathreplacing,arrows.meta,...
Milito's user avatar
  • 45
0 votes
1 answer
39 views

In "informs3" cls, why theorem caption enable break line?

In "informs3" cls, why does the theorem caption enable break line? template: https://www.overleaf.com/latex/templates/template-for-manufacturing-and-service-operations-management/...
Chin Ching CHAN's user avatar
0 votes
1 answer
48 views

Is there a way to use \nopagebreak globally, between two or more known words?

I'm looking for a way to define a couple of well-known word pairs that should never be split between pages, even if that means leaving a slightly awkward blank space at the end of the paragraph. I ...
Rad'Val's user avatar
  • 101
0 votes
1 answer
34 views

How to customize a tikzcd figure

I generated the following tikzcd diagram: \documentclass[a4paper,12pt, twoside]{report} \usepackage{tikz-cd} \usepackage{tipa} \begin{document} \begin{tikzcd} & ...
MariaCo's user avatar
  • 215
0 votes
1 answer
89 views

Underfull \hbox (badness 10000) in paragraph at lines 17--18

Throughout my document, I constantly have problems with the text spreading out when there is no real reason for it. I have tried to look up how to solve it but nothing seems to work for me. I am ...
Ninnie Tägtström's user avatar
1 vote
0 answers
20 views

Force text on last line of page when there is a table on next page [closed]

I am writing a document in overleaf (latex). I have a 2-column paper. There is a table inserted on the next page. The problem is that the last line on the previous page before the table is a blank ...
user2961109's user avatar
0 votes
0 answers
57 views

tcolorbox hyphens words instead of breaking lines

Facing the same problem described here, I noticed that when there are paragraphs inside the tcolorbox, insertion of line breaks is not so clever. Here there is unused space on the sides: On the 2nd ...
tush's user avatar
  • 1,093
2 votes
1 answer
77 views

How to set inference rules next to each other in semantic?

Feeding \documentclass{article} \pagestyle{empty} \usepackage{semantic} \begin{document} \setpremisesend{0pt}\setnamespace{0pt}% \inference{A_1\\A_2&A_3}{C_1} \quad \inference{A_4\\A_5&...
AlMa0's user avatar
  • 439
2 votes
2 answers
244 views

Force text onto new page

I have two tables and text. I would like to have the text start on a new page: \documentclass{article} \begin{document} \begin{table}[!ht] \centering \caption{Decomposition Level 6} \...
Edoardo's user avatar
  • 35
1 vote
1 answer
39 views

amsmath & formatting problem: equation over-runs solution box

In this math exercise solution set, the solution over-runs the solution box. Here's the current rendering: There should be a line break immediately following the =. I can't achieve this with either \\...
Siuslaw Math's user avatar
0 votes
1 answer
104 views

Why doesn't \textit work over multiple lines in tabbing?

If I have text in italics over two lines in the environment tabbing, only the first line is italic and the second line is upright. Also, the compilation has errors. Why is that? How can I make \textit ...
matj1's user avatar
  • 109
1 vote
1 answer
62 views

Splitting fraction numerator into several lines

I need to write a fraction for which I can break the numerator into several (not just two) lines. I tried several solutions and none have works. On Overleaf, most just stop the document from compiling....
eje211's user avatar
  • 1,191
1 vote
1 answer
247 views

How to include a long list of authors in the ACL template?

I'm working on a paper that has ~15 set of authors that is written in Latex using the ACL template. I can't seem to find a way to fit the author affiliations into the space and at the sometime ...
RinW's user avatar
  • 111
0 votes
1 answer
50 views

Automatically break a very long line, shown with monospaced font (code-like display)?

I have seen but there is no answer there ... I would like to show a very long line, composed of only digits and comma, as code in Latex - and have Latex automatically break it, as I do not want to ...
sdbbs's user avatar
  • 193

1
2 3 4 5
56