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

learn more… | top users | synonyms (1)

1
vote
1answer
40 views

Merge consecutive linebreaks

I have something like this : %\newcommand{\maybehide}[1]{#1} \newcommand{\maybehide}[1]{} \newcommand{\thing}[1]{#1} \newcommand{\bigthing}[1]{#1} \bigthing{ \thing{1}\\ \maybehide{\thing{2}}\\ ...
2
votes
1answer
45 views

Allowing line break at C++ operators ('::', '->', …) in \lstinline

The following picture shows my problem: How can I tell \lstinline to break lines at specific C++ operators? For example: FooFactory::instance()->createFoo() should be broken as follows: ... ...
1
vote
1answer
66 views

Underline long url and linebreak

I have a long url which I want to appear blue and underlined. Furthermore it must linebreak if the url is to long for a single line. \documentclass[a4paper,10pt]{article} ...
2
votes
2answers
28 views

Inserting \\ with a command doesn't do the same thing as inserting it directly

I'm using the mathpartir package and I have some code generated (by LyX) that puts an environment (that I'll call lines) in the \inferrule* and it seems to bother pdflatex whenever there are more than ...
0
votes
0answers
27 views

Define amount of space after \newline, \\, or \linebreak

How do I define the amount of vertical space there are after all new lines? I am looking for something that works like this: \define{x = 4} blah blah blah blah \\[x pt] blah blah \\[x pt] Where I ...
0
votes
0answers
11 views

Automatically avoid linebreaks before symbols and numbers

I want to have latex avoid starting a line with a number or symbol. Or at least print some sort of warning (similar to an overfull hbox warning). I know I can manually wrap each situation where this ...
2
votes
0answers
24 views

Line break with supertabular won't work

So, I have a really long list of symbols that I decided to create with supertabular. I'd like the table to split as it goes over to the second column, so I used {multicols}{2} but I found out that it ...
0
votes
0answers
23 views

2-line leaf in tikz qtree [duplicate]

How can I get two lines of leaf text in tikz-qtree? Specifically what I want is to have a word with a gloss under it. So for example, the leaf would be "Tisch" with the gloss "'table'" directly ...
2
votes
1answer
25 views

Breaking line inside a set

