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

learn more… | top users | synonyms (1)

10
votes
2answers
3k views

paragraph style - how to force line break? \paragraph{} \\ - make paragraph a header?

I want to format paragraph to work as a regular title \paragraph{title} text goes here output of that is: title text goes here how can I change the output to force line break and use the usal ...
10
votes
2answers
2k views

Force line break inside a \lim argument in align environment

Inside an align environment I have a \lim with two variables which should be displayed in two lines: \begin{align} ... f & = \lim _ {a \rightarrow -\infty \linebreak b \rightarrow \infty} ... \\ ...
10
votes
3answers
2k views

Why \linebreak doesn't work when text width is not set?

This is the code I have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \tikz \node[rectangle split, rectangle split parts=2] ...
10
votes
3answers
723 views

Censor text spanning multiple lines

I'd like to censor or hide some text while replacing it with the appropriate amount of white-space. The replacement text cannot be searchable. The text to be hidden usually exists in the LR mode. The ...
10
votes
1answer
191 views

Why does titlesec cause bizarre line breaks within \paragraph?

Consider the following example: \documentclass[12pt,a6paper]{article} %\usepackage{titlesec} \usepackage[textwidth=79mm]{geometry} \begin{document} \paragraph{I guess we'll have to make a few ...
10
votes
1answer
6k views

How to break long url in an item

I have an enumerate. In an item I have a long url. I use the package breakurl and it works fine outside the enumerate but not in the item. \usepackage[margin=3cm]{geometry} \usepackage{hyperref} ...
10
votes
2answers
242 views

I'm using the standalone package. How can I get regular paragraph breaks?

I'm using the standalone class to render images for individual math problems that will be displayed in an app, so the cropping functionality is essential. However, the package seems to destroy ...
10
votes
3answers
332 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 ...
10
votes
2answers
545 views

Environment to allow line breaks at “,” in math mode

I find the question and accepted answer to Allowing line break at , in inline math mode? very useful, BUT I would like to make an environment (e.g. "allowbreaks") out of it. The problem is that I'm ...
10
votes
3answers
3k views

Proof environment - line break after the “Proof.”

I want to make the proof environment in amsthm package to auto add a line break right after the "Proof." I tried the following code, which also removed the QED sign, but it doesn't work: No linebreak ...
10
votes
1answer
4k views

Manually breaking a long URL (in the bibliography)

I have a large bibliography in which a few items are causing underfull hboxes due to a long URL. Answers to similar questions suggest a number of global options for fixing this; e.g. Forcing ...
10
votes
2answers
1k views

How to break URLs when footnotes are on same line?

Question Footnotes on the same line revealed that it is a good idea to use \usepackage[para]{footmisc}. However, this does not seem to work with URLs: \documentclass{article} \usepackage{hyperref} ...
10
votes
1answer
699 views

How to wrap the 90 degrees rotated text in a table cell

in Microsoft word I have a table which has the following structure. Now, I need to make a similar table in LaTex to submit a publication, I tried with the following code, ...
10
votes
1answer
2k views

Listings package does not break

The following code does not break even though the breaklines and breakatwhitespace is set: \lstset{ language=XML, numbers=left, numberstyle=\tiny\color{gray}, stepnumber=1, ...
10
votes
1answer
1k views

Newline/linebreak in \message

I want to prompt some messages to my console. I used \message{Hi out there!} Now i want some more Text but with an linebreak. \message{Hello World %some line break here Salut monde } Well i ...
10
votes
2answers
399 views

How can I fix a problem where italics prevent line breaking when using microtype? [duplicate]

I wish to use protrusion and expansion from microtype as I like the look you get with them. I use amsthm and typeset theorems in italic as usual (with \theoremstyle{plain}). With microtype enabled, ...
10
votes
1answer
7k views

hyperref package, breaklinks option

When I compile with LaTeX + dvips, I get the following warning message: Package hyperref Warning: You have enabled option `breaklinks'. (hyperref) But driver `hdvips.def' does not ...
10
votes
2answers
148 views

How to rigidly chop long lines in plain TeX

I am using plain TeX and want to typeset an appendix that contains several hundred URLs. When a URL goes past the right margin, I would like TeX to stop printing (i.e. not carry into the margin, not ...
10
votes
2answers
269 views

Place TikZ coordinate or \zlabel at every (base)line

I'm currently adjusting the code shown in Test if a paragraph has a page break in it? to support underlining and highlighting using TikZ similar as shown in Cool Text Highlighting in LaTeX, but ...
9
votes
3answers
4k views

Skipping line after “Proof” in proof environment

Like the OP in Is it possible to skip the first line in a theorem environment?, I would like to be able to skip a line after the word "Proof" so that the first line of the proof is actually part of ...
9
votes
3answers
743 views

\documentclass[convert]{standalone} ignores linebreak

I tried to combine this answer Compile a LaTeX document into a PNG image that's as short as possible with my answer Add column in a table But the pdflatex -shell-escape table.tex ignores ...
9
votes
3answers
158 views

Box with adaptive length

When I want to put formulas into boxes, I like the box to adapt to the length of my formula. For example, I don't want to put $1+1=2$ in a very large box. To address this, I use the command \encadrer ...
9
votes
3answers
754 views

“Bleed” text into the page margins?

Is it possible to have lines (as an exception) that continue into the right margin ? Here's why I hope it's possible: I have a document and one of the headings is the formal name of a particular ...
9
votes
2answers
232 views

how to enforce correct hyphenation of “(near-)uniform” as “(near-)” + “uniform” instead of “(near-” + “)uniform”?

how to enforce correct hyphenation of (near-)uniform as (near-) uniform instead of (near- )uniform?
9
votes
2answers
6k views

amsthm: \newtheoremstyle, headspace, \mbox{}, and lists

Q: How do I define a newtheoremstyle which will start the theorem text on a newline after the header even when the theorem text starts with a list, e.g., enumerate? If there's no way of doing this, ...
9
votes
3answers
2k views

How can I make a pair of words stick together in line breaks?

How can I make a pair of words stick together in line breaks? For example, "MS Access". I don't want a line break in the middle. But, I'd like to set this up once, not at every occurrence of that ...
9
votes
3answers
15k views

Tabular, parbox, vertical alignment

What i want to achieve is really simple: I want to be able to align cell content at the top (which is the default behavior of tabular) while being able to manually break lines (and anything you could ...
9
votes
1answer
260 views

How to use less space for ~

In a paper, I need to use the abbreviated form of Figure as in "see Fig. 2". To avoid line breaks between Fig. and the number itself, I place a ~ in between. However in that case, the inserted space ...
9
votes
4answers
6k views

Newlines after section headings in amsart

This latex code: \documentclass[9pt]{amsart} \begin{document} \subsubsection*{Animals} Rabbit horse monkey cow \end{document} Generates something that looks approximately like this: ...
9
votes
2answers
444 views

How to deal with very long lstinline-phrases like long class names?

According to this Question: listing: How to deal with very long lines that do not contain spaces? My problem is that my \lstinline-phrases does not contain any special character like "-". In my ...
9
votes
2answers
515 views

Overfull \hbox from printindex

I've got a index generated with makeindex but when compiling the file again, when the index is generated, I get a bunch of overfull \hbox. This is an example of an index that results in overfull: ...
9
votes
2answers
194 views

stacking text for cryptography

What is the best way to stack long passages of (fixed-wdith) text on top of each other? I am writing exercises and solutions for a cryptography class and would like to be able to have plaintext above ...
9
votes
2answers
541 views

Automatically line breaking text, or extending arrows in tikz

Is it possible to automatically make the text line break so that it does not overflow into the nodes? An alternative is to have the nodes automatically moved farther away to accommodate the longer ...
9
votes
2answers
128 views

Insert a character at beginning of each line after the current one?

I'm looking for a way to obtain automatically the following layout of French "continuous guillemets", used in old typography when a citation includes another citation that spreads over several lines ...
9
votes
2answers
1k 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 ...
9
votes
2answers
976 views

\RaggedRight makes document longer

I have a document carefully written to fit in 4 pages; but when I added a \raggedright (or \RaggedRight with use of the ragged2e package) the length gets longer. Furthermore, suddenly the output ...
9
votes
1answer
2k views

Does amsmath provide any medium to auto-break equations?

I'm writing large equations in texlive with amsmath, and I want them to be automatically broken at the end of the line. Is there any way to do that with amsmath? What would you recommend me to do ...
9
votes
1answer
240 views

Using discretionary linebreaks in centering environment

I am having trouble with the interaction between discretionary line breaks and centering. I have defined macros for math mode that contain discretionary line breaks to help TeX lay out inline ...
9
votes
1answer
1k views

\overbrace split accross multiple lines

Is there a way to split the overbrace so that it appears in two halves over a multi-line equation. Something like /-----------Overbrace Label---- Equation over which to place ...
9
votes
2answers
922 views

Avoiding a line break at the beginning of an enumerate

How can I avoid the line break at the begin of an enumerate environment? I've noticed that theorem-style environments succeed in doing so. I'm using the enumitem package and my concrete example is: ...
9
votes
1answer
88 views

line breaking mystery in `\@dottedtocline`

I'm trying to understand why some entries in a table of contents are overfull even if a sensible break points exist. I pulled down the problem (and the definition of \@dottedtocline) to this example: ...
9
votes
1answer
3k views

LaTeX Centering newline in subfloat caption

I have these images with their title beneath: I want to add some information below, like this: The good news is, I'm able to do it. The last screenshot is from my pdf previewer. ...
9
votes
2answers
133 views

Preventing line shrinking with raggedright

Sometimes with \raggedright, if a line is too long, but only slighly so, it will be shrunk instead of broken up. Here is an example: \documentclass{article} \raggedright \begin{document} This is a ...
9
votes
1answer
108 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} ...
9
votes
1answer
2k views

Linebreak in \thanks footnote?

I am using the scrartcl class of Koma-Script with \thanks on the title page. Everything works as expected, so far, but I'd like to use a linebreak within the footnote. Here's an MWE: ...
9
votes
1answer
90 views

Prohibiting line break at specific point of url while using \url command

I have a \url{some.edu/page} that breaks just before .edu I would like to have it break at the / at worst, or not at all. How can I do that?
9
votes
1answer
584 views

Handling overflows in biblatex bibliographies

I'm finally making the transition to biblatex. This is a remarkable package, and has allowed me to cut out quite a bit of old code I used to use to handle eprints, DOIs, crossref mapping problems, ...
9
votes
2answers
3k views

Linebreak in Package algorithm2e

I'm using the algorithm2e package for pseudocode. I got some very long lines that needed to be wrapped. Is there a way to indent the following (breaked) lines and/or put a mark at the first line to ...
9
votes
1answer
4k views

Line break in edge labels in tikz graph

I'm using tikz and pgf to draw state machines in a document, and I'd like to be able to have a multiline edge label between two nodes. Something like the following would be ideal: \begin{center} ...
9
votes
1answer
153 views

How to float something right even if it wraps down a line?

I have a situation where I have some data in section headings (and sometimes normal paragraphs} that needs to be: floated right not split across lines I was able to accomplish this for most cases ...