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

learn more… | top users | synonyms (1)

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
375 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
74 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
247 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
105 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} ...
8
votes
1answer
179 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 ...
9
votes
1answer
258 views

How to use less space for ~

In a paper, I need to use the abbreviated form of Figure as in "see Fig. 2". To avoid line breaks between Fig. and the number itself, I place a ~ in between. However in that case, the inserted space ...
1
vote
1answer
834 views

Add a percentage error using siunitx package

I have a problem with the siunitx package. What I would like to do is the following. I have a number which for instance equals 145 and has the units mm. However, there is also an error expressed in ...
7
votes
2answers
1k views

Linebreak of words in math mode

I have some texts in math mode which does not break during justifications. For example, $A_xB_yC_z$ and $D_xE_yC_z$ The above two 'words' if at the end of a line, do not break and disrupts ...
1
vote
1answer
172 views

Resizing and line breaking for individual matrix entries

To make things easy, I have put up a pic here, I do not understand how I can reduce the size of the long entries in the matrix (the diagonal entries primarily) and also introduce line breaks so as ...
4
votes
1answer
108 views

Please help me fix a problem of tabbing

I typed a paragraph in tabbing environment. I use \= to place tab, and \> to move to tab position. It's alright with short line. But with long line, it out of line width. I don't know how can fix ...
0
votes
0answers
117 views

Long math expression in the middle of text exceeds the width page [duplicate]

I have a long math expression in the text, and it exceeds the width page. How can I fix it in middle of text? $x \in \left(10\%, 15\%, 20\%, 30\%, 40\%, 50\%, 60\%, 70\%, 80\%, 90\%\right)$
3
votes
0answers
30 views

Deleting new line when beginning new theorem in a list [duplicate]

I am using the package amsthm to type my assignments and I have encountered the following problem. Here's the code I use: \newtheorem{claim}{Claim} : : \begin{enumerate} \item \begin{claim} ...
1
vote
1answer
43 views

Prevent line break at one specific spot

I have \myDefineTerm{longFunctionName}($\pi$).... and want to tell LaTeX not to break the line just before the open bracket. Is there something like ~ that pretent a line break, but does not cause ...
2
votes
2answers
56 views

\item that starts with a number doesn't work with style=nextline

I've got a list of items and use style=nextline. Problem is, when a list-item starts with a number, the nextline doesn't work: \begin{example}[style=nextline] \item[3D] Doesn't line-break before ...
2
votes
1answer
290 views

Title in subfloat without line-break

