{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
3answers
308 views

Viva preparation document

In one of the doctoral thesis howto books (Rugg and Petrie, I think) the advice given is to prepare a document that summarises one page of your thesis per line of page. I'm interested in working with ...
8
votes
4answers
5k 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: ...
8
votes
2answers
5k views

How do I keep a string of text together without it doing a line break?

I'm writing up a long paper, in which in prose I have various equations. However, I do not want a line break to occur within the equation - I want the equation to stick together. I want to do this ...
8
votes
3answers
3k views

linebreak in description title

In my document I have a description environment. One of the titles in the description is too long to fit in one line and I want to break it. I know this is a bad styling but I can't think of any way ...
8
votes
2answers
5k views

How to prevent LaTeX from line-breaking a phrase?

How can I prevent LaTeX from putting line-breaks into a phrase? I could replace dashes with "~ and spaces with non-breaking spaces, but I'm looking for a more general solution in case I need other ...
8
votes
3answers
528 views

How to achieve line break in simple $formula$-mode

I want to have inline math text like Figure \ref{figure:example graph} shows an example of a graph $G = (\{v_{1}, \dots, v_{5}\}, \{(v_{1}, v_{2}), (v_{2}, v_{3}), (v_{1}, v_{3}), (v_{2}, v_{5}), ...
8
votes
2answers
873 views

Line overflow with long filenames and urls

Consider the following text. Here /etc/postgresql/8.4/main/pg_hba.confoverflows into the margin, and is hypenated. /var/lib/pgsql/data/pg_hba.conf is also hyphenated, but does not overflow. So, I was ...
8
votes
2answers
1k views

ragged2e: “newcommands” option produces “underfull \hbox” warnings

The ragged2e package provides the commands \Centering, \RaggedRight and \RaggedLeft for setting ragged text while allowing hyphenation. The package offers a newcommands option that sets the standard ...
8
votes
1answer
3k views

URL linebreak in footnote

I use a footnote with a too long url, so that I'd like to see a linebreak. The url package does linebreaks automatically as far as i know, but in the footnote it won't do it. Anyone have a solution to ...
8
votes
3answers
1k views

How to adjust font size or kerning to fit line width?

I have some text that nearly fits the given line width. I can see that a minimal adjustment of font size or kerning would make the text fit, but how do I tell LaTeX to squeeze the text? Yes, this ...
8
votes
2answers
493 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: ...
8
votes
3answers
376 views

How to put a non-breaking space in \cite

How do I put a non-breaking space inside a \cite macro with several citations? \cite{ref1,~ref2} causes an error. If I leave the space out, one is inserted and this is causing the citation to span two ...
8
votes
1answer
383 views

Adding overfull hbox 'slugs' to final document version

I'm using a documentclass which looks dramatically different in draft mode compared to final. I'm preparing my document for the final formatting, so I don't want to pass the draft option. However I ...
8
votes
2answers
79 views

How do I separate items within a line so that the separator automatically does not appear at either end, and items are not line-broken?

In my CV, I have lists that look like this: wizardry \tdot fluid dynamics \tdot applied bear wrangling \tdot calculus \tdot [...] where \tdot is a \textperiodcentered character along with some ...
8
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 ...
8
votes
1answer
466 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 ...
8
votes
1answer
229 views

Newline in \def

I can not solve my problem. I have definition: \def\mfTitle{askdj asldj asdlk jhasd kjhaslkjd asdas} and I would like add a newline into it: \def\mfTitle{askdj asldj asdlk \newline jhasd kjhaslkjd ...
8
votes
2answers
778 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 ...
8
votes
2answers
237 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. ...
8
votes
2answers
300 views

Passing text containing linebreaks as command or environment parameter?

I just tried to write some commands which used its argument to check whether they were empty (isempty{...} from package ifthen) or not. The problem was that the text to check contained a linebreak, ...
8
votes
1answer
993 views

Title running off the page!

I haven't had this problem before so I'm not quite sure what's happening, but my title is running off to the right side of the page. This is my code: \documentclass{article} \usepackage{assymb} ...
8
votes
2answers
944 views

Non-breaking space in \citet using natbib?

When adding citations in the body of a document I'm used to write ... in some interesting paper~\cite{interesting}. So that (if I'm using numbered references) the word “paper” and the citation ...
8
votes
1answer
3k views

How can I prevent hyphenation in a table column?

I have a table (tabular) with some fixed width columns, and I'd like to prevent a hyphen being inserted (preferring a line break to be inserted prematurely). The sample table's content is below. ...
8
votes
1answer
100 views

Use non-breaking space after name initials with biblatex macros

I want to enforce biber/biblatex to place non-breaking spaces between initials and last names of authors. Example: \documentclass{article} \usepackage[backend=biber,natbib=true]{biblatex} ...
8
votes
1answer
2k views

Wrapping text inside framebox

I would like to wrap the text inside a \framebox, such that it continues on the next line instead of running out of the margins. A minimum working example: \documentclass[]{report} \begin{document} ...
8
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: ...
8
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. ...
8
votes
1answer
2k 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} ...
8
votes
1answer
163 views

How to make ~ work for en-dashes?

I have a German LaTeX-document that tries to implement German en-dash line-breaking rules with ~ like this: \documentclass[twocolumn,a4paper]{scrartcl} \usepackage[T1]{fontenc} \usepackage{german} ...
8
votes
2answers
353 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, ...
8
votes
1answer
821 views

How to get XeLaTeX do proper hyphenation and full justification?

I want to use XeLaTeX to design a paperback (11x19cm) using Adobe's Garamond and Myriad as custom fonts. It is entirely written in German. However, both hyphenation and full justification are a mess: ...
8
votes
1answer
2k 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 ...
8
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 ...
8
votes
2answers
853 views

Linebreak before URL with biblatex/alphabetic

Using biblatex with alphabetic style, how could I insert a line break (\\ or \linebreak) before the URL output (with the aim to have less linebreaks within URL)? (I use url and hyperref) Slightly ...
8
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} ...
8
votes
1answer
468 views

Overfull hbox in biblatex

I just ran into a problem using biblatex with a long author and title: The output extends past the right margin of my text, because biblatex does not insert a linebreak before the date. Please see the ...
8
votes
1answer
77 views

Applications of various strength of \linebreak command

This is a curiosity-driven question. The LaTeX \linebreak command comes with five options, from 0 to 4, determining its strength. \linebreak[0] allows TeX to break a line where he normally does not ...
8
votes
1answer
331 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 ...
8
votes
1answer
547 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, ...
8
votes
1answer
6k views

Forcing new line after item number in enumerate environment

How can I force the text of an enumerate item to start on a new line below the item number?
8
votes
1answer
2k views

How to print in algorithmic package for some If condition or For loop in one line?

How to print \FOR{$j:=0,\ldots,i-1$} \STATE{$\C_{ij}:=\C_{ii}\cdot\C_{ij}$}; \ENDFOR in one line instead of two line?
8
votes
1answer
157 views

Tweak showlabels/showkeys - wrap the label

Can showlabels wrap the label in the margin? A very similar question is showlabels: wrap labels in marginpar, but the solution of @DavidCarlisle does not solve the more general case. Consider the ...
8
votes
1answer
181 views

Break line only if it's too long, but breaking won't create a new page

I'm the author of the contracard package/class for typesetting calling cards for traditional dances. Currently, if you typeset a particularly long figure on a calling card it wraps like this (look at ...
8
votes
1answer
282 views

Prevent line-breaking after short words

The publisher requires that most of short words (shorter then 4 chars, and all the prepositions, etc.) should not be left last on the line but kept with the following word. Wrong: Following the ...
8
votes
2answers
303 views

How to automatically keep the indentation level when a line has to be broken

I'm using the algpseudocode package with two custom commands, \Let and \LongState to handle automatic indentation of (broken) long lines in the spirit of Werner's answer, which uses \parbox to wrap ...
8
votes
1answer
219 views

Line breaks in listings

Is there a way like wrap the line after at most 60 letters but it should not break inside some commands like listings does? Example: \documentclass[a5paper]{article} \usepackage[T1]{fontenc} ...
8
votes
1answer
105 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 ...
7
votes
3answers
257 views

How to place a line break between every character in ConTeXt?

I have some text appearing in a macro, like this: \printascolumn{This is some text.} How can I place a line break between each letter or printed symbol, such that it appears like this? T h i s i ...
7
votes
3answers
226 views

How does (or, what happens when) Tex typeset(s) a line and linebreak?

I could not find references to this with a cursory search, so I thought I'd post a question; I'm aware this is probably discussed at length in the Tex book or similar, but unfortunately I don't have ...
7
votes
4answers
3k views

Something like \raisebox that respects line breaks

If one wants to raise some text one uses something like \raisebox{0.5 em}{some text} However this doesn't respect line breaks and may cause some nasty overflows. Is there a way to have \raisebox ...