{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
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
110 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
228 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
303 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
161 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
73 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
86 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
472 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
246 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
154 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
236 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
428 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
271 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
246 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
145 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
667 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
280 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
599 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
139 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
461 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
482 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
605 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
432 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
364 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
209 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
207 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
267 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
58 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
464 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
311 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
247 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 ...
8
votes
4answers
423 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
233 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
59 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 ...
0
votes
1answer
81 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
85 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
1k 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 ...
8
votes
1answer
92 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 ...