Questions tagged [line-breaking]
{line-breaking} is about how (La)TeX breaks paragraphs into lines and how those breaks can be influenced.
2,623
questions
1
vote
1
answer
51
views
Large space between texts after inserting a wrapfigure
I am currently having a problem with using latex, as when I insert a wrapfigure, some of my text gets extended. For example, it becomes like this:
How can I solve this problem?
Thank you!
Edit:
\[ x_{...
1
vote
0
answers
34
views
How to force a linebreak in a theorem title?
(This is a follow-up question to this one.)
Consider following code:
\documentclass{article}
\usepackage{amsmath}
\newtheorem{fruit}{Definition of a kind of fruit}
\begin{document}
Let's define ...
1
vote
1
answer
66
views
Preventing a line break at the end of a sentence
If I want to prevent a line break between two words, then I insert a ~ like this:
Lorem~impsum.
But what if I want to prevent a line break between the end of a sentence and the first word of the new ...
1
vote
1
answer
39
views
\href not breaking description
I am trying to use \href to display www.site.com but (without an http://) but include http:// in the actual link the output directs to when clicked. Long descriptions are running past the end of the ...
0
votes
0
answers
98
views
Line Break Issue using LaTeX
It seems that I've run into this line break issue. I've read to break lines using empty lines, but when I did so, the following issue occurred:
Despite breaking lines by pressing enter twice, this ...
0
votes
1
answer
34
views
Contracting a line inside theorem box on latex
\documentclass[8pts]{beamer}
\usepackage{amsmath,amsrefs,amsthm}
\usepackage{amssymb}
\usepackage{graphics,graphicx}
\usetheme{Frankfurt}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\...
3
votes
2
answers
190
views
How to get tcbox to break to a new line when it overflows the page?
As demonstrated in the code below, when the tcbox overflows the page horizontally it does not automatically move itself into a new line:
This is some text to fill the empty space before the box. Some ...
1
vote
1
answer
65
views
Centered text in Tikz nodes with linebreaks does not work properly
I want to place a two lines text inside each node in a grid and want them to be centered. Now I am aware of this among other threads. E.g. the most natural solution would be to use align=center in ...
2
votes
1
answer
41
views
How to find out if a break occurred at a manually inserted \discretionary?
How to find out if a break occurred at a manually inserted \discretionary?
I can't do it by assignments within the arguments of \discretionary—assignments are finished before decision about breaking ...
0
votes
0
answers
89
views
Break url in bibliography citation
I found similar issues around, but none of them fitting to my situation.
I would like to be able to decide WHERE to break an url in my bibliography.
In the examples below, the automatic breaking is ...
2
votes
1
answer
87
views
What exactly does \\ do in a tabular environment? How could I use obeylines to do it automatically?
I know that \\ is a very overloaded command in LaTeX, but what exactly does it do in the tabular environment?
Following my previous question, I have redefined the description environment, effectively ...
0
votes
0
answers
58
views
Breaking a line
I usually break a line with \\. I have a piece of code:
\textbf{Headline}
\\
\\
\begin{tabular}{...}
...
\end{tabular}
The problem is Headline and Table get separated into different pages. What ...
0
votes
1
answer
25
views
Add space after period when underfull hboxes occur?
Consider this MWE:
\documentclass[10pt,journal,compsoc]{IEEEtran}
\hyphenation{veryverylongword}
\begin{document}
\textbf{The word word word word word.} The word-veryverylongword word word word word.
\...
0
votes
1
answer
43
views
Dotfill the left end of paragraph's first line to get right end of paragraph's last line to the margin?
In TeX or LaTeX can you dot-fill from the left end of the first line of a paragraph until the right end of the last line of the paragraph is at the right margin?
Instead of
word01 word02 word03 word04 ...
0
votes
1
answer
42
views
Line breaking in hyperlinks in biblatex bibliography
I have a bibliography in which I included hyperlinks to the publication sites in the bibliography. Now I would like to include a line break within the hyperlink because the references are too long.
...
0
votes
1
answer
50
views
hyphenate even when it creates overfull hboxes
Is there a way to force hyphenation even when it would generate overfull hboxes?
I read here (texfaq.org) that when tex can't find a resolution that doesn't overfill the line, it just gives up with a ...
1
vote
1
answer
35
views
No line break in enumerate while using textcolor
Can someone explain why LaTeX is not inserting a line break ?
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\sffamily
\textcolor{red}{webServiceURL}/\textcolor{red}{version}/devices/\...
2
votes
2
answers
65
views
Avoid linebreak before cite
I often find myself typing
... see~\cite{reference}.
because I don't want my new lines to start with citations (I think it looks really bad).
But of course always inserting a ~ is a bit tedious, ...
0
votes
1
answer
64
views
Creating tables with multiple rows and columns with lists and very long text
I am trying to create the following table with LaTeX:
I have tried using makecell, tabularx, and array packages. However, I can't create it. I can't make the table have a maximum width equal to \...
2
votes
1
answer
71
views
Removing indent/newline before and after leftbar
Im writing a summary of my lectures and encountered a problem.
I would like to insert a vertical left bar near the important theorems I have to know.
What I found so far is the following:
\...
1
vote
1
answer
26
views
Write on the line that has been returned
I can not solve a small problem, starting from this solution, I have done the table below but now I would like to write a word on each column with the type first and second in italics.
For example the ...
1
vote
1
answer
43
views
Is there a hyperref-compatible package for DOIs allowing linebreaks?
I am aware of the packages url allowing to typeset hyperlinked URLs with sensible linebreaks, and of the package doi providing correct hyperlinks for Digital Object Identifiers (DOIs). However, the ...
0
votes
1
answer
67
views
Is it valid to use \mbox to make manual line breaks?
Based from the answers from this question, \\ should not be used to make line breaks. However, \mbox seems to do the same effect. Is this a valid way to make line breaks?
By the way, the 'line break' ...
0
votes
0
answers
12
views
heading like format without starting a subsection, without warning
I want to realize this effect:
\textbf{Settings.}\\
\(z\)-axis states: \(\ket{\uparrow}, \ket{\downarrow}\).\\
However this code generates a warning Underfull \hbox. I also read that many people say ...
0
votes
0
answers
54
views
How to break (long) equation latex?
when I'm almost at the end of the page and I insert a long equation (a few lines), Latex prefers to leave some white space at the end of the page, and writes the whole equation in the next page.
Is is ...
0
votes
1
answer
22
views
Nested environments within tabbing
It seems as though using nested environments within a tabbing environment along with a new line causes a Extra }, or forgotten \endgroup error.
Here is a minimal working example:
\documentclass{...
0
votes
0
answers
27
views
URL breaks due to hyphen
I am attaching url in references section, but the url breaks and goes to second line if theres a hyphen. How do i get the entire url in one line?
1
vote
1
answer
36
views
How to prevent linebreaks in chapter title?
I have the following chapter title:
with the following code:
\titleformat{\chapter}[display]{}{\chaptername}{-2pt}{\Huge \bfseries} \titlespacing{\chapter}{186pt}{-120pt}{27pt}
I want to prevent this ...
1
vote
1
answer
45
views
How to obtain a line break in an amsthm definition containing a citation?
Consider following MWE :
\documentclass{article}
\usepackage{amsmath}
\newtheorem{fruit}{Definition of a kind of fruit}
\begin{document}
Let's define some fruits. But first some text to reach till ...
0
votes
1
answer
37
views
Cannot split content onto a newline in Texmaker
I want the "Since\ e \in \Sigma " part in the image on a new line. So far I have tried "\". "\newline " and "\linebreak" after the end of the first line but ...
1
vote
2
answers
111
views
two lines in newcommand
I am working on a flowchart with the forest package. As I am using the same structur over and over again, I would like to define a new command. However I have some issues in getting a linebreak within ...
1
vote
0
answers
109
views
How to add text at the start and end of each line?
I would like to add some text at the end of each line. For example, for the input
This is a long text that will be split by LaTeX into various lines.
I want to obtain
This is a long textX
Xthat will ...
0
votes
0
answers
46
views
Drawing a very long commutative diagram
Here is the figure I wanna draw:
In the above figure, the lines are supposed to be either right arrows or down arrows.
Here is the code I am using (which did not work)
\documentclass{article}
%\...
9
votes
3
answers
351
views
\texttt and breaking in justified paragraphs
When a monospace segment is used within an otherwise variable-width justified paragraph, very often the monospaced part is wrapped "one word too late", resulting in many lines being overfull ...
0
votes
0
answers
36
views
Word hangs off the line after \ldots or \dots
I have run into a pproblem with \ldots.
Sometimes when it is close to the end of the line, and next word is next on the line, that world is not automatically hyphenated (or moved to next line), but ...
0
votes
0
answers
49
views
sloppypar adds vertical spacing when next to equations
paragraph 1
\begin{equation*}
equation 1
\end{equation*}
paragraph 2
paragraph 3
\begin{equation*}
equation 2
\end{equation*}
paragraph 4
paragraph 5
There's an inline equation in paragraph ...
0
votes
2
answers
96
views
How do I make a line stretch before line break?
I want to break before the equation to ensure it doesn't end up on two lines:
Words words words words words words words words words words words words words words
words words words words words words ...
0
votes
1
answer
29
views
Fill a multiline form field with proper line wrap
A form that is meant to be printed and filled via handwriting provides a field for a multiline value that can be filled by long text. It is rendered like this:
+-----------------------------------+
| ...
2
votes
1
answer
105
views
Unwanted line break with \raggedleft, \centering or \raggedright
In the following example, I get unwanted line breaks for text "Dest-Addr". The result is correct for text "Hello-World". The result is also correct if I change font size to 10pt or ...
0
votes
1
answer
51
views
"Allow page break before the next line" inside lstlisting
I am trying to use the code from this answer to have precise control over where page breaks can occur inside listings. My problem is twofold: it seems I can't put the commands on their own line, and ...
1
vote
1
answer
255
views
Breaking line in \email command
I'm trying to break a line in the \email command because there are a lot of authors on the work that I'm doing and, for some reason, I cannot.
Already tried to use \\, \hfill \break and \newline but ...
0
votes
1
answer
178
views
How to add blank lines in Beamer - block
I am writing a presentation on Overleaf and using Beamer.
Example:
\begin{frame}{Title}
\begin{block}{Bloc title}
Line one
Line three
\end{block}
\end{frame}
However, I'm not able to add ...
2
votes
2
answers
120
views
adjustbox doesn't allow line breaks in enumerate environment. How to fix that?
\documentclass{article}
\usepackage{adjustbox}
\begin{document}
\begin{enumerate}
\item \adjustbox{valign=t}{hello\\world}
\end{enumerate}
\end{document}
For a MWE. How to allow the line break as ...
1
vote
2
answers
87
views
How to wrap text inside a vbox?
I am using Ruby's erb templates to generate a LaTeX file that is basically just images with captions (albeit I am not using the \caption environment, because it seems to break things). The code looks ...
0
votes
2
answers
30
views
How to skip lines for tables
in my code I want the "if starts with a vowel" to be on one line, and the else in the line under. how do I do that without the Else being on the top line and the rest being on the other ...
6
votes
3
answers
139
views
Forbidding line breaks after specific symbols in inline math?
I'm writing a text in which order relations (e.g. <, \prec, \ll) often appear as arguments of functions rather than binary operators (e.g. $O(P,<)$). Every so often this leads to an inline ...
2
votes
1
answer
73
views
how to auto start a new line when text too long
Today I encount a problem, some words did not start a new line and out of the docs like this:
what should I do to make it start a new line automatic? This is my text:
结果发现有2条已经读取但是未处理的消息。...
3
votes
1
answer
64
views
Discourage a line break after a certain CJK character with babel
When I set Chinese using babel and LuaLaTeX, I often find a line break inserted after :“. This looks weird to me and I'd prefer the break to come after the : and before the “.
Can I tweak some babel ...
0
votes
0
answers
73
views
how to align Armenian text?
I want to align text written in Armenian, but using \justify command doesn't align it completely. There remain some lines which are not fully aligned. How can I fix this ?
Thank you
3
votes
1
answer
53
views
How to write subscript on multiple lines in an align* environment?
I'm writing \max_{some very long subscript} = f(x) within an \begin{align*} \end{align*} environment. The subscript is very long, so I want to write it on multiple lines under max.
I looked into this ...