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

learn more… | top users | synonyms (1)

4
votes
1answer
108 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 ...
0
votes
0answers
30 views

Allow line breaks in highlighted text [duplicate]

When I highlight a bit of text using \colorbox, it prevents line breaking. How does one give tex permission to break lines? Example: \documentclass{article} \usepackage{color} \begin{document} ...
5
votes
1answer
43 views

Is there any means by which to severely discourage breaking a line in a would-be box?

I have a small section of text—no more than 15 or 30 characters—that is split up into a few words. I'd like to add a penalty to breaking in this section, but I don't want to completely bar it and risk ...
5
votes
2answers
259 views

Breaking very long equations

This is a frequent question, so let me specify a bit more what the problem is. I have equations with very long fractions that are within integrals, \begin{equation} \int A \int \frac{A B C D E ...
1
vote
0answers
53 views

suspended hyphen without linebreak between word and hyphen

I have a word combination like this metallo-porphyrins and -phthalocyanines which eventually gives a linebreak between the hyphen and the word phthalocyanines. I tried to include the ngerman package ...
3
votes
1answer
186 views

LaTeX error with moderncv

I can't seem to figure where the problem is, and why the file wont compile. I'd be grateful if someone could help me. Here is the LaTeX code: \documentclass[11pt,a4paper]{moderncv} % Font sizes: ...
4
votes
1answer
199 views

LaTeX allows line break between concluding em-dash and comma before a new sub clause begins

I am surprised by LaTeX putting a comma which follows an em-dash on a new line when the previous line is flushed. My intuition and sense of style tells me that they should never be separated. For ...
7
votes
3answers
217 views

How to break long equations while keeping alignment?

I have the following long equations: \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{displaymath} \begin{aligned} (\chi_1|\chi_1) ...
0
votes
1answer
53 views

How to add a line-break inside a problem title?

I would like to state a problem in LaTeX with a somehow big title and I cannot find a way to separate the title in 2 lines. LaTeX keeps all this in one line. (Below is a sample code). ...
5
votes
2answers
802 views

Figure caption alignment screwed when using line break

I am having trouble with figure captions when I need a manual line break. \documentclass[A4]{book} \usepackage{subfig} \usepackage[top=35mm, bottom=38mm, inner=40mm, outer=24mm]{geometry} ...
3
votes
1answer
576 views

Manual line break in beamer \title adds spurious comma in \inserttitle

Currently I'm preparing a presentation with the beamer class. I want to add a manual line break (with \\) to the title to make it look nicer. However, in the \inserttitle command (which I use in the ...
5
votes
2answers
157 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 ...
3
votes
1answer
416 views

Removing Line Breaks in Bibliography compiled with Biblatex

I have a strict page limit on a paper I'm writing, and the page limit includes citations, so to save space I would like to remove the line breaks between entries in my bibliography: [1] Dr. Seuss. ...
7
votes
1answer
222 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 ...
3
votes
3answers
189 views

Custom line breaking

I have a long line, which could be a url but is not always a url so I cant use url/burl package. I want to specify where to break (at '&'), and how to do it. Long line: ...
1
vote
0answers
86 views

why changing page margins using geometry package causes bad math inline break?

I had no idea that changing page margin size can cause problems with line break with in-line math. I have this MWE that shows one problem. I like to make the page margins smaller, so I can fit more ...
0
votes
1answer
62 views

How to justify a very long ciphertext and corresponding plaintext in Latex? [duplicate]

I have a very long ciphertext and corresponding plaintext both are of 680 alphabets without space to print in a latex document. I have not found any way to make justify it in internet. Any Ideas ...
10
votes
1answer
170 views

Why does titlesec cause bizarre line breaks within \paragraph?

Consider the following example: \documentclass[12pt,a6paper]{article} %\usepackage{titlesec} \usepackage[textwidth=79mm]{geometry} \begin{document} \paragraph{I guess we'll have to make a few ...
5
votes
1answer
149 views

Linebreaks after bib items for Bibstyle (using BibLaTeX)

I am currently suffering of a strange bibstyle problem with line breaks. There is a missing space between bib items in the bibliography, which is generated using BibLaTeX. Even though I am using ...
0
votes
2answers
182 views

continuing equation under the equal sign [duplicate]

how to continued the equation under the equal sign? I want to do it like this
6
votes
2answers
185 views

Preventing hyphenation of specific short, repeated, hyphenated words

I'm writing a document where I frequently refer to some experimental cases which are called things like "M-1" and "P-2". It's always a single number, a hyphen, and a single number. In several places, ...
1
vote
1answer
58 views

Preventing space instead of linebreaks

How to prevent space at a line break? a b c produces: a b c I want abc.
1
vote
1answer
1k views

Automatic forced line breaks in latex table

Im making a table where the last column contains a URL which may be quite large, so I want to make automatic line breaks in this column. If I use p{3in} in the table, some of the URL are seen as one ...
4
votes
2answers
168 views

Lines overrun margins

I use custom 1 inch margins for most of my homework but for some reason LyX likes to ignore the margins sometimes, for example: I don't know why it keeps doing this it happens in a lot of my ...
4
votes
3answers
280 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 ...
5
votes
1answer
97 views

Is it true that it is impossible to insert manual line breaks in URLs that are part of a biblatex reference?

After having looked through quite a number of questions about inserting line breaks within URLs, I'm still wondering about a specific case: manual insertion of line breaks in a URL in biblatex. So the ...
10
votes
2answers
140 views

How to rigidly chop long lines in plain TeX

I am using plain TeX and want to typeset an appendix that contains several hundred URLs. When a URL goes past the right margin, I would like TeX to stop printing (i.e. not carry into the margin, not ...
12
votes
2answers
415 views

Nonbreaking dash that allows hyphenation

The babel package provides useful dash variants, e.g. "~ for a non-breaking dash that forbids hyphenation in the parts, and "= for a breaking dash that allows hyphenation in the parts. However, ...
3
votes
1answer
249 views

Should I use \\ to end a line or a paragraph? [duplicate]

I am somewhat confused as to how to approach the following issue. In my thesis is have a lot of text and want to group this is using line breaks and paragraphs. Up to now I have been using \\ to ...
0
votes
1answer
26 views

How to prevent aligned equations to shift when adding a non-aligned line break?

I have an equation in the aligned environment to align the equal signs together. However, the last equation is too long, and I want to break it up. When I insert a linebreak, all the equations above ...
8
votes
3answers
261 views

“Fill in the missing words” needs line breaking before a \phantom{word}, and a list of removed words

Apologies for the very long title. I'm writing a "fill in the missing words" document. I have made a makro \fjern{} ("remove" in Norwegian) which underlines the argument and places it in a phantom ...
5
votes
3answers
143 views

How do I break a line without breaking a column?

I would like to have a forced line break without having a break in a column, similar to how the //* gives a line break while preventing the page from breaking. Specifically, I would like to be able to ...
1
vote
0answers
65 views

\relpenalty=1000 problem [closed]

I was trying use \relpenalty to fix a formula which was breaking and I tried to use \relpenalty=1000: turns out now my layout got crazy and most of my images are now at the end of the chapters, in the ...
0
votes
0answers
135 views

Detect a newline after dollar $ sign

I would like to be able to use \ifnextchar to check if the next character is a new line character. The reason is that I would like to redefine the $ sign to behave differently if it is followed by a ...
2
votes
1answer
62 views

TeX4ht - prevent line breaking in HTML?

By default, TeX4ht breaks long lines of text in the input into shorter lines in the output HTML file. Is there any way to suppress these extra line breaks? (Note that I am trying to avoid extra line ...
1
vote
1answer
112 views

Split line if too long

I am sure that this has been answered here many times, but I can't find a duplicate. My question is what to do with lines that are "too long", i.e. that overflow into the margin. I think the problem ...
3
votes
1answer
89 views

I want to have pbox have line breaks where the margin falls

I am using \pbox to have line breaks in a table, but cannot seem to figure out how to have it break at the "natural" location where the margin begins. Here is my code: \documentclass{article} % ...
1
vote
1answer
81 views

What is the proper way to ensure/avoid non-break with item and subitem?

This is a rather basic question, but I wanted to know what the proper bracketing is or options to protect page breaks between items in 'itemize'. That is, items can be broken across pages but not ...
3
votes
1answer
200 views

Hyphenation when using \verb command

I'm having a problem using \verb command. Usually when I want some verbatim font in the current line (not in a new paragraph) I use the \verb command, not the verbatim environment. So, when I use ...
15
votes
1answer
199 views

Expand abbreviation automatically at beginning of line

According to an tradition in Spanish typesetting (Martinez de Sousa, MELE4), the abbreviation etc. should be fully expanded to etcétera when it appears at the beginning of the line (Spanish page in ...
3
votes
2answers
80 views

Why linebreaks break the line height within certain environments with size-changing macros?

Why linebreaks break the line height within certain environments with size-changing macros? I'm trying to understand what's the difference between these three approaches: \newenvironment between {} ...
2
votes
2answers
258 views

paralist package: \setdefaultleftmargin{0em}… doesn't properly align wrapped lines

I am using the paralist package to create very compact lists (for a poster). I'd like to use \setdefaultleftmargin{0em}{2em}{}{}{}{} to set the indentation of itemized lists to zero. This works ...
4
votes
1answer
96 views

Keeping first and last rows of a pgfplotstable with longtable on a page

I am using pgfplotstable along with longtable. Everything works good, but sometimes a single row can be on one page, which is kind of ugly. How can i keep the first 3 and last 3 rows of the table on ...
5
votes
2answers
138 views

Preventing \mbox or \fbox from exiting the page

I am trying to do something like this: \documentclass[a4paper]{article} \usepackage[top=0mm, bottom=0mm, left=0mm, right=0mm]{geometry} \begin{document} \noindent \fbox{\hskip1cm Some text ...
2
votes
0answers
82 views

break line at comma inside listings [closed]

I'm trying to do some listings environments, but I'm encountering problems. The ideal output is this: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦ ⤷ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
5
votes
3answers
2k views

How to center table caption that includes a newline

My table caption spans more than on line so I added a \newline to split the caption at an appropriate position. Now, the two lines are left aligned. How do I center the two lines of the caption? ...
3
votes
1answer
360 views

How to remove the extra blank line in algorithm2e

I want to add a right aligned comment in LaTeX after \For command, but it adds an undesired blank line. Please help me. CODE: \For(\tcp*[r]{Incremental calculation of edges}){$i \gets 1$ ...
3
votes
1answer
73 views

Weird new line using \cmpd from chemnum in long headingtitles

I have a problem using \cmpd in a heading, that is too long. For some weird reason, the compound number gets put on a new line, even though there is no need. I already have a workaround using ~, but ...
1
vote
1answer
240 views

Text wrapping in a minibox?

For a class I'm given access to a LaTeX version of the homework so that it's easier to fill out. We're given boxes we're suppose to answer the questions in similar to: \begin{picture}(420,570)(0,0) ...
5
votes
1answer
103 views

Break between words when line becomes too full

This example: \font\standard="Arial Unicode MS" at 10pt \standard \newlanguage\nohyphens \language=\nohyphens \hsize = 150mm \parindent = 0pt \vbox{ \setbox2=\hbox{\hskip12pt‣\hskip3dd} ...