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

learn more… | top users | synonyms (1)

0
votes
0answers
25 views

URLs out of page margin [duplicate]

I am writing a report in LaTeX. I am done with all of the work. Last thing that is remaining is that some of my references are going out of the margins and I don't know how to handle them. I Googled ...
3
votes
1answer
180 views

hyperref line break problem

I am using xelatex and I have the following warnings: !!!** WARNING ** Annotation out of page boundary.!!! !!!** WARNING ** Current page's MediaBox: [0 0 597.6 842.4]!!! !!!** WARNING ** Annotation: ...
3
votes
2answers
94 views

Using \color in a paragraph column inside a tabular environment results in a line break [duplicate]

Some of my documents are compiled into multiple outputs. Some Versions contain certain parts, while other versions contain only a placeholder. For this purpose I have a macro \markup that colors its ...
8
votes
2answers
788 views

Why \allowbreak is not working?

So, here's the code I have: \usepackage{amsthm} \begin{theorem} ...could be now considered as an algebraic structure $DB_E = \left\langle \mathbb{S},\allowbreak \mathbb{E},\allowbreak f,\allowbreak ...
2
votes
1answer
130 views

Long name of Chapter in TOC. Doesn't work \\ for a new line

For a \documentclass{report}, how can I make a long chapter name to wrap onto a second line in TOC ? For example :
2
votes
1answer
399 views

Tabbing and line-wrapping

I'm making a CV. I use the tabbing environment so that my sections start with a 1cm indent, and I can also right-justify dates. For example: Education University of Coolness ...
4
votes
2answers
180 views

How to merge marginpars to avoid overflows?

I am using margins to print keywords but sometimes the number of keywords in a paragraph become too many and they appear beside the next paragraphs. To avoid this issue, I thought maybe they could be ...
4
votes
1answer
64 views

How to insert a \special at every linebreak

How can I make TeX/LaTeX insert the token \special{lb} into the generated DVI command stream whenever a linebreak occurs? The listings package with its prebreak/postbreak option seems already close ...
3
votes
1answer
111 views

Line-break \jobname

Imagine I have a file called My_very_long_document_name_that_does_not_fit_in_the_left_footer.tex Now I would like to include this long string in the left footer of my document. For this, I use ...
5
votes
2answers
230 views

tikz alignment for multi-line text within font commands

Why doesn't tikz accept multi-line text within font commands like \texttt and \textbf? For instance, compilation of the document \documentclass[tikz]{standalone} \begin{document} ...
6
votes
1answer
314 views

\penalty-10000 or \linebreak?

What are the practical differences between \penalty-10000 and \linebreak? Do both make \allowbreak redundant? \documentclass{article} \begin{document} Text text text text text. This is a paragraph ...
3
votes
1answer
136 views

How to enforce newlines in latex

I am creating a macro driven songbook in LaTeX, and have run into a problem: Linebreaks. I want the input text: Line1 Line2 Line3 To output like that in the PDF as well. It is not an option to use ...
2
votes
1answer
163 views

Title indentation after linebreak

I have a document with a few long-named sections, which break at two lines, like this: To meet some standards I need to change indentation of these titles (after \linebreak) at the level of normal ...
0
votes
0answers
74 views

inline listing (lstinline) behaves bad at line end

I have defined some small macro to markup function names: \lstdefinestyle{inline-funcname}{ columns=fullflexible, breaklines=false, %Note: \usefont{OML}{cmm}{m}{it} is exactly like ...
1
vote
2answers
87 views

Unable to split a long equation

I want this equation to break into different lines at each of the line breaks indicated below. f = c_{A1}x_{A1}+c_{A2}x_{A2}+c_{A3}x_{A3}+c_{B1}x_{B1}+c_{B2}x_{B2}+c_{B3}x_{B3} \\ + ...
1
vote
1answer
477 views

Positioning \NewEntry elements in a CV

I need to write a CV that is attached to my thesis. Because I wrote my thesis in latex (classic thesis), I would like to set my CV in latex as well so it fits the layout of the thesis. I use this ...
5
votes
1answer
253 views

Automatic long word breaking in whole document

In my document some of long words are not automatically broken at the end of the line. Is there a way to fix that?
0
votes
0answers
44 views

Equating line length in paragraph [duplicate]

Is there a way to let Latex automatically insert a line break not when it runs out of space, but earlier so that the lines in that paragraph have roughly equal length? In my case, I am trying to ...
4
votes
1answer
155 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 = ...
5
votes
1answer
242 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
438 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
149 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
273 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 ...
10
votes
3answers
247 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
50 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
146 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 ...
5
votes
1answer
693 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 ...
4
votes
2answers
282 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} ...
4
votes
1answer
605 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
141 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
63 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
466 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
66 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. ...
41
votes
3answers
1k 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
489 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
613 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
436 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
366 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
129 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
76 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
98 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
210 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 ...
3
votes
1answer
1k 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
210 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
270 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
81 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
59 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
468 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
315 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 ...
3
votes
1answer
252 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 ...