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

learn more… | top users | synonyms (1)

4
votes
1answer
191 views

Latex randomly skips a line (or not)

Consider the following example: \documentclass{article} \RequirePackage{amsthm} \usepackage{lipsum} \RequirePackage[framemethod=tikz]{mdframed} \mdfdefinestyle{proof}{ skipabove = ...
9
votes
1answer
901 views

Keeping two rows on one page using longtable

I am creating a longtable which spreads over multiple pages. The problem is that the coefficients and standard errors which are in two consequential rows sometimes get separated. How to I hold those ...
3
votes
1answer
1k views

LyX: Problems with title line breaks when writing in Memoir document style

I am pretty new both to LyX and to TeX.SX, and have no LaTeX background. I'm writing my master's thesis in LyX and have just changed the document style from book to book (Memoir). When I try to export ...
11
votes
1answer
163 views

Split up several equations into smaller ones?

I've tried to search for it, but I couldn't seem to find an answer to my question, so here goes. Let's say I'm writing a report of some sort. I'm up 50 pages or so, and at least 100 equations. Then, ...
3
votes
2answers
927 views

emph ignores the page margin

Why \emph ignores the page margin? How can I fix it by setting the word in emph to a new line? See the example below: EDIT: The second line of the text is too long. I don't want ...
13
votes
3answers
570 views

How to break long words after n chars (long genomic sequences)

I have to include relatively small genomic sequences in a Latex document (still, they are words of around 600-900 As Ts Gs and Cs) but I cannot find a way to force line wrapping after a certain number ...
1
vote
0answers
73 views

Line breaks not breaking using varwidth package for color background which is giving compilation error [closed]

When we are using varwidth package and the below macro \newcommand\MyCBox[1]{% \colorbox{red!60}{\begin{varwidth}{\dimexpr\linewidth-2\fboxsep}#1\end{varwidth}}} While compiling we are getting ...
5
votes
2answers
189 views

Justify “orphans” to the right margin

I'm typesetting a book with some song lyrics, but at some points, the verses have too many words to fit on the page -- so they overflow and spill over to the next line. To make this read better I want ...
10
votes
3answers
13k views

URLs in bibliography: LaTeX not breaking line as expected

I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document. I have seen a number of questions about breaking URLs in bibliography, but after trying ...
5
votes
2answers
1k views

How to use \url in sloppypar to make url into multi-lines?

I met a problem about how to make the long link into a multi-lines one. The following is LaTeX code: \documentclass[11pt]{article} \usepackage[colorlinks,citecolor=black,linkcolor=black]{hyperref} ...
8
votes
1answer
2k views

New line in pgfplots/tikz not displaying in TeX

I have a multiple-line legend entry to preserve the width of my figure. I can use \newline in Matlab and the legend entry is split between two lines. When I produce a .tikz of the figure however, I ...
1
vote
1answer
432 views

Text does not fit into table which causes bad box errors

I use Excel2Latex to convert tables in Excel to Latex, however a problem arises when the text is too long to fit in the column and I get many bad box errors. My code is: % Table generated by ...
4
votes
2answers
112 views

plain tex: break \line and \vbox through pages

I'm trying to break the following command %\hsize=380 true pt \line{% 1 \hfil\vtop{\hsize 365 truept{% Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ...
12
votes
1answer
999 views

Is there a way to avoid short lines?

Is there a universal setting to tell TeX that the last line of a paragraph can not have just one word? For instance, instead of this: This is a sample paragraph and there is one word here. you ...
4
votes
1answer
95 views

break line within mathescape in listing

How do I solve the evergreen problem of breaking a long equation into multiple lines but this time within the lstlisting[mathescape] environment. Attached is the minimum working example. ...
48
votes
3answers
2k views

Why no vertical-mode Knuth-Plass?

I have only basic knowledge of the TeX internals, so I hope what I am saying here is not complete nonsense. If I understand correctly, in TeX, horizontal positioning / line breaking is done using a ...
3
votes
1answer
2k views

Underfull hbox in tabular

I'm trying to make a table with fixed column widths. Cells in the first column will generally not have enough text to require a line break within the cell. The second column's cells will quite often ...
13
votes
2answers
2k views

Format a verbatim paragraph

How can I format a verbatim paragraph? I.e. break, fill and join input lines to produce globally balanced output with the lengths of each line approaching the target \textwidth as closely as possible. ...
3
votes
1answer
909 views

Linebreak before \texttt

I have text and there are some commands, that should be write in \texttt. It's one word, that shouldn't be broken and should be on next line, but LaTeX doesn't put a line break before it and lays it ...
6
votes
1answer
505 views

Is there an alternative to LaTeX which isn't whitespace sensitive?

I have been using LaTeX for about a year now, and I quite like it. However, I like to space out my source code. In most languages, this doesn't cause an issue, as extra newlines don't affect meaning. ...
3
votes
1answer
199 views

Discretionary equation breaking at a particular symbol

I have long equations that I want LaTeX to break automatically. After some extensive searching I have been unable to work out how to achieve this effect. I have breqn in my package list, however it ...
2
votes
1answer
104 views

Is it possible to break the following aligned?

I don't want to use the displayed math environment for which \allowdisplaybreak is designed. Shortly speaking, is it possible to break the following alined by defining something like ...
2
votes
1answer
149 views

Linebreak without justification if remaining Text doesn't fit [duplicate]

I have a text (justified block paragraph) with an author attribution. If the last line of the text has enough space left to fit the author attribution and some space, then it should be put into that ...
11
votes
3answers
346 views

How to generate non-blanks between words?

In an otherwise-vanilla latex doc, I have a long list of strings that I need separated by <space> <cdot> <space>. The output needs to look like: Lorem <cdot> ipsum ...
5
votes
1answer
4k views

How can I fix this overfull hbox?

\documentclass[10pt]{article} \usepackage{chemfig} \usepackage[margin=1.2in]{geometry} \newcommand{\chem}{\setatomsep{2em}\chemfig} \begin{document} \begin{itemize} \item[--] 1$^\circ$ Alcohol ...
2
votes
1answer
606 views

Prevent words such as 'the' from appearing at the end of the line

I write my document in Latex for Mac and I don't know how to prevent Latex from putting 'the' and similar short words at the end of the line. I already tried impnattypo and encxvlna packages, but none ...
5
votes
1answer
758 views

Chemfig new line reaction scheme

I just recently started using LaTeX and chemfig and have a question in regard with making a new line in the text below or above the reaction arrow. I am trying to place MW, 160C, 5min under Na2CO3, ...
1
vote
1answer
535 views

How to add equation with cases inside the table

I want to include the complicated equation into one of the cells of my table. I am using tabular environment, additionally I have some multirows. I would like to add something like this: ...
5
votes
1answer
77 views

Spaces in references

I have the following reference : @misc{pcons, author = {Energy.Gov}, title = {{Estimating Appliance and Home Electronic Energy Use}}, Howpublished = ...
7
votes
1answer
1k views

How to create a table with merged columns and rows, and wrapped text, like in MS Word?

The above can easily be created in MS word, but how can I create something like this in latex? Basically changing the columns for specific cells, merging a bunch of cells together, wrapping text in ...
6
votes
1answer
598 views

Overfull \hbox caused by em-dash

There is one problem that currently seems insolvable to me. I am typesetting a book in Russian language and I noticed that, in some cases, an overfull box appears which cannot be solved via manual ...
5
votes
1answer
1k views

Why hyperref doesn't break links when using \href but it does when using \url ? Bibtex entries in the middle of a document?

I encountered the following problem while preparing my CV. There are a few links prepared by hyperref that are not broken in several lines. I am wondering if there is a way to fix this problem. This ...
15
votes
4answers
4k views

Splitting root symbol

How can the \sqrt command be modified to split root symbol into two or more lines automatically? Example: \documentclass{standalone} \begin{document} \begin{minipage}[t]{0.8\textwidth} ...
1
vote
1answer
652 views

New paragraph without \newline?

I am writing on a larger text and sometimes I want to begin a new paragraph. So I don't want to have a new heading, just a space for visiual reasons. Currently I use the solution with \\ \newline For ...
4
votes
1answer
84 views

Specify number of columns in brqalign

Some time ago David Carlisle wrote an awesome brqalign function in this answer: http://tex.stackexchange.com/a/51543/4011. See the cited code below. How to modify the brqalign environment such that ...
1
vote
1answer
395 views

Force DOI on a newline in reference list

I'm using biblatex for my citations (using xelatex). This is the relevant code to invoke the reference list: \usepackage[backend=biber, style=authoryear, doi=true, firstinits=true, ...
2
votes
2answers
191 views

Some text lines are longer than the rest of the column

Some text lines are not wrapped correctly and they are longer than the rest of the column. How to solve this? Here a MWE: \documentclass{acm_proc_article-sp} \begin{document} PTX source modules have ...
2
votes
1answer
4k views

Line return/spacing after \hrulefill

I'm new to LaTeX and am trying to make a simple resume. I'd like my left-justified name to appear above an \hrulefill line followed by my right-justified address on the next line. However, when I do ...
9
votes
3answers
188 views

How to typeset Tibetan in XeLatex with correct linebreaks?

I am trying to typeset Tibetan language in a document, but the text does not wrap at the margin. I think this could be easily fixed if I tell XeLaTeX to recognise the Tibetan tsheg character ('TIBETAN ...
7
votes
2answers
557 views

Custom verbatim that sets all spaces (“ ”) as visible spaces (“␣”) that can line-break

It makes sense to typeset code in a monospaced font. Sometimes such code needs to be embedded in a paragraph context, and then it will be useful to allow it to linebreak. In order to visualize spaces ...
2
votes
2answers
309 views

Breaking a long math expression

I am trying to type long expression by using parenthesis inserting some sentences, as an example I have a expression like product of \documentclass{12 pt}{article} \begin{document} \begin{multline} ...
10
votes
2answers
10k views

\hspace is not working after \newline command

I am currently working on my thesis report and would like to add affirmation to it. Following is the minimal code for the same : \documentclass[]{article} \begin{document} \section*{Affirmation} ...
5
votes
2answers
1k views

Correct line-breaking of long math expression

What is the correct way of breaking such unnumbered equation into multiple lines? \begin{equation*} \lim_{\bigtriangleup t \to 0^+}\int_{\bigtriangleup t}^{T} \! \int_{\Omega} \! D(t_1,x) ...
3
votes
1answer
285 views

Inline equation doesn't fit in page

I have an inline equation that I don't want to split in lines. If I use foo bar foo bar foo bar foo bar foo bar foo bar foo bar ${ B = A \cap \{ T \leq n \} }$ It doesn't fit in the page's width ...
5
votes
1answer
238 views

How to align this long equation which out put from Mathematica

I use Mathematica, and use the command TeXForm from Mathematica, I get \{\{x\to -19,y\to 4,z\to 11,t\to -14,m\to 11,n\to 19\},\{x\to -19,y\to 4,z\to 11,t\to 19,m\to 11,n\to ...
14
votes
2answers
3k views

How can I really force the hyphenation points of a word?

I try to make XeLaTeX hyphenate the German word "Sicherheitsbeauftragter". I tried several values for x in \tolerance=x and instances of \hyphenation{Si-cher-heits-be-auf-trag-ter}. Nothing worked. ...
5
votes
2answers
5k views

How to get line-breaking / multirow to work in the caption of my beginner's table?

How to get line-breaking / multirow to work in the caption of my beginner's table? \caption{this is my first table's captive caption} I'd like the caption to look sth like this: this is my ...
1
vote
1answer
723 views

How to get line-breaking / multirow to work in my beginner's table?

I can't seem to get the multirow or pbox to give me a line break (of "automatic" width). The following won't compile successfully: note the two variations in the "TOTALLY" line. How can I fix it? ...
1
vote
1answer
366 views

Algorithm code width problem

I have a problem in the width of the algorithm which I wrote as shown below, and I need to write it in a better way but I can't, any help? This is my code: \begin{algorithmic} \WHILE{$GenC[i] ...
4
votes
1answer
122 views

\url wrapping extends into marginal notes space

This is a slightly odd one. I've been trying to get \url{} blocks to wrap really long URLs, and the only thing that seemed to work was to renew the \UrlBreaks command to allow breaking on practically ...