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
3
votes
1answer
35 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
0answers
33 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 ...
1
vote
1answer
54 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
0answers
56 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
1answer
20 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
1answer
26 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
1answer
24 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
1answer
42 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
1answer
23 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
2answers
53 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
1answer
51 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
1answer
32 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
1answer
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
1answer
40 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
1answer
41 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
0answers
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
0answers
39 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
1answer
18 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
0answers
19 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
1answer
25 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
1answer
26 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
1answer
30 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
2answers
69 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
0answers
38 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
0answers
41 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
3answers
223 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
0answers
28 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
0answers
27 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
2answers
32 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
1answer
19 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: +-----------------------------------+ | ...
1
vote
1answer
70 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
1answer
24 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
1answer
27 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
1answer
22 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
2answers
68 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
2answers
64 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
2answers
20 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
3answers
110 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
1answer
50 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
1answer
41 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
0answers
43 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
1answer
32 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 ...
6
votes
1answer
94 views

Inline equations go off margin

My problem is that sometimes long inline equations go off the margin. For some of the equations, advice from a similar thread of using \raggedleft helped with most of the equations, but it does not ...
4
votes
2answers
78 views

Wordwrap text in small caps \textsc

I have several terms in small caps which include the character "/" such as: \textsc{solarium/disapproved} They are a part of regular text but sometimes when they appear at the end of the ...
3
votes
1answer
74 views

Line break in a NiceTabular environment in merged cells

I'm trying to create a table with NiceTabular, because I had some coloring problems with multicolumn/multirow. The table looks already good except, that no linebreaks are done in \Block cells. In ...
6
votes
2answers
225 views

Is it possible to define atomic chunks of math which automatically do line breaks when necessary?

I'm writing a paper for a journal, which publishes in double column style, but the submitted manuscript has to be single-column. This means, I have to make sure that the formulas are properly ...
0
votes
1answer
21 views

lstlisting url broken by line wrapping

I have a URL which get's broken by the line break. Ideally I'd like it to be possible to copy the whole wget command and paste it into a terminal. Unfortunately I am ending with an overflowing box and ...
1
vote
1answer
64 views

How to add variable arguments to \newcommand inside \SetBreakableRel from the package rmathbr? (inline math-break with repetition)

rmathbr is a package enabling another convention of breaking inline equations if they run too long. Specifically, symbols are repeated on the new line (and kept on previous line). So, for instance, a =...
2
votes
1answer
39 views

Allow arbitrary linebreaks in \texttt formatted text

My document is a mixture of regular text and code, where I format the code with \texttt{}. To make this a little easier, I added a new command: \newcommand {\ttt} {\texttt} so now I just write, \ttt{...
1
vote
1answer
62 views

Strikethrough and line breaks

I need to use \sout{} from the ulem package for longer passages of text and in combination with other macros. However, this removes all linebreaks and the text is kept on a single line. Is there any ...

1
2 3 4 5
51