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

learn more… | top users | synonyms (1)

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 ...
6
votes
1answer
272 views

TikZ: Text alignment and line breaking

I have some troubles with text alignment along path in tikz. I made custom shape and wrote text along path inside it in the following way: \documentclass{article} \usepackage{tikz} ...
6
votes
1answer
225 views

biblatex: no linebreaks in name lists when typesetting ragged-right

When typesetting a bibliography \raggedright, biblatex seems to have trouble breaking a line between an author's first/last/middle names (and, if multiple authors are present, between two authors). ...
6
votes
1answer
356 views

Biblatex breakline Doi

I'm using the XeTeX with BibLaTeX and biber. That's the line: \usepackage[backend=biber, citestyle=authoryear-ibid, bibstyle=authortitle-ibid]{biblatex} It's working fine but I'e just get one ...
5
votes
2answers
694 views

Automatic line-break in tabular

Sorry if I've missed the answer in another post, but I've literally spent 3+ hours googling this problem now. I'm making a tabular and I'd like to to automatically do a like break rather than going ...
5
votes
4answers
150 views

How to span \textit{} and \Large several lines in \author{}

I would like to span \textit{} in several line in \author{} tag. So far I know I can do this ( but here \LARGE will only affect the Name) : % title \title{\textbf{Cool title}} \author{\LARGE ...
5
votes
1answer
229 views

How to apply \looseness=-1 to ALL the paragraphs?

I'm writing a short document of (3-4 pages), and try to condense it into the allowed space. Putting \looseness=-1 at the end a paragraph helps quite a lot. Is there a way to tell LaTeX to treat ...
5
votes
2answers
163 views

Russian (Czech, Polish, etc.) tradition of equations breaking [duplicate]

According to the Russian (Czech, Polish, etc.) typesetting tradition, we have the following rules of equation breaking: If an equation cannot be fit into one line, a typesetter should put part of ...
5
votes
1answer
140 views

Make less space between lines on a table

I have a big table where I need to use multiple lines on each cell. The table is too big though so I need the space between lines on each cell to be smaller. I found on another post that I could use ...
5
votes
1answer
492 views

Command \obeylines in a macro

I need to collect data (a sequence of input strings) in the preamble of a document, but the strings are to be typeset later in the document and must obey the line breaks set when typing the strings at ...
5
votes
2answers
2k views

Breaking lines in codes with mcode package

I want to include some code from MATLAB and I'm using the mcode package. But the problem I encounter with it is that it doesn't break long lines automatically and since I load the file and not the ...
5
votes
2answers
779 views

resizebox doesn't respect linebreaks?

I'm trying to scale some text up. It seems like \resizebox (from graphicx?) and \adjustbox (from the adjustbox package) ignore line breaks: \resizebox{5cm}{!}{Hello\\ world} Is there a way to scale ...
4
votes
1answer
112 views

Line breaking and alignment in list

Consider the following code: \documentclass[ a4paper, 12pt ]{article} \usepackage[ hmargin=2.4cm, vmargin=3cm ]{geometry} \usepackage{amssymb} \usepackage{enumerate} % better to use ...
4
votes
3answers
350 views

Automatic line-breaks in tables?

I'm writing a short tabular CV that I have to add to my thesis. I thought a quick way would be to use a table for that purpose: \begin{tabular}{ll} 2009-present & very long text 1, very ...
4
votes
2answers
534 views

Macro to convert 'multi-line' text to 'single-line' (remove line breaks?)

Consider the following example: \documentclass{minimal} \def\myMultiLineText{% Line One Line One \\ % Line Two Line Two \\ % Line Three Line Three \\ % Line Four Line Four % } \begin{document} ...
4
votes
2answers
2k views

Starting an enumerate of an enumerate on next line?

What I'm trying to do is to make my enumerates look like this a) i) answer ii) answer b) answer Currently, I'm using \begin{enumerate} \item \hfill \\ \begin{enumerate}[a)] \item ...
3
votes
2answers
116 views

Using \color in a paragraph column inside a tabular environment results in a line break [duplicate]

Some of my documents are compiled into multiple outputs. Some Versions contain certain parts, while other versions contain only a placeholder. For this purpose I have a macro \markup that colors its ...
3
votes
1answer
288 views

Changing vertical alignment of items in middle of line (for ToC entry)

Well, I'm really starting to hate LaTeX sometimes - mostly because you can't really learn one thing, and have it applied everywhere else you wanted :/ For instance, I asked the question Changing ...
3
votes
2answers
1k views

Why doesn't \newline work inside lstlisting?

I am new to LaTeX and am using a template provided by a friend: \subsection{P2P library} The library is implemented in C-Sharp and provides two basic facilities - maintaining a member list at every ...
3
votes
1answer
1k views

An environment to change the vertical space around a formula