My code is like this, but the title of subfigure is with line-break, which looks very ugly? How can I solve it? \begin{figure}[!ht] \centering \subfloat[Subgraph]{ \label{fig:subg} ...
1
vote
1answer
528 views

\medskip doesn't seem to work

I've just begun using TeXShop but seem to have come across a problem - I have a centered section that uses a \medskip right after a newline. Like so: \begin{center} Some text \\ Some subheading \#1\\ ...
3
votes
1answer
110 views

Overlong line even with suggestions for hyphenation

I have a paragraph which starts with \documentclass[a4paper,11pt,twoside]{book} \setlength{\textwidth}{14.6cm} \hyphenation{MnTPPCl CoTPP} \begin{document} We studied surface doping with the ...
1
vote
0answers
85 views

How to set word wrap for enumerate items in booklet?

The code below is based on the code from booklet manual Chapter 2. I used the enumerate environment. The problem is that words are stretching out of the paper. It won't break line automatically: I ...
0
votes
1answer
137 views

how to break lines in a table?

my code is here \begin{table}[t] \centering \bgroup \def\arraystretch{1.2} \begin{tabular}{|c|c|c|} \hline Frucht graph & Graph $K_3$ & An homomorphism from Frucht graph to $K_3$\\ ...
4
votes
2answers
177 views

Math-mode overrun in newtheorem

I would like to have a long math-mode "title" in a newtheorem environment: \documentclass[twocolumn]{article} \usepackage{amsthm} \newtheorem{definition}{Definition} \begin{document} ...
9
votes
3answers
147 views

Box with adaptive length

When I want to put formulas into boxes, I like the box to adapt to the length of my formula. For example, I don't want to put $1+1=2$ in a very large box. To address this, I use the command \encadrer ...
8
votes
2answers
297 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 ...
4
votes
1answer
228 views

BibTeX (TeX Live 2013) doesn't escape & in url

BibTeX (TeX Live 2013 on ubuntu) doesn't escape the & specifically in urls. The % escapes but not &. For example I have the following reference: @article{benson1975, title = {The ...
7
votes
3answers
176 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, ...
3
votes
1answer
114 views

breaking lines in listings enviroment

I am trying to make listing enviroment brake lines. Unfortunately breaklines=true does not work for me. Here is my code: \usepackage{listings} \begin{document} ...
0
votes
1answer
172 views

PDF not generated but I see no error!

I am having a lot of trouble adding png images and also with hyphenations, All of a suddent I was adding the following tkiz scheme and when I add the lattest part I started getting a bunch of ...
2
votes
1answer
89 views

Text in itemize goes onto margin and doesnt align with other text

I'm having some problems with margins. \usepackage[top=2.5cm, headsep=0.4cm, bottom=2.5cm,left=2.5cm, right=2.5cm]{geometry} \geometry{bindingoffset=5mm} When I use itemize, the text doesn't align ...
4
votes
0answers
220 views

How to line-break cites correctly (hanging-over problem)?

while using Bibtex, I experienced an frustrating issue with line-breaks on cites in my block text. I have chosen to use the following bibtex implementation: \bibliographystyle{plain} ...
5
votes
1answer
70 views

Processing a particular line of text in a document

My question points actually to a particular problem, as opposed to the more general type of problem suggested in the title -- which would nevertheless be interesting to me to see answered: I'd like to ...
5
votes
0answers
451 views

break lines in minted code

Thanks to this question minted is able to break long source code lines. It is working really fantastic, except in one case: When already indented code gets breaked into two lines, than line two gets ...
1
vote
2answers
112 views

Line break in large formula and error message in align?

I have a very long align formula and I do not know how to optimally (that it looks good and is accetable with LaTeX rules) line-break this. Currently I have \begin{align*} ...
3
votes
1answer
176 views

Can't insert newlines in the code listing

I am currently trying to insert a batch file programming code in my report. I am using the code listing. I am not able to add new lines to format my code! I have following code example yet: ...
4
votes
1answer
74 views

Discourage linebreaks before/after math

I would like to discourage linebreaks right before and after inline math displays, such that now let $f$ be the function that connects acts similar to now let~$f$~be the function that connects ...
5
votes
1answer
505 views

Overfull hbox in tabular

In the following (M)WE, the tabular version of the Contact information from a CV gives an overfull hbox warning when compiled with pdfLatex, but the minipage version does not. Why? I have not found a ...
0
votes
0answers
57 views

Breaking line inside tikz node [duplicate]

I have the following code. I cannot for the life of me find a way to lay the table under the pink figure .. \documentclass{article} \usepackage[english]{babel} \usepackage{tikz} ...
11
votes
1answer
90 views

remove endashes at linebreaks

I want to typeset a paragraph of endash-separated expressions, like this \documentclass{article} \setlength{\parindent}{0pt} \begin{document} \centering test -- test -- test -- test -- test -- test ...
6
votes
2answers
414 views

Manual linebreak with justification but without empty line afterwards

What do I write at the end of a paragraph if my text is a couple letters short of being flush from left to right and I want the last line stretched slightly so that no empty space is left that the ...
7
votes
2answers
230 views

How can I effect line breaks within the title without hardcoding \\'s in \title?

Although I do need line breaks within my title for my document's title page (I'm using the book class), I'd like to avoid hardcoding line breaks in the argument passed to the \title command, for three ...
3
votes
1answer
119 views

Retain line breaking behaviour inside macro

I use a macro which just wraps its argument in a pair of delimiters (brackets). It interferes with the way LaTeX would normally wrap an inline math expression. The following illustrates: ...
9
votes
1answer
99 views

Macro to capture until end-of-line as argument

Is it possible to capture the contents to the end-of-line as a macro argument? For example, consider the following naive visualization: \documentclass{article} \newenvironment{myitemize} ...
3
votes
1answer
59 views

Error with nested environment and forced linebreak inside tabbing

I reduced the offending code to this: \documentclass[12pt,a4paper,notitlepage]{report} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \begin{document} \newenvironment{foo}{}{} ...
4
votes
1answer
233 views

URL linebreaks W/O \sloppy

Hours of reading the different articles on url linebreaking did not reveal a solution for the following problem: I've got a long url, which I do not intend to short using online services. The url ...
5
votes
1answer
227 views

Textsuperscript and linebreak problem

I got a problem when doing cites and linebreaks. I configured natbib the following way: \usepackage{babelbib} \usepackage[super,square,numbers,sort&compress]{natbib} Now, citing multiple ...
4
votes
1answer
212 views

Hyphenate long acronyms

I'm using the package acronym but I have a problem. I have a very long acronym "ADD1/SREBP1". I defined it like this: \acro{srebp}[ADD1/\-SREBP1]{adipocyte determination-and differentiation-dependent ...
1
vote
1answer
323 views

Can not force \newline within \longtable

\begin{table}[htbp] \begin{tabular}{p{3cm}|p{1.5cm}|p{8cm}} A \newline B & C \newline D & E \\ \end{tabular} I tried creating a table as shown in the above MWE, the table is longer than 1 ...
3
votes
1answer
203 views

Multiline Inferences / Rules / Axioms in Bussproofs

I have a proof that I need to set in LaTeX, and to do so I am using the bussproofs package. However my proof has large amounts of free text in it, which makes the proof overly wide. Is there a way to ...
1
vote
1answer
1k views

Break a subfigure set in two lines

Is it possible to break a figure block made by three subfigures in two lines? I would like to maintain the first subfigure on the first line and the other subfigures on the second line. ...
16
votes
3answers
716 views

Rounded box around placeholder text that supports line breaking

I want to draw a rounded box around a piece of text like that: The left and right borders should be half circles and line breaking should be supported. This my code so far: \setuppapersize[A7] ...