{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
1answer
176 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
2answers
198 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
298 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
399 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. ...
10
votes
2answers
959 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
599 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
3answers
2k 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
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
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
142 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
265 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
12k views

Newline in a table cell which is centered

This question may look like a duplicate but, none of the answers given to the possible duplicates contain the answer to this specific case. I have a tabular, say \begin{tabular}{ccc}. While adding a ...
9
votes
3answers
664 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
3k 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
148 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
735 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
231 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
3answers
1k 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
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
14k 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
258 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
2answers
396 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
186 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
487 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
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
3k 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 ...
9
votes
1answer
224 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
5k 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} ...
9
votes
1answer
964 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
885 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
2answers
125 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
101 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
87 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
143 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 ...
9
votes
1answer
145 views

Hyphenation does not work with acro and luatex, but with pdftex

I'm using luatex 0.70.1 together with acro 1.2 and I have the following MWE. \documentclass{minimal} \usepackage[ngerman]{babel} \usepackage{acro} \DeclareAcronym{DNA}{ short=DNA, ...
9
votes
2answers
837 views

Fixing a code to highlight formulas and text on several lines

In this post I've found the following amazing code to highlight text on several lines. The problem is that code dosen't work well with formulas : for example, fraction using the mode display are ...
9
votes
2answers
199 views

How to get listings that both feature line breaking of long identifiers and keywords highlighting?

I'm currently writing a book chapter in bioinformatics, and I would like to provide my readers some useful command lines to invoke recent software. To that purpose, I'm using the listings package to ...
9
votes
1answer
7k views

Change text background within paragraph (with automatic linebreaks)

How do I change the text color as well as the text background color for e.g. a sentence within a paragraph? I know \textcolor for coloring the font and \colorbox for background coloring ...
9
votes
2answers
8k views

Line breaking (or hyphenation?) of references in apalike

This is a problem I encountered some time ago and I never could solve it: how can you achieve correct line-breaking or hyphenation when citing references with the apalike style? Here is an example: ...
9
votes
1answer
808 views

bibtex: URL and DOI line breaks on different characters

In my references, I want to allow DOI's to break on a slash '/' character (or as a last resort on any character) to avoid underfull lines like the third reference below. Note that URL's are already ...
9
votes
0answers
102 views

How to typeset long numbers in LaTeX [duplicate]

Possible Duplicate: How to typeset large numbers I saw the posts on how to typeset long formulas into LaTeX, but I just want to output a really long number into LaTeX. 2011^2011 is long, ...
8
votes
4answers
699 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} ...
8
votes
3answers
750 views

An environment for setting \emergencystretch locally

The following environment, copied from this website about dealing with overfull hboxes, allows one to change the \tolerance parameter for just the paragraph(s) it encloses: ...
8
votes
3answers
284 views

“Fill in the missing words” needs line breaking before a \phantom{word}, and a list of removed words

Apologies for the very long title. I'm writing a "fill in the missing words" document. I have made a makro \fjern{} ("remove" in Norwegian) which underlines the argument and places it in a phantom ...
8
votes
2answers
472 views

How to wrap text in a table when there are no spaces at which to break the line?

I have a lot of text in table. I want to wrap it with in 2cm. In the last column, I have [1][2][3].....[89][100] but the column width is only 2 cm. It is supposed be wrapped by itself. How can I ...
8
votes
2answers
7k views

Writing an equation in a new line

I wish to write an inline equation using $%math...$, but the current line is too long, so the equation is broken into two parts, first one in the original line, and the other in a new line. I don't ...
8
votes
2answers
651 views

How to punctuate multiline equations?

This might be off topic, yet I wouldn't know where else to ask. I want to keep up with the good habit of punctuating displayed equations. For example I know the comma (,) is compulsory in Here, we ...
8
votes
3answers
248 views

Useful macro definitions

This question is related to Question: linebreak in macros, however it is not asking for the same information and I separated it out: In my documents, I make use of commands like the following: ...
8
votes
2answers
2k views

Line-break inside a `\verb'

I have set my text editor to wrap text at 76 columns. When including verbatim text in-line, my text editor did an auto-word-wrap and I ended up with something that looked like: \item Just another ...