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

learn more… | top users | synonyms (1)

8
votes
1answer
742 views

Append character at autobreaks in listing

I'm writing a LaTeX document for a hands-on workshop which uses shell/bash commands. I'm making use of the listings package to format the chunks of code. Some of the commands are rather long so I'm ...
1
vote
1answer
498 views

Linebreaking gather (equation) environment?

Please help me to line break this gather environment. You can clearly see which line I want broken by where I've placed the split environment in my code. It's too long for 1 line. I also want it ...
43
votes
1answer
18k views

How to typeset a “small” non-breaking space

I can use ~ to produce a non-breaking space. But it is too large for me, and I would like a non-breaking space of the size of \, for example. Is it possible ?
1
vote
1answer
314 views

Text Alignment problem [closed]

I am having a problem with the alignment in my pdf. The pdf is compiled with Xelatex. Some words instead of being separated with a "-" and continue at the bottom line are written whole in the upper ...
8
votes
1answer
513 views

Identical vertical spacing between paragraphs of different textsize

Something that happens to me very often is that I change the size of certain formula-like material (something close to but not identical to pseudocode in my case) but get inconsistent vertical ...
2
votes
1answer
271 views

Add image and line break within a table

I want to create a rather mysterious table with both a line brake in a single row and an image. You understand that I cannot use a new row without \hline because I want to add an image at the same ...
5
votes
1answer
386 views

How do I have a second line in my header?

I would like to have a header that looks like <my name> <Class> <page number> <Student number> However, I can't figure out how to insert the second ...
2
votes
1answer
11k views

New line in a math block [duplicate]