Specially in beamer presentations, I use a custom environment to change the vertical space around a formula. The code is: \newenvironment{shrinkeq}[1] { \bgroup ...
2
votes
1answer
215 views

avoid underfull \hbox (badness 10000) in paragraph because of linebreak

It seems to be a common question, but the other werent adressing my code. \begin{table}[ht!] \centering \small \caption{Absolute and relative frequencies } \label{FreqFair} ...
2
votes
1answer
189 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 ...
2
votes
2answers
850 views

Theorem formatting: strange interaction with itemize

This question is related to this one. I want to have theorem headers alone on a line like this: Theorem 1. some text... In the amsthm documentation, they suggest doing this: ...
1
vote
1answer
365 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 ...
16
votes
3answers
1k views

Help on dealing with items divided with slash

I am using a number of items in text that are divided with a slash. For example dates in different calendars or names of locations, such as 585/1190~CE (the first number is the year in Islamic lunar ...
15
votes
1answer
176 views

Does \\ suppress hyphenation for the following word?

I am not sure, if this is a bug of the package showhyphens or some LaTeX-behaviour I don't understand. Please have a look on the following example: % arara: lualatex \documentclass[ngerman]{article} ...
15
votes
4answers
885 views

How can I make (La)TeX prefer to fill centered lines

My thesis formatting requirements ask for multiline chapter and section titles to be a maximum of 4.5 inches wide with any subsequent lines being wrapped such that they are sucessively shorter, ...
14
votes
3answers
468 views

How to insert a non-stretching but line-breaking thin space?

How do I insert a small space that looks like the space I get with \, but allows a line break like a normal space does? I.e., I'm looking for a non-stretching, non-non-breaking space whose width is ...
14
votes
2answers
1k views

Wrong line break in description environment after a long label

I encountered an issue with my description environments: If I use a label that almost is as long as the text width, the explanatory text afterwards is not wrapped correctly. I am using the mdwlist ...
12
votes
3answers
7k views

No newline after (sub)section?

I want my text to appear right after the call to \subsection{Name} but I can't find how to do it. I'm using the article class. An example of command: \subsection{a)} Blah blah bla... produces: ...
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
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 ...
8
votes
2answers
304 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
2answers
354 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
333 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
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
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. ...
7
votes
3answers
177 views

Overruns in newtheorem in latex

I'm defining a newtheorem as follows: \newtheorem{definition}{Definition} the problem is when the definition name is long, it results in overruns. I've tried \\ to split the name in two lines, ...
7
votes
1answer
675 views

Automatically prevent line-break at hyphen of specific words (e.g. “dual-self”)

Usually questions about hyphenation and line-breaks are concerned about how to allow hyphenation when a word already contains a hyphen. That's not what I'm after: I would like to prevent the word ...
7
votes
1answer
822 views

Line length in fancyvrb

What I'm doing: Typsetting source code using pygments. What is happening: the code typsets fine, but because pygments puts the code into a Verbatim environment, some of the lines are far too long. ...
6
votes
1answer
815 views

Wrap text around a picture except for the first line

As the following minimal sample shows, a text wrapping around a picture starts wrapping with the first line. Including the wrapfigure in the text leads to strange paragraph breaks. %---- ...
6
votes
3answers
5k views

Insert a symbol at the end of line

I want to insert a symbol (\Box) at the end of the line.
5
votes
1answer
95 views

Why might \\* (“line break here, but no page break”) not work, and how can one fix this?

One is often taught that "\\ causes a line break which is not a paragraph break" and "the variant \\* additionally prevents a page break". (I hereby acknowledge user egreg's admonition that "\\* ...
5
votes
2answers
317 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} ...
5
votes
1answer
194 views

How to create a page with two columns that can span pages to achieve my special goal?

I am a Chinese plain TeX user and also a beginner. Now I encounter a hard question, that is I must write some numbered English paragraphs at the left column and its corresponding Chinese ...
5
votes
4answers
2k views

Line breaks and the URL package

Long URLs need to be broken at the end of a line. Here's a topic about that. That topic suggests adding the hyphens option to the URL package, and also to define ...
5
votes
1answer
514 views

Automatic linebreak in align environment in macros

I have given a selfdefined command like \newcommand{\AND}[2]{\left(#1 \vee #2 \right)} which makes sure that I always give the correct number of parameters to my formula and which handles the ...
5
votes
1answer
331 views

Different alignment for table number and caption

I have a table whose table number should be right-aligned and its caption should be center-aligned on the next line like this: Table 1 Caption ...
5
votes
1answer
176 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, ...
5
votes
2answers
412 views

Text created with a \newcommand overflows into margin (not xspace question)

I am aware of the use of xspace to handle the space after a macro in different situations. However, it seems that I cannot avoid having my text created with a \newcommand from running into the ...