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
0 votes
0 answers
6 views

How can I have most compact code inside a lstlisting frame?

I want most compact code inside a lstlisting frame. I have tried to fit the frame into the two-column using xleftmargin=1.1mm,xrightmargin=2.5pt by manually trying and checking with eye. But my real ...
  • 890
0 votes
1 answer
36 views

\verb content going out of the page

The \verb data is going out of the page. \begin{itemize} \item \verb |Now is the winter of our discontent Use the sample text below, or else you can replace it by typing over or pasting in your own ...
1 vote
0 answers
34 views

Introducing blank lines

I want to introduce a blank line in my document. But have seen that \\ and \newline do not always make a blank line. Only \hfill \break seems to work consistently. Any advice on this would be ...
  • 157
0 votes
1 answer
25 views

Entering entire paragraphs with \newcommand

I'm trying to generate a few documents based on answers in an Excel sheet. One of the questions in the excel sheet generates a \newcommand that is quite long. For example: \newcommand\articles{\...
7 votes
1 answer
189 views

Dealing with arbitrarily long paragraphs

We deal with arbitrary user input. From time to time, users push the limits of our LaTeX server by submitting arbitrarily long paragraphs: hundreds of pages of text, which has spaces, but no ...
  • 367
0 votes
1 answer
25 views

How can I prevent line breaks between words without exceeding the page margins?

I'm currently writing a legal paper in LaTeX that requires me to cite a lot of law in my text, for example something like Das in § 37 Abs. 2 BetrVG normierte Lohnausfallprinzip wirkt ...
  • 173
0 votes
0 answers
8 views

Using the acronym package, how can I set an automatic linebreak in the long form of a newacronym?

Setting a new acronym with a very long longform, there is no linebreak within the glossary, so it generates an overfull hbox warning. The description works correct. The behaviour in the text and in ...
  • 1
0 votes
1 answer
33 views

Automatic line break on any character?

I'm generating some latex from some information in a database. I am putting all this information in a table, but some of the data in the cells are very long and have no obvious break points. As a ...
  • 101
0 votes
1 answer
37 views

Inkscape words too close together in pdf_tex export

I'd like to have the following text written in Inkscape and exported to pdf_tex: erfasste Regelgröße $x_{\mathrm{r}}$ But the result after running the pdf_tex in Texmaker looks like this: Why is ...
1 vote
1 answer
44 views

Is there a line continuation character, the opposite of \\?

Latex doesn't like line breaks in \[ \] mode. I have a very long expression that wraps my input screen and I keep getting compile errors because of typos in it---the mess of symbols and controls is ...
  • 389
3 votes
3 answers
40 views

How to "teach" a custom command to set rules whilst also using linebreak?

So I am sadly still not as versed with TeX as I wish I would be. I am looking for guidance on creating a custom command. I have been doing this manually so far but would want to take a step ahaed. ...
  • 169
0 votes
1 answer
16 views

Break lines on references (book title) within biblatex-chicago

I'm putting the bibliography but I have a problem with the book's references. If the book title is too long this doesn't break to the next line. I've looked it only occurs with @book, whereas @Inbook, ...
  • 103
2 votes
1 answer
126 views

How to avoid damaging of a paragraph with `lettrine` and `varwidth` while using `chickenize`?

Trying to put automatically one symbol-words (as shown by arrows on the screenshot 1) from the end of the line into the beginning of the new line in scrbook (according to the topical typography rules) ...
  • 1,017
0 votes
1 answer
47 views

How to make background of note in 'tabularray' can be broken with 'xelatex' in LaTeX?

As I write the article that contains Chinese characters, so I need to use xelatex engine, even lualatex engine sometimes will not work. I also insert some tables by tabularray package which has a lot ...
  • 731
2 votes
1 answer
41 views

Why does highlighting stop working when I introduce hyphenation and text including an equals sign?

I'm using soul's \texthl in combination with \texttt to render inline code that can break at arbitrary hyphenation points when it reaches the end of a line. To simulate the "verbatim" aspect ...
  • 1,460
0 votes
0 answers
28 views

Overfull hbox in biblatex, how to insert line break between edition and publisher?