Possible Duplicate: Linebreak in equations I am very new to latex, its been a super frustrating I spend almost close to two hours on getting a new line inside the math block \[{P(g(X) \neq ...
8
votes
2answers
271 views

Is there any solution for highlighting text in CJK?

Is there any solution for highlighting texts or sentences in Chinese, Japanese, and Korean? I know none, at the moment. But this will be changed, if someone would like to help me with CJK in LaTeX. ...
2
votes
0answers
59 views

Why doesn't \underline{REALLY LONG TEXT} wrap? [duplicate]

Possible Duplicate: Why does underlined text not get wrapped once it hits the end of a line ? The string \underline{FOO BAR FOO BAR FOO BAR ... [100 more of these]} runs off the page in my ...
8
votes
1answer
563 views

Biblatex's textcite inserts a breaking space between author names and citation number

I have the following document : \documentclass{article} \usepackage[backend=biber,style=numeric,maxnames=2,maxbibnames=6,firstinits]{biblatex} \bibliography{sample} \begin{document} Here we want to ...
2
votes
0answers
80 views

Problem with pdfcomment and pdfsync [duplicate]

I have a problem with using both pdfsync and pdfcomment together: once I use pdfsync, the comment causes a line break, which it shouldn't do. As an example, compile with and without ...
22
votes
4answers
35k views

Aligned equations in LaTeX

I have a long equation in LaTeX, which I need to break up into more lines. I've done this, although its not quite what I was looking for. Here is a MWE showing my problem: ...
1
vote
1answer
885 views

Full justification fails [closed]

I am now writing my thesis and have a problem occurring in some pages. The problem regards full justification of text. LaTeX sometimes fails to fully justify text and break lines. In other words, the ...
3
votes
1answer
3k views

Line spacing in wrapped table text

I have a document where the text is set to double spacing. I have some text inside tables, which I use the paragraphy specifier for. It wraps properly, but spacing is set to single. Is it possible to ...
2
votes
0answers
547 views

Glossaries Acronyms generate overfull hbox: how do to line wrap? [closed]

I am using the glossaries package with the acronym option: \usepackage[acronym,style=long3col]{glossaries} For some reason the acronyms on first use will not line wrap, e.g., ...
5
votes
1answer
217 views

Avoiding linebreak before number

Is there a way to avoid linebreaks before all numbers without explicitly using the tilde? It would be nice if it worked both for explicit numbers, as in Sample~1 as well as when a number is implied, ...
8
votes
1answer
761 views

Underfull/overfull preference

When long words at the end of a line cannot be hyphenated (for example when hyphenation is suppressed with \mbox{}), LaTeX could either have the tendency to make lines overfull or the tendency to make ...
5
votes
2answers
196 views

Automatic linebreaking inside displaymath

Yes, I know of the existence of breqn, and I am very excited about this package. I am trying to write a mathematics paper, that will be typeset in two different styles (different page sizes, and ...
2
votes
1answer
280 views

Long lines when using listings [closed]

First Issue I'm using the listings package to present some algorithms using pseudocode. The problem is that sometimes the lines of my pseudocode are too "long" and listings breaks them in 2 lines. ...
1
vote
1answer
765 views

Prevent the overflow of text

I'm having some Yiddish text overflow it's box in a XeLaTeX document. I suspect there is a simple command to stop this from happening. Does anyone know an easy solution or do I need to make and post a ...
7
votes
2answers
732 views

References in margins `biblatex`

How can I use biblatex and not have the references run into the margins? I've seen some posts and solutions to this problem pertaining to URLs but I'm not using web links so it's a different problem. ...
2
votes
0answers
42 views

listings breaklines not working [duplicate]

Possible Duplicate: How to deal with very long lines that do not contain spaces? When I use the listings package with breaklines, it doesn't seem to break lines properly if there is no ...
4
votes
1answer
1k views

`pmatrix` line break

I wrote a matrix using the pmatrix environment. The content is very long and LaTeX produces an output of the kind (the "a" line extending beyond \textwidth): ( aaa aaa aaa aaa aaa aaa + aaa aaa aaa ) ...
4
votes
1answer
2k views

alltt package's \alltt{} makes a newline

alltt causes a line break (newline). How do i suppress this? I want something to the effect of \verb+HELLO+ in that it does what \begin{verbatim} \end{verbatim} does except doesn't cause the line to ...
7
votes
1answer
494 views

Penalty or badness for linebreak near start or end of sentence

I would like to set a penalty or badness for breaking a sentence (or the contents of some \command{...}) too early. More specifically, I would like the penalty of a line break to be dependent on the ...
1
vote
1answer
478 views

bibliography problem large spacing

@booklet{Ph4, author = {Panchenko, D.}, title = {Statistics for Applications / Gamma Distribution}, year = {2006}, url = ...
4
votes
1answer
424 views

How to line break a siunitx unit

I made a new command for this unit: \SI{#1(#3)e#2}{\KBE\per\gram\of{FM}} But it is so bulky and it seems that latex can t handle the "normal" linebreak. So, my new UNIT is sometimes over the normal ...
1
vote
2answers
107 views

Linebreak in math environment

I have an odd problem, I tried already all possible things, align, eqnarray, $, \[ \] and so on, but the following stays the same: I have a formula inside text and it is not broken, so it goes into ...
8
votes
1answer
3k views

Beamer: effect of newline and hphantom

Why is it that the file \documentclass{beamer} \begin{document} \begin{frame} a\\ \hphantom{ }b \end{frame} \end{document} produces an a and a b vertically aligned with a line skip in ...
1
vote
1answer
479 views

Placing several pictures in one line, but with linebreak

I am trying to plot several pictures in one line, but only two per line and then the next two in the next line. And I want it all to be in one Figure so that I have only one caption. I can place ...
15
votes
1answer
1k views

How to break long URLs using common hyphenation but adding a line feed indicator?

I saw several questions like this one that request a solution for breaking apart URLs. I wonder if it is possible to hyphenate the words in a URL as it happens in normal text (i.e., breaking apart ...
11
votes
1answer
340 views

Is it a good practice if we always locally precede \href with \sloppy?

Is it a good practice if we always locally precede \href with \sloppy as follows? if you are interested to know the details, please contact me at {\sloppy ...
5
votes
1answer
623 views

listings: closing parenthesis as delimiter not matched when linebreaks=true

I want code in parentheses and in brackets to appear in different colors. In the following document, the words brackets again appear in green as intended, and outside again is black as intended, but ...
9
votes
2answers
2k views

Avoid putting statements on the same line with algorithmicx

I'm writing a simple pseudocode, but I have a problem with a repeat..until block. Basically what happens is that the return statement that follows the end of this loop gets rendered on the same line ...
6
votes
1answer
184 views

Preventing line break at the start of a long name in `\lstinline`

This question has developed from How to deal with very long lstinline-phrases like long class names?. That question is about line breaking inside a \lstinline phrase. I have provided an answer which ...
11
votes
2answers
567 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 ...
5
votes
2answers
111 views

Tie an inline math environment to be in the same line

How should I put command so that my inline math environment could be together. For example 0<x<1 is break up into two parts, 0< and x<1 in the next line.
1
vote
1answer
2k views

list item multilined ( `\newline` inside of item label ?)

How to make multiline item label ? Example \documentclass[a4paper,10pt]{article} \usepackage{lipsum} \begin{document} \begin{itemize} \item[Great Item] \lipsum[1] \end{itemize} \end{document} I ...
4
votes
1answer
225 views

\newcommand creates underfull\hbox (badness 10000) in paragraph

I have a 2-column document with repeating boxes. So I created these macros (don't mind the colors and boxheight): % ------------------------------------------------------- % aitparagraph % % gives ...
5
votes
1answer
529 views

Manually Break line in custom chapter title

\documentclass[openany, 10pt]{book} \usepackage[utf8]{inputenc} \usepackage[MeX]{polski} \usepackage{titleps} \usepackage{lipsum} \usepackage{tocloft} \renewcommand\cftchapaftersnum{.}% adds dot ...
0
votes
1answer
307 views

Words don't wrap inside redefined \marginpar{}

I have tried to play with a MWE from @cmhughes in this topic, and discovered that words inside \marginpar do not wrap like they should. Here is a MWE: ...
10
votes
2answers
3k views

Adjust the indentation whithin the algorithmicx-package when a line is broken

I have this code \documentclass{article} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm} \caption{Minimal Working Example for my Problem} ...
9
votes
1answer
1k 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 ...
6
votes
1answer
2k views

Automatic break/hyphen for too long meaningless words

Since there is no pattern for hyphening meaningless words, they should be individually hyphenated/broken with methods such as \hyphenation{longword}, \seqsplit{longword}, etc. However, there should ...
7
votes
1answer
257 views

Allow line breaks but not page breaks in inline formulas

It often happens that LaTeX breaks up an inline formula over two lines. However, I find it quite distracting when it breaks an inline formula over multiple pages. For example: ...
4
votes
1answer
7k views

Vertical align at center in beamer slides using the [allowframebreaks] option and \newpage

I'm writing my thesis slides in beamer. I need to align vertically at center the slide's contents when I use the [allowframebreaks] option in the frame environment and the \newpage to start a new ...
3
votes
1answer
1k views

Background color in inline code listings with linebreak

I want to highlight code inline with a gray background. Preferably with listings. This question is related to Colored background in inline listings. But as my MWE shows it doesn't work with line ...
4
votes
1answer
743 views

correct the hyphenation

How to correct the hyphenation in my paper that is entirely wrong? For example, in my paper, there are wrong hyphenations like result-s, s-mall, s-pace, etc. How can I fix this problem. I don't use ...
30
votes
2answers
20k views

No hyphen for a word

I want to put pdflatex to not put a hyphen in a word went it comes to the end of the line. I tried to put a \- in the beginning or the end of that word but it doesn't work. For example if I put:This ...