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

learn more… | top users | synonyms (1)

3
votes
1answer
49 views

tabularx automatic line break and aligned over several tables

I found here a solution to the problem of having an automatic line break: \documentclass{article} \usepackage{tabularx} \usepackage{listliketab} \usepackage{lipsum} % only for this example ...
4
votes
2answers
32 views

Change color line in hline

Recently I asked a question about how to draw a line under titles but this line should be flexible is a picture is included or not. I am trying to change the color of this line but nothing works? ...
1
vote
0answers
12 views

GitHub-hosted Jupyter notebook auto line breaks / wrapping [on hold]

I would like to put a document containing a fair amount of inline math onto GitHub as an IPython Notebook. Because I don't like the typical Markdown sans-serif font, which wouldn't match the Latex ...
99
votes
5answers
212k views

How can I split an equation over two lines

I am having the following equation: \begin{equation} Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} ...
0
votes
2answers
19 views

Linebreak in a longtable

I use the longtable package to create a table that covers multiple pages, but the problem is that the linebreake does not function correctly.This is my code: \documentclass[12pt]{article} ...
2
votes
1answer
139 views

TeXworks adding bogus endline characters

I realise this is not exactly a TeX question, but I figured someone here might know what this is about, and in any rate, this is a question a LaTeX user might encounter. If it is not appropriate, do ...
27
votes
4answers
14k views

Include a line break in algorithmic while maintaining indentation

