{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
2answers
323 views

How come the tilde ~ sometimes does not behave like non-breaking space?

This is again one of the behaviors that are quite difficult to catch in a reconstructible (and simple) example, so one has to resort to animations. Basically, the issue is this: the tilde (~) is ...
8
votes
1answer
188 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
909 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
232 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
523 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
574 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
2answers
8k 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 ...
7
votes
3answers
235 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
2answers
81 views

Line break in macro

I have defined a macro in my document as \newcommand{\FSeq}[2]{\ensuremath #1_1, #1_2, \ldots, #1_#2} The problem is that surpasses the margin usually. Is there anyway to solve this problem? I ...
7
votes
1answer
156 views

Why does Context line-break my quotation and leave the quotation sign on it's own row?

Using Context to set a book I have the following problem: Context linebreaks some quotations in a way that makes the quotation sign (in my case a guillemet [sic!]) appear on its own row. How can i ...
7
votes
1answer
318 views

Shipout line like Shipout page

In lineno package guide, I found: Attaching line numbers after TeX has broken the paragraph into lines is already quite a difficult job for TeX. Why? Because TeX does not normally give you any ...
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
2answers
3k 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 ...
6
votes
1answer
284 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
235 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
375 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
4answers
189 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
2answers
175 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
175 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
530 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
3k 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
845 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
116 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
595 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
514 views

Start a new line in label using pgf-pie

I'm using pgf-pie. It is not a standard package. I found it on google code. As its name, it is used to create pie chart. \begin{figure}[htp] \centering \begin{tikzpicture}[scale=0.9] ...
4
votes
2answers
549 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
127 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
306 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
2k 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
2k 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
116 views

Make the lines of a description item line up

I am trying to line up the lines of a single description item. When I introduce a line-break or when the line becomes to long, the new line isn't lined up with the first one. I'm aware of the fact ...
2
votes
1answer
297 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
197 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
906 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: ...
17
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
194 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
904 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
499 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 ...
13
votes
3answers
8k 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: ...
11
votes
1answer
221 views

Layout issue with biblatex

On the screenshot you can see that the ISBN number breaks the layout: How can I fix the layout? On my small attatched example the layout is not so much demaged like in my real work but you will ...
11
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
127 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
368 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 ...
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 ...
8
votes
1answer
363 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
839 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. ...
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. ...