How can I write \[A=\Bigg\{\alpha\in \mathbb{Z}G : \alpha\ \text{is a unit in}\ \mathbb{Z}G\ \text{with}\ \varepsilon(\alpha)=1\ \text{and}\ \alpha+\Delta(G,G')\ \text{has finite multiplicative ...
25
votes
2answers
20k views

How to format an inline source code

I have a document where I quiet often refer to source code element, such as class names, I wanted to format these strings differently, but at the beginning I didn't want to fiddle with various options ...
1
vote
1answer
39 views

How to prevent line breaks in code listings?

I am adding a big Linux terminal output as a listing and would like to prevent these line breaks from happening: e.g. user@pc ~ $ top PID USER PR NI VIRT RES SHR S %CPU %MEM ...
0
votes
1answer
47 views

Text is spilling over the margin with standard margin settings

I have default margin settings, but certain text is spilling over the margin boundary. It happens when the final word on the line includes a hyphen. For example, if eye-movement happens to be at the ...
6
votes
2answers
6k views

URLs in bibliography: LaTeX not breaking line as expected

I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document. I have seen a number of questions about breaking URLs in bibliography, but after trying ...
3
votes
2answers
38 views

Preformatted text using ConTeXt's \startlines

This is a follow-up question to ConTeXt equivalent to LaTeX's \linebreak with full justification Include original page images for side-by-side comparison + SyncTex I am using the ...
1
vote
4answers
36 views

What is the command to add newline linebreak in \sum \prod? [duplicate]

I am sure this question or similar has been asked but I cannot find it by searching so adding it to make it more accessible: what is the command/environment to add newline linebreak in \sum \prod so ...
0
votes
0answers
18 views

Line breaks between quotation mark and footnote number, while using xeCJK

At the end of a line, a break sometimes happens between a quotation mark and the number of a footnote, while using xeCJK. MWE: \documentclass{scrreprt} \usepackage{xeCJK} \begin{document} This is an ...
9
votes
1answer
244 views

Balancing lines in two-column document containing figures

How to balance lines in two-column document that contains figures? In other words - how to set the vertical margins of figure with caption so that the line after the figure corresponds to the line in ...
8
votes
2answers
364 views

Line breaks in bibliography with biblatex/biber

I'm having trouble getting biblatex to break lines in a sensible way in the bibliography. Specifically, it seems that the line cannot be broken within the specification of chapter and/or page numbers ...
2
votes
1answer
28 views

French bis/ter/quater/quinquies section numbering with manual line breaks

As a follow-up to my previous Question French section numbering using bis, ter, etc, I'm attempting to manually add line breaks in my section titles that show up in the body of the text as intended ...
6
votes
2answers
87 views

Can't get teletype \texttt to move to next line

I'm having a problem that, whenever I have a lengthy region of \texttt{} at the end of a line where it continues to trail off rather than wrapping to the next line. Here is a MWE: ...
3
votes
1answer
26 views

Bad linebreak with tabulars in loop

I have built arrays (with csnames) containing contact information, and I would like to print out all the contacts in tabular format, using a loop. But when the tabulars overflow the \textwidth, ...
0
votes
1answer
12 views

Figure caption has line break problems when using subfig

I'm using the subfig package and I'm getting words that are broken in captions. Can anyone explain why, or how to stop it? \documentclass[11pt,a4paper, draft]{report} \usepackage{gensymb} ...
13
votes
2answers
11k 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} ...
0
votes
2answers
29 views

line break in enumeration and \underline command

How can I break a line that is inside of an enumeration, and \underline{} command, without using \usepackage{soul} and it's \ul{} command? \item{\textbf{\underline{Long string of text that needs to ...
1
vote
2answers
31 views

How to force a subfigure's caption to be on one line?

I want the caption for each subfigure to be on one line because it isn't so long that it should line-wrap. Is there any way I can force it to be on one line? Here is a minimum working example: ...
0
votes
0answers
23 views

Bizarre line-skipping in tex file

A tex source file that I have received from a coauthor is double-spaced (i.e. every even-numbered line is blank) when I open it in TexShop in Mac OS X, or in TexStudio. Naturally, the file won't ...
3
votes
2answers
44 views

How can I break lines automatically in tabular in IEEEtran?

I use tabularx to break lines automatically in tabular. Here is my code. \begin{table}[h] \caption{A table} \begin{tabularx}{\textwidth}{|l|X|} \hline \multicolumn{1}{|c|}{\textbf{Term}} & ...
1
vote
0answers
31 views

\newline not working with longtable?

This table comes from SAS output. The \newline is not working correctly. E.g. "Percent trimmed in tail" ought to be Percent Trimmed In tail but it is showing up as Percent Trimmed In Tail Here ...
1
vote
0answers
32 views

How can I break lines automatically in tabular to fit to page width? [closed]

I expect to break a long text automatically in tabular. After searching this site, there are several ways: (i). Use p{dimension} in tabular, answered here \begin{table}[h] \begin{tabular}{|l|l|} ...
8
votes
1answer
6k views

moderncv - newline within a cventry

The information that I want to provide isn't fitting into one line. I am working with \cventry{}{}{}{}... I want to put information into a new line, still positioned to what is in the line above. I ...
2
votes
0answers
28 views

sagetex with breqn ? break line sagetex equations

When using sagetex, it often produces very long equations that are not visible anymore because they go over the page width. How to fix that? I could work around it by loading the .sagetex.sage into ...
1
vote
1answer
37 views

TeXworks adding bogus endline characters

I realise this is not exactly a TeX question, but I figured someone here might know what this is about, and in any rate, this is a question a LaTeX user might encounter. If it is not appropriate, do ...
82
votes
5answers
163k views

How can I split an equation over two lines

I am having the following equation: \begin{equation} Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} ...
73
votes
5answers
170k views

How to break a long equation?

I have a long equation but long enough to occupy two lines. I want to break it to improve readability. How can I break it? \begin{equation} F = \{F_{x} \in F_{c} : (|S| > |C|) \cap (minPixels ...
1
vote
1answer
42 views

How can I make the appendix one column to fit my very long equations? And also keep equations from running off the page?

The rest of the document is two columns, just the appendix needs to be one column to fit the equations. Here is the code, any help greatly appreciated! ...
2
votes
1answer
35 views

Centering two line caption in memoir

I'm struggling to center my two line captions. I'm using memoir and I want the second line to be the reference to where I got the figure from. I'm using the following code for the figure: ...
0
votes
0answers
14 views

seqsplit error: \SQSPL@scani has an extra }

I created some commands to allow me to easily handle Japanese text in Latex. Recently I added seqsplit to automatically break lines, as Japanese text is handled as a single word due to the lack of ...
2
votes
1answer
81 views

How can I reduce the width of a table?

I'd like to put this table in a page: \begin{table}[h] \begin{tabular}{ccccccccc} \hline \textbf{No.} & \textbf{Author (year)} & ...
2
votes
2answers
41 views

Center in a table if the result has at maximum two lines, otherwise try harder to squeze it on two lines (and then maybe center)

This has the second cell span over three lines: \documentclass[12pt,landscape,a4paper]{article} \usepackage{microtype} \usepackage{multirow} \usepackage[T1]{fontenc} \usepackage{lmodern} ...
3
votes
3answers
72 views

No newline before scientific units without using “~”

Is it possible to define a list of units (like ml, °C, nmol, eq., etc.) and forbid latex to insert a newline before those? I know it is possible to use a ~ between number an unit, but the above ...
11
votes
3answers
8k 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, ...
1
vote
2answers
100 views

Redefining \section command

I'm writing a draft of my notes with Latex. They are basically definitions related to a particular concept from different sources. Therefore I have used the command \section to highlight the concept ...
2
votes
2answers
76 views

New line after reaching margins

I wonder if there is a way to tell to WinEdt (or TexStudio) to start a new line when a word reaches the margins of a document. The reason is that I don't like to have long expressions and I don't ...
5
votes
3answers
4k 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 ...
0
votes
1answer
31 views

How to force long lines to automatically split into several to fit on the page? [duplicate]

Intro I have a list of elements in a tabular, where some elements of the last (3rd) column sometimes are long enough to overpass the width of the page. It is quite boring to have to go line by line ...
7
votes
1answer
639 views

Listings - break on whitespace+

I'm using listings for the first time, and have some rather long lines of code. I get that I can break lines automatically with breaklines=true, and I can break only on whitespace with ...
0
votes
1answer
60 views

unbold title and no line break for a subsection

How can we unbold the title of a subsection and suppress the line break, like it was done in the following image? The answers in the duplicate deal with how to do that for all the subsection. I want ...
2
votes
1answer
72 views

How to deal with many overfull \hboxes in large document?

I am in the process of proofreading a major XeTeX document of more than 600 pages. It is hardly surprising that there are quite a few cases of overfull \hboxes; I usually get about 150 of them. I am ...
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 ...
2
votes
2answers
66 views

Automatic wrapping of displayed long formula (e.g., with the same algorithm used for inlined formulae)

Typographers warn against automatic wrapping of long formulae; however, there are cases in which this makes sense. Here is one: \documentclass[twocolumn]{article} \usepackage{lipsum,framed,amsmath} ...