I have this code: \DeclareCaptionFormat{algor}{% \hrulefill\par\offinterlineskip\vskip1pt% \textbf{#1#2}#3\offinterlineskip\hrulefill} ...
1
vote
0answers
21 views

Automatic linebreaks for equations in tabular environment?

I have so far tested the breqn's dmath environment example here but it does not work with tabular in rotating's sidewaystable, resulting into \cr errors in wrong place. So How can you automatically ...
2
votes
1answer
72 views

How to prevent words from running into the right margin?

I'm revising one of the final drafts of my thesis and on several pages there are words running into the right margin. My question is whether rewording the paragraph is the only way to get rid of this ...
7
votes
2answers
199 views

How can I control the minimum number of lines (rows) that should be kept together when a page break is necessary?

What to do when tabular alignment just doesn't cut it? I designed (perhaps not efficiently or with the "right" approach, yet using some helpful LaTeX3 answers from egreg) a way to enter data into an ...
21
votes
2answers
1k views

Best choice between using \\ or leaving space after each paragraph to end the paragraph

Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a ...
0
votes
1answer
22 views

how to let the long web-link automatically break line?

I use the \tt in the latex, however, it can not break line automatically. Then, I add \\ in the link, e.g. \tt{http://tex.stackexchange.com/ \\\\ questions/ask}. Then, in the generated pdf file, it ...
4
votes
1answer
129 views

Line Breaking Question with Polyglossia

I am working with multiple languages (with polyglossia and XeLaTeX), and I am having issues with extra line breaks where I don't expect them, also likely related to an issue of not hyphenating where ...
5
votes
1answer
84 views

How to break lines in tables without vertical spacing?

I'm building a table and I need to have line breaks in each cell of one column. I have found the following example: How to add a forced line break inside a table cell Here is the code: ...
31
votes
1answer
420 views

Obtain \badness or glue adjustment for each line

This might be interesting for perfectionists and/or fastidious typesetters who would like to improve the document even further (beyond the beyond the magnificence of a book with zero bad boxes). We ...
9
votes
1answer
9k views

Newline in table cell possible?

I am trying to add linebreaks in my table cell but found that LyX doesn't allow me to. How can I insert a newline inside a table cell?
11
votes
1answer
202 views

Macro to capture until end-of-line as argument

Is it possible to capture the contents to the end-of-line as a macro argument? For example, consider the following naive visualization: \documentclass{article} \newenvironment{myitemize} ...
1
vote
1answer
30 views

How to add a linebreak in a tikz UML Sequence Diagram instance/thread

I'm writing a UML sequence diagram with tikz package pgf-umlsd. Currently the code looks as follows: \begin{sequencediagram} \newthread{controller}{Special Task Controller} ...
0
votes
1answer
36 views

How can I prevent non-math overflowing into margin when using textsubscript?

I am using \textsubscript for subscripting a non-math data . but it is long enough to cause overflow into the margin. What are the possible solutions?(may be like writing subscript in 2 lines)
2
votes
1answer
88 views

Ifx and end of line [closed]

Can anyone shed some light on this? I have an interesting problem involving the "There's no line here to end" error. EDIT: Variables. I did not think to include this as I thought there was only one ...
1
vote
2answers
53 views

Lines with texttt reach into the page border, how to prevent?

MWE: \documentclass{scrartcl} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} ...
1
vote
1answer
94 views

Text is spilling over the margin with standard margin settings

I have default margin settings, but certain text is spilling over the margin boundary. It happens when the final word on the line includes a hyphen. For example, if eye-movement happens to be at the ...
1
vote
1answer
60 views

How to prevent a linebreak before align/equation environment in itemize? [duplicate]

The following code \documentclass{article} \usepackage{amsmath} \begin{document} \begin{itemize} \item \begin{align} a&=b\\ &=d \end{align} \item \begin{equation} a=b\\ =d \end{equation} ...
0
votes
1answer
28 views

Breaking Typewriter-styled Detokenized Text

The goal is to have snake_cased elements typewriter-styled breaking properly. I am using \detokenize rather than simply \_ because otherwise the snake_casing looks wrong, namely like this: rather ...
0
votes
1answer
26 views

Disallow line break in \cite

How can I disallow line break in \cite? Two bibtex entries are @book{is, author = "Mörður Árnason", title = "Íslensk orðabók", publisher = "Edda", address = ...
0
votes
1answer
13 views

Function throws error only on first call in a section

I'm setting up a template for my homework for this semester in LaTeX, and I'm getting an error that the first time I call a function it fails but every later time in the document it works. Here's the ...
1
vote
0answers
32 views

Reference a picture [duplicate]

I am writing a PhD thesis. Sometimes when I reference to a figure the following problem occurs. In PDF the word Fig.[number of figure] are written in two lines (Fig. and [] are separated). How to ...
4
votes
1answer
31 views

Justified text with predefined line breaks

I want to set a text following the line breaks in a certain edition, and I want it to be justified. I suppose I should use \obeylines, but don't know how to get the lines justified.
4
votes
0answers
68 views

Dealing with slightly overfull \hbox's

Generally, how do you deal with lines that are slightly overhung, when microtypography is already enabled, and there's no way of hyphenating the hanging word and no desire to put it on the next line, ...
2
votes
2answers
120 views

Auto-linebreaking in underset

I often find myself writing explanations to passages in (in)equality chains directly under the (in)equality signs, by putting an underset which puts a vertical line starting from the sign and going ...
24
votes
3answers
10k views

Quote environment with reference at the end right

I want to define a quote environment such that after the quote on the right occurs the author with page number. My solution is yet the redefinition of the quote environment \usepackage{amsthm} % ...
0
votes
0answers
28 views

Is it possible to revert a line break after an environment?

Most environments seem to automatically break a line after them. This of course makes sense but I am having a case where I would like start writing in the same line where the environment (minted) ...
65
votes
2answers
2k views

Was the Knuth-Plass line breaking output ever subjected to a blind experiment?

Have any blind trials been organized to test to which extent "the average reader" prefers paragraphs typeset by the Knuth-Plass algorithm (or more advanced variants) over those typeset using the ...
2
votes
1answer
34 views

Methods to resolve long line overflowing into margin

My document sometimes has lines which slightly overflow into the margin, such as in the below example. I was wondering what different methods could resolve this issue, such as changing spacing between ...
5
votes
1answer
58 views

Clickable URLs: no click possible after the line break

I use \url to make an URL clickable. When the line breaks, the part of the URL after the line break is not clickable. Why, and how to fix it? Demo: \documentclass[11pt,letterpaper]{article} ...
1
vote
2answers
22 views

hyperref : break long lines in pdftitle and other fields

I have a problem with hyperref: how to break long lines in pdf fields : the pdftitle is very long and I want hyperref to begin a new line, just like it does for key-words. I compile with pdflatex, ...
1
vote
1answer
51 views

Use \Updownright between two vertical expressions

I have a long equation \ldots - m \neq 0 \Leftrightarrow \ldots \neq m where \ldots is a long expression. Instead of having this on one line, can I instead format it to obtain \ldots - m \neq 0 ...
40
votes
1answer
551 views

Test if paragraph has an overfull line

I'd like to test if the last paragraph has any overfull line. The naive approach of looking at the \badness once the paragraph is finished does not work, as it will only give the badness of the last ...
1
vote
1answer
45 views

Some questions regarding tikz tree

I have a tree working written in tikz, however, it's not fully what I wanted it to look like \begin{tikzpicture}[level/.style={sibling distance=60mm/#1}] \node [circle,draw] (equal){$=$} child ...
2
votes
1answer
19 views

Fraction in first line of Example overlaps onto Example header

I'm writing an example where the question says to find what the Legendre symbol of a few numbers are equal to. The theorem style I'm using is 'nonumberbreak' as I like to have my examples start on ...
11
votes
1answer
1k views

break lines in minted code

Thanks to this question minted is able to break long source code lines. It is working really fantastic, except in one case: When already indented code gets breaked into two lines, than line two gets ...
4
votes
1answer
41 views

Need to break the 2nd line of the equation

% preamble \newcommand{\wa}{\mathbf{w}_a^H} \newcommand{\ga}{\mathbf{g}_{a_k}} \newcommand{\fa}{\mathbf{f}_{a_p}} \newcommand{\fak}{\mathbf{\overline{f}}_{a_k}} ...
0
votes
0answers
26 views

No multilingual support cannot enable multilingual quotes on input line? [duplicate]

i get an error in \begin{equation}, i write long equation and split it using \\. it shows an error Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; ...
9
votes
2answers
155 views

Disable protrusion from microtype for just one word

I had a really bad overfull hbox in my bibliography caused by an emdash in the first line of a two line entry. The only solution to get rid of the overfull hbox was to line break the emdash to the ...
0
votes
0answers
31 views

I faced a problem when I tried the statement option while activating Showkeys package

When I try to generat a pdf contains too long statement option like \begin{step}[{We prefer questions that can be answered, not just discussed, if your question is about this website, ask it on meta ...
3
votes
1answer
41 views

Fix overfull line by local settings of microtype expansion

The second line of the paragraphs has an overulll (6pt). I can't change the text and the hyphenation of the first two line (pri-vate and al-ready) would not help. I try to change the microtype ...
1
vote
1answer
49 views

Layout isn't shown appropriately with Thai font

I tried using a simple book template on TexStudio with Thai font. The result isn't quite good. Please help. \documentclass[a4paper,12pt]{book} \usepackage[english,main=thai]{babel} ...
5
votes
2answers
65 views

Non-English text remove hyphenation

I have huge Russian text and I am trying to build simple solution to have ability off/on hyphenations in the text, in the text numbers and dates as a plane text are possible. I have tried some ...
1
vote
0answers
56 views

What command can I use to break the formula to have the alignment acceptable? [duplicate]

Below, in the image, there is a math formula which has a pink underline (namely Ann_{f(A)+J}(J)=0). As you see the alignment isn't acceptable (highlighted). Question. What command can I use to break ...
1
vote
0answers
28 views

Automatic line break in writing pseudo-code using algorithm package

I am going to write a pseudo-code using the algorithm package. Everything is fine, however, I am not able to automatically break lines and you see what happens in the picture below: I am wondering ...