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

learn more… | top users | synonyms (1)

7
votes
3answers
462 views

References spilling out of margin in bibliography

I have a search for this problem but all I could find was the case of reference citations in document spilling over, not the bibliography. Quite simple problem I hope... In my bibliography some of ...
1
vote
1answer
96 views

Linebreak does not work in section headings modified with tikz

I have a problem with long sub/section headings: \\ is not wirking. As I'm new to Latex, I adopted this beautiful template http://www.fluortools.com/misc/LaTeXtemplate and modified it for my needs. ...
0
votes
0answers
52 views

inline listings line wrapping issues

I am having issues with inline listings line wrapping. As you can see in the linked image, the period ending the sentence is on the next line due to wrapping of the cite-website text. The listings ...
12
votes
5answers
699 views

Creating a multi-line colored box in LaTeX

I am trying to create a colored box in LaTeX that has two lines. I would like the text to be centered. Ideally, I want to be able to change the text font and the size of the colored box. So, an ...
1
vote
1answer
25 views

Force equation numbering to the same line of case equation

It seems that the column is so narrow that it can not bear the whole equation: \begin{equation} R(p_i|G) = \begin{cases} ep_{p_i} + (1- UA(p_i|G))\cdot ({r_G - ep_{p_i}}) ...
1
vote
0answers
19 views

colorbox highlighting: overfull hbox

For a current LaTeX-Document, I've done some highlighting using colorboxes around specific words or formulas. This works quite well, although, of course, the colorbox doesn't do line breaks when it is ...
0
votes
1answer
23 views

Automatic line breaks in path{} command?

i use the \path{} command to print out a path to a directory in my *.tex File. I searched a lot around the internet to solve the problem to automatically linebreak the path-url. I found some hints ...
3
votes
1answer
51 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
35 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
30 views

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

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
214k 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
20 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
145 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
15k 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
23 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
74 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
201 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
23 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
424 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
203 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
31 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
90 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
61 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
29 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
32 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
69 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
122 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
35 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
24 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
52 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
20 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; ...