I am trying to get my bibliography put together, and biblatex insists on not putting a line break where it seems like one makes sense. Here is my .bib file: @book{paparudin, title = {Real and complex ...
  • 101
0 votes
0 answers
25 views

Line overflow when using biblatex citation [duplicate]

Background I have defined a set of citations in the following style in a .bib file. @inproceedings{McKinney.2010, author = {{Mc\-Kinney}, Wes}, title = {Data Structures for ...
  • 101
0 votes
0 answers
18 views

auto break evenly with the same length at a maximum length of 50% of the page

I have a more specific request. My text should be no longer than half the page. I was able to realize this with minibox. But that is only the maximum. But in this case I want it to be broken earlier. ...
  • 7
1 vote
1 answer
46 views

Line break after theorem head

I would like to have a line break after "Theorem Head", like this: How can I do that for the Arabic language and amsart document class? I tried to add the following command but with no luck....
  • 4,200
0 votes
2 answers
38 views

Vertical centering thead in tabularx break when newline text in any column in row

I have the following long table with tabularx. \renewcommand\tabularxcolumn[1]{m{#1}} \begin{tabularx}{\textwidth}{|>{\hsize=.25\hsize\centering\let\newline\\\arraybackslash}X| >{\hsize=.5\...
  • 101
0 votes
1 answer
27 views

command to generate a breaking half space or break, but not full space

I like to use thin spaces in some in-line text lists, .e.g. of year numbers. Example: 2001, 2002, 2005, 2022. To compress the space needed, instead of space, I have been using \, between these year ...
  • 799
0 votes
2 answers
67 views

Is there a way to insert line-breaks in a tcbox within a forest environment?

I am trying to get line breaks in a tcolorbox object whose width is limited to the width of the text therein (or to the width of the forest node it is inside). This is standardly done via \tcbox[...
  • 333
2 votes
1 answer
29 views

How to prioritize tilde (non-breaking space) over hyphen (breaking space)

I am using a tilde in the defined \quoteboxtable because I do not want a line break to occur between the dash and the name of the person being quoted. However, justification of the line is taking ...
  • 507
1 vote
0 answers
30 views

Linebreaks in the names of subsections in the table of contents

I’m dealing with the following problem. The name of a subsection in my book is too long and it could not fit in the TOC. Could anyone suggest the solution to insert a line-break in TOK? That is the ...
3 votes
2 answers
171 views

How do I get right-sided bracket to close?

\begin{equation} \begin{aligned} \begin{split} F ={} & \frac{(-2)^m} {8}\sum_{K=0}^{}\frac{z^{yK}}{2^{K(y+2)}}\sum_{L=0}^{K}\left(\frac{(-1)^L}{1+ \lfloor {L/K} \rfloor} \right)\\ & \...
  • 41
0 votes
0 answers
28 views

Why is LaTeX adding spaces randomly between section title and surrounding text? [duplicate]

I have a section in a report which for some reason has random space around it. The code is: \chapter{Results \& Discussion}\label{ch:results} This chapter aims to present and discuss the results ...
13 votes
1 answer
687 views

Any elegant way to tell LaTeX that a line break after an abbreviation is bad but not impossible?

LaTeX manuals are full of examples such as Fig.~5 or Thm.~10. The tilde prohibits a line break after the abbreviation completely, to make sure that the reader doesn't see a period at the end of a ...
  • 1,565
0 votes
0 answers
22 views

No line gap between \paragraph{} and text

I have used all of my \subsection{} headers so using \paragraph{} with \setcounter{tocdepth}{4} and \setcounter{secnumdepth}{4} in the contents. The subheading is showing up just fine but the text of ...
0 votes
0 answers
30 views

Vertically align multi-line text in tabular with makecell

I have a table with line-breaked cells (using \makecell) and want to align the content vertically. The ``makecell'' command has an optional parameter for that -- however, only horizontal, not vertical ...
  • 351
1 vote
1 answer
77 views

Table: Color, alignment, and linebreak in cells

Code Consider the following code. \documentclass[ 12pt, landscape ]{article} \usepackage{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[ a3paper, margin = 0.77cm ]{...
1 vote
1 answer
28 views

Redefining proof environment without losing line break [duplicate]

I'm trying to redefine the proof environment because I want the word "Proof" to be bold, not italic. Normally, you'd get this with a nice line break after the proof is done. I've tried ...
0 votes
0 answers
58 views

replacing \\ by blank line

I have a LaTeX document in which paragraphs are separated by double backslashes (\\). However, I would like to separate them by blank lines instead. I have more than 350 instances of \\. Is there a ...
  • 101
0 votes
0 answers
32 views

biblatex autocite superscript is pushed out into the page margin

I am currently writing a tex document, for which I used the superscript autocite style like so: \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[...
  • 123
0 votes
1 answer
57 views

Automatically break long word to fit tabular column width

What is the best way to Set a column's width to fit the longest word of a column heading? If a word is too long, automatically break it to fit column margins? MWE: \begin{tabular}{|c|c|c|} \...
3 votes
2 answers
45 views

How to produce a line break with the runin style?

When using the runin style for sections, text will immediately follow the title. However, in some rare situation I would like to have a line break after the title. How should I achieve this? I tried ...
  • 6,811
0 votes
0 answers
34 views

Difference Between Break and Linebreak Commands [duplicate]

The motivation for this question originates from the answer given to Centering an Arabic Section Number Above Justified Title Text Consider the code \documentclass{book} \usepackage{titlesec} \...
  • 5,723
2 votes
1 answer
65 views

Extra line produced by \Needspace

I want to prevent page break for theorem environment if it contains less than 3 lines of text. I found that needspace package is what allows to do so by reserving specified space or break the page ...
  • 3,737
1 vote
1 answer
74 views

Distance between lines of equations

\documentclass{article} %%\usepackage[utf8]{inputenc} % that's the default nowadays \usepackage{mathtools} \usepackage{dsfont} \usepackage{amsmath} \begin{document} \begin{align*} \label{eq6.1} \...
  • 165
3 votes
1 answer
60 views

How to Force a [Para]Footmisc Footnote to Start on the Next Line

I am using the footmisc package. Consider the code \documentclass[12pt]{book} \usepackage[para]{footmisc} %\usepackage{setspace} \begin{document} \thispagestyle{empty} This is a sentence.\footnote{...
  • 5,723
1 vote
1 answer
65 views

How to Break Text-Underlining within a Paragraph without the Soul Package

Consider the code: \documentclass{book} \usepackage{soul} \begin{document} \thispagestyle{empty} \large How may I do this without the \textit{soul} package?\\[7pt] \ul{Text underlining with ...
  • 5,723
0 votes
2 answers
55 views

Splitting an heterogeneous too long table with a lot of columns

I have a table with a big number of columns. I'm trying to split it in order to make it visible. The problem is some "cell" contains very long data and some very short, but the width of ...
0 votes
1 answer
80 views

Unable to design table with checkbox, alignment,

I am unable to decide the columns and rows of the table. Moreover, checkbox needs to inserted there so handling tikz creates a confusion with bars. [![Desired table][1]][1] I am trying to design this ...
  • 87
1 vote
1 answer
22 views

How to automatically break lines with long string of (non-math) numbers in a custom list environment?

I am currently defining a list environment that, until now, worked just fine for my purposes. However, it turns out that when adding a string of (non-math) numbers that is too long, LaTex will fail to ...
  • 2,127
3 votes
3 answers
264 views

l3regex: Regular expression for a new line symbol \\

How to set regular expressions for a character \\ correctly? MWE below produce unwanded extra space character between words with \c{\\}. \documentclass[]{article} \ExplSyntaxOn \NewDocumentCommand{\...
  • 5,194
4 votes
4 answers
399 views

How to display or break a long equation properly?

I would like to ask about writing equation for this double columns' format. My equation is a bit long for this format so the equation numbering moves to the bottom as in the first case. Is this ...
  • 511
2 votes
1 answer
64 views

How to Automatically Break a Long Inline Term?

I want to break the line in the following code. I have tried two versions: version 1 has math mode for the whole term, and version 2 has math mode only at the necessary parts. I was expecting version ...
  • 33
1 vote
1 answer
25 views

Prevent line breaking around "-" in some phrases

How to prevent a line breaking at the character - in phrases such as $k$-algebra, without having to write like $k$\nobreak-\nobreak algebra?
  • 6,811
0 votes
2 answers
102 views

Family Group Sheet with tabularray - suggestions for improvements welcome

With the imminent birth of my first grandson, I am trying to record two generations of family history research (mine, and my Father's), by writing a book in latex. There are hundreds of names, going ...
0 votes
1 answer
61 views

New line in tabular does not create a new line

There is a problem while I use newline in the tabular environment. Namely, from the following exemple in the column 3 the \newline adds a new line and it works as intended, however in the column 4 no ...
0 votes
0 answers
19 views

How to force space in table environment? [duplicate]

I have a table with the following row: Currently, 'SVM' and 'RF' are shown next to each other in the 'Algorithm' column. Instead, I want RF to be shown underneath in the same row. I tried to do this ...
  • 330

1
2 3 4 5
54